Add new BO4 Installer

This commit is contained in:
Ahrimdon 2024-02-27 05:30:24 -05:00
parent 9cdc821096
commit 24175a0e7c
68 changed files with 3074 additions and 1 deletions

View File

View File

@ -0,0 +1,98 @@
!include "MUI2.nsh"
!include "WinVer.nsh"
!include "nsDialogs.nsh"
; Constants
!define PRODUCT_NAME "Project-BO4"
!define PRODUCT_DESCRIPTION "Call of Duty Black Ops 4 Client"
!define COPYRIGHT "Created by Ahrimdon - Free and Open Source"
!define PRODUCT_VERSION "1.0.0.0"
!define SETUP_VERSION "1.0.0.0"
; Attributes
Name "${PRODUCT_NAME}"
OutFile "build\BO4Installer.exe"
InstallDir "$EXEDIR"
RequestExecutionLevel user ; Request user-level execution, not admin
; Version Info
VIProductVersion "${PRODUCT_VERSION}"
VIAddVersionKey "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}"
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileVersion" "${SETUP_VERSION}"
; Modern UI Appearance
!define MUI_ICON "Contrib\Graphics\Icons\icon.ico"
!define MUI_UNICON "Contrib\Graphics\Icons\icon.ico"
!define MUI_HEADERIMAGE
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_TEXT "Setup has finished installing ${PRODUCT_NAME} on your computer.$\nClick Finish to close this wizard.$\n$\nRun the BlackOps4_boot.exe application from within your Call of Duty Black Ops 4 game folder or use the Desktop shortcut."
; Modern UI Settings
!define MUI_ABORTWARNING
!define MUI_UNABORTWARNING
!define MUI_FINISHPAGE_SHOWREADME ""
!define MUI_FINISHPAGE_SHOWREADME_CHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION finishpageaction
; Show details by default
ShowInstDetails show
ShowUninstDetails show
; Installer Images
!define MUI_WELCOMEFINISHPAGE_BITMAP "Contrib\Graphics\Assets\logo-cropped.bmp"
!define MUI_HEADERIMAGE_BITMAP "Contrib\Graphics\Assets\banner-bo4-title.bmp" ; For installer header
; Uninstaller Images
!define MUI_UNHEADERIMAGE_BITMAP "Contrib\Graphics\Assets\banner-bo4-title.bmp" ; For uninstaller header
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "Contrib\Graphics\Assets\logo-cropped.bmp" ; For uninstaller finish page
; Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
; Languages
!insertmacro MUI_LANGUAGE "English"
Function .onInit
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Place the installer in your Call of Duty Black Ops 4 game folder. Click OK to continue or Cancel to exit." IDOK done
Abort
done:
FunctionEnd
; Sections
Section "Main Application" SecMain
SetOutPath $INSTDIR
File "game\d3d11.dll"
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
Section "LPC Files" SecLPCFiles
SetOutPath $INSTDIR\LPC
File /r "game\base_game_dir\LPC\*.*"
SectionEnd
Function finishpageaction
SetOutPath $INSTDIR
CreateShortcut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\BlackOps4_boot.exe" "" "$INSTDIR\BlackOps4_boot.exe"
FunctionEnd
; Uninstaller Sections
Section "Uninstall"
Delete "$INSTDIR\d3d11.dll"
Delete "$INSTDIR\project-bo4.json"
Delete "$INSTDIR\project-bo4.log"
RMDir /r $INSTDIR\project-bo4
RMDir /r $INSTDIR\LPC
Delete "$INSTDIR\Uninstall.exe"
RMDir $INSTDIR
SectionEnd

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

View File

@ -0,0 +1,191 @@
# Header, don't edit
NLF v6
# Start editing here
# Language ID
1033
# Font and size - dash (-) means default
-
-
# Codepage - dash (-) means ASCII code page
-
# RTL - anything else than RTL means LTR
-
# Translation by ..... (any credits should go here)
# ^Branding
Project-BO4 Installer - Free and Open Source Software
# ^SetupCaption
$(^Name) Setup
# ^UninstallCaption
$(^Name) Uninstall
# ^LicenseSubCaption
: License Agreement
# ^ComponentsSubCaption
: Installation Options
# ^DirSubCaption
: Installation Folder
# ^InstallingSubCaption
: Installing
# ^CompletedSubCaption
: Completed
# ^UnComponentsSubCaption
: Uninstallation Options
# ^UnDirSubCaption
: Uninstallation Folder
# ^ConfirmSubCaption
: Confirmation
# ^UninstallingSubCaption
: Uninstalling
# ^UnCompletedSubCaption
: Completed
# ^BackBtn
< &Back
# ^NextBtn
&Next >
# ^AgreeBtn
I &Agree
# ^AcceptBtn
I &accept the terms of the License Agreement
# ^DontAcceptBtn
I &do not accept the terms of the License Agreement
# ^InstallBtn
&Install
# ^UninstallBtn
&Uninstall
# ^CancelBtn
Cancel
# ^CloseBtn
&Close
# ^BrowseBtn
B&rowse...
# ^ShowDetailsBtn
Show &details
# ^ClickNext
Click Next to continue.
# ^ClickInstall
Click Install to start the installation.
# ^ClickUninstall
Click Uninstall to start the uninstallation.
# ^Name
Name
# ^Completed
Completed
# ^LicenseText
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^LicenseTextCB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^LicenseTextRB
Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^UnLicenseText
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.
# ^UnLicenseTextCB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
# ^UnLicenseTextRB
Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
# ^Custom
Custom
# ^ComponentsText
Check the components you want to install and uncheck the components you don't want to install. $_CLICK
# ^ComponentsSubText1
Select the type of install:
# ^ComponentsSubText2_NoInstTypes
Select components to install:
# ^ComponentsSubText2
Or, select the optional components you wish to install:
# ^UnComponentsText
Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK
# ^UnComponentsSubText1
Select the type of uninstall:
# ^UnComponentsSubText2_NoInstTypes
Select components to uninstall:
# ^UnComponentsSubText2
Or, select the optional components you wish to uninstall:
# ^DirText
Setup will install $(^NameDA) in the following folder. Enter the path to your Call of Duty Black Ops 4 game folder, or click Browse and select the game folder. $_CLICK
# ^DirSubText
Destination Folder
# ^DirBrowseText
Select the folder to install $(^NameDA) in:
# ^UnDirText
Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK
# ^UnDirSubText
""
# ^UnDirBrowseText
Select the folder to uninstall $(^NameDA) from:
# ^SpaceAvailable
"Space available: "
# ^SpaceRequired
"Space required: "
# ^UninstallingText
$(^NameDA) will be uninstalled from the following folder. $_CLICK
# ^UninstallingSubText
Uninstalling from:
# ^FileError
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.
# ^FileError_NoIgnore
Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.
# ^CantWrite
"Can't write: "
# ^CopyFailed
Copy failed
# ^CopyTo
"Copy to "
# ^Registering
"Registering: "
# ^Unregistering
"Unregistering: "
# ^SymbolNotFound
"Could not find symbol: "
# ^CouldNotLoad
"Could not load: "
# ^CreateFolder
"Create folder: "
# ^CreateShortcut
"Create shortcut: "
# ^CreatedUninstaller
"Created uninstaller: "
# ^Delete
"Delete file: "
# ^DeleteOnReboot
"Delete on reboot: "
# ^ErrorCreatingShortcut
"Error creating shortcut: "
# ^ErrorCreating
"Error creating: "
# ^ErrorDecompressing
Error decompressing data! Corrupted installer?
# ^ErrorRegistering
Error registering DLL
# ^ExecShell
"ExecShell: "
# ^Exec
"Execute: "
# ^Extract
"Extract: "
# ^ErrorWriting
"Extract: error writing to file "
# ^InvalidOpcode
Installer corrupted: invalid opcode
# ^NoOLE
"No OLE for: "
# ^OutputFolder
"Output folder: "
# ^RemoveFolder
"Remove folder: "
# ^RenameOnReboot
"Rename on reboot: "
# ^Rename
"Rename: "
# ^Skipped
"Skipped: "
# ^CopyDetails
Copy Details To Clipboard
# ^LogInstall
Log install process
# ^Byte
B
# ^Kilo
K
# ^Mega
M
# ^Giga
G

View File

