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"
|
||||
|
||||
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 '_'
|
||||
|
|
|
@ -27,15 +27,25 @@ BGGradient 000000 800000 FFFFFF
|
|||
InstallColors FF8080 000030
|
||||
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"
|
||||
|
||||
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."
|
||||
CheckBitmap ..\contrib\Icons\checksX.bmp
|
||||
Page license
|
||||
Page components
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
UninstPage uninstConfirm
|
||||
UninstPage instfiles
|
||||
|
||||
;--------------------------------
|
||||
|
||||
!ifndef NOINSTTYPES ; only if not defined
|
||||
InstType "Most"
|
||||
|
|
|
@ -16,8 +16,12 @@ OutFile "example1.exe"
|
|||
; The default installation directory
|
||||
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
|
||||
; 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
|
||||
DirText "Choose a directory to install in to:"
|
||||
; Pages
|
||||
|
||||
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"
|
||||
|
||||
; 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"'
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "NoRepair" 1
|
||||
WriteUninstaller "uninstall.exe"
|
||||
|
||||
SectionEnd
|
||||
|
||||
; optional section (can be disabled by the user)
|
||||
; Optional section (can be disabled by the user)
|
||||
Section "Start Menu Shortcuts"
|
||||
|
||||
CreateDirectory "$SMPROGRAMS\Example2"
|
||||
|
@ -62,24 +69,20 @@ SectionEnd
|
|||
|
||||
; Uninstaller
|
||||
|
||||
UninstallText "This will uninstall example2. Hit next to continue."
|
||||
|
||||
; Uninstall section
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
; remove registry keys
|
||||
; Remove registry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2"
|
||||
DeleteRegKey HKLM SOFTWARE\NSIS_Example2
|
||||
|
||||
; remove files and uninstaller
|
||||
; Remove files and uninstaller
|
||||
Delete $INSTDIR\makensisw.exe
|
||||
Delete $INSTDIR\uninstall.exe
|
||||
|
||||
; remove shortcuts, if any
|
||||
; Remove shortcuts, if any
|
||||
Delete "$SMPROGRAMS\Example2\*.*"
|
||||
|
||||
; remove directories used
|
||||
; Remove directories used
|
||||
RMDir "$SMPROGRAMS\Example2"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
|
|
|
@ -41,15 +41,17 @@ LicenseText "License page"
|
|||
LicenseData "gfx.nsi"
|
||||
DirText "Lets make a third page!"
|
||||
|
||||
; Install dir
|
||||
InstallDir "${NSISDIR}\Examples"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; Pages
|
||||
Page license licenseImage
|
||||
Page custom customPage
|
||||
Page directory dirImage
|
||||
Page instfiles instImage
|
||||
|
||||
; Install dir
|
||||
InstallDir "${NSISDIR}\Examples"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
Section ""
|
||||
|
|
|
@ -27,51 +27,48 @@ InstallDir $PROGRAMFILES\NSIS
|
|||
InstallDirRegKey HKLM SOFTWARE\NSIS ""
|
||||
|
||||
;--------------------------------
|
||||
!ifndef CLASSIC_UI
|
||||
|
||||
;Include Modern UI
|
||||
!include "MUI.nsh"
|
||||
;Include Modern UI
|
||||
!include "MUI.nsh"
|
||||
|
||||
;--------------------------------
|
||||
;Modern UI Configuration
|
||||
;--------------------------------
|
||||
;Modern UI Configuration
|
||||
|
||||
;Names
|
||||
!define MUI_PRODUCT "NSIS"
|
||||
!define MUI_VERSION "${VER_MAJOR}.${VER_MINOR} (CVS)"
|
||||
;Names
|
||||
!define MUI_PRODUCT "NSIS"
|
||||
!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
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "..\license.txt"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Docs\index.html"
|
||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
;Settings
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header.bmp"
|
||||
!define MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Icons\modern-wizard nsis llama.bmp"
|
||||
;Pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "..\license.txt"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
|
||||
;--------------------------------
|
||||
;Languages
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Docs\index.html"
|
||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||
|
||||
!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_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
!endif
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
;Settings
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header.bmp"
|
||||
!define MUI_SPECIALBITMAP "${NSISDIR}\Contrib\Icons\modern-wizard nsis llama.bmp"
|
||||
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
|
||||
;--------------------------------
|
||||
;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"
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
@ -1045,8 +1042,6 @@ SectionEnd
|
|||
;--------------------------------
|
||||
;Descriptions
|
||||
|
||||
!ifndef CLASSIC_UI
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!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"
|
||||
|
@ -1098,8 +1093,6 @@ SectionEnd
|
|||
!insertmacro MUI_DESCRIPTION_TEXT ${SecSrcEx} "Example DLL plugin source in C and plugin function header"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecSrcMNW} "Source code to MakeNSIS Wrapper"
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
!endif
|
||||
|
||||
;--------------------------------
|
||||
;Installer Functions
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
Name example
|
||||
OutFile one-section.exe
|
||||
|
||||
ComponentText "please choose just one but the default"
|
||||
Page components
|
||||
|
||||
# defines SF_*, SECTION_OFF and some macros
|
||||
!include Sections.nsh
|
||||
|
|
|
@ -12,7 +12,15 @@ Caption "Prime number generator"
|
|||
ShowInstDetails show
|
||||
AllowRootDirInstall true
|
||||
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"
|
||||
OutFile "rtest.exe"
|
||||
|
||||
DirShow hide
|
||||
ComponentText "Select tests!"
|
||||
ShowInstDetails show
|
||||
|
||||
|
|
|
@ -37,6 +37,13 @@ ShowInstDetails nevershow
|
|||
|
||||
;--------------------------------
|
||||
|
||||
;Pages
|
||||
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; The stuff to install
|
||||
|
||||
Section ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue