diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 689b438e..9fbac54b 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -89,7 +89,7 @@ jobs: - name: Install dependencies run: > - sudo apt-get update && sudo apt-get install glslang-tools + sudo apt-get update && sudo apt-get install glslang-tools librsvg2-bin - name: Secrets if: ${{ github.event_name != 'pull_request' }} diff --git a/README.md b/README.md index 874d7a33..6de23cf7 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ OpenXR streaming application + + WiVRn lets you run OpenXR applications on a computer and display them on a standalone headset. # Installation @@ -41,7 +43,7 @@ adb install WiVRn.apk ### Compilation #### Build dependencies -As Arch package names: git git-lfs pkgconf glslang cmake jre17-openjdk +As Arch package names: git git-lfs pkgconf glslang cmake jre17-openjdk librsvg #### Android environment Download [sdkmanager](https://developer.android.com/tools/sdkmanager) commandline tool and extract it to any directory. diff --git a/build.gradle b/build.gradle index 82f29995..38b96a65 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,45 @@ allprojects { apply plugin: 'com.android.application' +task "generatePngs"() { + group = 'Custom' + + mkdir layout.buildDirectory.dir('generated_resources') + ["mipmap-mdpi", "mipmap-hdpi", "mipmap-xhdpi", "mipmap-xxhdpi", "mipmap-xxxhdpi", ].each { + mkdir layout.buildDirectory.dir("generated_resources/${it}") + } + + exec { + executable = 'rsvg-convert' + args = [ "wivrn.svg", "-w", "48", "-h", "48", "-o", layout.buildDirectory.file('generated_resources/mipmap-mdpi/ic_wivrn_launcher.png').get().asFile ] + workingDir 'images' + } + + exec { + executable = 'rsvg-convert' + args = [ "wivrn.svg", "-w", "72", "-h", "72", "-o", layout.buildDirectory.file('generated_resources/mipmap-hdpi/ic_wivrn_launcher.png').get().asFile ] + workingDir 'images' + } + + exec { + executable = 'rsvg-convert' + args = [ "wivrn.svg", "-w", "96", "-h", "96", "-o", layout.buildDirectory.file('generated_resources/mipmap-xhdpi/ic_wivrn_launcher.png').get().asFile ] + workingDir 'images' + } + + exec { + executable = 'rsvg-convert' + args = [ "wivrn.svg", "-w", "144", "-h", "144", "-o", layout.buildDirectory.file('generated_resources/mipmap-xxhdpi/ic_wivrn_launcher.png').get().asFile ] + workingDir 'images' + } + + exec { + executable = 'rsvg-convert' + args = [ "wivrn.svg", "-w", "192", "-h", "192", "-o", layout.buildDirectory.file('generated_resources/mipmap-xxxhdpi/ic_wivrn_launcher.png').get().asFile ] + workingDir 'images' + } +} + android { namespace "org.meumeu.wivrn" ndkVersion "26.1.10909125" @@ -93,7 +132,7 @@ android { sourceSets { main { manifest.srcFile 'AndroidManifest.xml' - res.srcDir 'resources' + res.srcDirs = [ 'resources', layout.buildDirectory.dir('generated_resources') ] } } @@ -103,4 +142,8 @@ android { path 'CMakeLists.txt' } } + + applicationVariants.all { variant -> + tasks["assemble${variant.name.capitalize()}"].finalizedBy "generatePngs" + } } diff --git a/images/wivrn.svg b/images/wivrn.svg new file mode 100644 index 00000000..8e8b303d --- /dev/null +++ b/images/wivrn.svg @@ -0,0 +1,779 @@ + + + +WiVRn logoWiVRn logoGuillaume Meunier, Patrick Nicolas diff --git a/resources/drawable/ic_wivrn_vk.xml b/resources/drawable/ic_wivrn_vk.xml deleted file mode 100644 index 19282944..00000000 --- a/resources/drawable/ic_wivrn_vk.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/resources/mipmap-anydpi-v26/ic_wivrn_launcher.xml b/resources/mipmap-anydpi-v26/ic_wivrn_launcher.xml deleted file mode 100644 index 3fa528b5..00000000 --- a/resources/mipmap-anydpi-v26/ic_wivrn_launcher.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/resources/mipmap-hdpi/ic_wivrn_launcher.png b/resources/mipmap-hdpi/ic_wivrn_launcher.png deleted file mode 100644 index 5236bcc4..00000000 Binary files a/resources/mipmap-hdpi/ic_wivrn_launcher.png and /dev/null differ diff --git a/resources/mipmap-mdpi/ic_wivrn_launcher.png b/resources/mipmap-mdpi/ic_wivrn_launcher.png deleted file mode 100644 index be601ebc..00000000 Binary files a/resources/mipmap-mdpi/ic_wivrn_launcher.png and /dev/null differ diff --git a/resources/mipmap-xhdpi/ic_wivrn_launcher.png b/resources/mipmap-xhdpi/ic_wivrn_launcher.png deleted file mode 100644 index 5e32dc97..00000000 Binary files a/resources/mipmap-xhdpi/ic_wivrn_launcher.png and /dev/null differ diff --git a/resources/mipmap-xxhdpi/ic_wivrn_launcher.png b/resources/mipmap-xxhdpi/ic_wivrn_launcher.png deleted file mode 100644 index b80f1702..00000000 Binary files a/resources/mipmap-xxhdpi/ic_wivrn_launcher.png and /dev/null differ diff --git a/resources/mipmap-xxxhdpi/ic_wivrn_launcher.png b/resources/mipmap-xxxhdpi/ic_wivrn_launcher.png deleted file mode 100644 index e7d02d90..00000000 Binary files a/resources/mipmap-xxxhdpi/ic_wivrn_launcher.png and /dev/null differ