fixes, format changes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2035 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
1d990eab9a
commit
3aac535b07
1 changed files with 134 additions and 106 deletions
|
@ -1,45 +1,14 @@
|
||||||
!define MUI_PRODUCT "NSIS"
|
;NSIS Setup Script
|
||||||
!define MUI_VERSION "2.0b1 (CVS)"
|
|
||||||
|
|
||||||
!define MUI_NAME "Nullsoft Install System ${MUI_VERSION}" ;Installer name
|
|
||||||
|
|
||||||
!define VER_MAJOR 2
|
!define VER_MAJOR 2
|
||||||
!define VER_MINOR 0b1
|
!define VER_MINOR 0b1
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Configuration
|
||||||
|
|
||||||
OutFile ..\nsis${VER_MAJOR}${VER_MINOR}.exe
|
OutFile ..\nsis${VER_MAJOR}${VER_MINOR}.exe
|
||||||
|
|
||||||
SetCompressor bzip2
|
SetCompressor bzip2
|
||||||
|
|
||||||
!ifndef CLASSIC_UI
|
|
||||||
|
|
||||||
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
|
|
||||||
|
|
||||||
!define MUI_WELCOMEPAGE
|
|
||||||
!define MUI_LICENSEPAGE
|
|
||||||
!define MUI_COMPONENTSPAGE
|
|
||||||
!define MUI_DIRECTORYPAGE
|
|
||||||
!define MUI_FINISHPAGE
|
|
||||||
|
|
||||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Docs\index.html"
|
|
||||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
|
||||||
!define MUI_UNINSTALLER
|
|
||||||
!define MUI_UNCONFIRMPAGE
|
|
||||||
|
|
||||||
;NSIS updates no system files
|
|
||||||
!define MUI_TEXT_WELCOME_INFO "\r\n\r\nThis will install ${MUI_PRODUCT} on your computer.\r\n\r\n\r\n\r\n"
|
|
||||||
|
|
||||||
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
|
|
||||||
!insertmacro MUI_SYSTEM
|
|
||||||
|
|
||||||
!endif
|
|
||||||
|
|
||||||
LicenseData ..\license.txt
|
|
||||||
|
|
||||||
InstType "Full (w/ Source and Contrib)"
|
InstType "Full (w/ Source and Contrib)"
|
||||||
InstType "Normal (w/ Contrib, w/o Source)"
|
InstType "Normal (w/ Contrib, w/o Source)"
|
||||||
InstType "Lite (w/o Source or Contrib)"
|
InstType "Lite (w/o Source or Contrib)"
|
||||||
|
@ -52,9 +21,61 @@ SetDateSave on
|
||||||
InstallDir $PROGRAMFILES\NSIS
|
InstallDir $PROGRAMFILES\NSIS
|
||||||
InstallDirRegKey HKLM SOFTWARE\NSIS ""
|
InstallDirRegKey HKLM SOFTWARE\NSIS ""
|
||||||
|
|
||||||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
;--------------------------------
|
||||||
!insertmacro MUI_RESERVEFILE_SPECIALINI
|
!ifndef CLASSIC_UI
|
||||||
!insertmacro MUI_RESERVEFILE_SPECIALBITMAP
|
|
||||||
|
;Include Modern UI Macro's
|
||||||
|
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Modern UI Configuration
|
||||||
|
|
||||||
|
!define MUI_PRODUCT "NSIS"
|
||||||
|
!define MUI_VERSION "2.0b1 (CVS)"
|
||||||
|
|
||||||
|
!define MUI_NAME "Nullsoft Install System ${MUI_VERSION}" ;Installer name
|
||||||
|
|
||||||
|
!define MUI_WELCOMEPAGE
|
||||||
|
!define MUI_LICENSEPAGE
|
||||||
|
!define MUI_COMPONENTSPAGE
|
||||||
|
!define MUI_DIRECTORYPAGE
|
||||||
|
!define MUI_FINISHPAGE
|
||||||
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Docs\index.html"
|
||||||
|
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||||
|
|
||||||
|
!define MUI_ABORTWARNING
|
||||||
|
|
||||||
|
!define MUI_UNINSTALLER
|
||||||
|
!define MUI_UNCONFIRMPAGE
|
||||||
|
|
||||||
|
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"
|
||||||
|
|
||||||
|
;Modern UI System
|
||||||
|
!insertmacro MUI_SYSTEM
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Languages
|
||||||
|
|
||||||
|
!define MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the installation of the ${MUI_PRODUCT}, a scriptable win32 installer/uninstaller system that doesn't suck and isn't huge.\r\n\r\n\r\n"
|
||||||
|
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Reserve Files
|
||||||
|
|
||||||
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
||||||
|
!insertmacro MUI_RESERVEFILE_SPECIALINI
|
||||||
|
!insertmacro MUI_RESERVEFILE_SPECIALBITMAP
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Data
|
||||||
|
|
||||||
|
LicenseData ..\license.txt
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Installer Sections
|
||||||
|
|
||||||
Section "NSIS Development System (required)" SecCore
|
Section "NSIS Development System (required)" SecCore
|
||||||
SectionIn 1 2 3 RO
|
SectionIn 1 2 3 RO
|
||||||
|
@ -514,71 +535,6 @@ SectionEnd
|
||||||
SubSectionEnd
|
SubSectionEnd
|
||||||
SubSectionEnd
|
SubSectionEnd
|
||||||
|
|
||||||
!define SF_SELECTED 1
|
|
||||||
|
|
||||||
!macro secSelected SEC
|
|
||||||
SectionGetFlags ${SEC} $R7
|
|
||||||
IntOp $R7 $R7 & ${SF_SELECTED}
|
|
||||||
StrCmp $R7 ${SF_SELECTED} 0 +2
|
|
||||||
IntOp $R0 $R0 + 1
|
|
||||||
!macroend
|
|
||||||
|
|
||||||
Function .onInit
|
|
||||||
!insertmacro MUI_WELCOMEFINISHPAGE_INIT
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function .onSelChange
|
|
||||||
StrCpy $R0 0
|
|
||||||
!insertmacro secSelected ${SecContribSplashTS}
|
|
||||||
!insertmacro secSelected ${SecContribBannerS}
|
|
||||||
!insertmacro secSelected ${SecContribBgImageS}
|
|
||||||
!insertmacro secSelected ${SecContribIOS}
|
|
||||||
!insertmacro secSelected ${SecContribLangDLLS}
|
|
||||||
!insertmacro secSelected ${SecContribnsExecS}
|
|
||||||
!insertmacro secSelected ${SecContribNSISdlS}
|
|
||||||
!insertmacro secSelected ${SecContribSplashS}
|
|
||||||
!insertmacro secSelected ${SecContribStartMenuS}
|
|
||||||
!insertmacro secSelected ${SecContribUserInfoS}
|
|
||||||
SectionGetFlags ${SecSrcEx} $R7
|
|
||||||
StrCmp $R0 0 notRequired
|
|
||||||
IntOp $R7 $R7 | ${SF_SELECTED}
|
|
||||||
SectionSetFlags ${SecSrcEx} $R7
|
|
||||||
SectionSetText ${SecSrcEx} "ExDLL Source (required)"
|
|
||||||
Goto done
|
|
||||||
notRequired:
|
|
||||||
SectionSetText ${SecSrcEx} "ExDLL Source"
|
|
||||||
done:
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function AddContribToStartMenu
|
|
||||||
Pop $0 ; link
|
|
||||||
Pop $1 ; file
|
|
||||||
IfFileExists $INSTDIR\Contrib\$1 0 +2
|
|
||||||
CreateShortCut $SMPROGRAMS\NSIS\Contrib\$0.lnk $INSTDIR\Contrib\$1
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function AddWorkspaceToStartMenu
|
|
||||||
Pop $0
|
|
||||||
IfFileExists $INSTDIR\Contrib\$0\$0.dsw 0 done
|
|
||||||
Push $0\$0.dsw
|
|
||||||
Push "Source\$0 project workspace"
|
|
||||||
Call AddContribToStartMenu
|
|
||||||
done:
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function AddReadmeToStartMenu
|
|
||||||
Pop $0
|
|
||||||
IfFileExists $INSTDIR\Contrib\$0\$0.txt 0 +3
|
|
||||||
Push $0\$0.txt
|
|
||||||
Goto create
|
|
||||||
IfFileExists $INSTDIR\Contrib\$0\Readme.txt 0 done
|
|
||||||
Push $0\Readme.txt
|
|
||||||
create:
|
|
||||||
Push "$0 readme"
|
|
||||||
Call AddContribToStartMenu
|
|
||||||
done:
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Section -post
|
Section -post
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
WriteRegStr HKLM SOFTWARE\NSIS "" $INSTDIR
|
WriteRegStr HKLM SOFTWARE\NSIS "" $INSTDIR
|
||||||
|
@ -708,6 +664,9 @@ Section -post
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Descriptions
|
||||||
|
|
||||||
!ifndef CLASSIC_UI
|
!ifndef CLASSIC_UI
|
||||||
|
|
||||||
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
|
||||||
|
@ -758,6 +717,73 @@ SectionEnd
|
||||||
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Installer Functions
|
||||||
|
|
||||||
|
!define SF_SELECTED 1
|
||||||
|
|
||||||
|
!macro secSelected SEC
|
||||||
|
SectionGetFlags ${SEC} $R7
|
||||||
|
IntOp $R7 $R7 & ${SF_SELECTED}
|
||||||
|
StrCmp $R7 ${SF_SELECTED} 0 +2
|
||||||
|
IntOp $R0 $R0 + 1
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
Function .onSelChange
|
||||||
|
StrCpy $R0 0
|
||||||
|
!insertmacro secSelected ${SecContribSplashTS}
|
||||||
|
!insertmacro secSelected ${SecContribBannerS}
|
||||||
|
!insertmacro secSelected ${SecContribBgImageS}
|
||||||
|
!insertmacro secSelected ${SecContribIOS}
|
||||||
|
!insertmacro secSelected ${SecContribLangDLLS}
|
||||||
|
!insertmacro secSelected ${SecContribnsExecS}
|
||||||
|
!insertmacro secSelected ${SecContribNSISdlS}
|
||||||
|
!insertmacro secSelected ${SecContribSplashS}
|
||||||
|
!insertmacro secSelected ${SecContribStartMenuS}
|
||||||
|
!insertmacro secSelected ${SecContribUserInfoS}
|
||||||
|
SectionGetFlags ${SecSrcEx} $R7
|
||||||
|
StrCmp $R0 0 notRequired
|
||||||
|
IntOp $R7 $R7 | ${SF_SELECTED}
|
||||||
|
SectionSetFlags ${SecSrcEx} $R7
|
||||||
|
SectionSetText ${SecSrcEx} "ExDLL Source (required)"
|
||||||
|
Goto done
|
||||||
|
notRequired:
|
||||||
|
SectionSetText ${SecSrcEx} "ExDLL Source"
|
||||||
|
done:
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function AddContribToStartMenu
|
||||||
|
Pop $0 ; link
|
||||||
|
Pop $1 ; file
|
||||||
|
IfFileExists $INSTDIR\Contrib\$1 0 +2
|
||||||
|
CreateShortCut $SMPROGRAMS\NSIS\Contrib\$0.lnk $INSTDIR\Contrib\$1
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function AddWorkspaceToStartMenu
|
||||||
|
Pop $0
|
||||||
|
IfFileExists $INSTDIR\Contrib\$0\$0.dsw 0 done
|
||||||
|
Push $0\$0.dsw
|
||||||
|
Push "Source\$0 project workspace"
|
||||||
|
Call AddContribToStartMenu
|
||||||
|
done:
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function AddReadmeToStartMenu
|
||||||
|
Pop $0
|
||||||
|
IfFileExists $INSTDIR\Contrib\$0\$0.txt 0 +3
|
||||||
|
Push $0\$0.txt
|
||||||
|
Goto create
|
||||||
|
IfFileExists $INSTDIR\Contrib\$0\Readme.txt 0 done
|
||||||
|
Push $0\Readme.txt
|
||||||
|
create:
|
||||||
|
Push "$0 readme"
|
||||||
|
Call AddContribToStartMenu
|
||||||
|
done:
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Uninstaller Section
|
||||||
|
|
||||||
Section Uninstall
|
Section Uninstall
|
||||||
IfFileExists $INSTDIR\makensis.exe skip_confirmation
|
IfFileExists $INSTDIR\makensis.exe skip_confirmation
|
||||||
MessageBox MB_YESNO "It does not appear that NSIS is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)" IDYES skip_confirmation
|
MessageBox MB_YESNO "It does not appear that NSIS is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)" IDYES skip_confirmation
|
||||||
|
@ -809,7 +835,9 @@ Section Uninstall
|
||||||
RMDir /r $INSTDIR\Docs
|
RMDir /r $INSTDIR\Docs
|
||||||
RMDir $INSTDIR
|
RMDir $INSTDIR
|
||||||
|
|
||||||
!ifndef CLASSIC_UI
|
!ifndef CLASSIC_UI
|
||||||
!insertmacro MUI_UNFINISHHEADER
|
;Modern UI Finish Header
|
||||||
!endif
|
!insertmacro MUI_UNFINISHHEADER
|
||||||
|
!endif
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
Loading…
Add table
Add a link
Reference in a new issue