diff --git a/.github/workflows/APK-Release.yml b/.github/workflows/APK-Release.yml index 8eb3d4a7..7a27b454 100644 --- a/.github/workflows/APK-Release.yml +++ b/.github/workflows/APK-Release.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: - hmd: ['Standard'] buildtype: ['Release', 'Debug', 'DebugWithValidationLayer'] steps: @@ -62,7 +61,7 @@ jobs: - name: Build run: | chmod +x gradlew - ./gradlew -Psuffix=".github.nightly" -Pwivrn_css=images/wivrn-nightly.css -Pwivrn_app_name="WiVRn Nightly" -Pwivrn_compress_glb=ON assemble${{ matrix.hmd }}${{ matrix.buildtype }} + ./gradlew -Psuffix=".github.nightly" -Pwivrn_css=images/wivrn-nightly.css -Pwivrn_app_name="WiVRn Nightly" -Pwivrn_compress_glb=ON assemble${{ matrix.buildtype }} - name: Prepare before archiving artifacts run: | @@ -75,7 +74,7 @@ jobs: - name: Archive APK uses: actions/upload-artifact@v4 with: - name: apk-${{ matrix.hmd }}-${{ (github.event_name == 'pull_request' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }} + name: apk-${{ (github.event_name == 'pull_request' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }} path: apk/*.apk retention-days: 7 @@ -83,7 +82,7 @@ jobs: if: ${{ matrix.buildtype != 'Release' }} uses: actions/upload-artifact@v4 with: - name: symbols-${{ matrix.hmd }}-${{ matrix.buildtype }} + name: symbols-${{ matrix.buildtype }} path: debug/**/*.so retention-days: 7 diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index fbb10590..90a998c9 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -208,7 +208,6 @@ jobs: strategy: matrix: - hmd: ['Standard'] buildtype: ['Release', 'Debug', 'DebugWithValidationLayer', 'Oculus'] steps: @@ -266,7 +265,7 @@ jobs: - name: Build run: | - VERSION=$(git describe --tags --always) + VERSION=$(git describe --tags --always | sed "s/^v\([0-9]\)/\1/") if [ ${{ matrix.buildtype }} = 'Oculus' ] then SUFFIX="" @@ -305,7 +304,7 @@ jobs: -Pwivrn_app_name="$APPNAME" \ -Pwivrn_compress_glb=ON \ -Pfetchcontent_base_dir=${{github.workspace}}/cmake-fetch \ - assemble${{ matrix.hmd }}${{ matrix.buildtype }} + assemble${{ matrix.buildtype }} - name: Upload build dir uses: actions/upload-artifact@v4 @@ -328,7 +327,7 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ matrix.buildtype != 'Oculus' }} with: - name: apk-${{ matrix.hmd }}-${{ (steps.secret-check.outputs.available == 'false' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }} + name: apk-${{ (steps.secret-check.outputs.available == 'false' && matrix.buildtype == 'Release') && 'Release-unsigned' || matrix.buildtype }} path: apk/*.apk retention-days: 30 @@ -336,7 +335,7 @@ jobs: if: ${{ matrix.buildtype != 'Release' && matrix.buildtype != 'Oculus' }} uses: actions/upload-artifact@v4 with: - name: symbols-${{ matrix.hmd }}-${{ matrix.buildtype }} + name: symbols-${{ matrix.buildtype }} path: debug/**/*.so retention-days: 30 @@ -357,7 +356,7 @@ jobs: IS_DRAFT= fi - ./ovr-platform-util upload-quest-build --app-id 7959676140827574 --token $OCULUS_TOKEN --apk apk/WiVRn-standard-oculus.apk --channel $CHANNEL --age-group TEENS_AND_ADULTS $IS_DRAFT --debug_symbols_dir debug/ --debug-symbols-pattern '*.so' + ./ovr-platform-util upload-quest-build --app-id 7959676140827574 --token $OCULUS_TOKEN --apk apk/WiVRn-oculus.apk --channel $CHANNEL --age-group TEENS_AND_ADULTS $IS_DRAFT --debug_symbols_dir debug/ --debug-symbols-pattern '*.so' build-ubuntu: name: Build Ubuntu package diff --git a/build.gradle b/build.gradle index 7a8ea961..ff9d92ac 100644 --- a/build.gradle +++ b/build.gradle @@ -126,6 +126,8 @@ android { '-DCMAKE_ANDROID_NDK_VERSION=' + ndkVersion, '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', + '-DCMAKE_ANDROID_ASSETS_DIRECTORIES=' + layout.buildDirectory.dir("assets").get().asFile, + '-DCMAKE_ANDROID_LIB_DIRECTORIES=' + layout.buildDirectory.dir("libs").get().asFile, '-DWIVRN_USE_SYSTEM_BOOST=OFF', '-DWIVRN_USE_SYSTEM_FREETYPE=OFF', '-DWIVRN_USE_ANDROID_BIN_LIBKTX=ON', @@ -141,7 +143,9 @@ android { '-DWIVRN_COMPRESS_GLB=' + compressGlb] + fetchcontentBaseDir resValue "string", "app_name", project.hasProperty('wivrn_app_name') ? project.wivrn_app_name : "WiVRn Local" + abiFilters 'arm64-v8a'//, 'x86_64' } + } } @@ -204,26 +208,13 @@ android { } } - flavorDimensions "device" - - productFlavors { - standard { - dimension "device" - externalNativeBuild { - cmake { - abiFilters 'arm64-v8a'//, 'x86_64' - } - } - } - } - sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['client/java'] res.srcDirs = [ 'resources', layout.buildDirectory.dir('generated_resources') ] - assets.srcDirs 'assets' + assets.srcDirs = ['assets', layout.buildDirectory.dir("assets")] } } @@ -240,32 +231,4 @@ android { // It probably works with merge${variant.name.capitalize()}Assets too tasks["generate${variant.name.capitalize()}Assets"].dependsOn "externalNativeBuild${variant.name.capitalize()}" } - - productFlavors.all { variant -> - sourceSets { - "${variant.name}" { - assets.srcDirs layout.buildDirectory.dir("assets${variant.name.capitalize()}") - } - } - - externalNativeBuild{ - cmake { - arguments '-DCMAKE_ANDROID_ASSETS_DIRECTORIES=' + layout.buildDirectory.dir("assets${variant.name.capitalize()}").get().asFile - } - } - } - - buildTypes.all { variant -> - sourceSets { - "${variant.name}" { - jniLibs.srcDirs layout.buildDirectory.dir("libs${variant.name.capitalize()}") - } - } - - externalNativeBuild{ - cmake { - arguments '-DCMAKE_ANDROID_LIB_DIRECTORIES=' + layout.buildDirectory.dir("libs${variant.name.capitalize()}").get().asFile - } - } - } } diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index aa38d4e8..f6bd1887 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -1090,7 +1090,7 @@ void scenes::lobby::gui_debug() void scenes::lobby::gui_about() { ImGui::PushFont(nullptr, constants::gui::font_size_large); - CenterTextH(std::string("WiVRn ") + wivrn::git_version); + CenterTextH(std::string("WiVRn ") + wivrn::display_version()); ImGui::PopFont(); ImGui::Dummy(ImVec2(0, 60)); diff --git a/dashboard/apk_installer.cpp b/dashboard/apk_installer.cpp index 5317a1a0..d44ca86b 100644 --- a/dashboard/apk_installer.cpp +++ b/dashboard/apk_installer.cpp @@ -91,7 +91,7 @@ QCoro::Task<> apk_installer::doRefreshLatestVersion() { std::string name = i["name"]; - if (name.ends_with("-standard-release.apk")) + if (name.ends_with("-release.apk")) { m_apkUrl = QString::fromStdString(i["browser_download_url"]); break; diff --git a/docs/building.md b/docs/building.md index edfac6dc..5ea29c2a 100644 --- a/docs/building.md +++ b/docs/building.md @@ -96,10 +96,10 @@ From the main directory. export ANDROID_HOME=~/Android export JAVA_HOME=/usr/lib/jvm/java-17-openjdk/ -./gradlew assembleStandardRelease +./gradlew assembleRelease ``` -Outputs will be in `build/outputs/apk/standard/release/WiVRn-standard-release.apk` +Outputs will be in `build/outputs/apk/release/WiVRn-release.apk` #### Install apk with adb Before using adb you must enable usb debugging on your device: @@ -117,7 +117,7 @@ adb start-server adb devices # Install apk -adb install build/outputs/apk/standard/release/WiVRn-standard-release.apk +adb install build/outputs/apk/release/WiVRn-release.apk # When you're done, you can stop the adb server adb kill-server