@ -0,0 +1,129 @@
;Language: English (1033)
;By Joost Verburg
!insertmacro LANGFILE "English" "English" "English" "English" ; See \Include\LangFile.nsh for a description of these parameters
!ifdef MUI_WELCOMEPAGE
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Setup"
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup will guide you through the installation of the $(^NameDA) Client for Call of Duty Black Ops 4.$\r$\n$\r$\nIt is recommended that you close all other applications before installing.$\r$\n$\r$\nYou will not need to restart your computer after installation.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_UNWELCOMEPAGE
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Uninstaller"
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Setup will guide you through the uninstallation of $(^NameDA).$\r$\n$\r$\nBefore starting the uninstallation, make sure $(^NameDA) is not running.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_LICENSEPAGE
${LangFileString} MUI_TEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Please review the license terms before installing $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(^NameDA)."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to install $(^NameDA). $_CLICK"
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to install $(^NameDA). $_CLICK"
!endif
!ifdef MUI_UNLICENSEPAGE
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "License Agreement"
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Please review the license terms before uninstalling $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to uninstall $(^NameDA)."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
!endif
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Press Page Down to see the rest of the agreement."
!endif
!ifdef MUI_COMPONENTSPAGE
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to install."
!endif
!ifdef MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choose Components"
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to uninstall."
!endif
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
!else
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Select a component to see its description."
!endif
!endif
!ifdef MUI_DIRECTORYPAGE
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choose Game Location"
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choose your Call of Duty Black Ops 4 game folder in which to install $(^NameDA)."
!endif
!ifdef MUI_UNDIRECTORYPAGE
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
!endif
!ifdef MUI_INSTFILESPAGE
${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installing"
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Please wait while $(^NameDA) is being installed."
${LangFileString} MUI_TEXT_FINISH_TITLE "Installation Complete"
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup was completed successfully."
${LangFileString} MUI_TEXT_ABORT_TITLE "Installation Aborted"
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup was not completed successfully."
!endif
!ifdef MUI_UNINSTFILESPAGE
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstalling"
${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Please wait while $(^NameDA) is being uninstalled."
${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uninstallation Complete"
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall was completed successfully."
${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uninstallation Aborted"
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall was not completed successfully."
!endif
!ifdef MUI_FINISHPAGE
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Setup"
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) has been installed on your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_UNFINISHPAGE
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completing $(^NameDA) Uninstall"
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) has been uninstalled from your computer.$\r$\n$\r$\nClick Finish to close Setup."
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the uninstallation of $(^NameDA). Do you want to reboot now?"
!endif
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot now"
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "I want to manually reboot later"
${LangFileString} MUI_TEXT_FINISH_RUN "&Run $(^NameDA)"
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Show Readme"
${LangFileString} MUI_BUTTONTEXT_FINISH "&Finish"
!endif
!ifdef MUI_STARTMENUPAGE
${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder"
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the $(^NameDA) shortcuts."
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder."
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
!endif
!ifdef MUI_UNCONFIRMPAGE
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remove $(^NameDA) from your computer."
!endif
!ifdef MUI_ABORTWARNING
${LangFileString} MUI_TEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Setup?"
!endif
!ifdef MUI_UNABORTWARNING
${LangFileString} MUI_UNTEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Uninstall?"
!endif
!ifdef MULTIUSER_INSTALLMODEPAGE
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_TITLE "Choose Users"
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_SUBTITLE "Choose for which users you want to install $(^NameDA)."
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_TOP "Select whether you want to install $(^NameDA) only for yourself or for all users of this computer. $(^ClickNext)"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS "Install for anyone using this computer"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER "Install just for me"
!endif

View File

@ -0,0 +1,72 @@
/*
NSIS Modern User Interface
Deprecated code - display warnings
*/
;--------------------------------
;InstallOptions
!define INSTALLOPTIONS_ERROR "MUI_INSTALLOPTIONS_* macros are no longer a part of MUI2. Include InstallOptions.nsh and use INSTALLOPTIONS_* macros instead. It is also recommended to upgrade to nsDialogs."
!macro MUI_INSTALLOPTIONS_EXTRACT FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_DISPLAY FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_SHOW
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_SHOW_RETURN
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
!error "${INSTALLOPTIONS_ERROR}"
!macroend
!macro MUI_RESERVEFILE_INSTALLOPTIONS
!define MUI_DOLLAR "$"
!error "MUI_RESERVEFILE_INSTALLOPTIONS is no longer supported as InstallOptions is no longer used by MUI2. Instead, use ReserveFile '${MUI_DOLLAR}{NSISDIR}\Plugins\InstallOptions.dll'. It is also recommended to upgrade to nsDialogs."
!macroend

View File

@ -0,0 +1,304 @@
/*
NSIS Modern User Interface
Interface code for all pages
*/
;--------------------------------
;Variables
Var mui.Header.Text
Var mui.Header.Text.Font
Var mui.Header.SubText
Var mui.Header.Background
Var mui.Header.Image
Var mui.Branding.Text
Var mui.Branding.Background
Var mui.Line.Standard
Var mui.Line.FullWindow
Var mui.Button.Next
Var mui.Button.Cancel
Var mui.Button.Back
;--------------------------------
;General interface settings
!macro MUI_INTERFACE
!ifndef MUI_INTERFACE
!define MUI_INTERFACE
;These values are set after the interface settings in the script,
;so the script itself can override all values.
;Default interface settings in nsisconf.nsh
!ifdef MUI_INSERT_NSISCONF
!insertmacro MUI_NSISCONF
!endif
;Default interface settings
!insertmacro MUI_DEFAULT MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
!insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
!insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe"
!insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
;Default header images
!ifdef MUI_HEADERIMAGE
!insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\UGX\banner.bmp"
!ifndef MUI_HEADERIMAGE_UNBITMAP
!define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
!ifdef MUI_HEADERIMAGE_BITMAP_NOSTRETCH
!insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH ""
!endif
!endif
!ifdef MUI_HEADERIMAGE_BITMAP_RTL
!ifndef MUI_HEADERIMAGE_UNBITMAP_RTL
!define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}"
!ifdef MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
!insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH ""
!endif
!endif
!endif
!endif
;Default texts
!insertmacro MUI_DEFAULT MUI_ABORTWARNING_TEXT "$(MUI_TEXT_ABORTWARNING)"
!insertmacro MUI_DEFAULT MUI_UNABORTWARNING_TEXT "$(MUI_UNTEXT_ABORTWARNING)"
;Apply settings
XPStyle On ;XP style setting in manifest resource
;Dialog resources
ChangeUI all "${MUI_UI}"
!ifdef MUI_HEADERIMAGE
!ifndef MUI_HEADERIMAGE_RIGHT
ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE}"
!else
ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE_RIGHT}"
!endif
!endif
;Icons
Icon "${MUI_ICON}"
UninstallIcon "${MUI_UNICON}"
!endif
!macroend
;--------------------------------
;Abort warning message box
!macro MUI_ABORTWARNING
!ifdef MUI_ABORTWARNING_CANCEL_DEFAULT
MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
!else
MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
!endif
Abort
mui.Quit:
!macroend
!macro MUI_UNABORTWARNING
!ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT
MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
!else
MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
!endif
Abort
mui.Quit:
!macroend
;--------------------------------
;Initialization of GUI
!macro MUI_HEADERIMAGE_INIT UNINSTALLER
;Load and display header image
!ifdef MUI_HEADERIMAGE
InitPluginsDir
!ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
${if} $(^RTL) == 1
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"
!ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH
SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
!else
SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
!endif
${else}
!endif
File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
!ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH
SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
!else
SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
!endif
!ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
${endif}
!endif
!endif
!macroend
!macro MUI_GUIINIT_OUTERDIALOG UNINSTALLER
;Initialize outer dialog (fonts & colors)
;Header
GetDlgItem $mui.Header.Text $HWNDPARENT 1037
CreateFont $mui.Header.Text.Font "$(^Font)" "$(^FontSize)" "700"
SendMessage $mui.Header.Text ${WM_SETFONT} $mui.Header.Text.Font 0
GetDlgItem $mui.Header.SubText $HWNDPARENT 1038
!ifndef MUI_HEADER_TRANSPARENT_TEXT
SetCtlColors $mui.Header.Text "" "${MUI_BGCOLOR}"
SetCtlColors $mui.Header.SubText "" "${MUI_BGCOLOR}"
!else
SetCtlColors $mui.Header.Text "" "transparent"
SetCtlColors $mui.Header.SubText "" "transparent"
!endif
;Header image
!insertmacro MUI_HEADERIMAGE_INIT "${UNINSTALLER}"
;Header background
GetDlgItem $mui.Header.Background $HWNDPARENT 1034
SetCtlColors $mui.Header.Background "" "${MUI_BGCOLOR}"
;Header image background
GetDlgItem $mui.Header.Image $HWNDPARENT 1039
SetCtlColors $mui.Header.Image "" "${MUI_BGCOLOR}"
;Branding text
GetDlgItem $mui.Branding.Background $HWNDPARENT 1028
SetCtlColors $mui.Branding.Background /BRANDING
GetDlgItem $mui.Branding.Text $HWNDPARENT 1256
SetCtlColors $mui.Branding.Text /BRANDING
SendMessage $mui.Branding.Text ${WM_SETTEXT} 0 "STR:$(^Branding) "
;Lines
GetDlgItem $mui.Line.Standard $HWNDPARENT 1035
GetDlgItem $mui.Line.FullWindow $HWNDPARENT 1045
;Buttons
GetDlgItem $mui.Button.Next $HWNDPARENT 1
GetDlgItem $mui.Button.Cancel $HWNDPARENT 2
GetDlgItem $mui.Button.Back $HWNDPARENT 3
!macroend
;--------------------------------
;Interface functions
!macro MUI_FUNCTION_GUIINIT
Function .onGUIInit
!insertmacro MUI_GUIINIT_OUTERDIALOG ""
!ifdef MUI_PAGE_FUNCTION_GUIINIT
Call "${MUI_PAGE_FUNCTION_GUIINIT}"
!endif
!ifdef MUI_CUSTOMFUNCTION_GUIINIT
Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
!endif
FunctionEnd
!macroend
!macro MUI_UNFUNCTION_GUIINIT
Function un.onGUIInit
!insertmacro MUI_GUIINIT_OUTERDIALOG UN
!ifdef MUI_UNPAGE_FUNCTION_GUIINIT
Call "${MUI_UNPAGE_FUNCTION_GUIINIT}"
!endif
!ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
!endif
FunctionEnd
!macroend
!macro MUI_FUNCTION_ABORTWARNING
Function .onUserAbort
!ifdef MUI_PAGE_FUNCTION_ABORTWARNING
Call ${MUI_PAGE_FUNCTION_ABORTWARNING}
!endif
!ifdef MUI_ABORTWARNING
!insertmacro MUI_ABORTWARNING
!endif
!ifdef MUI_CUSTOMFUNCTION_ABORT
Call "${MUI_CUSTOMFUNCTION_ABORT}"
!endif
FunctionEnd
!macroend
!macro MUI_FUNCTION_UNABORTWARNING
Function un.onUserAbort
!ifdef MUI_UNPAGE_FUNCTION_ABORTWARNING
Call ${MUI_UNPAGE_FUNCTION_ABORTWARNING}
!endif
!ifdef MUI_UNABORTWARNING
!insertmacro MUI_UNABORTWARNING
!endif
!ifdef MUI_CUSTOMFUNCTION_UNABORT
Call "${MUI_CUSTOMFUNCTION_UNABORT}"
!endif
FunctionEnd
!macroend

View File

@ -0,0 +1,192 @@
/*
NSIS Modern User Interface
Localization
*/
;--------------------------------
;Variables
!macro MUI_LANGDLL_VARIABLES
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
!ifndef MUI_LANGDLL_REGISTRY_VARAIBLES
!define MUI_LANGDLL_REGISTRY_VARAIBLES
;/GLOBAL because the macros are included in a function
Var /GLOBAL mui.LangDLL.RegistryLanguage
!endif
!endif
!macroend
;--------------------------------
;Include langauge files
!macro MUI_LANGUAGE LANGUAGE
;Include a language
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_INSERT
LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nlf"
;Include language file
!insertmacro LANGFILE_INCLUDE_WITHDEFAULT "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nsh" "${NSISDIR}\Contrib\Language files\English.nsh"
;Add language to list of languages for selection dialog
!ifndef MUI_LANGDLL_LANGUAGES
!define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
!define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
!else
!ifdef MUI_LANGDLL_LANGUAGES_TEMP
!undef MUI_LANGDLL_LANGUAGES_TEMP
!endif
!define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
!undef MUI_LANGDLL_LANGUAGES
!ifdef MUI_LANGDLL_LANGUAGES_CP_TEMP
!undef MUI_LANGDLL_LANGUAGES_CP_TEMP
!endif
!define MUI_LANGDLL_LANGUAGES_CP_TEMP "${MUI_LANGDLL_LANGUAGES_CP}"
!undef MUI_LANGDLL_LANGUAGES_CP
!define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
!define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_CP_TEMP}"
!endif
!verbose pop
!macroend
;--------------------------------
;Language selection
!macro MUI_LANGDLL_DISPLAY
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_LANGDLL_VARIABLES
!insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
!insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select a language."
!ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
${if} $mui.LangDLL.RegistryLanguage != ""
;Set default langauge to registry language
StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
${endif}
!endif
!ifdef NSIS_CONFIG_SILENT_SUPPORT
${unless} ${Silent}
!endif
!ifndef MUI_LANGDLL_ALWAYSSHOW
!ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
${if} $mui.LangDLL.RegistryLanguage == ""
!endif
!endif
;Show langauge selection dialog
!ifdef MUI_LANGDLL_ALLLANGUAGES
LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_LANGUAGES} ""
!else
LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" AC ${MUI_LANGDLL_LANGUAGES_CP} ""
!endif
Pop $LANGUAGE
${if} $LANGUAGE == "cancel"
Abort
${endif}
!ifndef MUI_LANGDLL_ALWAYSSHOW
!ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
${endif}
!endif
!endif
!ifdef NSIS_CONFIG_SILENT_SUPPORT
${endif}
!endif
!verbose pop
!macroend
!macro MUI_LANGDLL_SAVELANGUAGE
;Save language in registry
!ifndef MUI_PAGE_UNINSTALLER
IfAbort mui.langdllsavelanguage_abort
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
!endif
mui.langdllsavelanguage_abort:
!endif
!macroend
!macro MUI_UNGETLANGUAGE
;Get language from registry in uninstaller
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_LANGDLL_VARIABLES
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
${if} $mui.LangDLL.RegistryLanguage = ""
!endif
!insertmacro MUI_LANGDLL_DISPLAY
!ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
${else}
StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
${endif}
!endif
!verbose pop
!macroend
;--------------------------------
;Rerserve LangDLL file
!macro MUI_RESERVEFILE_LANGDLL
!verbose push
!verbose ${MUI_VERBOSE}
ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
!verbose pop
!macroend

View File

@ -0,0 +1,122 @@
/*
NSIS Modern User Interface - Version 2.0
Copyright 2002-2009 Joost Verburg
*/
!echo "NSIS Modern User Interface version 2.0 - Copyright 2002-2009 Joost Verburg"
;--------------------------------
!ifndef MUI_INCLUDED
!define MUI_INCLUDED
!define MUI_SYSVERSION "2.0"
!verbose push
!ifndef MUI_VERBOSE
!define MUI_VERBOSE 3
!endif
!verbose ${MUI_VERBOSE}
!addincludedir "${NSISDIR}\Contrib\Modern UI 2"
;--------------------------------
;Header files required by MUI
!include WinMessages.nsh
!include LogicLib.nsh
!include nsDialogs.nsh
!include LangFile.nsh
;--------------------------------
;Macros for compile-time defines
!macro MUI_DEFAULT SYMBOL CONTENT
;Define symbol if not yet defined
;For setting default values
!ifndef "${SYMBOL}"
!define "${SYMBOL}" "${CONTENT}"
!endif
!macroend
!macro MUI_SET SYMBOL CONTENT
;Define symbol and undefine if neccesary
!insertmacro MUI_UNSET "${SYMBOL}"
!define "${SYMBOL}" "${CONTENT}"
!macroend
!macro MUI_UNSET SYMBOL
;Undefine symbol if defined
!ifdef "${SYMBOL}"
!undef "${SYMBOL}"
!endif
!macroend
;--------------------------------
;MUI interface
!include "Deprecated.nsh"
!include "Interface.nsh"
!include "Localization.nsh"
!include "Pages.nsh"
;--------------------------------
;Pages
!include "Pages\Components.nsh"
!include "Pages\Directory.nsh"
!include "Pages\Finish.nsh"
!include "Pages\InstallFiles.nsh"
!include "Pages\License.nsh"
!include "Pages\StartMenu.nsh"
!include "Pages\UninstallConfirm.nsh"
!include "Pages\Welcome.nsh"
;--------------------------------
;Insert MUI code in script
!macro MUI_INSERT
!ifndef MUI_INSERT
!define MUI_INSERT
;This macro is included when the first language file is included,
;after the pages.
;Interface settings
!insertmacro MUI_INTERFACE
;Interface functions - Installer
!insertmacro MUI_FUNCTION_GUIINIT
!insertmacro MUI_FUNCTION_ABORTWARNING
;Interface functions - Uninstaller
!ifdef MUI_UNINSTALLER
!insertmacro MUI_UNFUNCTION_GUIINIT
!insertmacro MUI_FUNCTION_UNABORTWARNING
!endif
!endif
!macroend
!endif
!verbose pop

View File

