From 4231c50bf4a4ef84bd2d920bce1cf3f4051311cb Mon Sep 17 00:00:00 2001 From: Fire Cube Date: Sun, 21 Sep 2025 20:42:32 +0200 Subject: [PATCH] Change Updater to update launcher itself (#5) * fix updater? * clang * claang --- CMakePresets.json | 9 +++------ src/qt_gui/check_update.cpp | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 4b9ff4c..c34007a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -12,8 +12,7 @@ "displayName": "Clang x64 Debug", "inherits": ["x64-Clang-Base"], "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "ENABLE_QT_GUI": "ON" + "CMAKE_BUILD_TYPE": "Debug" } }, { @@ -21,8 +20,7 @@ "displayName": "Clang x64 Release", "inherits": ["x64-Clang-Base"], "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "ENABLE_QT_GUI": "ON" + "CMAKE_BUILD_TYPE": "Release" } }, { @@ -30,8 +28,7 @@ "displayName": "Clang x64 RelWithDebInfo", "inherits": ["x64-Clang-Base"], "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "ENABLE_QT_GUI": "ON" + "CMAKE_BUILD_TYPE": "RelWithDebInfo" } } ] diff --git a/src/qt_gui/check_update.cpp b/src/qt_gui/check_update.cpp index 8c06006..d09ecdb 100644 --- a/src/qt_gui/check_update.cpp +++ b/src/qt_gui/check_update.cpp @@ -47,10 +47,11 @@ void CheckUpdate::CheckForUpdates(const bool showMessage) { while (checkName) { updateChannel = m_gui_settings->GetValue(gui::gen_updateChannel).toString(); if (updateChannel == "Nightly") { - url = QUrl("https://api.github.com/repos/shadps4-emu/shadPS4/releases"); + url = QUrl("https://api.github.com/repos/shadps4-emu/shadps4-qtlauncher/releases"); checkName = false; } else if (updateChannel == "Release") { - url = QUrl("https://api.github.com/repos/shadps4-emu/shadPS4/releases/latest"); + url = + QUrl("https://api.github.com/repos/shadps4-emu/shadps4-qtlauncher/releases/latest"); checkName = false; } else { if (Common::g_is_release) { @@ -310,7 +311,7 @@ void CheckUpdate::requestChangelog(const QString& currentRev, const QString& lat const QString& downloadUrl, const QString& latestDate, const QString& currentDate) { QString compareUrlString = - QString("https://api.github.com/repos/shadps4-emu/shadPS4/compare/%1...%2") + QString("https://api.github.com/repos/shadps4-emu/shadps4-qtlauncher/compare/%1...%2") .arg(currentRev) .arg(latestRev); @@ -360,15 +361,14 @@ void CheckUpdate::requestChangelog(const QString& currentRev, const QString& lat QRegularExpressionMatch match = i.next(); newChanges += changes.mid(lastIndex, match.capturedStart() - lastIndex); QString num = match.captured(1); - newChanges += - QString( - "(#%1)") - .arg(num); + newChanges += QString("(#%1)") + .arg(num); lastIndex = match.capturedEnd(); } - newChanges += changes.mid(lastIndex); + newChanges += changes.m id(lastIndex); changes = newChanges; textField->setOpenExternalLinks(true); @@ -487,7 +487,7 @@ void CheckUpdate::Install() { "Remove-Item -Force -LiteralPath '%3\\update.ps1'\n" "Remove-Item -Force -LiteralPath '%3\\temp_download_update.zip'\n" "Remove-Item -Recurse -Force '%2'\n" - "Start-Process -FilePath '%3\\shadps4.exe' " + "Start-Process -FilePath '%3\\shadPS4QtLauncher.exe' " "-WorkingDirectory ([WildcardPattern]::Escape('%3'))\n"); arguments << "-ExecutionPolicy" << "Bypass" @@ -589,7 +589,7 @@ void CheckUpdate::Install() { "sleep 2\n" "rm \"%3/update.sh\"\n" "chmod +x \"%3/shadps4.app/Contents/MacOS/shadps4\"\n" - "open \"%3/shadps4.app\"\n" + "open \"%3/shadPS4QtLauncher.app\"\n" "rm -r \"%2\"\n"); arguments << scriptFileName;