diff --git a/Source/Core/Core/Slippi/SlippiUser.cpp b/Source/Core/Core/Slippi/SlippiUser.cpp index aa59bae940..c6e7da7684 100644 --- a/Source/Core/Core/Slippi/SlippiUser.cpp +++ b/Source/Core/Core/Slippi/SlippiUser.cpp @@ -181,48 +181,18 @@ void SlippiUser::OpenLogInPage() bool SlippiUser::UpdateApp() { -#ifdef _WIN32 - auto isoPath = SConfig::GetInstance().m_strFilename; - - std::string path = File::GetExeDirectory() + "/dolphin-slippi-tools.exe"; - std::string echoMsg = "echo Starting update process. If nothing happens after a few " - "minutes, you may need to update manually from https://slippi.gg/netplay ..."; + std::string url = "https://slippi.gg/downloads?update=true"; - // Check if updater exists, anti-virus sometimes deletes it - if (!File::Exists(path)) - { - ERROR_LOG(SLIPPI_ONLINE, "Update requested but updater does not exist."); - OSD::AddMessage("Updater cannot be found. Please download the latest Slippi version from slippi.gg.", 30000, - 0xFFFF0000); - return false; - } - - std::string command = "start /b cmd /c " + echoMsg + " && \"" + path + "\" app-update -launch -iso \"" + isoPath + - "\" -version \"" + scm_slippi_semver_str + "\""; - WARN_LOG(SLIPPI, "Executing app update command: %s", command); - RunSystemCommand(command); - return true; +#ifdef _WIN32 + std::string command = "explorer \"" + url + "\""; #elif defined(__APPLE__) - CriticalAlertT("Automatic updates are not available for standalone Netplay builds on macOS. Please get the latest " - "update from slippi.gg/netplay. " - "(The Slippi Launcher has automatic updates on macOS, and you should consider switching to that)"); - return false; + std::string command = "open \"" + url + "\""; #else - const char *appimage_path = getenv("APPIMAGE"); - const char *appmount_path = getenv("APPDIR"); - if (!appimage_path) - { - CriticalAlertT("Automatic updates are not available for non-AppImage Linux builds."); - return false; - } - std::string path(appimage_path); - std::string mount_path(appmount_path); - std::string command = mount_path + "/usr/bin/appimageupdatetool " + path; - WARN_LOG(SLIPPI, "Executing app update command: %s", command.c_str()); - RunSystemCommand(command); - CriticalAlertT("Dolphin failed to update, please head over to the Slippi Discord for support."); - return false; + std::string command = "xdg-open \"" + url + "\""; // Linux #endif + + RunSystemCommand(command); + return true; } void SlippiUser::ListenForLogIn()