@ -0,0 +1,160 @@
/*
NSIS Modern User Interface
Support code for all pages
*/
;--------------------------------
;Page initialization
!macro MUI_PAGE_INIT
;Include interface settings in neccesary
!insertmacro MUI_INTERFACE
;Define settings for installer page
!insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER
!insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_PREFIX
!insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_FUNCPREFIX
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX ""
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX ""
;Generate unique ID
!insertmacro MUI_UNSET MUI_UNIQUEID
!define MUI_UNIQUEID ${__LINE__}
!macroend
!macro MUI_UNPAGE_INIT
;Include interface settings
!insertmacro MUI_INTERFACE
;Define prefixes for uninstaller page
!insertmacro MUI_SET MUI_UNINSTALLER ""
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER ""
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX "UN"
!insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX "un."
;Generate unique ID
!insertmacro MUI_UNSET MUI_UNIQUEID
!define MUI_UNIQUEID ${__LINE__}
!macroend
;--------------------------------
;Header text for standard MUI page
!macro MUI_HEADER_TEXT_PAGE TEXT SUBTEXT
!ifdef MUI_PAGE_HEADER_TEXT & MUI_PAGE_HEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
!else ifdef MUI_PAGE_HEADER_TEXT
!insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${SUBTEXT}"
!else ifdef MUI_PAGE_HEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
!else
!insertmacro MUI_HEADER_TEXT "${TEXT}" "${SUBTEXT}"
!endif
!insertmacro MUI_UNSET MUI_PAGE_HEADER_TEXT
!insertmacro MUI_UNSET MUI_PAGE_HEADER_SUBTEXT
!macroend
;--------------------------------
;Header text for custom page
!macro MUI_HEADER_TEXT TEXT SUBTEXT ;Called from script
!verbose push
!verbose ${MUI_VERBOSE}
!ifdef MUI_HEADER_TRANSPARENT_TEXT
LockWindow on
!endif
SendMessage $mui.Header.Text ${WM_SETTEXT} 0 "STR:${TEXT}"
SendMessage $mui.Header.SubText ${WM_SETTEXT} 0 "STR:${SUBTEXT}"
!ifdef MUI_HEADER_TRANSPARENT_TEXT
LockWindow off
!endif
!verbose pop
!macroend
;--------------------------------
;Custom page functions
!macro MUI_PAGE_FUNCTION_CUSTOM TYPE
!ifdef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
Call "${MUI_PAGE_CUSTOMFUNCTION_${TYPE}}"
!undef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
!endif
!macroend
;--------------------------------
;Support for full window pages (like welcome/finish page)
!macro MUI_PAGE_FUNCTION_FULLWINDOW
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
LockWindow on
;The branding text needs to be hidden because the full windows page
;overlaps with it.
ShowWindow $mui.Branding.Background ${SW_HIDE}
ShowWindow $mui.Branding.Text ${SW_HIDE}
;The texts need to be hidden because otherwise they may show through
;the page above when the Alt key is pressed.
ShowWindow $mui.Header.Text ${SW_HIDE}
ShowWindow $mui.Header.SubText ${SW_HIDE}
ShowWindow $mui.Header.Image ${SW_HIDE}
;Show line below full width of page
ShowWindow $mui.Line.Standard ${SW_HIDE}
ShowWindow $mui.Line.FullWindow ${SW_NORMAL}
LockWindow off
FunctionEnd
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
;Set everything back to normal again
LockWindow on
ShowWindow $mui.Branding.Background ${SW_NORMAL}
ShowWindow $mui.Branding.Text ${SW_NORMAL}
ShowWindow $mui.Header.Text ${SW_NORMAL}
ShowWindow $mui.Header.SubText ${SW_NORMAL}
ShowWindow $mui.Header.Image ${SW_NORMAL}
ShowWindow $mui.Line.Standard ${SW_NORMAL}
ShowWindow $mui.Line.FullWindow ${SW_HIDE}
LockWindow off
FunctionEnd
!endif
!macroend

View File

