Fix issues

Signed-off-by: Danhoby <37343749+Dan4oby@users.noreply.github.com>
This commit is contained in:
Danhoby 2026-02-09 20:03:03 +03:00
parent 9d534d5a8f
commit 6e09f01714
2 changed files with 9 additions and 3 deletions

View file

@ -1007,10 +1007,11 @@ void MainWindow::processURLs(QList<QUrl> urls)
receivedData.insert(it->first, it->second); receivedData.insert(it->first, it->second);
emit APPLICATION->oauthReplyRecieved(receivedData); emit APPLICATION->oauthReplyRecieved(receivedData);
continue; continue;
} else if (url.scheme() == "prismlauncher" && isExternalURLImport) { } else if ((url.scheme() == "prismlauncher" || url.scheme() == BuildConfig.LAUNCHER_APP_BINARY_NAME)
&& isExternalURLImport) {
// PrismLauncher URL protocol modpack import // PrismLauncher URL protocol modpack import
// works for any prism fork // works for any prism fork
// preferred import format: <scheme>://import?url=ENCODED // preferred import format: prismlauncher://import?url=ENCODED
const auto host = url.host().toLower(); const auto host = url.host().toLower();
const auto path = url.path(); const auto path = url.path();
@ -1025,7 +1026,7 @@ void MainWindow::processURLs(QList<QUrl> urls)
} }
} }
// alternative import format: <scheme>://import/ENCODED // alternative import format: prismlauncher://import/ENCODED
if (encodedTarget.isEmpty()) { if (encodedTarget.isEmpty()) {
QString p = path; QString p = path;
@ -1078,6 +1079,7 @@ void MainWindow::processURLs(QList<QUrl> urls)
continue; continue;
} }
dl_url = target;
} else { } else {
dl_url = url; dl_url = url;
} }

View file

@ -397,6 +397,10 @@ Section "@Launcher_DisplayName@"
WriteRegStr HKCU Software\Classes\@Launcher_APP_BINARY_NAME@ "URL Protocol" "" WriteRegStr HKCU Software\Classes\@Launcher_APP_BINARY_NAME@ "URL Protocol" ""
WriteRegStr HKCU Software\Classes\@Launcher_APP_BINARY_NAME@\shell\open\command "" '"$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "%1"' WriteRegStr HKCU Software\Classes\@Launcher_APP_BINARY_NAME@\shell\open\command "" '"$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "%1"'
; Write the URL Handler into registry for prismlauncher import
WriteRegStr HKCU Software\Classes\prismlauncher "URL Protocol" ""
WriteRegStr HKCU Software\Classes\prismlauncher\shell\open\command "" '"$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "%1"'
; Write the uninstall keys for Windows ; Write the uninstall keys for Windows
; https://learn.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key ; https://learn.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key
${GetParameters} $R0 ${GetParameters} $R0