summaryrefslogtreecommitdiff
path: root/Examples/makensis.nsi
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/makensis.nsi')
-rwxr-xr-xExamples/makensis.nsi29
1 files changed, 18 insertions, 11 deletions
diff --git a/Examples/makensis.nsi b/Examples/makensis.nsi
index 77e5902..d2598f1 100755
--- a/Examples/makensis.nsi
+++ b/Examples/makensis.nsi
@@ -11,7 +11,7 @@
;--------------------------------
;Configuration
-!ifdef NSIS_MAKENSIS64
+!if ${NSIS_PTR_SIZE} > 4
!define BITS 64
!define NAMESUFFIX " (64 bit)"
!else
@@ -124,7 +124,7 @@ VIAddVersionKey "LegalCopyright" "http://nsis.sf.net/License"
;Installer Sections
!macro InstallPlugin pi
- !ifdef NSIS_MAKENSIS64
+ !if ${BITS} >= 64
File "/oname=$InstDir\Plugins\amd64-unicode\${pi}.dll" ..\Plugins\amd64-unicode\${pi}.dll
!else
File "/oname=$InstDir\Plugins\x86-ansi\${pi}.dll" ..\Plugins\x86-ansi\${pi}.dll
@@ -133,7 +133,7 @@ VIAddVersionKey "LegalCopyright" "http://nsis.sf.net/License"
!macroend
!macro InstallStub stub
- !ifdef NSIS_MAKENSIS64
+ !if ${BITS} >= 64
File ..\Stubs\${stub}-amd64-unicode
!else
File ..\Stubs\${stub}-x86-ansi
@@ -161,7 +161,7 @@ ${MementoSection} "NSIS Core Files (required)" SecCore
File ..\makensisw.exe
File ..\COPYING
File ..\NSIS.chm
- !searchparse /file "..\NSIS.chm" "ITSF" VALIDATE_CHM
+ !pragma verifychm "..\NSIS.chm"
File ..\NSIS.exe
!if /FileExists "..\NSIS.exe.manifest"
File "..\NSIS.exe.manifest"
@@ -237,11 +237,19 @@ ${MementoSection} "NSIS Core Files (required)" SecCore
SetOutPath $INSTDIR\Bin
File ..\Bin\LibraryLocal.exe
- File ..\Bin\RegTool.bin
+ !if ${BITS} >= 64
+ File /NonFatal ..\Bin\RegTool-x86.bin
+ File ..\Bin\RegTool-amd64.bin
+ !else
+ File ..\Bin\RegTool-x86.bin
+ !if /FileExists ..\Bin\RegTool-amd64.bin ; It is unlikely that this exists, avoid the /NonFatal warning.
+ File ..\Bin\RegTool-amd64.bin
+ !endif
+ !endif
CreateDirectory $INSTDIR\Plugins\x86-ansi
CreateDirectory $INSTDIR\Plugins\x86-unicode
- !ifdef NSIS_MAKENSIS64
+ !if ${BITS} >= 64
CreateDirectory $INSTDIR\Plugins\amd64-unicode
!endif
!insertmacro InstallPlugin TypeLib
@@ -497,11 +505,10 @@ ${MementoSection} "Language Files" SecLangFiles
SetOutPath $INSTDIR\Bin
File ..\Bin\MakeLangID.exe
- !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
- mui:
+ ${If} ${SectionIsSelected} ${SecInterfacesModernUI}
SetOutPath "$INSTDIR\Contrib\Language files"
File "..\Contrib\Language files\*.nsh"
- nomui:
+ ${EndIf}
${MementoSectionEnd}
@@ -787,13 +794,13 @@ Section -post
DetailPrint "Configuring Modern UI..."
SetDetailsPrint listonly
- ${If} ${SectionIsSelected} ${SecLangFiles}
+ ${IfNot} ${SectionIsSelected} ${SecLangFiles}
SetOutPath "$INSTDIR\Contrib\Language files"
File "..\Contrib\Language files\English.nlf"
File "..\Contrib\Language files\English.nsh"
${EndIf}
- ${If} ${SectionIsSelected} ${SecGraphics}
+ ${IfNot} ${SectionIsSelected} ${SecGraphics}
SetOutPath $INSTDIR\Contrib\Graphics\Checks
File "..\Contrib\Graphics\Checks\modern.bmp"
SetOutPath $INSTDIR\Contrib\Graphics\Icons