aboutsummaryrefslogtreecommitdiff
path: root/program_info
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-28 11:25:58 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-11 21:42:29 -0700
commit9957aeb003a28f24a7d3b2bbc46d21c31506615d (patch)
tree891048851c7819f334abf384a7d99dbeec7bf0ea /program_info
parenteb079c80605f88cbd0aaff8285dafc459c6f42eb (diff)
parent640aaa8c23d714ce17bc8e78754af6219abc6466 (diff)
downloadPrismLauncher-9957aeb003a28f24a7d3b2bbc46d21c31506615d.tar.gz
PrismLauncher-9957aeb003a28f24a7d3b2bbc46d21c31506615d.tar.bz2
PrismLauncher-9957aeb003a28f24a7d3b2bbc46d21c31506615d.zip
Merge branch 'develop' into curseforge-url-handle
Diffstat (limited to 'program_info')
-rwxr-xr-xprogram_info/genicons.sh5
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.desktop.in2
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in2
-rw-r--r--program_info/win_install.nsi.in75
4 files changed, 74 insertions, 10 deletions
diff --git a/program_info/genicons.sh b/program_info/genicons.sh
index 42592c4e..fe8d2e35 100755
--- a/program_info/genicons.sh
+++ b/program_info/genicons.sh
@@ -67,7 +67,4 @@ else
fi
# replace icon in themes
-for dir in ../launcher/resources/*/scalable
-do
- cp -v org.prismlauncher.PrismLauncher.svg "$dir/launcher.svg"
-done
+cp -v org.prismlauncher.PrismLauncher.svg "../launcher/resources/multimc/scalable/launcher.svg"
diff --git a/program_info/org.prismlauncher.PrismLauncher.desktop.in b/program_info/org.prismlauncher.PrismLauncher.desktop.in
index 675e1f1f..816c0059 100644
--- a/program_info/org.prismlauncher.PrismLauncher.desktop.in
+++ b/program_info/org.prismlauncher.PrismLauncher.desktop.in
@@ -8,6 +8,6 @@ Exec=@Launcher_APP_BINARY_NAME@
StartupNotify=true
Icon=org.prismlauncher.PrismLauncher
Categories=Game;ActionGame;AdventureGame;Simulation;
-Keywords=game;minecraft;launcher;mc;multimc;polymc;
+Keywords=game;minecraft;mc;
StartupWMClass=PrismLauncher
MimeType=application/zip;application/x-modrinth-modpack+zip;x-scheme-handler/curseforge;
diff --git a/program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in b/program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in
index 96708960..a482f0e3 100644
--- a/program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in
+++ b/program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in
@@ -10,7 +10,7 @@
<url type="homepage">https://prismlauncher.org/</url>
<url type="help">https://prismlauncher.org/wiki/</url>
<url type="bugtracker">https://github.com/PrismLauncher/PrismLauncher/issues</url>
- <url type="contact">https://discord.gg/prismlauncher</url>
+ <url type="contact">https://prismlauncher.org/discord</url>
<url type="vcs-browser">https://github.com/PrismLauncher/PrismLauncher</url>
<url type="contribute">https://github.com/PrismLauncher/PrismLauncher/blob/develop/CONTRIBUTING.md</url>
<url type="translate">https://hosted.weblate.org/projects/prismlauncher/launcher</url>
diff --git a/program_info/win_install.nsi.in b/program_info/win_install.nsi.in
index d2409fbb..cb7b0935 100644
--- a/program_info/win_install.nsi.in
+++ b/program_info/win_install.nsi.in
@@ -12,6 +12,8 @@ OutFile "../@Launcher_CommonName@-Setup.exe"
!define MUI_ICON "../@Launcher_Branding_ICO@"
+!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_CommonName@"
+
;--------------------------------
; Pages
@@ -269,7 +271,73 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "@Launcher_VERSION_NAME4@
!macroend
-;--------------------------------
+;------------------------------------------
+; Uninstall Previous install
+
+!macro RunUninstall exitcode uninstcommand
+ Push `${uninstcommand}`
+ Call RunUninstall
+ Pop ${exitcode}
+!macroend
+
+; Checks that the uninstaller in the provided command exists and runs it.
+Function RunUninstall
+ Exch $1 ; input uninstcommand
+ Push $2 ; Uninstaller
+ Push $3 ; Len
+ Push $4 ; uninstcommand
+ StrCpy $4 $1 ; make a copy of the command for later
+ StrCpy $3 ""
+ StrCpy $2 $1 1 ; take first char of string
+ StrCmp $2 '"' quoteloop stringloop
+ stringloop: ; get string length
+ StrCpy $2 $1 1 $3 ; get next char
+ IntOp $3 $3 + 1 ; index += 1
+ StrCmp $2 "" +2 stringloop ; if empty exit loop
+ IntOp $3 $3 - 1 ; index -= 1
+ Goto run
+ quoteloop: ; get string length with quotes removed
+ StrCmp $3 "" 0 +2 ; if index is set skip quote removal
+ StrCpy $1 $1 "" 1 ; Remove initial quote
+ IntOp $3 $3 + 1 ; index += 1
+ StrCpy $2 $1 1 $3 ; get next char
+ StrCmp $2 "" +2 ; if empty exit loop
+ StrCmp $2 '"' 0 quoteloop ; if ending quote exit loop, else loop
+ run:
+ StrCpy $2 $1 $3 ; Path to uninstaller ; (copy string up to ending quote - if it exists)
+ StrCpy $1 161 ; ERROR_BAD_PATHNAME ; set exit code (it get's overwritten with uninstaller exit code if ExecWait call doesn't error)
+ GetFullPathName $3 "$2\.." ; $InstDir
+ IfFileExists "$2" 0 +4
+ ExecWait $4 $1 ; The file exists, call the saved command
+ IntCmp $1 0 "" +2 +2 ; Don't delete the installer if it was aborted ;
+ Delete "$2" ; Delete the uninstaller
+ RMDir "$3" ; Try to delete $InstDir
+ Pop $4
+ Pop $3
+ Pop $2
+ Exch $1 ; exitcode
+FunctionEnd
+
+; The "" makes the section hidden.
+Section "" UninstallPrevious
+
+ ReadRegStr $0 HKCU "${UNINST_KEY}" "QuietUninstallString"
+ ${If} $0 == ""
+ ReadRegStr $0 HKCU "${UNINST_KEY}" "UninstallString"
+ ${EndIf}
+
+ ${If} $0 != ""
+ !insertmacro RunUninstall $0 $0
+ ${If} $0 <> 0
+ MessageBox MB_YESNO|MB_ICONSTOP "Failed to uninstall, continue anyway?" /SD IDYES IDYES +2
+ Abort
+ ${EndIf}
+ ${EndIf}
+
+SectionEnd
+
+
+;------------------------------------
; The stuff to install
Section "@Launcher_DisplayName@"
@@ -303,11 +371,10 @@ Section "@Launcher_DisplayName@"
${GetParameters} $R0
${GetOptions} $R0 "/NoUninstaller" $R1
${If} ${Errors}
- !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@Launcher_CommonName@"
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "@Launcher_DisplayName@"
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}" "UninstallString" '"$INSTDIR\uninstall.exe" _?=$INSTDIR'
+ WriteRegStr HKCU "${UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S _?=$INSTDIR'
WriteRegStr HKCU "${UNINST_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "@Launcher_DisplayName@ Contributors"
WriteRegStr HKCU "${UNINST_KEY}" "Version" "@Launcher_VERSION_NAME4@"