From 20781334939fbb15b1f0fec2a7f65b9ad25d02c1 Mon Sep 17 00:00:00 2001
From: Keri <kerichuudev@gmail.com>
Date: Sun, 23 Apr 2023 11:53:21 +0300
Subject: fix: remove unnecessary keywords from desktop file

this messes with apps that use tag search like rofi

Signed-off-by: Keri <kerichuudev@gmail.com>
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
---
 program_info/org.prismlauncher.PrismLauncher.desktop.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'program_info')

diff --git a/program_info/org.prismlauncher.PrismLauncher.desktop.in b/program_info/org.prismlauncher.PrismLauncher.desktop.in
index f08f2ba4..20fabe9d 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
-- 
cgit 


From 90b330d4baf5c3519788c4cc773775733720d7ef Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Fri, 19 May 2023 18:34:54 +0200
Subject: chore: update social links

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
---
 CMakeLists.txt                                               | 6 +++---
 README.md                                                    | 6 +++---
 program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

(limited to 'program_info')

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ff26aee..6bd12630 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,13 +164,13 @@ set(Launcher_BUG_TRACKER_URL "https://github.com/PrismLauncher/PrismLauncher/iss
 set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/prismlauncher/launcher/" CACHE STRING "URL for the translations platform.")
 
 # Matrix Space
-set(Launcher_MATRIX_URL "https://matrix.to/#/#prismlauncher:matrix.org" CACHE STRING "URL to the Matrix Space")
+set(Launcher_MATRIX_URL "https://prismlauncher.org/matrix" CACHE STRING "URL to the Matrix Space")
 
 # Discord URL
-set(Launcher_DISCORD_URL "https://discord.gg/prismlauncher" CACHE STRING "URL for the Discord guild.")
+set(Launcher_DISCORD_URL "https://prismlauncher.org/discord" CACHE STRING "URL for the Discord guild.")
 
 # Subreddit URL
-set(Launcher_SUBREDDIT_URL "https://www.reddit.com/r/PrismLauncher/" CACHE STRING "URL for the subreddit.")
+set(Launcher_SUBREDDIT_URL "https://prismlauncher.org/reddit" CACHE STRING "URL for the subreddit.")
 
 # Builds
 set(Launcher_FORCE_BUNDLED_LIBS OFF CACHE BOOL "Prevent using system libraries, if they are available as submodules")
diff --git a/README.md b/README.md
index aaa1fd4c..993f02f5 100644
--- a/README.md
+++ b/README.md
@@ -38,15 +38,15 @@ Feel free to create a GitHub issue if you find a bug or want to suggest a new fe
 
 - **Our Discord server:**
 
-[![Prism Launcher Discord server](https://discordapp.com/api/guilds/1031648380885147709/widget.png?style=banner3)](https://discord.gg/prismlauncher)
+[![Prism Launcher Discord server](https://discordapp.com/api/guilds/1031648380885147709/widget.png?style=banner3)](https://prismlauncher.org/discord)
 
 - **Our Matrix space:**
 
-[![PrismLauncher Space](https://img.shields.io/matrix/prismlauncher:matrix.org?style=for-the-badge&label=Matrix%20Space&logo=matrix&color=purple)](https://matrix.to/#/#prismlauncher:matrix.org)
+[![PrismLauncher Space](https://img.shields.io/matrix/prismlauncher:matrix.org?style=for-the-badge&label=Matrix%20Space&logo=matrix&color=purple)](https://prismlauncher.org/matrix)
 
 - **Our Subreddit:**
 
-[![r/PrismLauncher](https://img.shields.io/reddit/subreddit-subscribers/prismlauncher?style=for-the-badge&logo=reddit)](https://www.reddit.com/r/PrismLauncher/)
+[![r/PrismLauncher](https://img.shields.io/reddit/subreddit-subscribers/prismlauncher?style=for-the-badge&logo=reddit)](https://prismlauncher.org/reddit)
 
 ## Translations
 
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>
-- 
cgit 


From 03b66ba7a5a1e35f47a59a9e1cd5d73ad6685c8e Mon Sep 17 00:00:00 2001
From: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date: Wed, 31 May 2023 13:25:14 -0700
Subject: packaging: make windows nsis installer run the uninstaller for
 previous install before installing

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
---
 program_info/win_install.nsi.in | 76 ++++++++++++++++++++++++++++++++++++++---
 1 file changed, 72 insertions(+), 4 deletions(-)

(limited to 'program_info')

diff --git a/program_info/win_install.nsi.in b/program_info/win_install.nsi.in
index 1d902d5d..27c40039 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,74 @@ 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 != ""
+  ${AndIf} ${Cmd} `MessageBox MB_YESNO|MB_ICONQUESTION "Uninstall previous version?" /SD IDYES IDYES`
+	  !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@"
@@ -299,11 +368,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@"
-- 
cgit 


From 4593538fc864fe67d4c31376506f4d2b81201895 Mon Sep 17 00:00:00 2001
From: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date: Wed, 31 May 2023 13:54:13 -0700
Subject: fix: typo - space before comment

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
---
 program_info/win_install.nsi.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'program_info')

diff --git a/program_info/win_install.nsi.in b/program_info/win_install.nsi.in
index 27c40039..8389e246 100644
--- a/program_info/win_install.nsi.in
+++ b/program_info/win_install.nsi.in
@@ -293,7 +293,7 @@ Function RunUninstall
   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
+	  StrCmp $2 "" +2  stringloop  ; if empty exit loop
 	  IntOp $3 $3 - 1  ; index -= 1
 	  Goto run
   quoteloop: ; get string length with quotes removed
-- 
cgit 


From 6a4fb6a27149893f65d09cb69f1ee7f0ad6bcfad Mon Sep 17 00:00:00 2001
From: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date: Thu, 1 Jun 2023 12:40:08 -0700
Subject: packaging: remove redundant "do you want to uninstall previous
 version"

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
---
 program_info/win_install.nsi.in | 1 -
 1 file changed, 1 deletion(-)

(limited to 'program_info')

diff --git a/program_info/win_install.nsi.in b/program_info/win_install.nsi.in
index 8389e246..d3b5c256 100644
--- a/program_info/win_install.nsi.in
+++ b/program_info/win_install.nsi.in
@@ -327,7 +327,6 @@ Section "" UninstallPrevious
   ${EndIf}
   
   ${If} $0 != ""
-  ${AndIf} ${Cmd} `MessageBox MB_YESNO|MB_ICONQUESTION "Uninstall previous version?" /SD IDYES IDYES`
 	  !insertmacro RunUninstall $0 $0
 	  ${If} $0 <> 0
 		  MessageBox MB_YESNO|MB_ICONSTOP "Failed to uninstall, continue anyway?" /SD IDYES IDYES +2
-- 
cgit 


From ed4dce2fb658de726435b06f1d8973b447279f1e Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu <contact@scrumplex.net>
Date: Mon, 26 Jun 2023 08:59:23 +0200
Subject: fix: install logo to multimc theme in genicons.sh

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
---
 program_info/genicons.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'program_info')

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"
-- 
cgit