[frontend, android] Move update_checker to frontend_common and add Android support (#2687)
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: https://git.eden-emu.dev/eden-emu/eden/pulls/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:
parent
1971fbe5af
commit
cde02bfe46
50 changed files with 221 additions and 110 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ cmake .. -G Ninja \
|
|||
-DCMAKE_EXE_LINKER_FLAGS=" /LTCG" \
|
||||
-DDYNARMIC_ENABLE_LTO=ON \
|
||||
-DYUZU_USE_BUNDLED_QT=${BUNDLE_QT:-false} \
|
||||
-DUSE_CCACHE=${CCACHE:-false} \
|
||||
-DENABLE_QT_UPDATE_CHECKER=${DEVEL:-true} \
|
||||
-DUSE_CCACHE=${CCACHE:-false} \
|
||||
-DENABLE_UPDATE_CHECKER=${DEVEL:-true} \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}" \
|
||||
"$@"
|
||||
|
||||
|
|
|
|||
4
.github/workflows/trigger_release.yml
vendored
4
.github/workflows/trigger_release.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
2
externals/CMakeLists.txt
vendored
2
externals/CMakeLists.txt
vendored
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -74,22 +74,24 @@ android {
|
|||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
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
|
||||
"-DENABLE_OPENSSL=ON",
|
||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||
"-DYUZU_USE_CPM=ON",
|
||||
"-DCPMUTIL_FORCE_BUNDLED=ON",
|
||||
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
|
||||
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||
"-DBUILD_TESTING=OFF",
|
||||
"-DYUZU_TESTS=OFF",
|
||||
"-DDYNARMIC_TESTS=OFF",
|
||||
*extraCMakeArgs.toTypedArray()
|
||||
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
|
||||
"-DENABLE_OPENSSL=ON",
|
||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||
"-DYUZU_USE_CPM=ON",
|
||||
"-DCPMUTIL_FORCE_BUNDLED=ON",
|
||||
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
|
||||
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||
"-DBUILD_TESTING=OFF",
|
||||
"-DYUZU_TESTS=OFF",
|
||||
"-DDYNARMIC_TESTS=OFF",
|
||||
*extraCMakeArgs.toTypedArray()
|
||||
))
|
||||
|
||||
abiFilters("arm64-v8a")
|
||||
|
|
@ -227,6 +229,7 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
tasks.register<Delete>("ktlintReset", fun Delete.() {
|
||||
delete(File(layout.buildDirectory.toString() + File.separator + "intermediates/ktLint"))
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"),
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue