ptz
20th November 2011 16:13 UTC
not a valid win32 application
I'm compiling and running the following test script:
OutFile "hello_world.exe"
InstallDir $DESKTOP\hello_world
RequestExecutionLevel user
Page directory
Page instfiles
section ""
SetOutPath $INSTDIR
#File hello_world.nsi
messageBox MB_OK "Hello world!"
sectionEnd
If I uncomment the line "File hello_world.nsi" everything is OK, but as is it produces a "... is not a valid Win32 application" error in runtime. I am a complete beginner both in NSIS and in Windows, and would like to know why this happens. Or at least how to stay away from this problem.
Thanks.
Yathosho
20th November 2011 16:43 UTC
tried the full path to hello_world.nsi?
Anders
20th November 2011 16:50 UTC
NSIS version?
Unicode NSIS? (I have seen this happen with the latest unicode version)
ptz
20th November 2011 18:07 UTC
Yes, Unicode NSIS, latest version (2.46.3). May it be safer to revert to an older release (reverting to ANSI isn't an option).
Afrow UK
21st November 2011 00:06 UTC
Or just extract an empty file to $PLUGINSDIR or something.
Stu
T.Slappy
21st November 2011 05:47 UTC
Is your script called hello_world.nsi and you want to include it in the installer?
It looks like recursion -> file hello_world.nsi is being read by NSIS compiler and also being packed into .resulting exe file.
Try to include some other file like "readme.txt" (create it)
MSG
21st November 2011 08:36 UTC
Originally posted by T.Slappy
Is your script called hello_world.nsi and you want to include it in the installer?
It looks like recursion.
There is no recursion. Including the script is a perfectly legal command.
ptz
24th November 2011 13:52 UTC
So yeah, works fine in unicode 2.46.
Anders
24th November 2011 20:28 UTC
Originally posted by ptz
So yeah, works fine in unicode 2.46.
You mean 2.46.2 or .1? I only tested .3...