macro system updates

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1474 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2002-10-26 17:39:56 +00:00
parent bbc2dfe43a
commit 10efaf2ccb
4 changed files with 70 additions and 39 deletions

View file

@ -18,28 +18,58 @@
!define MUI_TEMP1 $R0
!define MUI_TEMP2 $R1
!macro MUI_INTERFACE UI ICON UNICON CHECKS PROGRESSBAR FONT CURRENTPAGEVAR
!macro MUI_INTERFACE
;User interface
!ifndef MUI_ICONPATH
!define MUI_ICONPATH "${NSISDIR}\Contrib\Icons\"
!ifndef MUI_ICON
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!endif
!ifndef MUI_UIPATH
!define MUI_UIPATH "${NSISDIR}\Contrib\UIs\"
!ifndef MUI_UNICON
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
!endif
!ifndef MUI_CHECKBITMAP
!define MUI_CHECKBITMAP "${NSISDIR}\Contrib\Icons\modern.bmp"
!endif
!ifndef MUI_UI
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
!endif
!ifndef MUI_FONT
!define MUI_FONT "Tahoma"
!endif
!ifndef MUI_INSTALLCOLORS
!define MUI_INSTALLCOLORS "/windows"
!endif
!ifndef MUI_PROGRESSBAR
!define MUI_PROGRESSBAR "smooth"
!endif
!ifndef MUI_BRANDINGTEXT
!define MUI_BRANDINGTEXT "" ;Default value
!endif
!ifndef MUI_CURRENTPAGEVAR
!define MUI_CURRENTPAGEVAR "$9"
!endif
Icon "${MUI_ICONPATH}${ICON}"
UninstallIcon "${MUI_ICONPATH}${UNICON}"
XPStyle On
ChangeUI all "${MUI_UIPATH}${UI}"
SetFont "${FONT}" 8
CheckBitmap "${MUI_ICONPATH}${CHECKS}"
InstallColors /windows
InstProgressFlags "${PROGRESSBAR}"
BrandingText /TRIMRIGHT
!define CURRENTPAGE ${CURRENTPAGEVAR}
Icon "${MUI_ICON}"
UninstallIcon "${MUI_UNICON}"
CheckBitmap "${MUI_CHECKBITMAP}"
ChangeUI all "${MUI_UI}"
SetFont "${MUI_FONT}" 8
InstallColors "${MUI_INSTALLCOLORS}"
InstProgressFlags "${MUI_PROGRESSBAR}"
BrandingText /TRIMRIGHT "${MUI_BRANDINGTEXT}"
!define CURRENTPAGE ${MUI_CURRENTPAGEVAR}
!macroend

View file

@ -1,5 +1,5 @@
;NSIS Modern UI version 1.3
;Basic Example Script
;NSIS Modern User Interface version 1.3
;Basic Macro System Example Script
;Written by Joost Verburg
!define NAME "Test Software" ;Define your own software name here
@ -9,6 +9,8 @@
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!verbose 4
;$9 is the variable used to store the current page, do not use this var!
;--------------------------------
;Configuration
@ -29,16 +31,15 @@
Name "${NAME} ${VERSION}"
OutFile "Basic.exe"
;User interface - icons, ui file, check bitmap, progress bar etc.
!insertmacro MUI_INTERFACE "modern.exe" "modern-install.ico" "modern-uninstall.ico" "modern.bmp" "smooth" "Tahoma" "$9" ;$9 is the variable used to store the current page, do not use this var!
!insertmacro MUI_INTERFACE
;License dialog
;License page
LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt"
;Descriptions
LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
;Folder-select dialog
;Folder-selection page
InstallDir "$PROGRAMFILES\${NAME}"
;--------------------------------

View file

@ -1,5 +1,5 @@
;NSIS Modern UI version 1.3
;Install Options Example Script
;NSIS Modern User Interface version 1.3
;Advanced Macro System & Install Options Example Script
;Written by Joost Verburg
!define NAME "Test Software" ;Define your own software name here
@ -33,22 +33,21 @@
Name "${NAME} ${VERSION}"
OutFile "InstallOptions.exe"
;User interface - icons, ui file, check bitmap, progress bar etc.
!insertmacro MUI_INTERFACE "modern.exe" "modern-install.ico" "modern-uninstall.ico" "modern.bmp" "smooth" "Tahoma" "$9" ;$9 is the variable used to store the current page, do not use this var!
!insertmacro MUI_INTERFACE
!insertmacro MUI_INSTALLOPTIONS "$7" "$8" ;Variables for the Install Options system. Do not use them in .onNext/PrevPage and SetPage
;License dialog
;License page
LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt"
;Component-select dialog
;Component-selection page
;Descriptions
LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
LangString DESC_SecCreateUninst ${LANG_ENGLISH} "Create a uninstaller which can automatically delete ${NAME}."
;Folder-select dialog
;Folder-selection page
InstallDir "$PROGRAMFILES\${NAME}"
;Install Options dialogs
;Install Options pages
LangString MUI_TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page"
LangString MUI_TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!"

View file

@ -1,5 +1,5 @@
;NSIS Modern UI version 1.3
;MultiLanguage & LangDLL Example Script
;NSIS Modern User Interface version 1.3
;Basic Macro System & MultiLanguage Example Script
;Written by Joost Verburg
!define NAME "Test Software" ;Define your own software name here
@ -9,6 +9,8 @@
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!verbose 4
;$9 is the variable used to store the current page, do not use this var!
;--------------------------------
;Configuration
@ -68,8 +70,12 @@
;Ukrainian
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Ukrainian.nlf"
!include "${NSISDIR}\Contrib\Modern UI\Language files\Ukrainian.nsh"
OutFile "MultiLanguage.exe"
;General
!insertmacro MUI_INTERFACE
;Name
Name /LANG=${LANG_ENGLISH} "${NAME} ${VERSION}"
Name /LANG=${LANG_FRENCH} "${NAME} ${VERSION}"
Name /LANG=${LANG_GERMAN} "${NAME} ${VERSION}"
@ -82,13 +88,8 @@
Name /LANG=${LANG_RUSSIAN} "${NAME} ${VERSION}"
Name /LANG=${LANG_PORTUGUESEBR} "${NAME} ${VERSION}"
Name /LANG=${LANG_UKRAINIAN} "${NAME} ${VERSION}"
OutFile "MultiLanguage.exe"
;User interface - icons, ui file, check bitmap, progress bar etc.
!insertmacro MUI_INTERFACE "modern.exe" "modern-install.ico" "modern-uninstall.ico" "modern.bmp" "smooth" "Tahoma" "$9" ;$9 is the variable used to store the current page, do not use this var!
;License dialog
;License page
LicenseData /LANG=${LANG_ENGLISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
LicenseData /LANG=${LANG_FRENCH} "${NSISDIR}\Contrib\Modern UI\License.txt"
LicenseData /LANG=${LANG_GERMAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
@ -102,7 +103,7 @@
LicenseData /LANG=${LANG_PORTUGUESEBR} "${NSISDIR}\Contrib\Modern UI\License.txt"
LicenseData /LANG=${LANG_UKRAINIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
;Component-select dialog
;Component-selection page
;Titles
LangString TITLE_SecCopyUI ${LANG_ENGLISH} "modern.exe"
LangString TITLE_SecCopyUI ${LANG_FRENCH} "modern.exe"
@ -131,7 +132,7 @@
LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "modern.exe: Portuguese (Brasil) description"
LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "modern.exe: Ukrainian description"
;Folder-select dialog
;Folder-selection page
InstallDir "$PROGRAMFILES\${NAME}"
;--------------------------------