Always run ninja

This commit is contained in:
Attila Uygun 2023-09-02 17:08:19 +02:00
parent a07d32e44a
commit ae825faf32
2 changed files with 19 additions and 24 deletions

View File

@ -31,19 +31,14 @@ Build only "demo" in debug mode and run.
ninja -C out/debug demo ninja -C out/debug demo
./out/debug/demo ./out/debug/demo
``` ```
### Android: ### Android:
Build the default game ("hello_world") in debug mode for all ABIs and install. Build the default game ("hello_world") in debug mode for all ABIs and install.
GN will be run by Gradle so no setup is required. Both Linux and Windows are GN will be run by Gradle so no setup is required.
supported as host platforms. The Gradle project can also be
opened in Android Studio.
```text ```text
cd build/android cd build/android
./gradlew :app:installDebug ./gradlew :app:installDebug
``` ```
Build in release mode. The generated APK must be signed before installing.
```text
./gradlew :app:assembleRelease
```
Build configuration can be changed via project properties. The following command Build configuration can be changed via project properties. The following command
will build "demo" in debug mode for x86_64 ABI and install. "targetArchs" will build "demo" in debug mode for x86_64 ABI and install. "targetArchs"
property can be set to any combination of Arm7, Arm8, X86_64, X86. Location of property can be set to any combination of Arm7, Arm8, X86_64, X86. Location of
@ -51,27 +46,13 @@ gn and ninja executables can also be specified via "gn" and "ninja" properties.
```text ```text
./gradlew :app:installDebug -PtargetArchs="X86_64" -PtargetGame="demo" ./gradlew :app:installDebug -PtargetArchs="X86_64" -PtargetGame="demo"
``` ```
### Generate Visual Studio solution: ### Generate Visual Studio solution:
```text ```text
gn.exe gen --args="is_debug=true" --ide=vs2022 out\vs gn.exe gen --args="is_debug=true" --ide=vs2022 out\vs
devenv out\vs\all.sln devenv out\vs\all.sln
``` ```
## Third-party libraries:
[glew](https://github.com/nigels-com/glew),
[jsoncpp](https://github.com/open-source-parsers/jsoncpp),
[minimp3](https://github.com/lieff/minimp3),
[oboe](https://github.com/google/oboe),
[stb](https://github.com/nothings/stb),
[texture-compressor](https://github.com/auygun/kaliber/tree/master/src/third_party/texture_compressor),
[minizip](https://github.com/madler/zlib/tree/master/contrib/minizip),
[glslang](https://github.com/KhronosGroup/glslang),
[spirv-reflect](https://github.com/KhronosGroup/SPIRV-Reflect),
[vma](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator),
[vulkan-sdk](https://vulkan.lunarg.com),
[volk](https://github.com/zeux/volk)
## Hello World example: ## Hello World example:
Shows a smoothly rotating "Hello World!". Shows a smoothly rotating "Hello World!".
@ -101,3 +82,18 @@ class HelloWorld final : public eng::Game {
GAME_FACTORIES{GAME_CLASS(HelloWorld)}; GAME_FACTORIES{GAME_CLASS(HelloWorld)};
``` ```
## Third-party libraries:
[glew](https://github.com/nigels-com/glew),
[jsoncpp](https://github.com/open-source-parsers/jsoncpp),
[minimp3](https://github.com/lieff/minimp3),
[oboe](https://github.com/google/oboe),
[stb](https://github.com/nothings/stb),
[texture-compressor](https://github.com/auygun/kaliber/tree/master/src/third_party/texture_compressor),
[minizip](https://github.com/madler/zlib/tree/master/contrib/minizip),
[glslang](https://github.com/KhronosGroup/glslang),
[spirv-reflect](https://github.com/KhronosGroup/SPIRV-Reflect),
[vma](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator),
[vulkan-sdk](https://vulkan.lunarg.com),
[volk](https://github.com/zeux/volk)

View File

@ -158,8 +158,7 @@ utils.addTask('runNinjaFor') { String taskName, String buildType, String arch ->
executable rootProject.ext.ninja executable rootProject.ext.ninja
args '-C', "${getOutDir(buildType)}/${utils.ABI_CODES[arch]}", rootProject.ext.targetGame args '-C', "${getOutDir(buildType)}/${utils.ABI_CODES[arch]}", rootProject.ext.targetGame
inputs.file(new File("${getOutDir(buildType)}/${utils.ABI_CODES[arch]}", 'build.ninja')) outputs.upToDateWhen { false }
outputs.file(new File("${getOutDir(buildType)}/${utils.ABI_CODES[arch]}", "lib${rootProject.ext.targetGame}.so"))
} }
} }