mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-15 02:28:56 +02:00
unsupported platform improvements
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
564d338c35
commit
4ba6738304
6 changed files with 29 additions and 23 deletions
|
|
@ -25,8 +25,6 @@ namespace Common::Net {
|
|||
std::vector<Asset> Release::GetAssets() const {
|
||||
#ifdef _WIN32
|
||||
static constexpr const std::string prefix = "Eden-Windows";
|
||||
#elif defined(__linux__)
|
||||
static constexpr const std::string prefix = "Eden-Linux";
|
||||
#elif defined(__APPLE__)
|
||||
static constexpr const std::string prefix = "Eden-macOS";
|
||||
#elif defined(__ANDROID__)
|
||||
|
|
@ -71,19 +69,13 @@ std::vector<Asset> Release::GetAssets() const {
|
|||
make_asset(QT_TR_NOOP("Standard"), "-mingw-arm64-clang-standard.zip"),
|
||||
make_asset(QT_TR_NOOP("PGO"), "-mingw-arm64-clang-pgo.zip")
|
||||
#endif
|
||||
#elif defined(__linux__)
|
||||
// TODO(crueter): Linux doesn't need this...?
|
||||
#ifdef ARCHITECTURE_x86_64
|
||||
make_asset("Standard", "-amd64-gcc-standard.AppImage"),
|
||||
make_asset("PGO", "-amd64-clang-pgo.AppImage"),
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
#ifdef ARCHITECTURE_arm64
|
||||
make_asset(QT_TR_NOOP("Standard"), ".dmg"),
|
||||
#endif
|
||||
#elif defined(__ANDROID__)
|
||||
#ifdef ARCHITECTURE_x86_64
|
||||
make_asset("ChromeOS", "-chromeos.apk"),
|
||||
make_asset("Standard", "-chromeos.apk"),
|
||||
#elif defined(ARCHITECTURE_arm64)
|
||||
#ifdef YUZU_LEGACY
|
||||
make_asset("Standard", "-legacy.apk"),
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ add_executable(yuzu
|
|||
|
||||
render/performance_overlay.h render/performance_overlay.cpp render/performance_overlay.ui
|
||||
libqt_common.h libqt_common.cpp
|
||||
update_dialog.h update_dialog.cpp update_dialog.ui
|
||||
updater/update_dialog.h updater/update_dialog.cpp updater/update_dialog.ui
|
||||
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "frontend_common/settings_generator.h"
|
||||
#include "qt_common/qt_string_lookup.h"
|
||||
#include "render/performance_overlay.h"
|
||||
#include "update_dialog.h"
|
||||
#include "updater/update_dialog.h"
|
||||
#if defined(QT_STATICPLUGIN) && !defined(__APPLE__)
|
||||
#undef VMA_IMPLEMENTATION
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "ui_update_dialog.h"
|
||||
#include "update_dialog.h"
|
||||
#include <QSaveFile>
|
||||
#include <qdesktopservices.h>
|
||||
|
||||
#include "common/httplib.h"
|
||||
|
||||
|
|
@ -35,21 +36,30 @@ UpdateDialog::UpdateDialog(const Common::Net::Release& release, QWidget* parent)
|
|||
ui->body->setMarkdown(QString::fromStdString(text));
|
||||
|
||||
// TODO(crueter): Find a way to set default
|
||||
u32 i = 0;
|
||||
for (const Common::Net::Asset& a : release.GetAssets()) {
|
||||
QRadioButton* r = new QRadioButton(tr(a.name.c_str()), this);
|
||||
if (i == 0) r->setChecked(true);
|
||||
++i;
|
||||
const auto assets = release.GetAssets();
|
||||
|
||||
r->setProperty("url", QString::fromStdString(a.url));
|
||||
r->setProperty("path", QString::fromStdString(a.path));
|
||||
r->setProperty("filename", QString::fromStdString(a.filename));
|
||||
if (assets.empty()) {
|
||||
ui->groupBox->setHidden(true);
|
||||
connect(this, &QDialog::accepted, this, [release]() {
|
||||
QDesktopServices::openUrl(QUrl{QString::fromStdString(release.html_url)});
|
||||
});
|
||||
} else {
|
||||
u32 i = 0;
|
||||
for (const Common::Net::Asset& a : release.GetAssets()) {
|
||||
QRadioButton* r = new QRadioButton(tr(a.name.c_str()), this);
|
||||
if (i == 0) r->setChecked(true);
|
||||
++i;
|
||||
|
||||
ui->radioButtons->addWidget(r);
|
||||
m_buttons.append(r);
|
||||
r->setProperty("url", QString::fromStdString(a.url));
|
||||
r->setProperty("path", QString::fromStdString(a.path));
|
||||
r->setProperty("filename", QString::fromStdString(a.filename));
|
||||
|
||||
ui->radioButtons->addWidget(r);
|
||||
m_buttons.append(r);
|
||||
}
|
||||
|
||||
connect(this, &QDialog::accepted, this, &UpdateDialog::Download);
|
||||
}
|
||||
|
||||
connect(this, &QDialog::accepted, this, &UpdateDialog::Download);
|
||||
}
|
||||
|
||||
UpdateDialog::~UpdateDialog() {
|
||||
|
|
@ -20,6 +20,7 @@ public:
|
|||
|
||||
private slots:
|
||||
void Download();
|
||||
|
||||
private:
|
||||
Ui::UpdateDialog* ui;
|
||||
QList<QRadioButton *> m_buttons;
|
||||
|
|
@ -19,6 +19,9 @@
|
|||
<property name="text">
|
||||
<string><a href="%1">View on Forgejo</a></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
Loading…
Add table
Add a link
Reference in a new issue