Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   not a valid win32 application (http://forums.winamp.com/showthread.php?t=337847)

ptz 20th November 2011 15:13

not a valid win32 application
 
I'm compiling and running the following test script:
Quote:

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 15:43

tried the full path to hello_world.nsi?

Anders 20th November 2011 15:50

NSIS version?
Unicode NSIS? (I have seen this happen with the latest unicode version)

ptz 20th November 2011 17:07

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 20th November 2011 23:06

Or just extract an empty file to $PLUGINSDIR or something.

Stu

T.Slappy 21st November 2011 04:47

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 07:36

Quote:

Originally Posted by T.Slappy (Post 2819998)
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 12:52

So yeah, works fine in unicode 2.46.

Anders 24th November 2011 19:28

Quote:

Originally Posted by ptz (Post 2820932)
So yeah, works fine in unicode 2.46.

You mean 2.46.2 or .1? I only tested .3...


All times are GMT. The time now is 17:47.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.