Updates all of our bundled CI deps to support android x86_64, adds a build flavor thereof (`chromeOS`), and also adds sirit mingw support. The new FFmpeg package is built in a much better way that actually makes it identically built to the other CI packages, meaning we now have real 8.0.0 support, no need for libvpx/cpu_features/all that other crap. PLUS, we can now statically link it! Hooray! It's also built with MediaCodec support so in the future we can work on that. Rewrote the android build script too, plus added a copyFlavorTypeOutput target that assembles and copies the APK. The code behind it sucks because I'm not great with Gradle but hey, it works. Testers: please test everything related to video decoding. VP9 and h264, games that normally suck with their prerendered stuff, make sure I didn't nuke it to oblivion, etc. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3086 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
3.5 KiB
3.5 KiB
Android
Dependencies
WINDOWS ONLY - Additional Dependencies
- Visual Studio 2022 Community - Make sure to select "Desktop development with C++" support in the installer. Make sure to update to the latest version if already installed.
- Vulkan SDK - Make sure to select Latest SDK.
- A convenience script to install the latest SDK is provided in
.ci\windows\install-vulkan-sdk.ps1.
- A convenience script to install the latest SDK is provided in
Cloning Eden with Git
git clone --recursive https://git.eden-emu.dev/eden-emu/eden.git
Eden by default will be cloned into:
C:\Users\<user-name>\edenon Windows~/edenon Linux and macOS
Building
- Start Android Studio, on the startup dialog select
Open. - Navigate to the
eden/src/androiddirectory and click onOK. - In
Build > Select Build Variant, selectreleaseorrelWithDebInfoas the "Active build variant". - Build the project with
Build > Make Projector run it on an Android device withRun > Run 'app'.
Building with Terminal
- Download the SDK and NDK from Android Studio.
- Navigate to SDK and NDK paths.
- Then set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT in terminal via
export ANDROID_SDK_ROOT=path/to/sdkexport ANDROID_NDK_ROOT=path/to/ndk. - Navigate to
eden/src/android. - Then Build with
./gradlew assembleRelWithDebInfo. - To build the optimised build use
./gradlew assembleGenshinSpoofRelWithDebInfo. - You can pass extra variables to cmake via
-PYUZU_ANDROID_ARGS="-D..."
Remember to have a Java SDK installed if not already, on Debian and similar this is done with sudo apt install openjdk-17-jdk.
Script
A convenience script for building is provided in .ci/android/build.sh. On Windows, this must be run in Git Bash or MSYS2. This script provides the following options:
Usage: build.sh [-c|--chromeos] [-t|--target FLAVOR] [-b|--build-type BUILD_TYPE]
[-h|--help] [-r|--release] [extra options]
Build script for Android.
Associated variables can be set outside the script,
and will apply both to this script and the packaging script.
bool values are "true" or "false"
Options:
-c, --chromeos Build for ChromeOS (x86_64) (variable: CHROMEOS, bool)
Default: false
-r, --release Enable update checker. If set, sets the DEVEL bool variable to false.
By default, DEVEL is true.
-t, --target <FLAVOR> Build flavor (variable: TARGET)
Valid values are: legacy, optimized, standard
Default: standard
-b, --build-type <TYPE> Build type (variable: TYPE)
Valid values are: Release, RelWithDebInfo, Debug
Default: Debug
Extra arguments are passed to CMake (e.g. -DCMAKE_OPTION_NAME=VALUE)
Set the CCACHE variable to "true" to enable build caching.
The APK and AAB will be output into "artifacts".
Examples:
- Build legacy release with update checker for ChromeOS:
.ci/android/build.sh -c -r -t legacy
- Build standard release with debug info without update checker for phones:
.ci/android/build.sh -b RelWithDebInfo
- Build optimized release with update checker:
.ci/android/build.sh -r -t optimized