Hi, I have been writing a program in masm and now I would like to share it with a few other people. I have never actually done this so I was wondering, should I write an installer? can i be sure that my code will work on any other windows system ? What about antiviruses thinking my program has bad intentions ? (my own antivirus usually thinks my programs in masm are malicious.. even though they aren't).
So how do I go about installing a masm program ?
thanks in advance
Ps: i added the source files and the program (in case anyone is interested...) (beware quite messy source code)
I believe that you cannot make commercial use of your program but Huch will tell you more.
See this (http://www.masm32.com/licence.htm) it's the licence.
Nice RubikCube.
The mouse is hidden while selecting the menu (windows 10 Pro)
I don't want to use it for commercial purposes. Just as a usefull tool for people. The program contains some more features which are 'hidden'. if the user presses enter a random configuration appears between start and end (or linear if selected). If a bool is checked inside the code (the edit bool) the user can change a color of the cube and save it to a file so it can be added to the configurations.
Right now I am having problems with antialiasing and I am not completely satisfied with the mouse input.
And i don't know why the mouse is being hidden in windows 10 (I have windows 7 myself)
Hi gelatine1,
QuoteI have never actually done this so I was wondering, should I write an installer?
No need of an installer if your application is only one executable.
Quotecan i be sure that my code will work on any other windows system ?
To be sure, you need to test it on different versions of Windows.
QuoteWhat about antiviruses thinking my program has bad intentions ? (my own antivirus usually thinks my programs in masm are malicious.. even though they aren't).
You can instruct your antivirus to ignore the case - place the application to the exceptions list if it's possible.
Quote from: Vortex on January 29, 2016, 07:06:55 AM
QuoteWhat about antiviruses thinking my program has bad intentions ? (my own antivirus usually thinks my programs in masm are malicious.. even though they aren't).
You can instruct your antivirus to ignore the case - place the application to the exceptions list if it's possible.
Yes I can do that for myself but not for them. I don't want people to think they downloaded a malicious program from me while it isn't. So I rather have something that asks the user "do you trust this application?" instead of antivirus shouting "danger!"
QuoteSo I rather have something that asks the user "do you trust this application?"
Technically, one can never be 100% sure. You can also use a sandbox application to protect your system.
Hi gelatine1,
When using the mouse nothing happens, only the keyboard works.
Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz
Windows 8.1
Quote from: Siekmanski on January 29, 2016, 07:30:50 AM
Hi gelatine1,
When using the mouse nothing happens, only the keyboard works.
Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz
Windows 8.1
Well using the mouse you should click on a certain square, keep the mouse pressed, move it to another square and release there (make sure the line between the two would represent a valid cube turn)? if this still doesn't work It's probably got to do something with the color picking maybe it's reading another alpha value somewhere or i don't know :/
I decided to give up on the ray picking i was trying before :p
It doesn't work on my PC :(
Could you see in odbg what the value of startalpha is right after clicking some of the green faces? It should be between 9 and 17. The source code for that should be around line 1000 in cube.asm or simply search WM_LBUTTONDOWN. If the alpha values are not being read correctly then its obviously not working because of that..
Otherwise you could try to remove the whole WM_MOUSEMOVE message code (if you have some spare time ofcourse). As that code could possibly be messing with the moved bool...
The mouse not working is obviously a big issue :S
Can you post these missing files...
../glMacros/gl.mac ( gl.def line 1416 )
../glMacros/glu.mac ( glu.def line 250 )
..\macros\mymacro.asm ;macros ( cube.asm line 26 )
Hi gelatine1,
The only limit on code written in MASM32 is you cannot give it away to a different licencing system (GPL and similar). What you write is your own property, its up to you as to whether you supply the source code and you can sell it or give it away. The reason for the restriction on making code GPL is because nothing in the MASM32 SDK is owned by the GNU organisation so their rules of forced supply of code cannot be applied.
RE the executable file, make sure you supply a manifest with it and a resource based version control block. This will ensure that most AV scanners and the OS will not have any problems with it.
Quote from: hutch-- on January 29, 2016, 01:39:12 PMRE the executable file, make sure you supply a manifest with it and a resource based version control block. This will ensure that most AV scanners and the OS will not have any problems with it.
Reason is obviously that virus writers do not know what a manifest and a VCB are 8)
Quote from: Siekmanski on January 29, 2016, 10:50:39 AM
Can you post these missing files...
../glMacros/gl.mac ( gl.def line 1416 )
../glMacros/glu.mac ( glu.def line 250 )
..\macros\mymacro.asm ;macros ( cube.asm line 26 )
Sorry.... totally forgot about the macro's. new zip file with macros in attachment. thank you alot for trying to help.
Quote from: hutch-- on January 29, 2016, 01:39:12 PM
Hi gelatine1,
The only limit on code written in MASM32 is you cannot give it away to a different licencing system (GPL and similar).
I have basically no knowledge about licencing systems or whatsoever but I assume I can't do anything wrong by not doing anything at all..? (for this)
Quote from: hutch-- on January 29, 2016, 01:39:12 PM
RE the executable file, make sure you supply a manifest with it and a resource based version control block. This will ensure that most AV scanners and the OS will not have any problems with it.
Where could i find good information on those topics (how to create them)?
Thanks in advance
Can you also post your msvcrt.lib and msvcrt.inc ?
I'm afraid I do not have msvcrt.lib... the .inc file was just in the masm include folder...
But I see the msvcrt.lib is being included in my file but it's really not there...
how can I include a file thats apparently not existing ?? What sorcery is this ?
i do have msvcrt.dll maybe that's it ?
Quote from: gelatine1 on January 30, 2016, 03:30:48 AM
I'm afraid I do not have msvcrt.lib
\Masm32\lib\msvcrt.lib is part of the Masm32 package.
Quote from: jj2007 on January 30, 2016, 04:06:34 AM
Quote from: gelatine1 on January 30, 2016, 03:30:48 AM
I'm afraid I do not have msvcrt.lib
\Masm32\lib\msvcrt.lib is part of the Masm32 package.
I guess I'll reinstall masm then as it is really not there..
Quote
Where could i find good information on those topics (how to create them)?
resource based version control block :it is a VERSIONINFO resource,good information in this forum
manifest ,good information http://masm32.com/board/index.php?topic=1235.msg11991#msg11991
Lazy method for manifest is to let's it done by visual studio,compiling your project with it,when he is finished.
There is a tool who create them,Mt.exe.
https://msdn.microsoft.com/fr-fr/library/ms235591.aspx
Using the original msvcrt.lib is also a good soluce to avoid false alerts of antivirus
Hi gelatine1,
A method to build msvcrt.lib :
\masm32\bin\polib.exe /OUT:msvcrt.lib %windir%\system32\msvcrt.dll
As part of the installation, go to the masm32\tools\makecimp directory and run the batch file MAKEVCRT.BAT.
Hi gelatine1
Cool ! Well done .
I built your app from reply #14. Compiles and works fine ! :t
I think there's no need for installer in this case . Just unzip it for the girl you like most ;)
Impressive! :eusa_clap: How I can solve the cube? :biggrin:
Apparently mouse (and menu) don't work in full screen mode, but perfectly in a window. (win7)
Thank you all for the nice feedback :)
Right now Im looking to build the manifest according to the links provided by toutenasm (thanks!) I'm not sure what I should actually use in the xml and resource files to make it better or something..
And I got the msvcrt.lib file back. Hutch is there an essential difference between that and the method provided by vortex ?
Quote from: HSE on January 30, 2016, 07:37:31 AM
Impressive! :eusa_clap: How I can solve the cube? :biggrin:
Apparently mouse (and menu) don't work in full screen mode, but perfectly in a window. (win7)
Oh I have never actually tried the fullscreen mode (to be honest fullscreen modes annoy me very much :p but it was included in the first opengl tutorials so i used it..) I'll try to see if i can fix the mouse there. you could try to solve the cube by randomly doing some moves and in a finite time it will be solved :P
Hi gelatine1,
It never executes the "turn,[startalpha],[endalpha]" proc
Because startalpha and endalpha are always both 255 ( at least on my windows 8.1 PC.... )
I've implemented a messagebox with the alpha values.
Used these params for glReadPixels to show colors and alpha,
GL_UNSIGNED_INT_8_8_8_8 equ 08035h ; not in your includes
invoke glReadPixels,ecx,eax,1,1,GL_RGBA,GL_UNSIGNED_INT_8_8_8_8,addr startalpha
invoke glReadPixels,ecx,eax,1,1,GL_RGBA,GL_UNSIGNED_INT_8_8_8_8,addr endalpha
It only shows the colors and alpha values, it doesn't turn.
Quote from: Siekmanski on January 30, 2016, 08:26:49 PM
Hi gelatine1,
It never executes the "turn,[startalpha],[endalpha]" proc
Because startalpha and endalpha are always both 255 ( at least on my windows 8.1 PC.... )
I've implemented a messagebox with the alpha values.
Used these params for glReadPixels to show colors and alpha,
GL_UNSIGNED_INT_8_8_8_8 equ 08035h ; not in your includes
invoke glReadPixels,ecx,eax,1,1,GL_RGBA,GL_UNSIGNED_INT_8_8_8_8,addr startalpha
invoke glReadPixels,ecx,eax,1,1,GL_RGBA,GL_UNSIGNED_INT_8_8_8_8,addr endalpha
It only shows the colors and alpha values, it doesn't turn.
Alright thanks Siekmanski! I have same issue when I'm in fullscreen so I'll try to see what goes wrong there and maybe that will fix the problem on your pc too.
Okay in some cases the screen was created with only 16 bits per pixel so the alpha channel is ignored or not accurate enough. I changed it now and it works for me in fullscreen now. can you test if it works for you now ?
thanks
Hi Gelatine1!
Now mouse work in full screen, but don't make movements (in any mode). Only the face selected change color ( in some cases become Gray).
Regards. HSE
Same here, no color change.
Quote from: HSE on January 31, 2016, 01:17:58 AM
Hi Gelatine1!
Now mouse work in full screen, but don't make movements (in any mode). Only the face selected change color ( in some cases become Gray).
Regards. HSE
Oh yes that's just a variable called 'edit'. change the value to 0 and build again and the faces will turn. I should make it so one can change it from inside the program though...
Quote from: Siekmanski on January 31, 2016, 01:23:13 AM
Same here, no color change.
I can't really think of what might be wrong then ... Maybe something specific with your graphics card or I don't know :/
Yeah, I can't find it either.
I only checked the alpha values not the whole source code, when I fill all alpha values with zero it reads 255 back.
:t
I had to know why glReadPixels always returned an alpha value of 255 on my PC.
Finally found out why. :biggrin:
Video cards need the PIXELFORMATDESCRIPTOR.cAlphaBits set to 8.
Some work if cAlphaBits is set to 0.
And you do not need the alphaBlend functions to read the alpha values.
Made an example to check it.
So changing PIXELFORMATDESCRIPTOR.cAlphaBits to 8 is the only thing to do to make it work right ? Thanks alot for helping by the way! I've been looking through the files you posted and i was wondering what's the .rap file ?
You're a very good programmer ;)
Yes, that must be the solution.
The .rap file is the project file for RadASM.
That's the programming environment I use.