-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NSIS installer script + bump version code
- Loading branch information
ThePBone
committed
Jun 14, 2020
1 parent
5252ac2
commit 9357495
Showing
2 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
; Script generated by the HM NIS Edit Script Wizard. | ||
|
||
; HM NIS Edit Wizard helper defines | ||
!define PRODUCT_NAME "DDCToolbox" | ||
!define PRODUCT_VERSION "1.4" | ||
!define PRODUCT_PUBLISHER "ThePBone" | ||
!define PRODUCT_WEB_SITE "https://github.com/ThePBone/DDCToolbox" | ||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\DDCToolbox.exe" | ||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" | ||
!define PRODUCT_UNINST_ROOT_KEY "HKLM" | ||
|
||
; MUI 1.67 compatible ------ | ||
!include "MUI.nsh" | ||
|
||
; MUI Settings | ||
!define MUI_ABORTWARNING | ||
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" | ||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" | ||
|
||
; Welcome page | ||
!insertmacro MUI_PAGE_WELCOME | ||
; License page | ||
!define MUI_LICENSEPAGE_CHECKBOX | ||
!insertmacro MUI_PAGE_LICENSE "LICENSE" | ||
; Directory page | ||
!insertmacro MUI_PAGE_DIRECTORY | ||
; Instfiles page | ||
!insertmacro MUI_PAGE_INSTFILES | ||
; Finish page | ||
!define MUI_FINISHPAGE_RUN "$INSTDIR\DDCToolbox.exe" | ||
!insertmacro MUI_PAGE_FINISH | ||
|
||
; Uninstaller pages | ||
!insertmacro MUI_UNPAGE_INSTFILES | ||
|
||
; Language files | ||
!insertmacro MUI_LANGUAGE "English" | ||
|
||
; MUI end ------ | ||
|
||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" | ||
OutFile "Setup_DDCToolbox_${PRODUCT_VERSION}.exe" | ||
InstallDir "$PROGRAMFILES\DDCToolbox" | ||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" | ||
ShowInstDetails show | ||
ShowUnInstDetails show | ||
|
||
Section "Hauptgruppe" SEC01 | ||
SetOutPath "$INSTDIR" | ||
SetOverwrite on | ||
File "DDCToolbox.exe" | ||
CreateDirectory "$SMPROGRAMS\DDCToolbox" | ||
CreateShortCut "$SMPROGRAMS\DDCToolbox\DDCToolbox.lnk" "$INSTDIR\DDCToolbox.exe" | ||
CreateShortCut "$DESKTOP\DDCToolbox.lnk" "$INSTDIR\DDCToolbox.exe" | ||
SectionEnd | ||
|
||
Section -AdditionalIcons | ||
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" | ||
SectionEnd | ||
|
||
Section -Post | ||
WriteUninstaller "$INSTDIR\uninst.exe" | ||
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\DDCToolbox.exe" | ||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" | ||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" | ||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\DDCToolbox.exe" | ||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" | ||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" | ||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" | ||
SectionEnd | ||
|
||
|
||
Function un.onUninstSuccess | ||
HideWindow | ||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) has been successfully uninstalled." | ||
FunctionEnd | ||
|
||
Function un.onInit | ||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you want to uninstall $(^Name) and all its components?" IDYES +2 | ||
Abort | ||
FunctionEnd | ||
|
||
Section Uninstall | ||
Delete "$INSTDIR\${PRODUCT_NAME}.url" | ||
Delete "$INSTDIR\uninst.exe" | ||
Delete "$INSTDIR\DDCToolbox.exe" | ||
|
||
Delete "$DESKTOP\DDCToolbox.lnk" | ||
Delete "$SMPROGRAMS\DDCToolbox\DDCToolbox.lnk" | ||
|
||
RMDir "$SMPROGRAMS\DDCToolbox" | ||
RMDir "$INSTDIR" | ||
|
||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" | ||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" | ||
SetAutoClose true | ||
SectionEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters