From 786d8e2618616db7677bf6f877fe6468dc292fe1 Mon Sep 17 00:00:00 2001 From: Jarrod Norwell Date: Tue, 28 May 2024 18:15:12 +0800 Subject: [PATCH] Updated Android plugins and added Linux build guide --- documentation/building/ANDROID.md | 4 +-- documentation/building/LINUX.md | 30 +++++++++++++++++++ src/android/build.gradle.kts | 4 +-- .../gradle/wrapper/gradle-wrapper.properties | 4 +-- src/android/sudachi/build.gradle.kts | 10 +++---- 5 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 documentation/building/LINUX.md diff --git a/documentation/building/ANDROID.md b/documentation/building/ANDROID.md index 04560e6..cb99c0c 100644 --- a/documentation/building/ANDROID.md +++ b/documentation/building/ANDROID.md @@ -22,12 +22,12 @@ Documentation on how to build Sudachi for Android ## Steps ### Step I - Cloning ```sh -cd /path/to/directory +cd path/to/directory git clone --recursive https://github.com/sudachi-emu/sudachi ``` ### Step II - Building ```sh -cd /path/to/sudachi/directory +cd src/android gradlew.bat build # gradlew if building on a Unix system ``` \ No newline at end of file diff --git a/documentation/building/LINUX.md b/documentation/building/LINUX.md new file mode 100644 index 0000000..d95dbaf --- /dev/null +++ b/documentation/building/LINUX.md @@ -0,0 +1,30 @@ +# Building for Linux +Documentation on how to build Sudachi for Linux + +## Requirements +> [!NOTE] +> Below is a list of development tools, software, etc. required for building Sudachi for Linux + +### Development Packages +``` +sudo apt install autoconf cmake g++-11 gcc-11 git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qtbase5-dev qtbase5-private-dev qtwebengine5-dev qtmultimedia5-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev libunistring-dev libaom-dev libdav1d-dev autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev nasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libopus-dev libsvtav1-dev libsvtav1enc-dev libsvtav1dec-dev libdav1d-dev +``` + +## Steps +### Step I - Cloning +```sh +cd path/to/directory +git clone --recursive https://github.com/sudachi-emu/sudachi +``` + +### Step II - Building +#### Step II (a) +```sh +mkdir build; cd build +cmake .. -DSUDACHI_USE_BUNDLED_VCPKG=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=x86-64-v2" -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DENABLE_QT_TRANSLATION=OFF -DUSE_DISCORD_PRESENCE=ON -DSUDACHI_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DSUDACHI_USE_BUNDLED_FFMPEG=ON -DSUDACHI_ENABLE_LTO=ON -DSUDACHI_CRASH_DUMPS=OFF -DCMAKE_INSTALL_PREFIX="/usr" -DSUDACHI_ROOM=OFF -GNinja +``` + +#### Step II (b) +```sh +cmake --build . --config Release +``` \ No newline at end of file diff --git a/src/android/build.gradle.kts b/src/android/build.gradle.kts index f4cfcfa..5a49d62 100644 --- a/src/android/build.gradle.kts +++ b/src/android/build.gradle.kts @@ -3,8 +3,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.3.1" apply false - id("com.android.library") version "8.3.1" apply false + id("com.android.application") version "8.4.1" apply false + id("com.android.library") version "8.4.1" apply false id("org.jetbrains.kotlin.android") version "1.9.20" apply false } diff --git a/src/android/gradle/wrapper/gradle-wrapper.properties b/src/android/gradle/wrapper/gradle-wrapper.properties index 42b415f..e34969b 100644 --- a/src/android/gradle/wrapper/gradle-wrapper.properties +++ b/src/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Feb 21 18:16:59 EST 2021 +#Tue May 28 14:57:37 GMT+08:00 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip diff --git a/src/android/sudachi/build.gradle.kts b/src/android/sudachi/build.gradle.kts index b72192c..2d81ae1 100644 --- a/src/android/sudachi/build.gradle.kts +++ b/src/android/sudachi/build.gradle.kts @@ -28,7 +28,7 @@ android { namespace = "org.sudachi.sudachi_emu" compileSdk = 34 - ndkVersion = "26.2.11394342" + ndkVersion = "26.3.11579264" buildFeatures { viewBinding = true @@ -218,15 +218,15 @@ play { } dependencies { - implementation("androidx.core:core-ktx:1.12.0") + implementation("androidx.core:core-ktx:1.13.1") implementation("androidx.appcompat:appcompat:1.6.1") implementation("androidx.recyclerview:recyclerview:1.3.2") implementation("androidx.constraintlayout:constraintlayout:2.1.4") - implementation("androidx.fragment:fragment-ktx:1.6.2") + implementation("androidx.fragment:fragment-ktx:1.7.1") implementation("androidx.documentfile:documentfile:1.0.1") - implementation("com.google.android.material:material:1.11.0") + implementation("com.google.android.material:material:1.12.0") implementation("androidx.preference:preference-ktx:1.2.1") - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0") + implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.0") implementation("io.coil-kt:coil:2.6.0") implementation("androidx.core:core-splashscreen:1.0.1") implementation("androidx.window:window:1.2.0")