[frontend, android] Move update_checker to frontend_common and add Android support (#2687)
All checks were successful
GitHub Actions [CI] Build succeeded – Release published

I still have to add a setting to disable the auto update checking on a later PR, firstly lets make sure i didn't accidentally break anything  with CMAKE. or QT.

Reviewed-on: #2687
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: Inix <Nixy01@proton.me>
Co-committed-by: Inix <Nixy01@proton.me>
This commit is contained in:
Inix 2025-10-21 23:36:35 +02:00 committed by crueter
parent 1971fbe5af
commit cde02bfe46
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
50 changed files with 221 additions and 110 deletions

View file

@ -67,8 +67,9 @@ else
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DYUZU_USE_PRECOMPILED_HEADERS=OFF)
fi
if [ "$DEVEL" != "true" ]; then
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_QT_UPDATE_CHECKER=ON)
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_UPDATE_CHECKER=ON)
fi
if [ "$USE_WEBENGINE" = "true" ]; then

View file

@ -37,7 +37,7 @@ cmake .. -G Ninja \
-DDYNARMIC_ENABLE_LTO=ON \
-DYUZU_USE_BUNDLED_QT=${BUNDLE_QT:-false} \
-DUSE_CCACHE=${CCACHE:-false} \
-DENABLE_QT_UPDATE_CHECKER=${DEVEL:-true} \
-DENABLE_UPDATE_CHECKER=${DEVEL:-true} \
"${EXTRA_CMAKE_FLAGS[@]}" \
"$@"

View file

@ -96,7 +96,7 @@ jobs:
fetch-tags: true
- name: Build
run: TARGET=appimage RELEASE=1 ./.ci/linux/build.sh v3 8
run: TARGET=appimage RELEASE=1 DEVEL=false ./.ci/linux/build.sh v3 8
- name: Package AppImage
run: ./.ci/linux/package.sh v3 &> /dev/null
@ -133,7 +133,7 @@ jobs:
echo $GIT_TAG_NAME
- name: Build
run: ANDROID_HOME=/home/runner/sdk ./.ci/android/build.sh
run: DEVEL=false ANDROID_HOME=/home/runner/sdk ./.ci/android/build.sh
env:
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}

View file

@ -175,7 +175,7 @@ endif()
# qt stuff
option(ENABLE_QT "Enable the Qt frontend" ON)
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF)
option(ENABLE_UPDATE_CHECKER "Enable update checker (for Qt and Android)" OFF)
cmake_dependent_option(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
@ -596,7 +596,7 @@ if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)
# find_package(httplib CONFIG)
endif()
if (ENABLE_WEB_SERVICE)
if (ENABLE_WEB_SERVICE OR ENABLE_UPDATE_CHECKER)
find_package(cpp-jwt)
endif()

View file

@ -62,7 +62,7 @@ Certain other dependencies will be fetched by CPM regardless. System packages *c
* [libusb](https://github.com/libusb/libusb)
* [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator)
* [sirit](https://github.com/eden-emulator/sirit)
* [httplib](https://github.com/yhirose/cpp-httplib) - if `ENABLE_QT_UPDATE_CHECKER` or `ENABLE_WEB_SERVICE` are on
* [httplib](https://github.com/yhirose/cpp-httplib) - if `ENABLE_UPDATE_CHECKER` or `ENABLE_WEB_SERVICE` are on
- This package is known to be broken on the AUR.
* [cpp-jwt](https://github.com/arun11299/cpp-jwt) 1.4+ - if `ENABLE_WEB_SERVICE` is on
* [unordered-dense](https://github.com/martinus/unordered_dense)

View file

@ -38,6 +38,7 @@ Notes:
- `YUZU_USE_BUNDLED_OPENSSL` (ON for MSVC) Download bundled OpenSSL build
* Always on for Android
* Unavailable on OpenBSD
- `ENABLE_UPDATE_CHECKER` (OFF) Enable update checker for the Qt an Android frontends
The following options are desktop only:
- `ENABLE_SDL2` (ON) Enable the SDL2 desktop, audio, and input frontend (HIGHLY RECOMMENDED!)
@ -51,7 +52,6 @@ The following options are desktop only:
* Unavailable on Windows/ARM64 and Android
- `ENABLE_QT` (ON) Enable the Qt frontend (recommended)
- `ENABLE_QT_TRANSLATION` (OFF) Enable translations for the Qt frontend
- `ENABLE_QT_UPDATE_CHECKER` (OFF) Enable update checker for the Qt frontend
- `YUZU_USE_BUNDLED_QT` (ON for MSVC) Download bundled Qt binaries
* Note that using **system Qt** requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH`, e.g:
* `-DCMAKE_PREFIX_PATH=C:/Qt/6.9.0/msvc2022_64/lib/cmake/Qt6`

View file

@ -27,5 +27,5 @@ Boolean flags (set `true` to enable, `false` to disable):
* AppImage packaging script: `.ci/linux/package.sh`
* Accepts same arch targets as build script
* Use `DEVEL=true` to rename app to `Eden Nightly`
* Use `DEVEL=true` to rename app to `Eden Nightly` and disable the update checker
* This should generally not be used unless in a tailor-made packaging environment (e.g. Actions/CI)

View file

@ -214,7 +214,7 @@ if (VulkanMemoryAllocator_ADDED)
endif()
# httplib
if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)
if (ENABLE_WEB_SERVICE OR ENABLE_UPDATE_CHECKER)
AddJsonPackage(httplib)
endif()

View file

@ -74,9 +74,11 @@ android {
externalNativeBuild {
cmake {
val extraCMakeArgs = (project.findProperty("YUZU_ANDROID_ARGS") as String?)?.split("\\s+".toRegex()) ?: emptyList()
arguments.addAll(listOf(
val extraCMakeArgs =
(project.findProperty("YUZU_ANDROID_ARGS") as String?)?.split("\\s+".toRegex())
?: emptyList()
arguments.addAll(
listOf(
"-DENABLE_QT=0", // Don't use QT
"-DENABLE_SDL2=0", // Don't use SDL
"-DENABLE_WEB_SERVICE=1", // Enable web service
@ -227,6 +229,7 @@ android {
}
}
tasks.register<Delete>("ktlintReset", fun Delete.() {
delete(File(layout.buildDirectory.toString() + File.separator + "intermediates/ktLint"))
})

View file

@ -200,6 +200,21 @@ object NativeLibrary {
external fun logSettings()
/**
* Checks for available updates.
*/
external fun checkForUpdate(): String?
/**
* Return the URL to the release page
*/
external fun getUpdateUrl(version: String): String
/**
* Returns whether the update checker is enabled through CMAKE options.
*/
external fun isUpdateCheckerEnabled(): Boolean
enum class CoreError {
ErrorSystemFiles,
ErrorSavestate,

View file

@ -12,6 +12,10 @@ import android.app.NotificationManager
import android.content.Context
import org.yuzu.yuzu_emu.features.input.NativeInput
import java.io.File
import java.io.FileOutputStream
import java.security.KeyStore
import javax.net.ssl.TrustManagerFactory
import javax.net.ssl.X509TrustManager
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
import org.yuzu.yuzu_emu.utils.DocumentsTree
import org.yuzu.yuzu_emu.utils.GpuDriverHelper

View file

@ -35,6 +35,8 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
PICTURE_IN_PICTURE("picture_in_picture"),
USE_CUSTOM_RTC("custom_rtc_enabled"),
BLACK_BACKGROUNDS("black_backgrounds"),
ENABLE_UPDATE_CHECKS("enable_update_checks"),
JOYSTICK_REL_CENTER("joystick_rel_center"),
DPAD_SLIDE("dpad_slide"),
HAPTIC_FEEDBACK("haptic_feedback"),

View file

@ -24,7 +24,7 @@ object Settings {
SECTION_INPUT_PLAYER_SIX,
SECTION_INPUT_PLAYER_SEVEN,
SECTION_INPUT_PLAYER_EIGHT,
SECTION_THEME(R.string.preferences_theme),
SECTION_APP_SETTINGS(R.string.preferences_app_settings),
SECTION_DEBUG(R.string.preferences_debug),
SECTION_EDEN_VEIL(R.string.eden_veil),
SECTION_APPLETS(R.string.applets_menu);

View file

@ -750,6 +750,12 @@ abstract class SettingsItem(
valuesId = R.array.rendererApiValues
)
)
put(
SwitchSetting(
BooleanSetting.ENABLE_UPDATE_CHECKS,
titleId = R.string.enable_update_checks,
)
)
put(
SwitchSetting(
BooleanSetting.RENDERER_DEBUG,

View file

@ -105,7 +105,7 @@ class SettingsFragmentPresenter(
MenuTag.SECTION_INPUT_PLAYER_SIX -> addInputPlayer(sl, 5)
MenuTag.SECTION_INPUT_PLAYER_SEVEN -> addInputPlayer(sl, 6)
MenuTag.SECTION_INPUT_PLAYER_EIGHT -> addInputPlayer(sl, 7)
MenuTag.SECTION_THEME -> addThemeSettings(sl)
MenuTag.SECTION_APP_SETTINGS -> addThemeSettings(sl)
MenuTag.SECTION_DEBUG -> addDebugSettings(sl)
MenuTag.SECTION_EDEN_VEIL -> addEdenVeilSettings(sl)
MenuTag.SECTION_APPLETS -> addAppletSettings(sl)
@ -1030,6 +1030,14 @@ class SettingsFragmentPresenter(
override fun reset() = IntSetting.THEME.setInt(defaultValue)
}
if (NativeLibrary.isUpdateCheckerEnabled()) {
add(HeaderSetting(R.string.app_settings))
add(BooleanSetting.ENABLE_UPDATE_CHECKS.key)
}
add(HeaderSetting(R.string.theme_and_color))
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
add(
SingleChoiceSetting(

View file

@ -86,6 +86,20 @@ class HomeSettingsFragment : Fragment() {
}
)
)
add(
HomeSetting(
R.string.app_settings,
R.string.app_settings_description,
R.drawable.ic_palette,
{
val action = HomeNavigationDirections.actionGlobalSettingsActivity(
null,
Settings.MenuTag.SECTION_APP_SETTINGS
)
binding.root.findNavController().navigate(action)
}
)
)
add(
HomeSetting(
R.string.preferences_controls,
@ -216,20 +230,6 @@ class HomeSettingsFragment : Fragment() {
{ openFileManager() }
)
)
add(
HomeSetting(
R.string.preferences_theme,
R.string.theme_and_color_description,
R.drawable.ic_palette,
{
val action = HomeNavigationDirections.actionGlobalSettingsActivity(
null,
Settings.MenuTag.SECTION_THEME
)
binding.root.findNavController().navigate(action)
}
)
)
add(
HomeSetting(
R.string.about,

View file

@ -23,6 +23,7 @@ import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.preference.PreferenceManager
import com.google.android.material.color.MaterialColors
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.io.File
import java.io.FilenameFilter
import org.yuzu.yuzu_emu.NativeLibrary
@ -50,6 +51,8 @@ import java.util.zip.ZipInputStream
import androidx.core.content.edit
import org.yuzu.yuzu_emu.activities.EmulationActivity
import kotlin.text.compareTo
import androidx.core.net.toUri
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
class MainActivity : AppCompatActivity(), ThemeProvider {
private lateinit var binding: ActivityMainBinding
@ -152,9 +155,47 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
// Dismiss previous notifications (should not happen unless a crash occurred)
EmulationActivity.stopForegroundService(this)
val firstTimeSetup = PreferenceManager.getDefaultSharedPreferences(applicationContext)
.getBoolean(Settings.PREF_FIRST_APP_LAUNCH, true)
if (!firstTimeSetup && NativeLibrary.isUpdateCheckerEnabled() && BooleanSetting.ENABLE_UPDATE_CHECKS.getBoolean()) {
checkForUpdates()
}
setInsets()
}
private fun checkForUpdates() {
Thread {
val latestVersion = NativeLibrary.checkForUpdate()
if (latestVersion != null) {
runOnUiThread {
showUpdateDialog(latestVersion)
}
}
}.start()
}
private fun showUpdateDialog(version: String) {
MaterialAlertDialogBuilder(this)
.setTitle(R.string.update_available)
.setMessage(getString(R.string.update_available_description, version))
.setPositiveButton(android.R.string.ok) { _, _ ->
val url = NativeLibrary.getUpdateUrl(version)
val intent = Intent(Intent.ACTION_VIEW, url.toUri())
startActivity(intent)
}
.setNeutralButton(R.string.cancel) { dialog, _ ->
dialog.dismiss()
}
.setNegativeButton(R.string.dont_show_again) { dialog, _ ->
BooleanSetting.ENABLE_UPDATE_CHECKS.setBoolean(false)
NativeConfig.saveGlobalConfig()
dialog.dismiss()
}
.show()
}
fun displayMultiplayerDialog() {
val dialog = NetPlayDialog(this)
dialog.show()

View file

@ -30,4 +30,8 @@ if (ENABLE_OPENSSL OR ENABLE_WEB_SERVICE)
target_link_libraries(yuzu-android PRIVATE OpenSSL::SSL cpp-jwt::cpp-jwt)
endif()
if (ENABLE_UPDATE_CHECKER)
target_compile_definitions(yuzu-android PUBLIC ENABLE_UPDATE_CHECKER)
endif()
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} yuzu-android)

View file

@ -62,6 +62,8 @@ namespace AndroidSettings {
Settings::Setting<s32> theme_mode{linkage, -1, "theme_mode", Settings::Category::Android};
Settings::Setting<bool> black_backgrounds{linkage, false, "black_backgrounds",
Settings::Category::Android};
Settings::Setting<bool> enable_update_checks{linkage, true, "enable_update_checks",
Settings::Category::Android};
// Input/performance overlay settings
std::vector<OverlayControlData> overlay_control_data;

View file

@ -61,6 +61,9 @@
#include "core/loader/loader.h"
#include "frontend_common/config.h"
#include "frontend_common/firmware_manager.h"
#ifdef ENABLE_UPDATE_CHECKER
#include "frontend_common/update_checker.h"
#endif
#include "hid_core/frontend/emulated_controller.h"
#include "hid_core/hid_core.h"
#include "hid_core/hid_types.h"
@ -1107,4 +1110,48 @@ JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_updatePowerState(
g_is_charging.store(isCharging, std::memory_order_relaxed);
g_has_battery.store(hasBattery, std::memory_order_relaxed);
}
// return #ifdef ENABLE_UPDATE_CHECKER
JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_isUpdateCheckerEnabled(
JNIEnv* env,
jobject obj) {
#ifdef ENABLE_UPDATE_CHECKER
return JNI_TRUE;
#else
return JNI_FALSE;
#endif
}
#ifdef ENABLE_UPDATE_CHECKER
JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_checkForUpdate(
JNIEnv* env,
jobject obj) {
const bool is_prerelease = ((strstr(Common::g_build_version, "pre-alpha") != nullptr) ||
(strstr(Common::g_build_version, "alpha") != nullptr) ||
(strstr(Common::g_build_version, "beta") != nullptr) ||
(strstr(Common::g_build_version, "rc") != nullptr));
const std::optional<std::string> latest_release_tag =
UpdateChecker::GetLatestRelease(is_prerelease);
if (latest_release_tag && latest_release_tag.value() != Common::g_build_version) {
return env->NewStringUTF(latest_release_tag.value().c_str());
}
return nullptr;
}
JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_getUpdateUrl(
JNIEnv* env,
jobject obj,
jstring version) {
const char* version_str = env->GetStringUTFChars(version, nullptr);
const std::string url = fmt::format("{}/{}/releases/tag/{}",
std::string{Common::g_build_auto_update_website},
std::string{Common::g_build_auto_update_repo},
version_str);
env->ReleaseStringUTFChars(version, version_str);
return env->NewStringUTF(url.c_str());
}
#endif
} // extern "C"

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">أضيفت مؤخراً</string>
<string name="open_user_folder">فتح مجلد عدن</string>
<string name="open_user_folder_description">إدارة الملفات الداخلية لـ عدن</string>
<string name="theme_and_color_description">تعديل مظهر التطبيق</string>
<string name="no_file_manager">لم يتم العثور على مدير الملفات</string>
<string name="notification_no_directory_link">لا يمكن فتح مجلد عدن</string>
<string name="notification_no_directory_link_description">الرجاء تحديد موقع مجلد المستخدم باستخدام اللوحة الجانبية لمدير الملفات يدويًا</string>
@ -666,7 +665,6 @@
<string name="preferences_controls">التحكم</string>
<string name="preferences_controls_description">مدخلات وحدة تحكم الخريطة</string>
<string name="preferences_player">اللاعب %d</string>
<string name="preferences_theme">السمة واللون</string>
<string name="preferences_debug">تصحيح الأخطاء</string>
<string name="preferences_debug_description">CPU/GPU debugging, graphics API, fastmem</string>

View file

@ -271,7 +271,6 @@
<string name="search_recently_added">بەم دواییە زیادکرا</string>
<string name="open_user_folder">کردنەوەی فۆڵدەری یوزو</string>
<string name="open_user_folder_description">بەڕێوەبردنی فایلە ناوخۆییەکانی یوزو</string>
<string name="theme_and_color_description">دەستکاری کردنی شێوازی ئەپەکە</string>
<string name="no_file_manager">هیچ فایل بەڕێوەبەرێک نەدۆزرایەوە</string>
<string name="notification_no_directory_link">نەتوانرا ناونیشانی یوزو بکرێتەوە</string>
<string name="notification_no_directory_link_description">تکایە شوێنی فۆڵدەری بەکارهێنەر لەگەڵ پانێڵی لایەنی فایل بەڕێوەبارەکان بە دەست بدۆزەرەوە.</string>
@ -532,7 +531,6 @@
<string name="preferences_system">سیستەم</string>
<string name="preferences_graphics">گرافیک</string>
<string name="preferences_audio">دەنگ</string>
<string name="preferences_theme">ڕەنگ و ڕووکار</string>
<string name="preferences_debug">چاککردنەوە</string>
<string name="path">ڕێڕەو</string>
<string name="version">وەشان</string>

View file

@ -482,7 +482,6 @@
<string name="preferences_graphics">Grafika</string>
<string name="preferences_audio">Zvuk</string>
<string name="preferences_audio_description">Výstupní engine, hlasitost</string>
<string name="preferences_theme">Vzhled a barva</string>
<string name="preferences_debug">Ladění</string>
<!-- Game properties -->
<string name="info">Info</string>

View file

@ -291,7 +291,6 @@
<string name="search_recently_added">Kürzlich hinzugefügt</string>
<string name="open_user_folder">Eden-Ordner öffnen</string>
<string name="open_user_folder_description">Eden\'s interne Dateien verwalten</string>
<string name="theme_and_color_description">Das Aussehen der App ändern</string>
<string name="no_file_manager">Kein Dateimanager gefunden</string>
<string name="notification_no_directory_link">Eden-Verzeichnis konnte nicht geöffnet werden</string>
<string name="notification_no_directory_link_description">Bitte suche den Benutzerordner manuell über die Seitenleiste des Dateimanagers.</string>
@ -645,7 +644,6 @@ Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die
<string name="preferences_controls">Steuerung</string>
<string name="preferences_controls_description">Belege die Kontrollertasten</string>
<string name="preferences_player">Spieler %d</string>
<string name="preferences_theme">Theme und Farbe</string>
<string name="preferences_debug">Debug</string>
<string name="preferences_debug_description">CPU/GPU-Debugging, Grafik-API, Fastmem</string>

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">Añadido recientemente</string>
<string name="open_user_folder">Abrir la carpeta de Eden</string>
<string name="open_user_folder_description">Administrar los archivos internos de Eden</string>
<string name="theme_and_color_description">Modificar la apariencia de la aplicación</string>
<string name="no_file_manager">Explorador de archivos no encontrado</string>
<string name="notification_no_directory_link">No se pudo abrir la carpeta Eden</string>
<string name="notification_no_directory_link_description">Por favor, busque la carpeta user con el panel lateral del explorador de archivos de forma manual.</string>
@ -660,7 +659,6 @@
<string name="preferences_controls">Controles</string>
<string name="preferences_controls_description">Asignar entradas del mando</string>
<string name="preferences_player">Jugador %d</string>
<string name="preferences_theme">Tema y color</string>
<string name="preferences_debug">Depuración</string>
<string name="preferences_debug_description">CPU/GPU debug, API gráfica, fastMEM</string>

View file

@ -335,7 +335,6 @@
<string name="search_recently_added">به تازگی اضافه شده‌ها</string>
<string name="open_user_folder">باز کردن پوشه Eden</string>
<string name="open_user_folder_description">مدیریت فایل‌های داخلی Eden</string>
<string name="theme_and_color_description">تغییر ظاهر برنامه</string>
<string name="no_file_manager">هیچ برنامه مدیریت فایلی پیدا نشد</string>
<string name="notification_no_directory_link">پوشه Eden باز نشد</string>
<string name="notification_no_directory_link_description">لطفاً پوشه کاربری را با استفاده از پنل کناری برنامه مدیریت فایل به صورت دستی پیدا کنید.</string>
@ -619,7 +618,6 @@
<string name="preferences_graphics_description">سطح دقت، وضوح، حافظه پنهان سایه‌زن</string>
<string name="preferences_audio">صدا</string>
<string name="preferences_audio_description">موتور خروجی، میزان</string>
<string name="preferences_theme">رنگ و تم</string>
<string name="preferences_debug">اشکال‌زدایی</string>
<string name="preferences_debug_description">اشکال‌زدایی پردازنده/گرافیک، API گرافیک، fastmem</string>

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">Ajouté récemment</string>
<string name="open_user_folder">Ouvrir le dossier de Eden</string>
<string name="open_user_folder_description">Gérer les fichiers internes de Eden</string>
<string name="theme_and_color_description">Modifier l\'apparence de l\'application</string>
<string name="no_file_manager">Aucun gestionnaire de fichiers trouvé</string>
<string name="notification_no_directory_link">Impossible d\'ouvrir le répertoire de Eden</string>
<string name="notification_no_directory_link_description">Veuillez localiser manuellement le dossier utilisateur avec le panneau latéral du gestionnaire de fichiers.</string>
@ -660,7 +659,6 @@
<string name="preferences_controls">Contrôles</string>
<string name="preferences_controls_description">Mapper l\'entrée du contrôleur</string>
<string name="preferences_player">Joueur %d</string>
<string name="preferences_theme">Thème et couleur</string>
<string name="preferences_debug">Débogage</string>
<string name="preferences_debug_description">Débogage CPU/GPU, API graphique, fastmem</string>

View file

@ -275,7 +275,6 @@
<string name="search_recently_added">הוסף לאחרונה</string>
<string name="open_user_folder">פתח את תיקיית Eden </string>
<string name="open_user_folder_description">נה ל את הקבצים הפנימיין של Eden</string>
<string name="theme_and_color_description">ערוך את נראות האפליקציה</string>
<string name="no_file_manager">לא נמצא מנהל קבצים</string>
<string name="notification_no_directory_link">לא יכול לפתוח את ספריית Eden</string>
<string name="notification_no_directory_link_description">בבקשה מקם את תיקיית המשתמש בפנל הצידי של מנהל הקבצים באופן ידני.</string>
@ -556,7 +555,6 @@
<string name="preferences_graphics_description">רמת דיוק, רזולוציה, מטמון שיידרים</string>
<string name="preferences_audio">שמע</string>
<string name="preferences_audio_description">מנוע פלט, עוצמת שמע</string>
<string name="preferences_theme">צבע ונושא</string>
<string name="preferences_debug">דיבאג</string>
<string name="preferences_debug_description">דיבאגינג עבור מעבד/מעבד גרפי, ממשק תוכנה עבור הגרפיקות, fastmem</string>

View file

@ -274,7 +274,6 @@
<string name="search_recently_added">Nemrég hozzáadva</string>
<string name="open_user_folder">Eden mappa megnyitása</string>
<string name="open_user_folder_description">Eden belső fájljainak kezelése</string>
<string name="theme_and_color_description">Az alkalmazás megjelenésének módosítása</string>
<string name="no_file_manager">Nem található fájlkezelő</string>
<string name="notification_no_directory_link">Nem sikerült megnyitni a Eden könyvtárat</string>
<string name="notification_no_directory_link_description">Kérjük, manuálisan keresd meg a felhasználói mappát a fájlkezelő oldalsó paneljével.</string>
@ -612,7 +611,6 @@
<string name="preferences_audio_description">Kimeneti motor, hangerő</string>
<string name="preferences_controls">Irányítás</string>
<string name="preferences_player">Játékos %d</string>
<string name="preferences_theme">Téma és színek</string>
<string name="preferences_debug">Hibakeresés</string>
<string name="preferences_debug_description">CPU/GPU hibakeresés, grafikus API, fastmem</string>

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">baru ditambahkan</string>
<string name="open_user_folder">Buka folder Eden</string>
<string name="open_user_folder_description">Kelola file internal Eden\'s</string>
<string name="theme_and_color_description">Ubah tampilan aplikasi</string>
<string name="no_file_manager">Tidak menemukan file manager</string>
<string name="notification_no_directory_link">Tidak bisa membuka direktori Eden</string>
<string name="notification_no_directory_link_description">Silakan cari folder pengguna dengan panel samping manajer file secara manual.</string>
@ -656,7 +655,6 @@
<string name="preferences_controls">Kendali</string>
<string name="preferences_controls_description">Petakan input kontroler</string>
<string name="preferences_player">Player %d</string>
<string name="preferences_theme">Tema dan warna</string>
<string name="preferences_debug">Awakutu</string>
<string name="preferences_debug_description">CPU/GPU debugging, graphics API, fastmem</string>

View file

@ -301,7 +301,6 @@
<string name="search_recently_added">Aggiunti recentemente</string>
<string name="open_user_folder">Apri la cartella di Eden</string>
<string name="open_user_folder_description">Gestisci i file interni di Eden</string>
<string name="theme_and_color_description">Modifica l\'aspetto dell\'app</string>
<string name="no_file_manager">Nessun file manager trovato</string>
<string name="notification_no_directory_link">Impossibile aprire la cartella di Eden</string>
<string name="notification_no_directory_link_description">Per favore individua la cartella dell\'utente manualmente con il pannello laterale del file manager.</string>
@ -601,7 +600,6 @@
<string name="preferences_audio">Audio</string>
<string name="preferences_audio_description">Motore di Output audio e volume</string>
<string name="preferences_controls">Comandi</string>
<string name="preferences_theme">Tema e colori</string>
<string name="preferences_debug">Debug</string>
<string name="preferences_debug_description">Debugging CPU/GPU, API grafiche, fastmem</string>

View file

@ -277,7 +277,6 @@
<string name="search_recently_added">最近追加された</string>
<string name="open_user_folder">Eden フォルダを開く</string>
<string name="open_user_folder_description">Eden内部のファイルを管理します</string>
<string name="theme_and_color_description">アプリの見た目を変更</string>
<string name="no_file_manager">ファイルマネージャーが見つかりませんでした</string>
<string name="notification_no_directory_link">Edenのディレクトリを開けません</string>
<string name="notification_no_directory_link_description">ファイルマネージャのサイドパネルでユーザーフォルダを手動で探してください。</string>
@ -556,7 +555,6 @@
<string name="preferences_graphics">グラフィック</string>
<string name="preferences_audio">サウンド</string>
<string name="preferences_controls">操作</string>
<string name="preferences_theme">テーマと色</string>
<string name="preferences_debug">デバッグ</string>
<!-- Game properties -->
<string name="info">情報</string>

View file

@ -275,7 +275,6 @@
<string name="search_recently_added">최근 추가</string>
<string name="open_user_folder">Eden 폴더 열기</string>
<string name="open_user_folder_description">Eden의 내부 파일 관리</string>
<string name="theme_and_color_description">앱 디자인 편집</string>
<string name="no_file_manager">파일 관리자를 찾을 수 없음</string>
<string name="notification_no_directory_link">Eden 디렉터리를 열 수 없음</string>
<string name="notification_no_directory_link_description">파일 관리자의 사이드 패널에서 사용자 폴더를 수동으로 찾아주세요.</string>
@ -570,7 +569,6 @@
<string name="preferences_audio">오디오</string>
<string name="preferences_audio_description">출력 엔진, 불륨</string>
<string name="preferences_controls">조작</string>
<string name="preferences_theme">테마 및 색상</string>
<string name="preferences_debug">디버그</string>
<string name="preferences_debug_description">CPU/GPU 디버깅, 그래픽 API, Fastmem</string>

View file

@ -271,7 +271,6 @@
<string name="search_recently_added">Nylig lagt til</string>
<string name="open_user_folder">Åpne Eden-mappen</string>
<string name="open_user_folder_description">Administrere Edens interne filer</string>
<string name="theme_and_color_description">Endre appens utseende</string>
<string name="no_file_manager">Ingen filbehandler funnet</string>
<string name="notification_no_directory_link">Kunne ikke åpne Eden-katalogen</string>
<string name="notification_no_directory_link_description">Finn brukermappen manuelt med filbehandlingens sidepanel.</string>
@ -539,7 +538,6 @@
<string name="preferences_graphics">Grafikk</string>
<string name="preferences_audio">Lyd</string>
<string name="preferences_controls">Kontrollere</string>
<string name="preferences_theme">Tema og farge</string>
<string name="preferences_debug">Feilsøk</string>
<!-- Game properties -->
<string name="info">Info</string>

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">Ostatnio dodane</string>
<string name="open_user_folder">Otwórz folder Eden</string>
<string name="open_user_folder_description">Zarządzaj plikami emulatora</string>
<string name="theme_and_color_description">Personalizuj wygląd aplikacji</string>
<string name="no_file_manager">Nie znaleziono menedżera plików</string>
<string name="notification_no_directory_link">Nie można otworzyć folderu emulatora</string>
<string name="notification_no_directory_link_description">Proszę wybrać ręcznie folder z pomocą panelu bocznego menedżera plików.</string>
@ -662,7 +661,6 @@
<string name="preferences_controls">Sterowanie</string>
<string name="preferences_controls_description">Mapuj wejście kontrolera</string>
<string name="preferences_player">Gracz %d</string>
<string name="preferences_theme">Motyw i kolor</string>
<string name="preferences_debug">Debug</string>
<string name="preferences_debug_description">Debugowanie CPU/GPU, API grafiki, fastmem</string>

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">Adicionado recentemente</string>
<string name="open_user_folder">Abrir a pasta do Eden</string>
<string name="open_user_folder_description">Gerencie os arquivos internos do Eden</string>
<string name="theme_and_color_description">Alterar a aparência do aplicativo</string>
<string name="no_file_manager">Nenhum gerenciador de arquivos encontrado</string>
<string name="notification_no_directory_link">Não foi possível abrir a pasta do Eden</string>
<string name="notification_no_directory_link_description">Localize manualmente a pasta do usuário usando o gerenciador de arquivos.</string>
@ -661,7 +660,6 @@ uma tentativa de mapeamento automático</string>
<string name="preferences_controls">Controles</string>
<string name="preferences_controls_description">Mapear entradas do controle</string>
<string name="preferences_player">Jogador %d</string>
<string name="preferences_theme">Tema e cor</string>
<string name="preferences_debug">Depuração</string>
<string name="preferences_debug_description">Depuração de CPU/GPU, API gráfica, fastmem</string>

View file

@ -275,7 +275,6 @@
<string name="search_recently_added">Adicionado recentemente</string>
<string name="open_user_folder">Abre a pasta Eden</string>
<string name="open_user_folder_description">Gere os ficheiro internos do Eden</string>
<string name="theme_and_color_description">Modifica a aparência da App</string>
<string name="no_file_manager">Nenhum gestor de ficheiros encontrado</string>
<string name="notification_no_directory_link">Impossível abrir pasta Eden</string>
<string name="notification_no_directory_link_description">Localiza a pasta de utilizador manualmente com o painel lateral do gestor de ficheiros.</string>
@ -623,7 +622,6 @@ uma tentativa de mapeamento automático</string>
<string name="preferences_controls">Controlos</string>
<string name="preferences_controls_description">Mapear entradas do controle</string>
<string name="preferences_player">Jogador %d</string>
<string name="preferences_theme">Cor e tema.</string>
<string name="preferences_debug">Depurar</string>
<string name="preferences_debug_description">Depuração de CPU/GPU, API gráfica, fastmem</string>

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">Недавно добавлено</string>
<string name="open_user_folder">Открыть папку Eden</string>
<string name="open_user_folder_description">Управление внутренними файлами Eden</string>
<string name="theme_and_color_description">Изменение внешнего вида приложения</string>
<string name="no_file_manager">Не найден файловый менеджер</string>
<string name="notification_no_directory_link">Не удалось открыть папку Eden</string>
<string name="notification_no_directory_link_description">Пожалуйста, найдите папку пользователя с помощью боковой панели файлового менеджера вручную.</string>
@ -662,7 +661,6 @@
<string name="preferences_controls">Управление</string>
<string name="preferences_controls_description">Маппинг контроллера</string>
<string name="preferences_player">Игрок %d</string>
<string name="preferences_theme">Тема и цвет</string>
<string name="preferences_debug">Отладка</string>
<string name="preferences_debug_description">Отладка ЦП/ГП, графический API, fastmem</string>

View file

@ -274,7 +274,6 @@
<string name="search_recently_added">Недавно је додато</string>
<string name="open_user_folder">Отворите директоријум ЕДЕН</string>
<string name="open_user_folder_description">Управљајте унутрашњим датотекама ЕДЕН-а</string>
<string name="theme_and_color_description">Измените изглед апликације</string>
<string name="no_file_manager">Није пронађен ниједан управник датотека</string>
<string name="notification_no_directory_link">Није могуће отворити директоријум ЕДЕН-а</string>
<string name="notification_no_directory_link_description">Молимо пронађите корисничку мапу са бочним панелом датотека менаџера и ручно.</string>
@ -621,7 +620,6 @@
<string name="preferences_controls">Контрола</string>
<string name="preferences_controls_description">Унос контролера мапе</string>
<string name="preferences_player">Играч%d</string>
<string name="preferences_theme">Тема и боја</string>
<string name="preferences_debug">Ослободити збрајања</string>
<string name="preferences_debug_description">ЦПУ / ГПУ уклањање погрешака, графички АПИ, ФастМем</string>

View file

@ -305,7 +305,6 @@
<string name="search_recently_added">Нещодавно додано</string>
<string name="open_user_folder">Відкрити теку Eden</string>
<string name="open_user_folder_description">Керування внутрішніми файлами Eden</string>
<string name="theme_and_color_description">Змінити зовнішній вигляд застосунку</string>
<string name="no_file_manager">Не знайдено файлового менеджера</string>
<string name="notification_no_directory_link">Не вдалося відкрити теку Eden</string>
<string name="notification_no_directory_link_description">Будь ласка, знайдіть теку користувача за допомогою бічної панелі файлового менеджера вручну.</string>
@ -662,7 +661,6 @@
<string name="preferences_controls">Керування</string>
<string name="preferences_controls_description">Призначити кнопки контролера</string>
<string name="preferences_player">Гравець %d</string>
<string name="preferences_theme">Тема та колір</string>
<string name="preferences_debug">Налагодження</string>
<string name="preferences_debug_description">Налагодження CPU/GPU, графічний API, швидка пам\'ять</string>

View file

@ -271,7 +271,6 @@
<string name="search_recently_added">Đã thêm gần đây</string>
<string name="open_user_folder">Mở thư mục Eden</string>
<string name="open_user_folder_description">Quản lý file nội bộ của Eden</string>
<string name="theme_and_color_description">Thay đổi giao diện ứng dụng</string>
<string name="no_file_manager">Không tìm thấy trình quản lý tệp</string>
<string name="notification_no_directory_link">Không thể mở thư mục Eden</string>
<string name="notification_no_directory_link_description">Vui lòng xác định thư mục người dùng với bảng điều khiển bên của trình quản lý tệp thủ công.</string>
@ -539,7 +538,6 @@
<string name="preferences_graphics">Đồ Họa</string>
<string name="preferences_audio">Âm Thanh</string>
<string name="preferences_controls">Phím</string>
<string name="preferences_theme">Chủ đề và màu sắc</string>
<string name="preferences_debug">Vá lỗi</string>
<!-- Game properties -->
<string name="info">Thông Tin</string>

View file

@ -279,7 +279,6 @@
<string name="search_recently_added">最近添加</string>
<string name="open_user_folder">打开 Eden 文件夹</string>
<string name="open_user_folder_description">管理 Eden 内部文件</string>
<string name="theme_and_color_description">更改外观</string>
<string name="no_file_manager">找不到可用的文件管理器</string>
<string name="notification_no_directory_link">无法打开 Eden 文件夹</string>
<string name="notification_no_directory_link_description">请使用文件管理器侧边栏中的内部存储手动定位用户文件夹。</string>
@ -624,7 +623,6 @@
<string name="preferences_controls">控制</string>
<string name="preferences_controls_description">使用控制器来映射输入</string>
<string name="preferences_player">玩家 %d</string>
<string name="preferences_theme">主题和色彩</string>
<string name="preferences_debug">调试</string>
<string name="preferences_debug_description">CPU/GPU 调试、图形 API 及 fastmem 内存访问</string>

View file

@ -300,7 +300,6 @@
<string name="search_recently_added">最近新增</string>
<string name="open_user_folder">開啟 Eden 資料夾</string>
<string name="open_user_folder_description">管理 Eden 的內部檔案</string>
<string name="theme_and_color_description">修改應用程式外觀</string>
<string name="no_file_manager">找不到檔案管理員</string>
<string name="notification_no_directory_link">無法開啟 Eden 目錄</string>
<string name="notification_no_directory_link_description">請使用檔案管理員的側邊面板手動定位到使用者資料夾。</string>
@ -651,7 +650,6 @@
<string name="preferences_controls">控制</string>
<string name="preferences_controls_description">控制器輸入配對</string>
<string name="preferences_player">玩家 %d</string>
<string name="preferences_theme">主題和色彩</string>
<string name="preferences_debug">偵錯</string>
<string name="preferences_debug_description">CPU/GPU 偵錯、圖形 API 及 fastmem</string>

View file

@ -268,6 +268,9 @@
<string name="folder">Folder</string>
<string name="dont_show_again">Don\'t Show Again</string>
<string name="add_directory_success">New game directory added successfully </string>
<string name="enable_update_checks">"Check for updates on app startup. "</string>
<string name="update_available">Update Available</string>
<string name="update_available_description">A new version is available: %1$s\n\nWould you like to download it?</string>
<string name="home_search">Search</string>
<string name="home_settings">Settings</string>
<string name="empty_gamelist">No files were found or no game directory has been selected yet.</string>
@ -310,7 +313,7 @@
<string name="search_recently_added">Recently added</string>
<string name="open_user_folder">Open Eden folder</string>
<string name="open_user_folder_description">Manage Eden\'s internal files</string>
<string name="theme_and_color_description">Modify the look of the app</string>
<string name="app_settings_description">Modify the behavior and look of the app</string>
<string name="no_file_manager">No file manager found</string>
<string name="notification_no_directory_link">Could not open Eden directory</string>
<string name="notification_no_directory_link_description">Please locate the user folder with the file manager\'s side panel manually.</string>
@ -670,7 +673,7 @@
<string name="preferences_controls">Controls</string>
<string name="preferences_controls_description">Map controller input</string>
<string name="preferences_player">Player %d</string>
<string name="preferences_theme">Theme and color</string>
<string name="preferences_app_settings">App vSettings</string>
<string name="preferences_debug">Debug</string>
<string name="preferences_debug_description">CPU/GPU debugging, graphics API, fastmem</string>
@ -991,10 +994,12 @@
<!-- Disk shader cache -->
<string name="building_shaders">Building shaders</string>
<!-- Theme options -->
<!-- App options -->
<string name="change_app_theme">Change app theme</string>
<string name="theme_default">Default</string>
<string name="theme_material_you">Material You</string>
<string name="app_settings">App Settings</string>
<string name="theme_and_color">Theme And Color</string>
<!-- Theme Modes -->
<string name="change_theme_mode">Change theme mode</string>

View file

@ -15,5 +15,20 @@ add_library(frontend_common STATIC
play_time_manager.h
)
if (ENABLE_UPDATE_CHECKER)
target_link_libraries(frontend_common PRIVATE httplib::httplib)
target_link_libraries(frontend_common PRIVATE nlohmann_json::nlohmann_json)
target_sources(frontend_common PRIVATE
update_checker.cpp
update_checker.h
)
if (ENABLE_OPENSSL)
target_compile_definitions(frontend_common PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
target_link_libraries(frontend_common PRIVATE OpenSSL::SSL)
endif()
endif()
create_target_directory_groups(frontend_common)
target_link_libraries(frontend_common PUBLIC core SimpleIni::SimpleIni PRIVATE common Boost::headers)

View file

@ -22,7 +22,6 @@
#include <nlohmann/json.hpp>
#include <optional>
#include <qdebug.h>
#include <string>
std::optional<std::string> UpdateChecker::GetResponse(std::string url, std::string path)
@ -74,13 +73,16 @@ std::optional<std::string> UpdateChecker::GetResponse(std::string url, std::stri
return response.body;
} catch (std::exception &e) {
qDebug() << e.what();
LOG_ERROR(Frontend,
"GET to {}{} failed during update check: {}",
url,
path,
e.what());
return std::nullopt;
}
}
std::optional<std::string> UpdateChecker::GetLatestRelease(bool include_prereleases)
{
std::optional<std::string> UpdateChecker::GetLatestRelease(bool include_prereleases) {
const auto update_check_url = std::string{Common::g_build_auto_update_api};
std::string update_check_path = fmt::format("/repos/{}",
std::string{Common::g_build_auto_update_repo});
@ -90,8 +92,8 @@ std::optional<std::string> UpdateChecker::GetLatestRelease(bool include_prerelea
const auto update_check_tags_path = update_check_path + "/tags";
const auto update_check_releases_path = update_check_path + "/releases";
const auto tags_response = GetResponse(update_check_url, update_check_tags_path);
const auto releases_response = GetResponse(update_check_url, update_check_releases_path);
const auto tags_response = UpdateChecker::GetResponse(update_check_url, update_check_tags_path);
const auto releases_response = UpdateChecker::GetResponse(update_check_url, update_check_releases_path);
if (!tags_response || !releases_response)
return {};
@ -110,7 +112,7 @@ std::optional<std::string> UpdateChecker::GetLatestRelease(bool include_prerelea
return latest_tag;
} else { // This is a stable release, only check for other stable releases.
update_check_path += "/releases/latest";
const auto response = GetResponse(update_check_url, update_check_path);
const auto response = UpdateChecker::GetResponse(update_check_url, update_check_path);
if (!response)
return {};

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright Citra Emulator Project / Azahar Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
@ -9,5 +12,5 @@
namespace UpdateChecker {
std::optional<std::string> GetResponse(std::string url, std::string path);
std::optional<std::string> GetLatestRelease(bool);
std::optional<std::string> GetLatestRelease(bool include_prereleases);
} // namespace UpdateChecker

View file

@ -263,10 +263,8 @@ file(GLOB COMPAT_LIST
file(GLOB_RECURSE ICONS ${PROJECT_SOURCE_DIR}/dist/icons/*)
file(GLOB_RECURSE THEMES ${PROJECT_SOURCE_DIR}/dist/qt_themes/*)
if (ENABLE_QT_UPDATE_CHECKER)
target_link_libraries(yuzu PRIVATE httplib::httplib)
target_sources(yuzu PRIVATE update_checker.cpp)
target_compile_definitions(yuzu PUBLIC ENABLE_QT_UPDATE_CHECKER)
if (ENABLE_UPDATE_CHECKER)
target_compile_definitions(yuzu PUBLIC ENABLE_UPDATE_CHECKER)
endif()
if (ENABLE_QT_TRANSLATION)

View file

@ -54,8 +54,8 @@
#include "yuzu/multiplayer/state.h"
#include "yuzu/util/controller_navigation.h"
#ifdef ENABLE_QT_UPDATE_CHECKER
#include "yuzu/update_checker.h"
#ifdef ENABLE_UPDATE_CHECKER
#include "frontend_common/update_checker.h"
#endif
#ifdef YUZU_ROOM
@ -517,7 +517,7 @@ GMainWindow::GMainWindow(bool has_broken_vulkan)
show();
#ifdef ENABLE_QT_UPDATE_CHECKER
#ifdef ENABLE_UPDATE_CHECKER
if (UISettings::values.check_for_updates) {
update_future = QtConcurrent::run([]() -> QString {
const bool is_prerelease = ((strstr(Common::g_build_version, "pre-alpha") != NULL) ||
@ -4220,7 +4220,7 @@ void GMainWindow::MigrateConfigFiles() {
}
}
#ifdef ENABLE_QT_UPDATE_CHECKER
#ifdef ENABLE_UPDATE_CHECKER
void GMainWindow::OnEmulatorUpdateAvailable() {
QString version_string = update_future.result();
if (version_string.isEmpty())

View file

@ -32,7 +32,7 @@
#include <QtDBus/QtDBus>
#endif
#ifdef ENABLE_QT_UPDATE_CHECKER
#ifdef ENABLE_UPDATE_CHECKER
#include <QFuture>
#include <QFutureWatcher>
#endif
@ -420,7 +420,7 @@ private slots:
void OnEmulationStopped();
void OnEmulationStopTimeExpired();
#ifdef ENABLE_QT_UPDATE_CHECKER
#ifdef ENABLE_UPDATE_CHECKER
void OnEmulatorUpdateAvailable();
#endif
@ -476,7 +476,7 @@ private:
std::unique_ptr<PlayTime::PlayTimeManager> play_time_manager;
std::shared_ptr<InputCommon::InputSubsystem> input_subsystem;
#ifdef ENABLE_QT_UPDATE_CHECKER
#ifdef ENABLE_UPDATE_CHECKER
QFuture<QString> update_future;
QFutureWatcher<QString> update_watcher;
#endif