WIP: [frontend, android] Move update_checker to frontend_common and add Android support #2687

Draft
inix wants to merge 4 commits from inix/eden:update-checker-android into master
8 changed files with 15 additions and 13 deletions
Showing only changes of commit abd24b12e5 - Show all commits

View file

@ -67,10 +67,6 @@ 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_UPDATE_CHECKER=ON)
fi
if [ "$USE_WEBENGINE" = "true" ]; then
WEBENGINE=ON
else

View file

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

View file

@ -135,7 +135,7 @@ jobs:
echo $GIT_TAG_NAME
- name: Build
run: ANDROID_HOME=/home/runner/sdk ./.ci/android/build.sh
run: DEVEL=true 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

@ -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

View file

@ -567,6 +567,16 @@ if (ENABLE_WEB_SERVICE OR ENABLE_UPDATE_CHECKER)
find_package(cpp-jwt)
endif()
if (DEFINED ENV{DEVEL})
if ("$ENV{DEVEL}" STREQUAL "false")
message(STATUS "DEVEL=false: Enabling update checker for release builds")
set(ENABLE_UPDATE_CHECKER ON)
else()
message(STATUS "DEVEL=$ENV{DEVEL}: Disabling updates checker for development builds")
set(ENABLE_UPDATE_CHECKER OFF)
endif()
endif()

I don't think this a good way to check for DEVEL, as we shouldn't rely on system environment variables (or at least I think we shouldn't

I don't think this a good way to check for DEVEL, as we shouldn't rely on system environment variables (or at least I think we shouldn't

Yeah, DEVEL should be CI-local, not CMake-based

Yeah, `DEVEL` should be CI-local, not CMake-based
if (ARCHITECTURE_arm64 OR DYNARMIC_TESTS)
find_package(oaknut)
endif()

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

@ -166,8 +166,6 @@ android {
defaultConfig {
externalNativeBuild {
cmake {
val enableUpdater = if (System.getenv("DEVEL") != "true") "OM" else "OFF"
arguments(
"-DENABLE_QT=0", // Don't use QT
"-DENABLE_SDL2=0", // Don't use SDL
@ -180,8 +178,7 @@ android {
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
"-DBUILD_TESTING=OFF",
"-DYUZU_TESTS=OFF",
"-DDYNARMIC_TESTS=OFF",
"-DENABLE_UPDATE_CHECKER=$enableUpdater"
"-DDYNARMIC_TESTS=OFF"
)
abiFilters("arm64-v8a")

View file

@ -31,7 +31,7 @@ if (ENABLE_OPENSSL OR ENABLE_WEB_SERVICE)
endif()
if (ENABLE_UPDATE_CHECKER)
target_compile_definitions(yuzu-android PRIVATE ENABLE_UPDATE_CHECKER)
target_compile_definitions(yuzu-android PUBLIC ENABLE_UPDATE_CHECKER)
endif()
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} yuzu-android)