@ -0,0 +1,242 @@
/*
NSIS Modern User Interface
Components page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_COMPONENTSPAGE_INTERFACE
!ifndef MUI_COMPONENTSPAGE_INTERFACE
!define MUI_COMPONENTSPAGE_INTERFACE
Var mui.ComponentsPage
Var mui.ComponentsPage.Text
Var mui.ComponentsPage.InstTypesText
Var mui.ComponentsPage.ComponentsText
Var mui.ComponentsPage.InstTypes
Var mui.ComponentsPage.Components
Var mui.ComponentsPage.DescriptionTitle
Var mui.ComponentsPage.DescriptionText.Info
Var mui.ComponentsPage.DescriptionText
Var mui.ComponentsPage.SpaceRequired
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
!insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\modern_smalldesc.exe"
!insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\modern_nodesc.exe"
;Apply settings
!ifdef MUI_COMPONENTSPAGE_SMALLDESC
ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_SMALLDESC}"
!else ifdef MUI_COMPONENTSPAGE_NODESC
ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_NODESC}"
!endif
CheckBitmap "${MUI_COMPONENTSPAGE_CHECKBITMAP}"
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_COMPONENTS
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}COMPONENTSPAGE ""
!insertmacro MUI_COMPONENTSPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_TOP ""
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_COMPLIST ""
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_INSTTYPE ""
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE)"
!insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}components
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
Caption " "
ComponentText "${MUI_COMPONENTSPAGE_TEXT_TOP}" "${MUI_COMPONENTSPAGE_TEXT_INSTTYPE}" "${MUI_COMPONENTSPAGE_TEXT_COMPLIST}"
PageExEnd
!insertmacro MUI_FUNCTION_COMPONENTSPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
!undef MUI_COMPONENTSPAGE_TEXT_TOP
!undef MUI_COMPONENTSPAGE_TEXT_COMPLIST
!undef MUI_COMPONENTSPAGE_TEXT_INSTTYPE
!insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE
!insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO
!macroend
!macro MUI_PAGE_COMPONENTS
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_COMPONENTS
!verbose pop
!macroend
!macro MUI_UNPAGE_COMPONENTS
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_COMPONENTS
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_COMPONENTSPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get control hanldes
FindWindow $mui.ComponentsPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.ComponentsPage.Text $mui.ComponentsPage 1006
GetDlgItem $mui.ComponentsPage.InstTypesText $mui.ComponentsPage 1021
GetDlgItem $mui.ComponentsPage.ComponentsText $mui.ComponentsPage 1022
GetDlgItem $mui.ComponentsPage.InstTypes $mui.ComponentsPage 1017
GetDlgItem $mui.ComponentsPage.Components $mui.ComponentsPage 1032
GetDlgItem $mui.ComponentsPage.DescriptionTitle $mui.ComponentsPage 1042
GetDlgItem $mui.ComponentsPage.DescriptionText $mui.ComponentsPage 1043
GetDlgItem $mui.ComponentsPage.SpaceRequired $mui.ComponentsPage 1023
;Default text in description textbox
SendMessage $mui.ComponentsPage.DescriptionTitle ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}"
EnableWindow $mui.ComponentsPage.DescriptionText 0
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
StrCpy $mui.ComponentsPage.DescriptionText.Info "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}" ;Text for current components page
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend
;--------------------------------
;Script functions for components descriptions
!macro MUI_DESCRIPTION_BEGIN
${if} $0 == -1
;No mouse hover over component in list
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:"
EnableWindow $mui.ComponentsPage.DescriptionText 0
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:$mui.ComponentsPage.DescriptionText.Info"
!macroend
!macro MUI_DESCRIPTION_TEXT VAR TEXT
!verbose push
!verbose ${MUI_VERBOSE}
${elseif} $0 == ${VAR}
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:"
EnableWindow $mui.ComponentsPage.DescriptionText 1
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:${TEXT}"
!verbose pop
!macroend
!macro MUI_DESCRIPTION_END
!verbose push
!verbose ${MUI_VERBOSE}
${endif}
!verbose pop
!macroend
!macro MUI_FUNCTION_DESCRIPTION_BEGIN
!verbose push
!verbose ${MUI_VERBOSE}
Function .onMouseOverSection
!insertmacro MUI_DESCRIPTION_BEGIN
!verbose pop
!macroend
!macro MUI_FUNCTION_DESCRIPTION_END
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_DESCRIPTION_END
!ifdef MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION
Call "${MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION}"
!endif
FunctionEnd
!verbose pop
!macroend
!macro MUI_UNFUNCTION_DESCRIPTION_BEGIN
!verbose push
!verbose ${MUI_VERBOSE}
Function un.onMouseOverSection
!insertmacro MUI_DESCRIPTION_BEGIN
!verbose pop
!macroend
!macro MUI_UNFUNCTION_DESCRIPTION_END
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_DESCRIPTION_END
!ifdef MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION
Call "${MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION}"
!endif
FunctionEnd
!verbose pop
!macroend

View File

@ -0,0 +1,143 @@
/*
NSIS Modern User Interface
Directory page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_DIRECTORYPAGE_INTERFACE
!ifndef MUI_DIRECTORYPAGE_INTERFACE
!define MUI_DIRECTORYPAGE_INTERFACE
Var mui.DirectoryPage
Var mui.DirectoryPage.Text
Var mui.DirectoryPage.DirectoryBox
Var mui.DirectoryPage.Directory
Var mui.DirectoryPage.BrowseButton
Var mui.DirectoryPage.SpaceRequired
Var mui.DirectoryPage.SpaceAvailable
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_DIRECTORY
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}DIRECTORYPAGE ""
!insertmacro MUI_DIRECTORYPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP "SAMPLETEXT"
!insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION "Location:"
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}directory
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
Caption " "
DirText "${MUI_DIRECTORYPAGE_TEXT_TOP}" "${MUI_DIRECTORYPAGE_TEXT_DESTINATION}"
!ifdef MUI_DIRECTORYPAGE_VARIABLE
DirVar "${MUI_DIRECTORYPAGE_VARIABLE}"
!endif
!ifdef MUI_DIRECTORYPAGE_VERIFYONLEAVE
DirVerify leave
!endif
PageExEnd
!insertmacro MUI_FUNCTION_DIRECTORYPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
!undef MUI_DIRECTORYPAGE_TEXT_TOP
!undef MUI_DIRECTORYPAGE_TEXT_DESTINATION
!insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VARIABLE
!insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VERIFYONLEAVE
!macroend
!macro MUI_PAGE_DIRECTORY
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_DIRECTORY
!verbose pop
!macroend
!macro MUI_UNPAGE_DIRECTORY
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_DIRECTORY
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_DIRECTORYPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_SUBTITLE)
ReadRegStr $0 HKLM "SOFTWARE\Activision\Call of Duty WAW" "InstallPath"
ReadRegStr $1 HKLM "SOFTWARE\UGX-Mods\Map Installer" "InstallPath"
;If the key has already been created by a past installation, and if it matches the key found for the install path, continue
${if} $0 != ""
${AndIf} $0 == $1
Abort
${EndIf}
${if} $0 != ""
StrCpy $INSTDIR $0
WriteRegStr HKLM "Software\UGX-Mods\Map Installer" "InstallPath" "$INSTDIR"
Abort
${EndIf}
;If we haven't aborted yet, then this is a first time install and their installation key is missing from registry. Let them find their directory and then we will save it to the registry later in InstallFiles.nsh
FunctionEnd
Function "${SHOW}"
;Get control handles
FindWindow $mui.DirectoryPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.DirectoryPage.Text $mui.DirectoryPage 1006
GetDlgItem $mui.DirectoryPage.DirectoryBox $mui.DirectoryPage 1020
GetDlgItem $mui.DirectoryPage.Directory $mui.DirectoryPage 1019
GetDlgItem $mui.DirectoryPage.BrowseButton $mui.DirectoryPage 1001
GetDlgItem $mui.DirectoryPage.SpaceRequired $mui.DirectoryPage 1023
GetDlgItem $mui.DirectoryPage.SpaceAvailable $mui.DirectoryPage 1024
!ifdef MUI_DIRECTORYPAGE_BGCOLOR
SetCtlColors $mui.DirectoryPage.Directory "" "${MUI_DIRECTORYPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

View File

@ -0,0 +1,491 @@
/*
NSIS Modern User Interface
Finish page (implemented using nsDialogs)
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_FINISHPAGE_INTERFACE
!ifndef MUI_FINISHPAGE_INTERFACE
!define MUI_FINISHPAGE_INTERFACE
Var mui.FinishPage
Var mui.FinishPage.Image
Var mui.FinishPage.Image.Bitmap
Var mui.FinishPage.Title
Var mui.FinishPage.Title.Font
Var mui.FinishPage.Text
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
!ifndef MUI_FINISHPAGE_RETURNVALUE_VARIABLES
!define MUI_FINISHPAGE_RETURNVALUE_VARIABLES
Var mui.FinishPage.ReturnValue
!endif
!else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
!ifndef MUI_FINISHPAGE_RETURNVALUE_VARIABLES
!define MUI_FINISHPAGE_RETURNVALUE_VARIABLES
Var mui.FinishPage.ReturnValue
!endif
!endif
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
!ifndef MUI_FINISHPAGE_CANCEL_ENABLED_VARIABLES
!define MUI_FINISHPAGE_CANCEL_ENABLED_VARIABLES
Var mui.FinishPage.DisableAbortWarning
!endif
!endif
!ifdef MUI_FINISHPAGE_RUN
!ifndef MUI_FINISHPAGE_RUN_VARIABLES
!define MUI_FINISHPAGE_RUN_VARIABLES
Var mui.FinishPage.Run
!endif
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
!ifndef MUI_FINISHPAGE_SHOREADME_VARAIBLES
!define MUI_FINISHPAGE_SHOREADME_VARAIBLES
Var mui.FinishPage.ShowReadme
!endif
!endif
!ifdef MUI_FINISHPAGE_LINK
!ifndef MUI_FINISHPAGE_LINK_VARIABLES
!define MUI_FINISHPAGE_LINK_VARIABLES
Var mui.FinishPage.Link
!endif
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
!ifndef MUI_FINISHPAGE_REBOOT_VARIABLES
!define MUI_FINISHPAGE_REBOOT_VARIABLES
Var mui.FinishPage.RebootNow
Var mui.FinishPage.RebootLater
!endif
!endif
!insertmacro MUI_DEFAULT MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
!macroend
;--------------------------------
;Interface initialization
!macro MUI_FINISHPAGE_GUIINIT
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_GUINIT
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_GUINIT
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.GUIInit
InitPluginsDir
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT
Call "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT}"
!endif
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE_NOAUTOCLOSE
SetAutoClose true
!endif
FunctionEnd
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.GUIInit
!endif
!macroend
;--------------------------------
;Abort warning
!macro MUI_FINISHPAGE_ABORTWARNING
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE_ABORTWARNING
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE_ABORTWARNING
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.AbortWarning
${if} $mui.FinishPage.DisableAbortWarning == "1"
Quit
${endif}
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_ABORTWARNING
Call ${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_ABORTWARNING}
!endif
FunctionEnd
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_ABORTWARNING ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.AbortWarning
!endif
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_FINISH
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE ""
!insertmacro MUI_FINISHPAGE_INTERFACE
!insertmacro MUI_FINISHPAGE_GUIINIT
!insertmacro MUI_FINISHPAGE_ABORTWARNING
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TITLE)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TEXT)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_BUTTON "$(MUI_BUTTONTEXT_FINISH)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_REBOOT)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOTNOW "$(MUI_TEXT_FINISH_REBOOTNOW)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOTLATER "$(MUI_TEXT_FINISH_REBOOTLATER)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_RUN_TEXT "$(MUI_TEXT_FINISH_RUN)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_SHOWREADME_TEXT "$(MUI_TEXT_FINISH_SHOWREADME)"
!insertmacro MUI_DEFAULT MUI_FINISHPAGE_LINK_COLOR "000080"
!insertmacro MUI_PAGE_FUNCTION_FULLWINDOW
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Pre_${MUI_UNIQUEID} \
${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Leave_${MUI_UNIQUEID}
Caption " "
PageExEnd
!insertmacro MUI_FUNCTION_FINISHPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Pre_${MUI_UNIQUEID} \
${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Leave_${MUI_UNIQUEID} \
${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPage.Link_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE
!insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE_3LINES
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_LARGE
!insertmacro MUI_UNSET MUI_FINISHPAGE_BUTTON
!insertmacro MUI_UNSET MUI_FINISHPAGE_CANCEL_ENABLED
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTNOW
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTLATER
!insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTLATER_DEFAULT
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_TEXT
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_PARAMETERS
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_NOTCHECKED
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_FUNCTION
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_TEXT
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_FUNCTION
!insertmacro MUI_UNSET MUI_FINISHPAGE_LINK
!insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_LOCATION
!insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_COLOR
!insertmacro MUI_UNSET MUI_FINISHPAGE_NOREBOOTSUPPORT
!insertmacro MUI_UNSET MUI_FINISHPAGE_ABORTWARNINGCHECK
!insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_BOTTOM
!macroend
!macro MUI_PAGE_FINISH
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_FINISH
!verbose pop
!macroend
!macro MUI_UNPAGE_FINISH
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_FINISH
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_FINISHPAGE PRE LEAVE LINK
!ifdef MUI_FINISHPAGE_LINK
Function "${LINK}"
ExecShell open "${MUI_FINISHPAGE_LINK_LOCATION}"
FunctionEnd
!endif
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
;Set text on Next button
SendMessage $mui.Button.Next ${WM_SETTEXT} 0 "STR:${MUI_FINISHPAGE_BUTTON}"
;Enable cancel button if set in script
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
EnableWindow $mui.Button.Cancel 1
!endif
;Create dialog
nsDialogs::Create 1044
Pop $mui.FinishPage
nsDialogs::SetRTL $(^RTL)
SetCtlColors $mui.FinishPage "" "${MUI_BGCOLOR}"
;Image control
${NSD_CreateBitmap} 0u 0u 109u 193u ""
Pop $mui.FinishPage.Image
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
${NSD_SetStretchedImage} $mui.FinishPage.Image $PLUGINSDIR\modern-wizard.bmp $mui.FinishPage.Image.Bitmap
!else
${NSD_SetImage} $mui.FinishPage.Image $PLUGINSDIR\modern-wizard.bmp $mui.FinishPage.Image.Bitmap
!endif
;Positiong of controls
;Title
!ifndef MUI_FINISHPAGE_TITLE_3LINES
!define MUI_FINISHPAGE_TITLE_HEIGHT 28
!else
!define MUI_FINISHPAGE_TITLE_HEIGHT 38
!endif
;Text
;17 = 10 (top margin) + 7 (distance between texts)
!define /math MUI_FINISHPAGE_TEXT_TOP 17 + ${MUI_FINISHPAGE_TITLE_HEIGHT}
;Height if space required for radio buttons or check boxes
!ifndef MUI_FINISHPAGE_TEXT_LARGE
!define MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS 40
!else
!define MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS 60
!endif
!define /math MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS ${MUI_FINISHPAGE_TEXT_TOP} + ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}
;Positioning of radio buttons to ask for a reboot
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
!define /math MUI_FINISHPAGE_REBOOTNOW_TOP ${MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS} + 5 ;Distance between text and options
;25 = 10 (height of first radio button) + 15 (distance between buttons)
!define /math MUI_FINISHPAGE_REBOOTLATER_TOP ${MUI_FINISHPAGE_REBOOTNOW_TOP} + 25
!endif
;Positioning of checkboxes
!ifdef MUI_FINISHPAGE_RUN
!define /math MUI_FINISHPAGE_RUN_TOP ${MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS} + 5 ;Distance between text and options
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
!ifdef MUI_FINISHPAGE_RUN
;25 = 10 (height of run checkbox) + 10 (distance between checkboxes)
!define /math MUI_FINISHPAGE_SHOWREADME_TOP ${MUI_FINISHPAGE_RUN_TOP} + 20
!else
!define /math MUI_FINISHPAGE_SHOWREADME_TOP ${MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS} + 5 ;Distance between text and options
!endif
!endif
!ifndef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
;Height if full space is available for text and link
!ifndef MUI_FINISHPAGE_LINK
!define MUI_FINISHPAGE_TEXT_HEIGHT 130
!else
!define MUI_FINISHPAGE_TEXT_HEIGHT 120
!endif
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
${if} ${RebootFlag}
;Title text
${NSD_CreateLabel} 120u 10u 195u ${MUI_FINISHPAGE_TITLE_HEIGHT}u "${MUI_FINISHPAGE_TITLE}"
Pop $mui.FinishPage.Title
SetCtlColors $mui.FinishPage.Title "" "${MUI_BGCOLOR}"
CreateFont $mui.FinishPage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.FinishPage.Title ${WM_SETFONT} $mui.FinishPage.Title.Font 0
;Finish text
${NSD_CreateLabel} 120u 45u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT_REBOOT}"
Pop $mui.FinishPage.Text
SetCtlColors $mui.FinishPage.Text "" "${MUI_BGCOLOR}"
;Radio buttons for reboot page
${NSD_CreateRadioButton} 120u ${MUI_FINISHPAGE_REBOOTNOW_TOP}u 195u 10u "${MUI_FINISHPAGE_TEXT_REBOOTNOW}"
Pop $mui.FinishPage.RebootNow
SetCtlColors $mui.FinishPage.RebootNow "" "${MUI_BGCOLOR}"
${NSD_CreateRadioButton} 120u ${MUI_FINISHPAGE_REBOOTLATER_TOP}u 195u 10u "${MUI_FINISHPAGE_TEXT_REBOOTLATER}"
Pop $mui.FinishPage.RebootLater
SetCtlColors $mui.FinishPage.RebootLater "" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_REBOOTLATER_DEFAULT
SendMessage $mui.FinishPage.RebootNow ${BM_SETCHECK} ${BST_CHECKED} 0
!else
SendMessage $mui.FinishPage.RebootLater ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
${NSD_SetFocus} $mui.FinishPage.RebootNow
${else}
!endif
;Title text
${NSD_CreateLabel} 120u 10u 195u ${MUI_FINISHPAGE_TITLE_HEIGHT}u "${MUI_FINISHPAGE_TITLE}"
Pop $mui.FinishPage.Title
SetCtlColors $mui.FinishPage.Title "" "${MUI_BGCOLOR}"
CreateFont $mui.FinishPage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.FinishPage.Title ${WM_SETFONT} $mui.FinishPage.Title.Font 0
;Finish text
!ifndef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT}u "${MUI_FINISHPAGE_TEXT}"
!else
${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT}"
!endif
Pop $mui.FinishPage.Text
SetCtlColors $mui.FinishPage.Text "" "${MUI_BGCOLOR}"
;Checkboxes
!ifdef MUI_FINISHPAGE_RUN
${NSD_CreateCheckbox} 120u ${MUI_FINISHPAGE_RUN_TOP}u 195u 10u "${MUI_FINISHPAGE_RUN_TEXT}"
Pop $mui.FinishPage.Run
SetCtlColors $mui.FinishPage.Run "" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_RUN_NOTCHECKED
SendMessage $mui.FinishPage.Run ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
${NSD_SetFocus} $mui.FinishPage.Run
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
${NSD_CreateCheckbox} 120u ${MUI_FINISHPAGE_SHOWREADME_TOP}u 195u 10u "${MUI_FINISHPAGE_SHOWREADME_TEXT}"
Pop $mui.FinishPage.ShowReadme
SetCtlColors $mui.FinishPage.ShowReadme "" "${MUI_BGCOLOR}"
!ifndef MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
SendMessage $mui.FinishPage.ShowReadme ${BM_SETCHECK} ${BST_CHECKED} 0
!endif
!ifndef MUI_FINISHPAGE_RUN
${NSD_SetFocus} $mui.FinishPage.ShowReadme
!endif
!endif
;Link
!ifdef MUI_FINISHPAGE_LINK
${NSD_CreateLink} 120u 175u 195u 10u "${MUI_FINISHPAGE_LINK}"
Pop $mui.FinishPage.Link
SetCtlColors $mui.FinishPage.Link "${MUI_FINISHPAGE_LINK_COLOR}" "${MUI_BGCOLOR}"
${NSD_OnClick} $mui.FinishPage.Link "${LINK}"
!endif
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
${endif}
!endif
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
StrCpy $mui.FinishPage.DisableAbortWarning "1"
!endif
;Show page
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
nsDialogs::Show
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
!ifdef MUI_FINISHPAGE_CANCEL_ENABLED
StrCpy $mui.FinishPage.DisableAbortWarning ""
!endif
;Delete image from memory
${NSD_FreeImage} $mui.FinishPage.Image.Bitmap
!insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE_HEIGHT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_HEIGHT
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS
!insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_BOTTOM_BUTTONS
!insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTNOW_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTLATER_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_TOP
!insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_TOP
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
;Check whether the user has chosen to reboot the computer
${if} ${RebootFlag}
SendMessage $mui.FinishPage.RebootNow ${BM_GETCHECK} 0 0 $mui.FinishPage.ReturnValue
${if} $mui.FinishPage.ReturnValue = ${BST_CHECKED}
Reboot
${else}
Return
${endif}
${endif}
!endif
;Run functions depending on checkbox state
!ifdef MUI_FINISHPAGE_RUN
SendMessage $mui.FinishPage.Run ${BM_GETCHECK} 0 0 $mui.FinishPage.ReturnValue
${if} $mui.FinishPage.ReturnValue = ${BST_CHECKED}
!ifndef MUI_FINISHPAGE_RUN_FUNCTION
!ifndef MUI_FINISHPAGE_RUN_PARAMETERS
Exec "$\"${MUI_FINISHPAGE_RUN}$\""
!else
Exec "$\"${MUI_FINISHPAGE_RUN}$\" ${MUI_FINISHPAGE_RUN_PARAMETERS}"
!endif
!else
Call "${MUI_FINISHPAGE_RUN_FUNCTION}"
!endif
${endif}
!endif
!ifdef MUI_FINISHPAGE_SHOWREADME
SendMessage $mui.FinishPage.ShowReadme ${BM_GETCHECK} 0 0 $mui.FinishPage.ReturnValue
${if} $mui.FinishPage.ReturnValue = ${BST_CHECKED}
!ifndef MUI_FINISHPAGE_SHOWREADME_FUNCTION
ExecShell open "${MUI_FINISHPAGE_SHOWREADME}"
!else
Call "${MUI_FINISHPAGE_SHOWREADME_FUNCTION}"
!endif
${endif}
!endif
FunctionEnd
!macroend

View File

@ -0,0 +1,168 @@
/*
NSIS Modern User Interface
InstallFiles page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_INSTFILESPAGE_INTERFACE
!ifndef MUI_INSTFILESYPAGE_INTERFACE
!define MUI_INSTFILESYPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_COLORS "/windows"
!insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
Var mui.InstFilesPage
Var mui.InstFilesPage.Text
Var mui.InstFilesPage.ProgressBar
Var mui.InstFilesPage.ShowLogButton
Var mui.InstFilesPage.Log
;Apply settings
InstallColors ${MUI_INSTFILESPAGE_COLORS}
InstProgressFlags ${MUI_INSTFILESPAGE_PROGRESSBAR}
SubCaption 4 " "
UninstallSubCaption 2 " "
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_INSTFILES
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INSTFILESPAGE ""
!insertmacro MUI_INSTFILESPAGE_INTERFACE
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}instfiles
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
Caption " "
PageExEnd
!insertmacro MUI_FUNCTION_INSTFILESPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_TEXT
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_TEXT
!insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_SUBTEXT
!macroend
!macro MUI_PAGE_INSTFILES
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_INSTFILES
!verbose pop
!macroend
!macro MUI_UNPAGE_INSTFILES
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_INSTFILES
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_SUBTITLE)
FunctionEnd
Function "${SHOW}"
ReadRegStr $1 HKLM "SOFTWARE\UGX-Mods\Map Installer" "InstallPath"
;If this is a first time install with a broken CoDWaW install, save the dir they chose manually for next time.
${if} $1 == ""
WriteRegStr HKLM "Software\UGX-Mods\Map Installer" "InstallPath" "$INSTDIR"
${EndIf}
;Now that we have their root dir, set the install directory to where the mod actually needs to go. Just needed the root dir for bik files.
StrCpy $INSTDIR "$LOCALAPPDATA\Activision\CoDWaW\mods"
Rename $INSTDIR\$(^NameDA)\$(^NameDA)_load.bik $1\main\video\$(^NameDA)_load.bik
Rename "${NSISDIR}\Contrib\Graphics\Icons\ugx.ico" "$1\main\ugx.ico"
SetOutPath "$1"
CreateShortCut "$DESKTOP\UGX Community Maps\$(^NameDA).lnk" "$1\CoDWaW.exe" " +set fs_game $\"mods/$(^NameDA)$\"" "$1\main\ugx.ico"
SetOutPath "$INSTDIR"
;Get controls handles
FindWindow $mui.InstFilesPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.InstFilesPage.Text $mui.InstFilesPage 1006
GetDlgItem $mui.InstFilesPage.ProgressBar $mui.InstFilesPage 1004
GetDlgItem $mui.InstFilesPage.ShowLogButton $mui.InstFilesPage 1027
GetDlgItem $mui.InstFilesPage.Log $mui.InstFilesPage 1016
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
;Set text on completed page header
IfAbort mui.endheader_abort
!ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT & MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
!else ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
!else ifdef MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
!else
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
!endif
Goto mui.endheader_done
mui.endheader_abort:
!ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT & MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
!else ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT
!insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
!else ifdef MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
!else
!insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
!endif
mui.endheader_done:
!insertmacro MUI_LANGDLL_SAVELANGUAGE
FunctionEnd
!macroend

View File

@ -0,0 +1,145 @@
/*
NSIS Modern User Interface
License page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_LICENSEPAGE_INTERFACE
!ifndef MUI_LICENSEPAGE_INTERFACE
!define MUI_LICENSEPAGE_INTERFACE
Var mui.LicensePage
Var mui.Licensepage.TopText
Var mui.Licensepage.Text
Var mui.Licensepage.LicenseText
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BGCOLOR "/windows"
;Apply settings
LicenseBkColor "${MUI_LICENSEPAGE_BGCOLOR}"
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_LICENSE LICENSEDATA
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}LICENSEPAGE ""
!insertmacro MUI_LICENSEPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_TEXT_TOP "$(MUI_INNERTEXT_LICENSE_TOP)"
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BUTTON ""
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_CHECKBOX_TEXT ""
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT ""
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE ""
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}license
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
Caption " "
LicenseData "${LICENSEDATA}"
!ifndef MUI_LICENSEPAGE_TEXT_BOTTOM
!ifndef MUI_LICENSEPAGE_CHECKBOX & MUI_LICENSEPAGE_RADIOBUTTONS
;LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM)" "${MUI_LICENSEPAGE_BUTTON}"
!else ifdef MUI_LICENSEPAGE_CHECKBOX
LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_CHECKBOX)" "${MUI_LICENSEPAGE_BUTTON}"
!else
LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS)" "${MUI_LICENSEPAGE_BUTTON}"
!endif
!else
LicenseText "${MUI_LICENSEPAGE_TEXT_BOTTOM}" "${MUI_LICENSEPAGE_BUTTON}"
!endif
!ifdef MUI_LICENSEPAGE_CHECKBOX
LicenseForceSelection checkbox "${MUI_LICENSEPAGE_CHECKBOX_TEXT}"
!else ifdef MUI_LICENSEPAGE_RADIOBUTTONS
LicenseForceSelection radiobuttons "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT}" "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE}"
!endif
PageExEnd
!insertmacro MUI_FUNCTION_LICENSEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_TOP
!insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_BOTTOM
!insertmacro MUI_UNSET MUI_LICENSEPAGE_BUTTON
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT
!insertmacro MUI_UNSET MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_ACCEPT
!insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_DECLINE
!verbose pop
!macroend
!macro MUI_PAGE_LICENSE LICENSEDATA
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
!verbose pop
!macroend
!macro MUI_UNPAGE_LICENSE LICENSEDATA
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get conrol handles
FindWindow $mui.LicensePage "#32770" "" $HWNDPARENT
GetDlgItem $mui.LicensePage.TopText $mui.LicensePage 1040
GetDlgItem $mui.LicensePage.Text $mui.LicensePage 1006
GetDlgItem $mui.LicensePage.LicenseText $mui.LicensePage 1000
;Top text
SendMessage $mui.LicensePage.TopText ${WM_SETTEXT} 0 "STR:${MUI_LICENSEPAGE_TEXT_TOP}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

View File

@ -0,0 +1,235 @@
/*
NSIS Modern User Interface
Start Menu folder page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_STARTMENUPAGE_INTERFACE
!ifndef MUI_STARTMENUPAGE_INTERFACE
!define MUI_STARTMENUPAGE_INTERFACE
Var mui.StartMenuPage
Var mui.StartMenuPage.Location
Var mui.StartMenuPage.FolderList
Var mui.StartMenuPage.Temp
!endif
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
!ifndef MUI_STARTMENUPAGE_REGISTRY_VARIABLES
!define MUI_STARTMENUPAGE_REGISTRY_VARIABLES
Var mui.StartMenuPage.RegistryLocation
!endif
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_STARTMENU ID VAR
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}STARTMENUPAGE ""
!insertmacro MUI_STARTMENUPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_DEFAULTFOLDER "$(^Name)"
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_TOP "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_TOP)"
!insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_CHECKBOX "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_CHECKBOX)"
!define MUI_STARTMENUPAGE_VARIABLE "${VAR}"
!define "MUI_STARTMENUPAGE_${ID}_VARIABLE" "${MUI_STARTMENUPAGE_VARIABLE}"
!define "MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT
!define "MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}"
!endif
!ifdef MUI_STARTMENUPAGE_REGISTRY_KEY
!define "MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${MUI_STARTMENUPAGE_REGISTRY_KEY}"
!endif
!ifdef MUI_STARTMENUPAGE_REGISTRY_VALUENAME
!define "MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
!endif
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
Caption " "
PageExEnd
!insertmacro MUI_FUNCTION_STARTMENUPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
!undef MUI_STARTMENUPAGE_VARIABLE
!undef MUI_STARTMENUPAGE_TEXT_TOP
!undef MUI_STARTMENUPAGE_TEXT_CHECKBOX
!undef MUI_STARTMENUPAGE_DEFAULTFOLDER
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_NODISABLE
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_ROOT
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_KEY
!insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_VALUENAME
!macroend
!macro MUI_PAGE_STARTMENU ID VAR
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_STARTMENU "${ID}" "${VAR}"
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_STARTMENUPAGE PRE LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
;Get Start Menu location from registry
${if} "${MUI_STARTMENUPAGE_VARIABLE}" == ""
ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
${if} $mui.StartMenuPage.RegistryLocation != ""
StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" $mui.StartMenuPage.RegistryLocation
${endif}
ClearErrors
${endif}
!endif
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
${if} $(^RTL) == "0"
!ifndef MUI_STARTMENUPAGE_NODISABLE
StartMenu::Init /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!else
StartMenu::Init /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!endif
${else}
!ifndef MUI_STARTMENUPAGE_NODISABLE
StartMenu::Init /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!else
StartMenu::Init /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
!endif
${endif}
Pop $mui.StartMenuPage
;Get control handles
GetDlgItem $mui.StartMenuPage.Location $mui.StartMenuPage 1002
GetDlgItem $mui.StartMenuPage.FolderList $mui.StartMenuPage 1004
!ifdef MUI_STARTMENUPAGE_BGCOLOR
SetCtlColors $mui.StartMenuPage.Location "" "${MUI_STARTMENUPAGE_BGCOLOR}"
SetCtlColors $mui.StartMenuMenu.FolderList "" "${MUI_STARTMENUPAGE_BGCOLOR}"
!endif
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
StartMenu::Show
Pop $mui.StartMenuPage.Temp
${if} $mui.StartMenuPage.Temp == "success"
Pop "${MUI_STARTMENUPAGE_VARIABLE}"
${endif}
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend
;--------------------------------
;Script macros to get Start Menu folder
!macro MUI_STARTMENU_GETFOLDER ID VAR
!verbose push
!verbose ${MUI_VERBOSE}
;Get Start Menu folder from registry
;Can be called from the script in the uninstaller
!ifdef MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME
ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}"
${if} $mui.StartMenuPage.RegistryLocation != ""
StrCpy "${VAR}" $mui.StartMenuPage.RegistryLocation
${else}
StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
${endif}
!else
StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
!endif
!verbose pop
!macroend
!macro MUI_STARTMENU_WRITE_BEGIN ID
;The code in the script to write the shortcuts should be put between the
;MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END macros
!verbose push
!verbose ${MUI_VERBOSE}
!define MUI_STARTMENUPAGE_CURRENT_ID "${ID}"
StrCpy $mui.StartMenuPage.Temp "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" 1
;If the folder start with >, the user has chosen not to create a shortcut
${if} $mui.StartMenuPage.Temp != ">"
${if} "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" == ""
;Get folder from registry if the variable doesn't contain anything
!insertmacro MUI_STARTMENU_GETFOLDER "${MUI_STARTMENUPAGE_CURRENT_ID}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
${endif}
!verbose pop
!macroend
!macro MUI_STARTMENU_WRITE_END
!verbose push
!verbose ${MUI_VERBOSE}
!ifdef MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME
;Write folder to registry
WriteRegStr "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
!endif
${endif}
!undef MUI_STARTMENUPAGE_CURRENT_ID
!verbose pop
!macroend

View File

@ -0,0 +1,96 @@
/*
NSIS Modern User Interface
Uninstall confirmation page
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_UNCONFIRMPAGE_INTERFACE
!ifndef MUI_UNCONFIRMPAGE_INTERFACE
!define MUI_UNCONFIRMPAGE_INTERFACE
Var mui.UnConfirmPage
Var mui.UnConfirmPage.Text
Var mui.UnConfirmPage.DirectoryText
Var mui.UnConfirmPage.Directory
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_CONFIRM
!insertmacro MUI_SET MUI_UNCONFIRMPAGE ""
!insertmacro MUI_UNCONFIRMPAGE_INTERFACE
!insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_TOP ""
!insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_LOCATION ""
PageEx un.uninstConfirm
PageCallbacks un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
Caption " "
UninstallText "${MUI_UNCONFIRMPAGE_TEXT_TOP}" "${MUI_UNCONFIRMPAGE_TEXT_LOCATION}"
PageExEnd
!insertmacro MUI_UNFUNCTION_CONFIRMPAGE un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_TOP
!insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_LOCATION
!macroend
!macro MUI_UNPAGE_CONFIRM
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_CONFIRM
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_UNFUNCTION_CONFIRMPAGE PRE SHOW LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_UNTEXT_CONFIRM_TITLE) $(MUI_UNTEXT_CONFIRM_SUBTITLE)
FunctionEnd
Function "${SHOW}"
;Get controls handles
FindWindow $mui.UnConfirmPage "#32770" "" $HWNDPARENT
GetDlgItem $mui.UnConfirmPage.Text $mui.UnConfirmPage 1006
GetDlgItem $mui.UnConfirmPage.DirectoryText $mui.UnConfirmPage 1029
GetDlgItem $mui.UnConfirmPage.Directory $mui.UnConfirmPage 1000
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

View File

@ -0,0 +1,180 @@
/*
NSIS Modern User Interface
Welcome page (implemented using nsDialogs)
*/
;--------------------------------
;Page interface settings and variables
!macro MUI_WELCOMEPAGE_INTERFACE
!ifndef MUI_WELCOMEPAGE_INTERFACE
!define MUI_WELCOMEPAGE_INTERFACE
Var mui.WelcomePage
Var mui.WelcomePage.Image
Var mui.WelcomePage.Image.Bitmap
Var mui.WelcomePage.Title
Var mui.WelcomePage.Title.Font
Var mui.WelcomePage.Text
!endif
!insertmacro MUI_DEFAULT MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\UGX\banner.bmp"
!macroend
;--------------------------------
;Interface initialization
!macro MUI_WELCOMEPAGE_GUIINIT
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEWELCOMEPAGE_GUINIT
!define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEWELCOMEPAGE_GUINIT
Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePage.GUIInit
InitPluginsDir
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP}"
!ifdef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT
Call "${MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT}"
!endif
FunctionEnd
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_GUIINIT ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePage.GUIInit
!endif
!macroend
;--------------------------------
;Page declaration
!macro MUI_PAGEDECLARATION_WELCOME
!insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEPAGE ""
!insertmacro MUI_WELCOMEPAGE_INTERFACE
!insertmacro MUI_WELCOMEPAGE_GUIINIT
!insertmacro MUI_DEFAULT MUI_WELCOMEPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TITLE)"
!insertmacro MUI_DEFAULT MUI_WELCOMEPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TEXT)"
!insertmacro MUI_PAGE_FUNCTION_FULLWINDOW
PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
PageExEnd
!insertmacro MUI_FUNCTION_WELCOMEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE_3LINES
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TEXT
!macroend
!macro MUI_PAGE_WELCOME
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGEDECLARATION_WELCOME
!verbose pop
!macroend
!macro MUI_UNPAGE_WELCOME
!verbose push
!verbose ${MUI_VERBOSE}
!insertmacro MUI_UNPAGE_INIT
!insertmacro MUI_PAGEDECLARATION_WELCOME
!verbose pop
!macroend
;--------------------------------
;Page functions
!macro MUI_FUNCTION_WELCOMEPAGE PRE LEAVE
Function "${PRE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
;Create dialog
nsDialogs::Create 1044
Pop $mui.WelcomePage
nsDialogs::SetRTL $(^RTL)
SetCtlColors $mui.WelcomePage "" "${MUI_BGCOLOR}"
;Image control
${NSD_CreateBitmap} 0u 0u 109u 193u ""
Pop $mui.WelcomePage.Image
!ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
${NSD_SetStretchedImage} $mui.WelcomePage.Image $PLUGINSDIR\modern-wizard.bmp $mui.WelcomePage.Image.Bitmap
!else
${NSD_SetImage} $mui.WelcomePage.Image $PLUGINSDIR\modern-wizard.bmp $mui.WelcomePage.Image.Bitmap
!endif
;Positiong of controls
;Title
!ifndef MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_WELCOMEPAGE_TITLE_HEIGHT 28
!else
!define MUI_WELCOMEPAGE_TITLE_HEIGHT 38
!endif
;Text
;17 = 10 (top margin) + 7 (distance between texts)
!define /math MUI_WELCOMEPAGE_TEXT_TOP 17 + ${MUI_WELCOMEPAGE_TITLE_HEIGHT}
;Title
${NSD_CreateLabel} 120u 10u 195u ${MUI_WELCOMEPAGE_TITLE_HEIGHT}u "${MUI_WELCOMEPAGE_TITLE}"
Pop $mui.WelcomePage.Title
SetCtlColors $mui.WelcomePage.Title "" "${MUI_BGCOLOR}"
CreateFont $mui.WelcomePage.Title.Font "$(^Font)" "12" "700"
SendMessage $mui.WelcomePage.Title ${WM_SETFONT} $mui.WelcomePage.Title.Font 0
;Welcome text
${NSD_CreateLabel} 120u ${MUI_WELCOMEPAGE_TEXT_TOP}u 195u 130u "${MUI_WELCOMEPAGE_TEXT}"
Pop $mui.WelcomePage.Text
SetCtlColors $mui.WelcomePage.Text "" "${MUI_BGCOLOR}"
;Show page
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
nsDialogs::Show
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
;Delete image from memory
${NSD_FreeImage} $mui.WelcomePage.Image.Bitmap
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE_HEIGHT
!insertmacro MUI_UNSET MUI_WELCOMEPAGE_TEXT_TOP
FunctionEnd
Function "${LEAVE}"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,81 @@
;Change this file to customize zip2exe generated installers
Name "${ZIP2EXE_NAME}"
OutFile "${ZIP2EXE_OUTFILE}"
AllowRootDirInstall true
!ifdef ZIP2EXE_COMPRESSOR_SOLID
!define SETCOMPRESSOR_SWITCH /SOLID
!else
!define SETCOMPRESSOR_SWITCH
!endif
SetCompressor ${SETCOMPRESSOR_SWITCH} bzip2
!ifdef ZIP2EXE_INSTALLDIR
InstallDir "${ZIP2EXE_INSTALLDIR}"
Function zip2exe.SetOutPath
SetOutPath "$INSTDIR"
FunctionEnd
!else ifdef ZIP2EXE_INSTALLDIR_WINAMP
InstallDir "$PROGRAMFILES\Winamp"
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" "UninstallString"
Function .onVerifyInstDir
IfFileExists $INSTDIR\winamp.exe WinampInstalled
Abort
WinampInstalled:
FunctionEnd
!ifdef ZIP2EXE_INSTALLDIR_WINAMPMODE
Var ZIP2EXE_TEMP1
Var ZIP2EXE_TEMP2
Function zip2exe.SetOutPath
!ifdef ZIP2EXE_INSTALLDIR_SKINS
StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Skins"
!else
StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Plugins"
!endif
ReadINIStr $ZIP2EXE_TEMP2 "$INSTDIR\winamp.ini" "Winamp" "${ZIP2EXE_INSTALLDIR_WINAMPMODE}"
StrCmp $ZIP2EXE_TEMP2 "" End
IfFileExists $ZIP2EXE_TEMP2 0 End
StrCpy $ZIP2EXE_TEMP1 $ZIP2EXE_TEMP2
End:
SetOutPath $ZIP2EXE_TEMP1
FunctionEnd
!else
Function zip2exe.SetOutPath
!ifdef ZIP2EXE_INSTALLDIR_PLUGINS
SetOutPath "$INSTDIR\Plugins"
!else
SetOutPath "$INSTDIR"
!endif
FunctionEnd
!endif
!endif
!macro SECTION_BEGIN
Section ""
Call zip2exe.SetOutPath
!macroend
!macro SECTION_END
SectionEnd
!macroend

