aboutsummaryrefslogtreecommitdiff
path: root/program_info
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-06-12 18:12:42 +0200
committerGitHub <noreply@github.com>2022-06-12 18:12:42 +0200
commit2212a6e40fae329a0e15f1c4ad7249f240d690e0 (patch)
treef85ceb73439dcc926c77269302e23f3f5fe87f4c /program_info
parentc4f2e3a95584d9c50544a978a83650f8f83551fa (diff)
parent278219b1d8bbd9b468f329fa8097fa243e155358 (diff)
downloadPrismLauncher-2212a6e40fae329a0e15f1c4ad7249f240d690e0.tar.gz
PrismLauncher-2212a6e40fae329a0e15f1c4ad7249f240d690e0.tar.bz2
PrismLauncher-2212a6e40fae329a0e15f1c4ad7249f240d690e0.zip
Merge pull request #679 from kthchew/fix/win-install-version
Diffstat (limited to 'program_info')
-rw-r--r--program_info/CMakeLists.txt3
-rw-r--r--program_info/win_install.nsi.in (renamed from program_info/win_install.nsi)52
2 files changed, 34 insertions, 21 deletions
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index 2cbef1b6..1000be23 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -14,6 +14,8 @@ set(Launcher_MetaInfo "program_info/org.polymc.PolyMC.metainfo.xml" PARENT_SCOPE
set(Launcher_ManPage "program_info/polymc.6.txt" PARENT_SCOPE)
set(Launcher_SVG "program_info/org.polymc.PolyMC.svg" PARENT_SCOPE)
set(Launcher_Branding_ICNS "program_info/polymc.icns" PARENT_SCOPE)
+set(Launcher_Branding_ICO "program_info/polymc.ico")
+set(Launcher_Branding_ICO "${Launcher_Branding_ICO}" PARENT_SCOPE)
set(Launcher_Branding_WindowsRC "program_info/polymc.rc" PARENT_SCOPE)
set(Launcher_Branding_LogoQRC "program_info/polymc.qrc" PARENT_SCOPE)
@@ -24,3 +26,4 @@ configure_file(org.polymc.PolyMC.metainfo.xml.in org.polymc.PolyMC.metainfo.xml)
configure_file(polymc.rc.in polymc.rc @ONLY)
configure_file(polymc.manifest.in polymc.manifest @ONLY)
configure_file(polymc.ico polymc.ico COPYONLY)
+configure_file(win_install.nsi.in win_install.nsi @ONLY)
diff --git a/program_info/win_install.nsi b/program_info/win_install.nsi.in
index cb4c8d1d..e5687de7 100644
--- a/program_info/win_install.nsi
+++ b/program_info/win_install.nsi.in
@@ -4,10 +4,13 @@
Unicode true
-Name "PolyMC"
-InstallDir "$LOCALAPPDATA\Programs\PolyMC"
-InstallDirRegKey HKCU "Software\PolyMC" "InstallDir"
+Name "@Launcher_CommonName@"
+InstallDir "$LOCALAPPDATA\Programs\@Launcher_CommonName@"
+InstallDirRegKey HKCU "Software\@Launcher_CommonName@" "InstallDir"
RequestExecutionLevel user
+OutFile "../@Launcher_CommonName@-Setup.exe"
+
+!define MUI_ICON "../@Launcher_Branding_ICO@"
;--------------------------------
@@ -18,7 +21,7 @@ RequestExecutionLevel user
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!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_UNPAGE_CONFIRM
@@ -98,16 +101,23 @@ RequestExecutionLevel user
;--------------------------------
+; Version info
+VIProductVersion "@Launcher_RELEASE_VERSION_NAME4@"
+VIFileVersion "@Launcher_RELEASE_VERSION_NAME4@"
+VIAddVersionKey "FileVersion" "@Launcher_RELEASE_VERSION_NAME4@"
+
+;--------------------------------
+
; The stuff to install
-Section "PolyMC"
+Section "@Launcher_CommonName@"
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
- File "polymc.exe"
+ File "@Launcher_APP_BINARY_NAME@.exe"
File "qt.conf"
File *.dll
File /r "iconengines"
@@ -117,20 +127,20 @@ Section "PolyMC"
File /r "styles"
; Write the installation path into the registry
- WriteRegStr HKCU Software\PolyMC "InstallDir" "$INSTDIR"
+ WriteRegStr HKCU Software\@Launcher_CommonName@ "InstallDir" "$INSTDIR"
; Write the uninstall keys for Windows
${GetParameters} $R0
${GetOptions} $R0 "/NoUninstaller" $R1
${If} ${Errors}
- !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\PolyMC"
- WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "PolyMC"
- WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\polymc.exe"
+ !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_CommonName@"
+ WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "@Launcher_CommonName@"
+ WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe"
WriteRegStr HKCU "${UNINST_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegStr HKCU "${UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
WriteRegStr HKCU "${UNINST_KEY}" "InstallLocation" "$INSTDIR"
- WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "PolyMC Contributors"
- WriteRegStr HKCU "${UNINST_KEY}" "ProductVersion" "${VERSION}"
+ WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "@Launcher_CommonName@ Contributors"
+ WriteRegStr HKCU "${UNINST_KEY}" "ProductVersion" "@Launcher_RELEASE_VERSION_NAME4@"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKCU "${UNINST_KEY}" "EstimatedSize" "$0"
@@ -143,13 +153,13 @@ SectionEnd
Section "Start Menu Shortcut" SM_SHORTCUTS
- CreateShortcut "$SMPROGRAMS\PolyMC.lnk" "$INSTDIR\polymc.exe" "" "$INSTDIR\polymc.exe" 0
+ CreateShortcut "$SMPROGRAMS\@Launcher_CommonName@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0
SectionEnd
Section "Desktop Shortcut" DESKTOP_SHORTCUTS
- CreateShortcut "$DESKTOP\PolyMC.lnk" "$INSTDIR\polymc.exe" "" "$INSTDIR\polymc.exe" 0
+ CreateShortcut "$DESKTOP\@Launcher_CommonName@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0
SectionEnd
@@ -159,12 +169,12 @@ SectionEnd
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\PolyMC
+ DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_CommonName@"
+ DeleteRegKey HKCU SOFTWARE\@Launcher_CommonName@
- Delete $INSTDIR\polymc.exe
+ Delete $INSTDIR\@Launcher_APP_BINARY_NAME@.exe
Delete $INSTDIR\uninstall.exe
Delete $INSTDIR\portable.txt
@@ -220,8 +230,8 @@ Section "Uninstall"
RMDir /r $INSTDIR\platforms
RMDir /r $INSTDIR\styles
- Delete "$SMPROGRAMS\PolyMC.lnk"
- Delete "$DESKTOP\PolyMC.lnk"
+ Delete "$SMPROGRAMS\@Launcher_CommonName@.lnk"
+ Delete "$DESKTOP\@Launcher_CommonName@.lnk"
RMDir "$INSTDIR"