gameknife / gkNextRenderer

A Modern gkRenderer
29 stars 3 forks source link

Android build #34

Open tigrazone opened 1 month ago

tigrazone commented 1 month ago

Which programs I must to install on Windows pc to build for android?

gameknife commented 1 month ago

if you already have windows vulkan sdk, just need to install android studio. then refer https://github.com/gameknife/gkNextRenderer/blob/main/.github/workflows/android.yml to build it

gameknife commented 1 month ago

vcpkg_android.bat -> build_android.bat -> deploy_android.bat, need android studio and adb.exe in PATH

tigrazone commented 1 month ago

as instruction. I do these steps:

  1. Install Android Studio
  2. Install Java SDK
  3. Start Android Studio and accept to install Android SDK
  4. set environment variable JAVA_HOME=C:\Program Files\Java\jdk-22\ for jdk version 22
  5. set environment variable ANDROID_HOME=C:\Users\user\AppData\Local\Android\Sdk where user is my default user name

and then you can build

tigrazone commented 1 month ago

when I call vcpkg_android.bat I have errors: Detecting compiler hash for triplet arm64-android... error: while detecting compiler information: The log file content at "C:\msys64\home\user\from-git\gkNextRenderer-my-ori-dev\build\vcpkg.android\buildtrees\detect_compiler\stdout-arm64-android.log" is: -- Configuring arm64-android CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message): Command failed: C:/msys64/home/user/from-git/gkNextRenderer-my-ori-dev/build/vcpkg.android/downloads/tools/ninja/1.10.2-windows/ninja.exe -v Working Directory: C:/msys64/home/user/from-git/gkNextRenderer-my-ori-dev/build/vcpkg.android/buildtrees/detect_compiler/arm64-android-rel/vcpkg-parallel-configure Error code: 1 See logs for more information: C:\msys64\home\user\from-git\gkNextRenderer-my-ori-dev\build\vcpkg.android\buildtrees\detect_compiler\config-arm64-android-rel-CMakeCache.txt.log C:\msys64\home\user\from-git\gkNextRenderer-my-ori-dev\build\vcpkg.android\buildtrees\detect_compiler\config-arm64-android-out.log

Call Stack (most recent call first): scripts/cmake/vcpkg_configure_cmake.cmake:314 (vcpkg_execute_required_process) scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake) scripts/ports.cmake:175 (include)

error: vcpkg was unable to detect the active compiler's information. See above for the CMake failure output. Failed with error #1.

How to fix?

gameknife commented 1 month ago

https://learn.microsoft.com/en-us/vcpkg/users/platforms/android

this is the key: export ANDROID_NDK_HOME=/home/your-account/Android/Sdk/ndk-bundle

tigrazone commented 1 month ago

build Android app is not simple. But i try

tigrazone commented 1 month ago

Which compiler you use on Windows? vcpkg_android.bat say me Visual Studio is not supported

gameknife commented 1 month ago

https://github.com/gameknife/gkNextRenderer/blob/main/README.md add android build instruction, set ndk_path is the key step