mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-26 12:16:20 +00:00
pull in 85d7304222
This commit is contained in:
parent
a513283950
commit
14c0f9cf4d
2 changed files with 9 additions and 25 deletions
|
@ -178,43 +178,27 @@ void SlippiUser::OpenLogInPage()
|
||||||
RunSystemCommand(command);
|
RunSystemCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlippiUser::UpdateApp()
|
bool SlippiUser::UpdateApp()
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef defined(__APPLE__) || defined(_WIN32)
|
||||||
auto isoPath = SConfig::GetInstance().m_strIsoPath;
|
CriticalAlertT("Dolphin auto updates are not available on standalone builds. Migrate to "
|
||||||
|
"the Slippi Launcher at your earliest convenience");
|
||||||
std::string path = File::GetExeDirectory() + "/dolphin-slippi-tools.exe";
|
return false;
|
||||||
std::string echo_msg =
|
|
||||||
"echo Starting update process. If nothing happen after a few "
|
|
||||||
"minutes, you may need to update manually from https://slippi.gg/netplay ...";
|
|
||||||
// std::string command =
|
|
||||||
// "start /b cmd /c " + echo_msg + " && \"" + path + "\" app-update -launch -iso \"" + isoPath
|
|
||||||
// +
|
|
||||||
// "\"";
|
|
||||||
std::string command = "start /b cmd /c " + echo_msg + " && \"" + path +
|
|
||||||
"\" app-update -launch -iso \"" + isoPath + "\" -version \"" +
|
|
||||||
Common::scm_slippi_semver_str + "\"";
|
|
||||||
WARN_LOG(SLIPPI, "Executing app update command: %s", command.c_str());
|
|
||||||
RunSystemCommand(command);
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
CriticalAlertT("Automatic updates are not available for macOS; please get the latest update from "
|
|
||||||
"slippi.gg/netplay.");
|
|
||||||
#else
|
#else
|
||||||
const char* appimage_path = getenv("APPIMAGE");
|
const char* appimage_path = getenv("APPIMAGE");
|
||||||
const char* appmount_path = getenv("APPDIR");
|
const char* appmount_path = getenv("APPDIR");
|
||||||
if (!appimage_path)
|
if (!appimage_path)
|
||||||
{
|
{
|
||||||
CriticalAlertT("Automatic updates are not available for non-AppImage Linux builds.");
|
CriticalAlertT("Automatic updates are not available for non-AppImage Linux builds.");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
std::string path(appimage_path);
|
std::string path(appimage_path);
|
||||||
std::string mount_path(appmount_path);
|
std::string mount_path(appmount_path);
|
||||||
std::string command = mount_path + "/usr/bin/appimageupdatetool " + path;
|
std::string command = mount_path + "/usr/bin/appimageupdatetool " + path;
|
||||||
WARN_LOG(SLIPPI, "Executing app update command: %s", command.c_str());
|
WARN_LOG(SLIPPI, "Executing app update command: %s", command.c_str());
|
||||||
RunSystemCommand(command);
|
RunSystemCommand(command);
|
||||||
CriticalAlertT(
|
CriticalAlertT("Dolphin failed to update, please head over to the Slippi Discord for support.");
|
||||||
"Restart Dolphin to finish the update. If there was an issue, please head over to the Slippi "
|
return true;
|
||||||
"Discord for support.");
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
|
|
||||||
bool AttemptLogin();
|
bool AttemptLogin();
|
||||||
void OpenLogInPage();
|
void OpenLogInPage();
|
||||||
void UpdateApp();
|
bool UpdateApp();
|
||||||
void ListenForLogIn();
|
void ListenForLogIn();
|
||||||
void LogOut();
|
void LogOut();
|
||||||
void OverwriteLatestVersion(std::string version);
|
void OverwriteLatestVersion(std::string version);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue