page commands
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2842 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
efa51b61da
commit
3520ee2e4f
10 changed files with 105 additions and 71 deletions
|
@ -8,7 +8,15 @@
|
||||||
OutFile "UserVars.exe"
|
OutFile "UserVars.exe"
|
||||||
|
|
||||||
InstallDir "$PROGRAMFILES\User Variables Test"
|
InstallDir "$PROGRAMFILES\User Variables Test"
|
||||||
DirText "Choose a folder to install in which to install the test:" " "
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
;Pages
|
||||||
|
Page directory
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
|
UninstPage uninstConfirm
|
||||||
|
UninstPage instfiles
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; Declaration of user variables (Var command), allowed charaters for variables names : [a-z][A-Z][0-9] and '_'
|
; Declaration of user variables (Var command), allowed charaters for variables names : [a-z][A-Z][0-9] and '_'
|
||||||
|
|
|
@ -27,15 +27,25 @@ BGGradient 000000 800000 FFFFFF
|
||||||
InstallColors FF8080 000030
|
InstallColors FF8080 000030
|
||||||
XPStyle on
|
XPStyle on
|
||||||
|
|
||||||
LicenseText "A license text, make sure it's all there"
|
InstallDir "$PROGRAMFILES\NSISCrap\BigNSISTest"
|
||||||
|
InstallDirRegKey HKLM "Software\NSISCrap\BigNSISTest" ""
|
||||||
|
|
||||||
|
CheckBitmap ..\contrib\Icons\checksX.bmp
|
||||||
|
|
||||||
|
LicenseText "A test text, make sure it's all there"
|
||||||
LicenseData "..\source\exehead\main.c"
|
LicenseData "..\source\exehead\main.c"
|
||||||
|
|
||||||
InstallDir "$PROGRAMFILES\NSISCrap\BigNSISTest"
|
;--------------------------------
|
||||||
InstallDirRegKey HKLM SOFTWARE\NSISCrap\BigNSISTest "Install_Dir"
|
|
||||||
DirText "Choose a directory to install in to:"
|
|
||||||
|
|
||||||
ComponentText "This will install the test on your computer. Select which optional things you want installed."
|
Page license
|
||||||
CheckBitmap ..\contrib\Icons\checksX.bmp
|
Page components
|
||||||
|
Page directory
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
|
UninstPage uninstConfirm
|
||||||
|
UninstPage instfiles
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
!ifndef NOINSTTYPES ; only if not defined
|
!ifndef NOINSTTYPES ; only if not defined
|
||||||
InstType "Most"
|
InstType "Most"
|
||||||
|
|
|
@ -16,8 +16,12 @@ OutFile "example1.exe"
|
||||||
; The default installation directory
|
; The default installation directory
|
||||||
InstallDir $PROGRAMFILES\Example1
|
InstallDir $PROGRAMFILES\Example1
|
||||||
|
|
||||||
; The text to prompt the user to enter a directory
|
;--------------------------------
|
||||||
DirText "This will install the very simple example1 on your computer. Choose a directory"
|
|
||||||
|
; Pages
|
||||||
|
|
||||||
|
Page directory
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,18 @@ InstallDir $PROGRAMFILES\Example2
|
||||||
|
|
||||||
; Registry key to check for directory (so if you install again, it will
|
; Registry key to check for directory (so if you install again, it will
|
||||||
; overwrite the old one automatically)
|
; overwrite the old one automatically)
|
||||||
InstallDirRegKey HKLM SOFTWARE\NSIS_Example2 "Install_Dir"
|
InstallDirRegKey HKLM "Software\NSIS_Example2" ""
|
||||||
|
|
||||||
; The text to prompt the user to enter a directory
|
;--------------------------------
|
||||||
ComponentText "This will install the less simple example2 on your computer. Select which optional things you want installed."
|
|
||||||
|
|
||||||
; The text to prompt the user to enter a directory
|
; Pages
|
||||||
DirText "Choose a directory to install in to:"
|
|
||||||
|
Page components
|
||||||
|
Page directory
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
|
UninstPage uninstConfirm
|
||||||
|
UninstPage instfiles
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
|
@ -43,13 +48,15 @@ Section "Example2 (required)"
|
||||||
WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR"
|
WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR"
|
||||||
|
|
||||||
; Write the uninstall keys for Windows
|
; Write the uninstall keys for Windows
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "DisplayName" "NSIS Example2 (remove only)"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "DisplayName" "NSIS Example2"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "NoModify" 1
|
||||||
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "NoRepair" 1
|
||||||
WriteUninstaller "uninstall.exe"
|
WriteUninstaller "uninstall.exe"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
; optional section (can be disabled by the user)
|
; Optional section (can be disabled by the user)
|
||||||
Section "Start Menu Shortcuts"
|
Section "Start Menu Shortcuts"
|
||||||
|
|
||||||
CreateDirectory "$SMPROGRAMS\Example2"
|
CreateDirectory "$SMPROGRAMS\Example2"
|
||||||
|
@ -62,24 +69,20 @@ SectionEnd
|
||||||
|
|
||||||
; Uninstaller
|
; Uninstaller
|
||||||
|
|
||||||
UninstallText "This will uninstall example2. Hit next to continue."
|
|
||||||
|
|
||||||
; Uninstall section
|
|
||||||
|
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
|
|
||||||
; remove registry keys
|
; Remove registry keys
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2"
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2"
|
||||||
DeleteRegKey HKLM SOFTWARE\NSIS_Example2
|
DeleteRegKey HKLM SOFTWARE\NSIS_Example2
|
||||||
|
|
||||||
; remove files and uninstaller
|
; Remove files and uninstaller
|
||||||
Delete $INSTDIR\makensisw.exe
|
Delete $INSTDIR\makensisw.exe
|
||||||
Delete $INSTDIR\uninstall.exe
|
Delete $INSTDIR\uninstall.exe
|
||||||
|
|
||||||
; remove shortcuts, if any
|
; Remove shortcuts, if any
|
||||||
Delete "$SMPROGRAMS\Example2\*.*"
|
Delete "$SMPROGRAMS\Example2\*.*"
|
||||||
|
|
||||||
; remove directories used
|
; Remove directories used
|
||||||
RMDir "$SMPROGRAMS\Example2"
|
RMDir "$SMPROGRAMS\Example2"
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
|
|
|
@ -41,15 +41,17 @@ LicenseText "License page"
|
||||||
LicenseData "gfx.nsi"
|
LicenseData "gfx.nsi"
|
||||||
DirText "Lets make a third page!"
|
DirText "Lets make a third page!"
|
||||||
|
|
||||||
|
; Install dir
|
||||||
|
InstallDir "${NSISDIR}\Examples"
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
; Pages
|
; Pages
|
||||||
Page license licenseImage
|
Page license licenseImage
|
||||||
Page custom customPage
|
Page custom customPage
|
||||||
Page directory dirImage
|
Page directory dirImage
|
||||||
Page instfiles instImage
|
Page instfiles instImage
|
||||||
|
|
||||||
; Install dir
|
|
||||||
InstallDir "${NSISDIR}\Examples"
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
Section ""
|
Section ""
|
||||||
|
|
|
@ -27,51 +27,48 @@ InstallDir $PROGRAMFILES\NSIS
|
||||||
InstallDirRegKey HKLM SOFTWARE\NSIS ""
|
InstallDirRegKey HKLM SOFTWARE\NSIS ""
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
!ifndef CLASSIC_UI
|
|
||||||
|
|
||||||
;Include Modern UI
|
;Include Modern UI
|
||||||
!include "MUI.nsh"
|
!include "MUI.nsh"
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Modern UI Configuration
|
;Modern UI Configuration
|
||||||
|
|
||||||
;Names
|
;Names
|
||||||
!define MUI_PRODUCT "NSIS"
|
!define MUI_PRODUCT "NSIS"
|
||||||
!define MUI_VERSION "${VER_MAJOR}.${VER_MINOR} (CVS)"
|
!define MUI_VERSION "${VER_MAJOR}.${VER_MINOR} (CVS)"
|
||||||
|
|
||||||
!define MUI_NAME "Nullsoft Install System ${MUI_VERSION}"
|
!define MUI_NAME "Nullsoft Install System ${MUI_VERSION}"
|
||||||
|
|
||||||
;Pages
|
;Pages
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
!insertmacro MUI_PAGE_LICENSE "..\license.txt"
|
!insertmacro MUI_PAGE_LICENSE "..\license.txt"
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Docs\index.html"
|
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Docs\index.html"
|
||||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
|
||||||
;Settings
|
;Settings
|
||||||
!define MUI_ABORTWARNING
|
!define MUI_ABORTWARNING
|
||||||
|
|
||||||
!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header.bmp"
|
!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header.bmp"
|
||||||
!define MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Icons\modern-wizard nsis llama.bmp"
|
!define MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Icons\modern-wizard nsis llama.bmp"
|
||||||
|
|
||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Languages
|
;Languages
|
||||||
|
|
||||||
!define MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the installation of NSIS, a scriptable win32 installer/uninstaller system that doesn't suck and isn't huge.\r\n\r\n\r\n"
|
!define MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the installation of NSIS, a scriptable win32 installer/uninstaller system that doesn't suck and isn't huge.\r\n\r\n\r\n"
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
!endif
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Installer Sections
|
;Installer Sections
|
||||||
|
@ -1045,8 +1042,6 @@ SectionEnd
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Descriptions
|
;Descriptions
|
||||||
|
|
||||||
!ifndef CLASSIC_UI
|
|
||||||
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The core files required to use NSIS (compiler etc.)"
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The core files required to use NSIS (compiler etc.)"
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecExample} "Example installation scripts that show you how to use NSIS"
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecExample} "Example installation scripts that show you how to use NSIS"
|
||||||
|
@ -1099,8 +1094,6 @@ SectionEnd
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecSrcMNW} "Source code to MakeNSIS Wrapper"
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecSrcMNW} "Source code to MakeNSIS Wrapper"
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
!endif
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Installer Functions
|
;Installer Functions
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
Name example
|
Name example
|
||||||
OutFile one-section.exe
|
OutFile one-section.exe
|
||||||
|
|
||||||
ComponentText "please choose just one but the default"
|
Page components
|
||||||
|
|
||||||
# defines SF_*, SECTION_OFF and some macros
|
# defines SF_*, SECTION_OFF and some macros
|
||||||
!include Sections.nsh
|
!include Sections.nsh
|
||||||
|
|
|
@ -12,7 +12,15 @@ Caption "Prime number generator"
|
||||||
ShowInstDetails show
|
ShowInstDetails show
|
||||||
AllowRootDirInstall true
|
AllowRootDirInstall true
|
||||||
InstallDir "$EXEDIR"
|
InstallDir "$EXEDIR"
|
||||||
DirText "Select directory to write primes.txt"
|
|
||||||
|
DirText "Select a directory to write primes.txt. $_CLICK"
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
;Pages
|
||||||
|
|
||||||
|
Page directory
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
Name "rtest"
|
Name "rtest"
|
||||||
OutFile "rtest.exe"
|
OutFile "rtest.exe"
|
||||||
|
|
||||||
DirShow hide
|
|
||||||
ComponentText "Select tests!"
|
ComponentText "Select tests!"
|
||||||
ShowInstDetails show
|
ShowInstDetails show
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,13 @@ ShowInstDetails nevershow
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
|
;Pages
|
||||||
|
|
||||||
|
Page directory
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
; The stuff to install
|
; The stuff to install
|
||||||
|
|
||||||
Section ""
|
Section ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue