|
|
@@ -4,10 +4,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
Unicode true
|
|
|
|
Unicode true
|
|
|
|
|
|
|
|
|
|
|
|
Name "PolyMC"
|
|
|
|
Name "@Launcher_Name@"
|
|
|
|
InstallDir "$LOCALAPPDATA\Programs\PolyMC"
|
|
|
|
InstallDir "$LOCALAPPDATA\Programs\@Launcher_Name@"
|
|
|
|
InstallDirRegKey HKCU "Software\PolyMC" "InstallDir"
|
|
|
|
InstallDirRegKey HKCU "Software\@Launcher_Name@" "InstallDir"
|
|
|
|
RequestExecutionLevel user
|
|
|
|
RequestExecutionLevel user
|
|
|
|
|
|
|
|
OutFile "../@Launcher_Name@-Setup.exe"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!define MUI_ICON "../@Launcher_Branding_ICO@"
|
|
|
|
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;--------------------------------
|
|
|
|
|
|
|
|
|
|
|
@@ -18,7 +21,7 @@ RequestExecutionLevel user
|
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
!define MUI_FINISHPAGE_RUN "$InstDir\polymc.exe"
|
|
|
|
!define MUI_FINISHPAGE_RUN "$InstDir\@Launcher_APP_BINARY_NAME@.exe"
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
@@ -99,15 +102,15 @@ RequestExecutionLevel user
|
|
|
|
;--------------------------------
|
|
|
|
;--------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
; The stuff to install
|
|
|
|
; The stuff to install
|
|
|
|
Section "PolyMC"
|
|
|
|
Section "@Launcher_Name@"
|
|
|
|
|
|
|
|
|
|
|
|
SectionIn RO
|
|
|
|
SectionIn RO
|
|
|
|
|
|
|
|
|
|
|
|
nsExec::Exec /TIMEOUT=2000 'TaskKill /IM polymc.exe /F'
|
|
|
|
nsExec::Exec /TIMEOUT=2000 'TaskKill /IM @Launcher_APP_BINARY_NAME@.exe /F'
|
|
|
|
|
|
|
|
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
|
|
|
|
|
|
|
|
File "polymc.exe"
|
|
|
|
File "@Launcher_APP_BINARY_NAME@.exe"
|
|
|
|
File "qt.conf"
|
|
|
|
File "qt.conf"
|
|
|
|
File *.dll
|
|
|
|
File *.dll
|
|
|
|
File /r "iconengines"
|
|
|
|
File /r "iconengines"
|
|
|
@@ -117,20 +120,20 @@ Section "PolyMC"
|
|
|
|
File /r "styles"
|
|
|
|
File /r "styles"
|
|
|
|
|
|
|
|
|
|
|
|
; Write the installation path into the registry
|
|
|
|
; Write the installation path into the registry
|
|
|
|
WriteRegStr HKCU Software\PolyMC "InstallDir" "$INSTDIR"
|
|
|
|
WriteRegStr HKCU Software\@Launcher_Name@ "InstallDir" "$INSTDIR"
|
|
|
|
|
|
|
|
|
|
|
|
; Write the uninstall keys for Windows
|
|
|
|
; Write the uninstall keys for Windows
|
|
|
|
${GetParameters} $R0
|
|
|
|
${GetParameters} $R0
|
|
|
|
${GetOptions} $R0 "/NoUninstaller" $R1
|
|
|
|
${GetOptions} $R0 "/NoUninstaller" $R1
|
|
|
|
${If} ${Errors}
|
|
|
|
${If} ${Errors}
|
|
|
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\PolyMC"
|
|
|
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_Name@"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "PolyMC"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "@Launcher_Name@"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\polymc.exe"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "InstallLocation" "$INSTDIR"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "InstallLocation" "$INSTDIR"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "PolyMC Contributors"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "@Launcher_Name@ Contributors"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "ProductVersion" "${VERSION}"
|
|
|
|
WriteRegStr HKCU "${UNINST_KEY}" "ProductVersion" "@Launcher_RELEASE_VERSION_NAME@"
|
|
|
|
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
|
|
|
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
|
|
|
IntFmt $0 "0x%08X" $0
|
|
|
|
IntFmt $0 "0x%08X" $0
|
|
|
|
WriteRegDWORD HKCU "${UNINST_KEY}" "EstimatedSize" "$0"
|
|
|
|
WriteRegDWORD HKCU "${UNINST_KEY}" "EstimatedSize" "$0"
|
|
|
@@ -143,13 +146,13 @@ SectionEnd
|
|
|
|
|
|
|
|
|
|
|
|
Section "Start Menu Shortcut" SM_SHORTCUTS
|
|
|
|
Section "Start Menu Shortcut" SM_SHORTCUTS
|
|
|
|
|
|
|
|
|
|
|
|
CreateShortcut "$SMPROGRAMS\PolyMC.lnk" "$INSTDIR\polymc.exe" "" "$INSTDIR\polymc.exe" 0
|
|
|
|
CreateShortcut "$SMPROGRAMS\@Launcher_Name@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0
|
|
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
|
|
Section "Desktop Shortcut" DESKTOP_SHORTCUTS
|
|
|
|
Section "Desktop Shortcut" DESKTOP_SHORTCUTS
|
|
|
|
|
|
|
|
|
|
|
|
CreateShortcut "$DESKTOP\PolyMC.lnk" "$INSTDIR\polymc.exe" "" "$INSTDIR\polymc.exe" 0
|
|
|
|
CreateShortcut "$DESKTOP\@Launcher_Name@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0
|
|
|
|
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
|
@@ -159,12 +162,12 @@ SectionEnd
|
|
|
|
|
|
|
|
|
|
|
|
Section "Uninstall"
|
|
|
|
Section "Uninstall"
|
|
|
|
|
|
|
|
|
|
|
|
nsExec::Exec /TIMEOUT=2000 'TaskKill /IM polymc.exe /F'
|
|
|
|
nsExec::Exec /TIMEOUT=2000 'TaskKill /IM @Launcher_APP_BINARY_NAME@.exe /F'
|
|
|
|
|
|
|
|
|
|
|
|
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\PolyMC"
|
|
|
|
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_Name@"
|
|
|
|
DeleteRegKey HKCU SOFTWARE\PolyMC
|
|
|
|
DeleteRegKey HKCU SOFTWARE\@Launcher_Name@
|
|
|
|
|
|
|
|
|
|
|
|
Delete $INSTDIR\polymc.exe
|
|
|
|
Delete $INSTDIR\@Launcher_APP_BINARY_NAME@.exe
|
|
|
|
Delete $INSTDIR\uninstall.exe
|
|
|
|
Delete $INSTDIR\uninstall.exe
|
|
|
|
Delete $INSTDIR\portable.txt
|
|
|
|
Delete $INSTDIR\portable.txt
|
|
|
|
|
|
|
|
|
|
|
@@ -220,8 +223,8 @@ Section "Uninstall"
|
|
|
|
RMDir /r $INSTDIR\platforms
|
|
|
|
RMDir /r $INSTDIR\platforms
|
|
|
|
RMDir /r $INSTDIR\styles
|
|
|
|
RMDir /r $INSTDIR\styles
|
|
|
|
|
|
|
|
|
|
|
|
Delete "$SMPROGRAMS\PolyMC.lnk"
|
|
|
|
Delete "$SMPROGRAMS\@Launcher_Name@.lnk"
|
|
|
|
Delete "$DESKTOP\PolyMC.lnk"
|
|
|
|
Delete "$DESKTOP\@Launcher_Name@.lnk"
|
|
|
|
|
|
|
|
|
|
|
|
RMDir "$INSTDIR"
|
|
|
|
RMDir "$INSTDIR"
|
|
|
|
|
|
|
|
|