mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-06-04 23:05:00 -06:00
qt: Prerelease builds now direct users to upgrade via GitHub rather than azahar-emu.org
Some checks are pending
citra-build / source (push) Waiting to run
citra-build / linux (appimage) (push) Waiting to run
citra-build / linux (fresh) (push) Waiting to run
citra-build / macos (arm64) (push) Waiting to run
citra-build / macos (x86_64) (push) Waiting to run
citra-build / macos-universal (push) Blocked by required conditions
citra-build / windows (msvc) (push) Waiting to run
citra-build / windows (msys2) (push) Waiting to run
citra-build / android (push) Waiting to run
citra-format / clang-format (push) Waiting to run
citra-transifex / transifex (push) Waiting to run
Some checks are pending
citra-build / source (push) Waiting to run
citra-build / linux (appimage) (push) Waiting to run
citra-build / linux (fresh) (push) Waiting to run
citra-build / macos (arm64) (push) Waiting to run
citra-build / macos (x86_64) (push) Waiting to run
citra-build / macos-universal (push) Blocked by required conditions
citra-build / windows (msvc) (push) Waiting to run
citra-build / windows (msys2) (push) Waiting to run
citra-build / android (push) Waiting to run
citra-format / clang-format (push) Waiting to run
citra-transifex / transifex (push) Waiting to run
This commit is contained in:
parent
68aab3e0e5
commit
2087f96e90
@ -170,6 +170,12 @@ void GMainWindow::ShowCommandOutput(std::string title, std::string message) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsPrerelease() {
|
||||||
|
return ((strstr(Common::g_build_fullname, "alpha") != NULL) ||
|
||||||
|
(strstr(Common::g_build_fullname, "beta") != NULL) ||
|
||||||
|
(strstr(Common::g_build_fullname, "rc") != NULL));
|
||||||
|
}
|
||||||
|
|
||||||
GMainWindow::GMainWindow(Core::System& system_)
|
GMainWindow::GMainWindow(Core::System& system_)
|
||||||
: ui{std::make_unique<Ui::MainWindow>()}, system{system_}, movie{system.Movie()},
|
: ui{std::make_unique<Ui::MainWindow>()}, system{system_}, movie{system.Movie()},
|
||||||
user_data_migrator{this}, config{std::make_unique<QtConfig>()}, emu_thread{nullptr} {
|
user_data_migrator{this}, config{std::make_unique<QtConfig>()}, emu_thread{nullptr} {
|
||||||
@ -398,12 +404,8 @@ GMainWindow::GMainWindow(Core::System& system_)
|
|||||||
#ifdef ENABLE_QT_UPDATE_CHECKER
|
#ifdef ENABLE_QT_UPDATE_CHECKER
|
||||||
if (UISettings::values.check_for_update_on_start) {
|
if (UISettings::values.check_for_update_on_start) {
|
||||||
update_future = QtConcurrent::run([]() -> QString {
|
update_future = QtConcurrent::run([]() -> QString {
|
||||||
const bool is_prerelease = // TODO: This can be done better -OS
|
|
||||||
((strstr(Common::g_build_fullname, "alpha") != NULL) ||
|
|
||||||
(strstr(Common::g_build_fullname, "beta") != NULL) ||
|
|
||||||
(strstr(Common::g_build_fullname, "rc") != NULL));
|
|
||||||
const std::optional<std::string> latest_release_tag =
|
const std::optional<std::string> latest_release_tag =
|
||||||
UpdateChecker::GetLatestRelease(is_prerelease);
|
UpdateChecker::GetLatestRelease(IsPrerelease());
|
||||||
if (latest_release_tag && latest_release_tag.value() != Common::g_build_fullname) {
|
if (latest_release_tag && latest_release_tag.value() != Common::g_build_fullname) {
|
||||||
return QString::fromStdString(latest_release_tag.value());
|
return QString::fromStdString(latest_release_tag.value());
|
||||||
}
|
}
|
||||||
@ -3926,8 +3928,13 @@ void GMainWindow::OnEmulatorUpdateAvailable() {
|
|||||||
.arg(version_string));
|
.arg(version_string));
|
||||||
update_prompt.exec();
|
update_prompt.exec();
|
||||||
if (update_prompt.button(QMessageBox::Yes) == update_prompt.clickedButton()) {
|
if (update_prompt.button(QMessageBox::Yes) == update_prompt.clickedButton()) {
|
||||||
QDesktopServices::openUrl(
|
std::string update_page_url;
|
||||||
QUrl(QString::fromStdString("https://azahar-emu.org/pages/download/")));
|
if (IsPrerelease()) {
|
||||||
|
update_page_url = "https://github.com/azahar-emu/azahar/releases";
|
||||||
|
} else {
|
||||||
|
update_page_url = "https://azahar-emu.org/pages/download/";
|
||||||
|
}
|
||||||
|
QDesktopServices::openUrl(QUrl(QString::fromStdString(update_page_url)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user