Archive: fatal error while compiling


fatal error while compiling
i'm getting error:
"fatal error while compiling myscript.nsi". dialog title
is 4112.
first troubleshooting seems to show it's related to lzma compressor: if i use instead set compressor /solid zlib
i don't get the error.
strange to say, issue arise first time today on a script just a little bit modified.
nothing found in other posts.


Try to reinstall your NSIS!


thanks not there the issue
it's not a problem of nsis installation for sure. still digging into it.
thanks.


What's the exact NSIS version you're using? Can you attach a Dr. Watson log?


the cause was...
...an error by me but don't know if it is normal anyway. i can explain.

i've a nsis script generator&compiler (written in other language) that create the .nsi i need. Inside the nsis script i use the GetVersion function (found somewhere in this forum) to get at compile time the version of main executable. Even the GetVersion function is auto-generated.
Well: there was a bug in the script generator that made the entire getversion function duplicated, but as i launch makensisw /v4 ....getversion.nsi and after that makensiw mainprogram.nsi (which uses GetVersion) at first i didn0t understand what's happened.

Actually i had two '!define File "c:\myapp.exe"'
lines: the error shown was on that.

OutFile "GetVersion.exe"
!define File "c:\myapp.exe"
Function .onInit
GetDllVersion "${File}" $R0 $R1
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
StrCpy $R1 "$R2.$R3.$R4.$R5"
FileOpen $R0 "..\GetVersion.txt" w
FileWrite $R0 '!echo "${File} version: $R1"$\r$\n!define Version "$R1"'
FileClose $R0
Abort
FunctionEnd
Section
SectionEnd


You can use the MoreInfo plugin as replacment for GetVersion for stabler version extracting.

http://nsis.sourceforge.net/wiki/MoreInfo_plugin

Comes with examples and source...


thanks
thanks onad: sounds good.
btw: the link is not working. searching the forum i got MI r1.01...