Move Windows installer configure to program_info
This commit is contained in:
parent
8731c86d0d
commit
065e38c6aa
@ -260,8 +260,6 @@ elseif(WIN32)
|
|||||||
|
|
||||||
# install as bundle
|
# install as bundle
|
||||||
set(INSTALL_BUNDLE "full")
|
set(INSTALL_BUNDLE "full")
|
||||||
|
|
||||||
configure_file(program_info/win_install.nsi.in program_info/win_install.nsi @ONLY)
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Platform not supported")
|
message(FATAL_ERROR "Platform not supported")
|
||||||
endif()
|
endif()
|
||||||
|
@ -14,7 +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_ManPage "program_info/polymc.6.txt" PARENT_SCOPE)
|
||||||
set(Launcher_SVG "program_info/org.polymc.PolyMC.svg" 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_ICNS "program_info/polymc.icns" PARENT_SCOPE)
|
||||||
set(Launcher_Branding_ICO "program_info/polymc.ico" 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_WindowsRC "program_info/polymc.rc" PARENT_SCOPE)
|
||||||
set(Launcher_Branding_LogoQRC "program_info/polymc.qrc" PARENT_SCOPE)
|
set(Launcher_Branding_LogoQRC "program_info/polymc.qrc" PARENT_SCOPE)
|
||||||
|
|
||||||
@ -25,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.rc.in polymc.rc @ONLY)
|
||||||
configure_file(polymc.manifest.in polymc.manifest @ONLY)
|
configure_file(polymc.manifest.in polymc.manifest @ONLY)
|
||||||
configure_file(polymc.ico polymc.ico COPYONLY)
|
configure_file(polymc.ico polymc.ico COPYONLY)
|
||||||
|
configure_file(win_install.nsi.in win_install.nsi @ONLY)
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
Unicode true
|
Unicode true
|
||||||
|
|
||||||
Name "@Launcher_Name@"
|
Name "@Launcher_CommonName@"
|
||||||
InstallDir "$LOCALAPPDATA\Programs\@Launcher_Name@"
|
InstallDir "$LOCALAPPDATA\Programs\@Launcher_CommonName@"
|
||||||
InstallDirRegKey HKCU "Software\@Launcher_Name@" "InstallDir"
|
InstallDirRegKey HKCU "Software\@Launcher_CommonName@" "InstallDir"
|
||||||
RequestExecutionLevel user
|
RequestExecutionLevel user
|
||||||
OutFile "../@Launcher_Name@-Setup.exe"
|
OutFile "../@Launcher_CommonName@-Setup.exe"
|
||||||
|
|
||||||
!define MUI_ICON "../@Launcher_Branding_ICO@"
|
!define MUI_ICON "../@Launcher_Branding_ICO@"
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ OutFile "../@Launcher_Name@-Setup.exe"
|
|||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
; The stuff to install
|
; The stuff to install
|
||||||
Section "@Launcher_Name@"
|
Section "@Launcher_CommonName@"
|
||||||
|
|
||||||
SectionIn RO
|
SectionIn RO
|
||||||
|
|
||||||
@ -120,19 +120,19 @@ Section "@Launcher_Name@"
|
|||||||
File /r "styles"
|
File /r "styles"
|
||||||
|
|
||||||
; Write the installation path into the registry
|
; Write the installation path into the registry
|
||||||
WriteRegStr HKCU Software\@Launcher_Name@ "InstallDir" "$INSTDIR"
|
WriteRegStr HKCU Software\@Launcher_CommonName@ "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\@Launcher_Name@"
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_CommonName@"
|
||||||
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "@Launcher_Name@"
|
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "@Launcher_CommonName@"
|
||||||
WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\@Launcher_APP_BINARY_NAME@.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" "@Launcher_Name@ Contributors"
|
WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "@Launcher_CommonName@ Contributors"
|
||||||
WriteRegStr HKCU "${UNINST_KEY}" "ProductVersion" "@Launcher_RELEASE_VERSION_NAME@"
|
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
|
||||||
@ -146,13 +146,13 @@ SectionEnd
|
|||||||
|
|
||||||
Section "Start Menu Shortcut" SM_SHORTCUTS
|
Section "Start Menu Shortcut" SM_SHORTCUTS
|
||||||
|
|
||||||
CreateShortcut "$SMPROGRAMS\@Launcher_Name@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0
|
CreateShortcut "$SMPROGRAMS\@Launcher_CommonName@.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\@Launcher_Name@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0
|
CreateShortcut "$DESKTOP\@Launcher_CommonName@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
@ -164,8 +164,8 @@ Section "Uninstall"
|
|||||||
|
|
||||||
nsExec::Exec /TIMEOUT=2000 'TaskKill /IM @Launcher_APP_BINARY_NAME@.exe /F'
|
nsExec::Exec /TIMEOUT=2000 'TaskKill /IM @Launcher_APP_BINARY_NAME@.exe /F'
|
||||||
|
|
||||||
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_Name@"
|
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_CommonName@"
|
||||||
DeleteRegKey HKCU SOFTWARE\@Launcher_Name@
|
DeleteRegKey HKCU SOFTWARE\@Launcher_CommonName@
|
||||||
|
|
||||||
Delete $INSTDIR\@Launcher_APP_BINARY_NAME@.exe
|
Delete $INSTDIR\@Launcher_APP_BINARY_NAME@.exe
|
||||||
Delete $INSTDIR\uninstall.exe
|
Delete $INSTDIR\uninstall.exe
|
||||||
@ -223,8 +223,8 @@ Section "Uninstall"
|
|||||||
RMDir /r $INSTDIR\platforms
|
RMDir /r $INSTDIR\platforms
|
||||||
RMDir /r $INSTDIR\styles
|
RMDir /r $INSTDIR\styles
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\@Launcher_Name@.lnk"
|
Delete "$SMPROGRAMS\@Launcher_CommonName@.lnk"
|
||||||
Delete "$DESKTOP\@Launcher_Name@.lnk"
|
Delete "$DESKTOP\@Launcher_CommonName@.lnk"
|
||||||
|
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user