2020-11-08 15:44:24 +00:00
|
|
|
|
############################################################################################
|
|
|
|
|
# NSIS Installation Script created by NSIS Quick Setup Script Generator v1.09.18
|
|
|
|
|
# Entirely Edited with NullSoft Scriptable Installation System
|
|
|
|
|
# by Vlasis K. Barkas aka Red Wine red_wine@freemail.gr Sep 2006
|
|
|
|
|
############################################################################################
|
|
|
|
|
#
|
|
|
|
|
# Edited by Briano 🤔
|
|
|
|
|
#
|
|
|
|
|
############################################################################################
|
|
|
|
|
|
|
|
|
|
!define APP_NAME "UWPHook"
|
|
|
|
|
!define COMP_NAME "Briano"
|
|
|
|
|
!define WEB_SITE "https://briano.dev"
|
2020-12-30 06:48:17 +00:00
|
|
|
|
!define VERSION "2.8.00.00"
|
2020-11-08 15:44:24 +00:00
|
|
|
|
!define COPYRIGHT "Briano <20> 2020"
|
|
|
|
|
!define DESCRIPTION "The easy way to add UWP and XGP games to Steam"
|
|
|
|
|
!define LICENSE_TXT "C:\Users\Brian\Documents\GitHub\UWPHook\README.md"
|
|
|
|
|
!define INSTALLER_NAME "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook.exe"
|
|
|
|
|
!define MAIN_APP_EXE "UWPHook.exe"
|
|
|
|
|
!define INSTALL_TYPE "SetShellVarContext current"
|
|
|
|
|
!define REG_ROOT "HKCU"
|
|
|
|
|
!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}"
|
|
|
|
|
!define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
|
|
|
|
|
|
|
|
|
!define REG_START_MENU "Start Menu Folder"
|
|
|
|
|
|
|
|
|
|
var SM_Folder
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
VIProductVersion "${VERSION}"
|
|
|
|
|
VIAddVersionKey "ProductName" "${APP_NAME}"
|
|
|
|
|
VIAddVersionKey "CompanyName" "${COMP_NAME}"
|
|
|
|
|
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
|
|
|
|
|
VIAddVersionKey "FileDescription" "${DESCRIPTION}"
|
|
|
|
|
VIAddVersionKey "FileVersion" "${VERSION}"
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
SetCompressor ZLIB
|
|
|
|
|
Name "${APP_NAME}"
|
|
|
|
|
Caption "${APP_NAME}"
|
|
|
|
|
OutFile "${INSTALLER_NAME}"
|
|
|
|
|
BrandingText "${APP_NAME}"
|
|
|
|
|
XPStyle on
|
|
|
|
|
InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" ""
|
|
|
|
|
InstallDir "$PROGRAMFILES\Briano\UWPHook"
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
!include "MUI.nsh"
|
|
|
|
|
|
|
|
|
|
!define MUI_ABORTWARNING
|
|
|
|
|
!define MUI_UNABORTWARNING
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
|
|
|
|
|
|
|
|
!ifdef LICENSE_TXT
|
|
|
|
|
!insertmacro MUI_PAGE_LICENSE "${LICENSE_TXT}"
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
|
|
|
|
|
|
!ifdef REG_START_MENU
|
|
|
|
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "UWPHook"
|
|
|
|
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
|
|
|
|
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
|
|
|
|
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
|
|
|
|
|
!insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
|
|
|
|
|
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MAIN_APP_EXE}"
|
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_UNPAGE_FINISH
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
Section -MainProgram
|
|
|
|
|
${INSTALL_TYPE}
|
|
|
|
|
SetOverwrite ifnewer
|
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\MaterialDesignColors.dll"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\MaterialDesignThemes.Wpf.dll"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\Microsoft.Management.Infrastructure.dll"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\SharpSteam.dll"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\System.Management.Automation.dll"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\UWPHook.exe"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\UWPHook.exe.config"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\VDFParser.dll"
|
2020-12-30 06:48:17 +00:00
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\Crc32.NET.dll"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\System.Net.Http.Formatting.dll"
|
|
|
|
|
File "C:\Users\Brian\Documents\GitHub\UWPHook\UWPHook\bin\Release\Newtonsoft.Json.dll"
|
|
|
|
|
|
2020-11-08 15:44:24 +00:00
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
Section -Icons_Reg
|
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
|
|
|
|
|
|
|
|
|
!ifdef REG_START_MENU
|
|
|
|
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
|
|
|
CreateDirectory "$SMPROGRAMS\$SM_Folder"
|
|
|
|
|
CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
|
|
|
|
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
|
|
|
|
CreateShortCut "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
|
|
|
|
|
|
|
|
|
|
!ifdef WEB_SITE
|
|
|
|
|
WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
|
|
|
|
|
CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME} Website.lnk" "$INSTDIR\${APP_NAME} website.url"
|
|
|
|
|
!endif
|
|
|
|
|
!insertmacro MUI_STARTMENU_WRITE_END
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
!ifndef REG_START_MENU
|
|
|
|
|
CreateDirectory "$SMPROGRAMS\UWPHook"
|
|
|
|
|
CreateShortCut "$SMPROGRAMS\UWPHook\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
|
|
|
|
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
|
|
|
|
CreateShortCut "$SMPROGRAMS\UWPHook\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
|
|
|
|
|
|
|
|
|
|
!ifdef WEB_SITE
|
|
|
|
|
WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
|
|
|
|
|
CreateShortCut "$SMPROGRAMS\UWPHook\${APP_NAME} Website.lnk" "$INSTDIR\${APP_NAME} website.url"
|
|
|
|
|
!endif
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
WriteRegStr ${REG_ROOT} "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
|
|
|
|
|
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "${APP_NAME}"
|
|
|
|
|
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
|
|
|
|
|
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${MAIN_APP_EXE}"
|
|
|
|
|
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
|
|
|
|
|
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "${COMP_NAME}"
|
|
|
|
|
|
|
|
|
|
!ifdef WEB_SITE
|
|
|
|
|
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "${WEB_SITE}"
|
|
|
|
|
!endif
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
Section Uninstall
|
|
|
|
|
${INSTALL_TYPE}
|
|
|
|
|
Delete "$INSTDIR\MaterialDesignColors.dll"
|
|
|
|
|
Delete "$INSTDIR\MaterialDesignThemes.Wpf.dll"
|
|
|
|
|
Delete "$INSTDIR\MaterialDesignThemes.Wpf.xml"
|
|
|
|
|
Delete "$INSTDIR\Microsoft.Management.Infrastructure.dll"
|
|
|
|
|
Delete "$INSTDIR\SharpSteam.dll"
|
|
|
|
|
Delete "$INSTDIR\System.Management.Automation.dll"
|
|
|
|
|
Delete "$INSTDIR\System.Management.Automation.xml"
|
|
|
|
|
Delete "$INSTDIR\UWPHook.exe"
|
|
|
|
|
Delete "$INSTDIR\UWPHook.exe.config"
|
|
|
|
|
Delete "$INSTDIR\VDFParser.dll"
|
2020-12-30 06:48:17 +00:00
|
|
|
|
Delete "$INSTDIR\Crc32.NET.dll"
|
|
|
|
|
Delete "$INSTDIR\Crc32.NET.xml"
|
2020-11-08 15:44:24 +00:00
|
|
|
|
Delete "$INSTDIR\uninstall.exe"
|
2020-12-30 06:48:17 +00:00
|
|
|
|
Delete "$INSTDIR\System.Net.Http.Formatting.dll"
|
|
|
|
|
Delete "$INSTDIR\Newtonsoft.Json.dll"
|
2020-11-08 15:44:24 +00:00
|
|
|
|
!ifdef WEB_SITE
|
|
|
|
|
Delete "$INSTDIR\${APP_NAME} website.url"
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
RmDir "$INSTDIR"
|
|
|
|
|
|
|
|
|
|
!ifdef REG_START_MENU
|
|
|
|
|
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $SM_Folder
|
|
|
|
|
Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk"
|
|
|
|
|
Delete "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk"
|
|
|
|
|
!ifdef WEB_SITE
|
|
|
|
|
Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME} Website.lnk"
|
|
|
|
|
!endif
|
|
|
|
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
|
|
|
|
|
|
|
|
|
RmDir "$SMPROGRAMS\$SM_Folder"
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
!ifndef REG_START_MENU
|
|
|
|
|
Delete "$SMPROGRAMS\UWPHook\${APP_NAME}.lnk"
|
|
|
|
|
Delete "$SMPROGRAMS\UWPHook\Uninstall ${APP_NAME}.lnk"
|
|
|
|
|
!ifdef WEB_SITE
|
|
|
|
|
Delete "$SMPROGRAMS\UWPHook\${APP_NAME} Website.lnk"
|
|
|
|
|
!endif
|
|
|
|
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
|
|
|
|
|
|
|
|
|
RmDir "$SMPROGRAMS\UWPHook"
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
DeleteRegKey ${REG_ROOT} "${REG_APP_PATH}"
|
|
|
|
|
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
######################################################################
|