This has been asked before, this string is used before translations have been loaded. If you want to change the string, use a hex editor...Originally Posted by Redo89 View PostPlease, make possibility of translation of the text for "NSIS Error".
It always in English.... Add opportunity to change the text of this error.
thanks.
NSIS 3.0a0
66 posts
what file to edit hex editor? the compiled installer? It will cause CRC error!
I don't want to disable CRC check
And you are right, about this problem many times wrote. I don't understand why developers can't add opportunity to change this message...
Sorry for bad English!
I don't want to disable CRC check
And you are right, about this problem many times wrote. I don't understand why developers can't add opportunity to change this message...
Sorry for bad English!
in need some advice on how to best debug an installer generated with this alpha version. i have one installer that produces problems: it compiles, but upon running it crashes with no error message whatsoever. i commented out all used plugins (MoreInfo, System and ToolTips) and even the custom UI it uses - no success. a look at process monitor shows a couple of errors/warnings (NAME COLLISION, FILE LOCKED WITH ONLY READERS, FAST IO DISALLOWED and BUFFER OVERFLOW). the installer quits with error code -1073741819 (and google doesn't know about that). i checked with the last working version and it produces the same results in process monitor, but the installer works as desired.
Can you create a minimal sample with the same issue? Does MessageBox in .onInit work? Unicode/Ansi?Originally Posted by Yathosho View Postin need some advice on how to best debug an installer generated with this alpha version. i have one installer that produces problems: it compiles, but upon running it crashes with no error message whatsoever. i commented out all used plugins (MoreInfo, System and ToolTips) and even the custom UI it uses - no success. a look at process monitor shows a couple of errors/warnings (NAME COLLISION, FILE LOCKED WITH ONLY READERS, FAST IO DISALLOWED and BUFFER OVERFLOW). the installer quits with error code -1073741819 (and google doesn't know about that). i checked with the last working version and it produces the same results in process monitor, but the installer works as desired.
okay, thanks to your advise i could narrow down the problemOriginally Posted by Anders View PostCan you create a minimal sample with the same issue? Does MessageBox in .onInit work? Unicode/Ansi?
1. it works when i compile an ansi version
2. when i compile a unicode version, this segment is causing the problem:
${If} ${AtLeastWin2000}
StrCpy "$settingsINI" "$APPDATA\RunWithParameters\settings.ini"
StrCpy "$historyINI" "$APPDATA\RunWithParameters\history.ini"
StrCpy "$defaultsINI" "$APPDATA\RunWithParameters\defaults.ini"
IfFileExists "$APPDATA\RunWithParameters\mydefaults.ini" 0 +2
StrCpy "$mydefaultsINI" "$APPDATA\RunWithParameters\mydefaults.ini"
${ElseIf} ${AtMostWinME}
StrCpy "$settingsINI" "$EXEDIR\settings.ini"
StrCpy "$historyINI" "$EXEDIR\history.ini"
StrCpy "$defaultsINI" "$EXEDIR\defaults.ini"
IfFileExists "$EXEDIR\mydefaults.ini" 0 +2
StrCpy "$mydefaultsINI" "$EXEDIR\mydefaults.ini"
${EndIf}Does not crash for me (tested in a section), please provide a full .nsiOriginally Posted by Yathosho View Post2. when i compile a unicode version, this segment is causing the problem:
As far as the code goes, what about NT4?
My guess is that the crash is in nsArray, please provide sample code that does not use 3rd-party plugins if you want me to investigate further...Originally Posted by Yathosho View Postsee attachment, should include everything to compile
as i said before, i already tried and commented out all plugins and the ui - to no successOriginally Posted by Anders View PostMy guess is that the crash is in nsArray, please provide sample code that does not use 3rd-party plugins if you want me to investigate further...
By using Messageboxes you can narrow it down to the ForEachIn loop in line 318.
I don't know nsArray, but are you allowed to use StrCpy with it (line 304, 310 and 314)?
I don't know nsArray, but are you allowed to use StrCpy with it (line 304, 310 and 314)?
i'm getting the same problem with this simple script
seems only to happen on my main windows installation (windows 7 with all patches). works just fine in a vm with windows 2003, on virtualized windows 7 i get as far as the messagebox before the program terminates with an error message (see attachment).; Settings ---------------------------------
OutFile "installer_name.exe"
RequestExecutionLevel user
Unicode true
!include LogicLib.nsh
!include WinVer.nsh
; Pages ------------------------------------
Page instfiles
; Sections ---------------------------------
Section "section_name"
Quit
SectionEnd
; Functions --------------------------------
Function .onInit
${If} ${AtLeastWin2000}
MessageBox MB_OK "${__LINE__}"
${EndIf}
FunctionEnd
As said in my previous post, I get a crash on your script with nsArray, which you are mixing with StrCpy.
For the Kernelbase.dll error:
For the Kernelbase.dll error:
Working on the crash now. It appears to be coming from nsArray.
Stu
I very much doubt that this would cause a crash - the value passed to the plug-in at run time should be no different when passing it via a variable or a hard coded string.Originally Posted by jpderuiter View PostI don't know nsArray, but are you allowed to use StrCpy with it (line 304, 310 and 314)?
Stu
the executable runs fine when i comment out the first if-statement in onInit, also the ansi version never caused any problems.Originally Posted by jpderuiter View PostAs said in my previous post, I get a crash on your script with nsArray, which you are mixing with StrCpy
i think the bug is caused by WinVer.nsh. when i comment its line 197, my compiled executable does not crash. this is the line:
System::Call kernel32::GetVersionEx(pr0)i.r3
The last example doesn't crash for me either. Can you maybe attach the compiled installer too?
...
Sorry, my crashes happen because I commented out onGUIInit, because I wanted to test it without parameters.
Yatosho, does your script crash when using /help as parameter?
Yatosho, does your script crash when using /help as parameter?
Fixed the memory access violation in nsArray which occurred in the ForEachIn loop (nsArray::Iterate). I tested by running with /install and then running subsequent debugging executions with the default INI file as an argument. I don't get any crashes now.
Edit: I should mention the crash came about because an invalid array name is being used in your ForEachIn loop - it resulted in a NULL pointer in the plug-in and subsequent violation where validation was missing. This should not be an issue now.
Stu
Edit: I should mention the crash came about because an invalid array name is being used in your ForEachIn loop - it resulted in a NULL pointer in the plug-in and subsequent violation where validation was missing. This should not be an issue now.
Stu
attachedOriginally Posted by jpderuiter View PostThe last example doesn't crash for me either. Can you maybe attach the compiled installer too?
Yatosho, does your script crash when using /help as parameter?[/QUOTE]
yes
ok, i did some more testing as getting different results on different windows installations seemed strange. computer is virus free, so i renamed my old nsis directory (i installed nsis 3 over nsis 2) and did a clean install of 3.0a. now everything compiles and runs fine. still find it a bit weird (ANSI worked, WinVer seems to have caused this), but for me it's sorted. thanks for all advice.
I had problem with an installer, where ANSI worked as opposed to UNICODE, that was caused by WinVer. The installer didn't crash, but the ${If} ${AtLeastWin'X'} conditions failed, UNICODE. Though, unlike in Yathosho's example, my script had a mistake. I was including WinVer.nsh before I declared Unicode true/false.
I thought of posting this earlier in response to Yathosho, but it didn't seem related. Maybe it is (worth looking into)? If the Unicode true declaration comes after an included file, a compiler error message would be in order, even though it's an avoidable mistake. I wonder as well if it should be necessary to declare Unicode when the script file is encoded in UNICODE. Make Unicode an optional command?
I thought of posting this earlier in response to Yathosho, but it didn't seem related. Maybe it is (worth looking into)? If the Unicode true declaration comes after an included file, a compiler error message would be in order, even though it's an avoidable mistake. I wonder as well if it should be necessary to declare Unicode when the script file is encoded in UNICODE. Make Unicode an optional command?
Thanks Yathosho and bnicer for tracking this down.
The compiler should abort if you use a plugin before switching unicode mode but WinVer does some size calculations when you include it and those are later passed to System::Call, I'll try to come up with a fix for this...
The compiler should abort if you use a plugin before switching unicode mode but WinVer does some size calculations when you include it and those are later passed to System::Call, I'll try to come up with a fix for this...
I'm trying to digitally sign the installer using the new !finalize command.
Everything works well as long as I don't use "%1" in the command line. If "%1" is used, makensis.exe crashes...
My code goes like this:
!finalize '"${__FILEDIR__}\SignTool.exe" sign /s MY_CERTSTORE /t "http://timestamp.globalsign.com/scripts/timstamp.dll" /d "Description" /du "http://www.blahblah.com" /v "%1"'
Btw, congratulations for reviving NSIS!
Everything works well as long as I don't use "%1" in the command line. If "%1" is used, makensis.exe crashes...
My code goes like this:
!finalize '"${__FILEDIR__}\SignTool.exe" sign /s MY_CERTSTORE /t "http://timestamp.globalsign.com/scripts/timstamp.dll" /d "Description" /du "http://www.blahblah.com" /v "%1"'
Btw, congratulations for reviving NSIS!
Is there filesize >2GB support in 3.0a?
Or will it come with x64 branch?
Or will it come with x64 branch?
No and I'm guessing no, the top bit is already used to store data...Originally Posted by extremecarver View PostIs there filesize >2GB support in 3.0a?
Or will it come with x64 branch?
thanks for the answer. Well then I hope it will be changed/enabled after x64 intregration sometimes. It would be much better than having the installer call external .zip/7z files (which on top can only be bzip/lzma and not lzma2) to unpack because they don't fit into the 2GB limit.
Just want to say thank you for everyone's work. 🙂
BTW can I use/install both NSIS 2 and NSIS 3 in one PC?
Would like my project to keep running and be able to test NSIS 3 to tell if I found a bug.
So amazing that NSIS 3 exist. Even NSIS 2 is already amaze me. 🙂
BTW can I use/install both NSIS 2 and NSIS 3 in one PC?
Would like my project to keep running and be able to test NSIS 3 to tell if I found a bug.
So amazing that NSIS 3 exist. Even NSIS 2 is already amaze me. 🙂
The startmenu and add/remove programs entries will be taken over, other than that it should not be a problem. Makensis itself does not depend on any kind of system configuration...Originally Posted by yoachan View PostBTW can I use/install both NSIS 2 and NSIS 3 in one PC?
Would like my project to keep running and be able to test NSIS 3 to tell if I found a bug.
So amazing that NSIS 3 exist. Even NSIS 2 is already amaze me. 🙂
are there plans to move the examples (and maybe includes) to the user space? on any modern windows version, the examples won't compile due to lack of privileges. just saying.