Hello,
I´ve a problem with the following code in onInit:
---------------
StrCmp $IsUpdate False +1 +2
!insertmacro MUI_LANGDLL_DISPLAY
---------------
I want to show the language dialog if the installation is not an update. But it doesn´t matter which value $IsUpdate has.
If the variabel $IsUpdate is true or false the code "!insertmacro MUI_LANGDLL_DISPLAY" will be executed every time.
The next code works, but it is not really correct because the last line will be skipped if there is any code:
---------------
StrCmp $IsUpdate False +1 +3
!insertmacro MUI_LANGDLL_DISPLAY
---------------
This works to correctly without any problems:
---------------
StrCmp $IsUpdate False ShowLanguageDialog DontShowLanguageDialog
ShowLanguageDialog:
!insertmacro MUI_LANGDLL_DISPLAY
DontShowLanguageDialog:
---------------
Is the first version a bug?
Best regards
Rainer
Bug: StrCmp + MUI_LANGDLL_DISPLAY
4 posts
What is False?
StrCmp $IsUpdate False +1 +2
you can't do relative jumps over a macro, you don't know how many instructions the macro has, so you must use labels or even better, logiclib.nsh:
${If} $IsUpdate == "False"
!insertmacro xxxxx
${EndIf}
${If} $IsUpdate == "False"
!insertmacro xxxxx
${EndIf}
Hello,
yes you are right. I though that +1 is a relative jump so that the macro code should be ignored. Now I use Labels...
Kind regards
Rainer
yes you are right. I though that +1 is a relative jump so that the macro code should be ignored. Now I use Labels...
Kind regards
Rainer