Added a make android-studio target that wraps ./run-image.sh bash build-image/prepare-android-project.sh --host-paths, and updated the README (Layout's Makefile-target list, "5.2. Building natively in Android Studio", and "5.3. Testing cycles") to reference it — including a note that it must be re-run after make clean specifically, since that's what just bit you. Run make android-studio now to fix the build.
build / build (push) Successful in 1m42s
build / build (push) Successful in 1m42s
This commit is contained in:
@@ -52,6 +52,11 @@ a cross-platform port of the original game.
|
||||
Android-based OpenXR headsets. Unlike every other target, this needs
|
||||
network access at build time (Gradle/AGP's own dependency
|
||||
resolution). See "5. Android / Quest build" below.
|
||||
- `android-studio` - stages `engine/`/`android/gl4es-src/` (scratch,
|
||||
patched copies) and the Android prebuilts with host-resolvable paths,
|
||||
so Android Studio can compile and deploy `android/` natively instead
|
||||
of inside the build-image. See "5.2. Building natively in Android
|
||||
Studio" below.
|
||||
- `clean` - removes all build output (`dist/`, `build/`, compiled
|
||||
engine artifacts, and the staged Android project files).
|
||||
- `android/` - the Quest app (Java `SDLActivity` glue, Gradle project).
|
||||
@@ -168,11 +173,12 @@ that happens inside a container it isn't running.
|
||||
To have Android Studio compile and deploy `android/` itself instead:
|
||||
|
||||
```sh
|
||||
./run-image.sh bash build-image/prepare-android-project.sh --host-paths
|
||||
make android-studio
|
||||
```
|
||||
|
||||
This stages everything `make apk` normally stages (scratch, patched copies
|
||||
of `engine/` and `android/gl4es-src/`; the Android
|
||||
(equivalent to `./run-image.sh bash build-image/prepare-android-project.sh
|
||||
--host-paths` directly.) This stages everything `make apk` normally stages
|
||||
(scratch, patched copies of `engine/` and `android/gl4es-src/`; the Android
|
||||
SDL2/SDL2_mixer/fluidsynth-lite/openxr prebuilts; bundled assets) - the
|
||||
same as `build-apk.sh`'s own prep step - except it writes
|
||||
`android/engine.properties` with paths that resolve on your host
|
||||
@@ -184,12 +190,13 @@ Studio's own native build (a CMake subdirectory of `engine/`'s build, not
|
||||
a separate prebuilt step), so `android/gl4es-src/`/`android/gl4es-patches/`
|
||||
changes are picked up by a normal rebuild here - no need to re-run
|
||||
`./build-image.sh` first, unlike `build-image/Dockerfile` changes. Re-run
|
||||
this script whenever `engine/`, `android/engine-patches/`,
|
||||
`make android-studio` whenever `engine/`, `android/engine-patches/`,
|
||||
`android/gl4es-src/`, `android/gl4es-patches/`, or the prebuilt-library
|
||||
versions in `build-image/Dockerfile` change (the Gradle build already
|
||||
does this automatically for you via its `stageEngine` task, so this
|
||||
manual re-run is mainly useful for confirming staging succeeded on its
|
||||
own).
|
||||
own) - and always after `make clean`, which deletes
|
||||
`android/engine.properties` along with everything else.
|
||||
|
||||
Then, in Android Studio, use File > Open and select the `android/`
|
||||
directory itself (the one containing `settings.gradle` - not the repo
|
||||
@@ -226,7 +233,7 @@ the same as any other Android Studio project:
|
||||
`QuestShock`, so filtering Logcat by that tag shows everything
|
||||
questshock-specific without gl4es/OpenXR loader/system noise (drop
|
||||
the filter to see those too).
|
||||
6. Only re-run `prepare-android-project.sh` manually (see above) after
|
||||
6. Only re-run `make android-studio` manually (see above) after
|
||||
changing `engine/`, `android/engine-patches/`, `android/gl4es-src/`,
|
||||
`android/gl4es-patches/`, or the prebuilt-library versions in
|
||||
`build-image/Dockerfile` - the Gradle build's `stageEngine` task does
|
||||
|
||||
Reference in New Issue
Block a user