View File

@ -0,0 +1,20 @@
; UGX-Mods auto-installer by treminaor
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "UGX Map Packager"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "UGX-Mods"
!define PRODUCT_WEB_SITE "http://ugx-mods.com"
!include "MUI2.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\License.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"

4
Project-BO4/compile.bat Normal file
View File

@ -0,0 +1,4 @@
@echo off
if not exist "build" mkdir "build"
..\tools\makensis.exe "..\Project-BO4\BO4_Installer.nsi"

Binary file not shown.

BIN
Project-BO4/game/d3d11.dll Normal file

Binary file not shown.

BIN
Project-BO4/icon/128.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
Project-BO4/icon/16.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
Project-BO4/icon/256.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
Project-BO4/icon/32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
Project-BO4/icon/64.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -18,6 +18,6 @@
| Call of Duty: Modern Warfare Remastered (H1) | ❌ |
| Call of Duty: Black Ops III (T7) | ☑️ |
| Call of Duty: Infinite Warfare (IW7) | ❌ |
| Call of Duty: Black Ops 4 (T8) | |
| Call of Duty: Black Ops 4 (T8) | ☑️ |
| Call of Duty: Modern Warfare (2019) (IW8x) | ❌ |
| Call of Duty: Cold War (T9D) | ❌ |

BIN
T7x/build/t7xInstaller.exe Normal file

Binary file not shown.

BIN
T7x/icon/256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB