Skip to content

Commit e873070

Browse files
committed
Drop unneeded and broken cargo-apk setup
1 parent 7b42ef8 commit e873070

File tree

11 files changed

+25
-174
lines changed

11 files changed

+25
-174
lines changed

agdk-cpal/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This is a minimal test application based on `GameActivity` that just
22
runs a mainloop based on android_activity::poll_events() and plays a
33
sine wave audio test using the Cpal audio library.
44

5-
```
5+
```bash
66
export ANDROID_NDK_HOME="path/to/ndk"
77
export ANDROID_HOME="path/to/sdk"
88

agdk-eframe/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This tests using `GameActivity` with egui, winit and wgpu.
33
This is based on a re-worked winit backend here:
44
https://github.com/rib/winit/tree/android-activity
55

6-
```
6+
```bash
77
export ANDROID_NDK_HOME="path/to/ndk"
88
export ANDROID_HOME="path/to/sdk"
99

agdk-mainloop/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ runs a mainloop based on android_activity::poll_events() and traces
33
the events received without doing any rendering. It also saves and
44
restores some minimal application state.
55

6-
```
6+
```bash
77
export ANDROID_NDK_HOME="path/to/ndk"
88
export ANDROID_HOME="path/to/sdk"
99

agdk-oboe/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This is a minimal test application based on `GameActivity` that just
22
runs a mainloop based on android_activity::poll_events() and plays a
33
sine wave audio test using the Oboe audio library.
44

5-
```
5+
```bash
66
export ANDROID_NDK_HOME="path/to/ndk"
77
export ANDROID_HOME="path/to/sdk"
88

na-mainloop/Cargo.toml

Lines changed: 1 addition & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -29,163 +29,11 @@ crate-type = ["cdylib"]
2929
####################
3030

3131
[package.metadata.android]
32-
# Specifies the package property of the manifest.
3332
package = "com.github.rust_mobile.namainloop"
34-
35-
# Specifies the array of targets to build for.
36-
build_targets = ["aarch64-linux-android"]
37-
38-
# Path to your application's resources folder.
39-
# If not specified, resources will not be included in the APK.
40-
#resources = "path/to/resources_folder"
41-
42-
# Path to the folder containing your application's assets.
43-
# If not specified, assets will not be included in the APK.
44-
#assets = "path/to/assets_folder"
45-
46-
# Name for final APK file.
47-
# Defaults to package name.
48-
#apk_name = "myapp"
49-
50-
# Folder containing extra shared libraries intended to be dynamically loaded at runtime.
51-
# Files matching `libs_folder/${android_abi}/*.so` are added to the apk
52-
# according to the specified build_targets.
53-
#runtime_libs = "path/to/libs_folder"
54-
55-
# See https://developer.android.com/guide/topics/manifest/uses-sdk-element
5633
#
57-
# Defaults to a `min_sdk_version` of 23 and `target_sdk_version` of 30 (or lower if the detected NDK doesn't support this).
5834
[package.metadata.android.sdk]
5935
min_sdk_version = 31
6036
target_sdk_version = 35
61-
#max_sdk_version = 35
62-
63-
# See https://developer.android.com/guide/topics/manifest/uses-feature-element
64-
#
65-
# Note: there can be multiple .uses_feature entries.
66-
[[package.metadata.android.uses_feature]]
67-
name = "android.hardware.vulkan.level"
68-
required = true
69-
version = 1
70-
71-
# See https://developer.android.com/guide/topics/manifest/uses-permission-element
72-
#
73-
# Note: there can be multiple .uses_permission entries.
74-
#[[package.metadata.android.uses_permission]]
75-
#name = "android.permission.WRITE_EXTERNAL_STORAGE"
76-
#max_sdk_version = 18
77-
78-
# See https://developer.android.com/guide/topics/manifest/queries-element#provider
79-
#[[package.metadata.android.queries.provider]]
80-
#authorities = "org.khronos.openxr.runtime_broker;org.khronos.openxr.system_runtime_broker"
81-
# Note: The `name` attribute is normally not required for a queries provider, but is non-optional
82-
# as a workaround for aapt throwing errors about missing `android:name` attribute.
83-
# This will be made optional if/when cargo-apk migrates to aapt2.
84-
#name = "org.khronos.openxr"
8537

86-
# See https://developer.android.com/guide/topics/manifest/queries-element#intent
87-
#[[package.metadata.android.queries.intent]]
88-
#actions = ["android.intent.action.SEND"]
89-
90-
# See https://developer.android.com/guide/topics/manifest/queries-element#intent
91-
# Note: there can be several .data entries.
92-
#[[package.metadata.android.queries.intent.data]]
93-
#mime_type = "image/jpeg"
94-
95-
# See https://developer.android.com/guide/topics/manifest/queries-element#package
96-
#[[package.metadata.android.queries.package]]
97-
#name = "org.freedesktop.monado.openxr_runtime.in_process"
98-
99-
# See https://developer.android.com/guide/topics/manifest/application-element
100-
#[package.metadata.android.application]
101-
102-
# See https://developer.android.com/guide/topics/manifest/application-element#debug
103-
#
104-
# Defaults to false.
105-
#debuggable = false
106-
107-
# See https://developer.android.com/guide/topics/manifest/application-element#theme
108-
#
109-
# Example shows setting the theme of an application to fullscreen.
110-
#theme = "@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"
111-
112-
# Virtual path your application's icon for any mipmap level.
113-
# If not specified, an icon will not be included in the APK.
114-
#icon = "@mipmap/ic_launcher"
115-
116-
# See https://developer.android.com/guide/topics/manifest/application-element#label
117-
#
118-
# Defaults to the compiled artifact's name.
38+
[package.metadata.android.application]
11939
label = "NativeActivity Mainloop"
120-
121-
# See https://developer.android.com/guide/topics/manifest/meta-data-element
122-
#
123-
# Note: there can be several .meta_data entries.
124-
# Note: the `resource` attribute is currently not supported.
125-
#[[package.metadata.android.application.meta_data]]
126-
#name = "com.samsung.android.vr.application.mode"
127-
#value = "vr_only"
128-
129-
# See https://developer.android.com/guide/topics/manifest/activity-element
130-
[package.metadata.android.application.activity]
131-
132-
# See https://developer.android.com/guide/topics/manifest/activity-element#nm
133-
#
134-
# The name of the class that implements the activity, a subclass of Activity
135-
#
136-
# Defaults to "android.app.NativeActivity"
137-
# name = "android.app.MyActivity"
138-
139-
# See https://developer.android.com/guide/topics/manifest/activity-element#config
140-
#
141-
# Defaults to "orientation|keyboardHidden|screenSize".
142-
#config_changes = "orientation"
143-
144-
# See https://developer.android.com/guide/topics/manifest/activity-element#label
145-
#
146-
# Defaults to the application's label.
147-
#label = "Activity Name"
148-
149-
# See https://developer.android.com/guide/topics/manifest/activity-element#lmode
150-
#
151-
# Defaults to "standard".
152-
#launch_mode = "singleTop"
153-
154-
# See https://developer.android.com/guide/topics/manifest/activity-element#screen
155-
#
156-
# Defaults to "unspecified".
157-
#orientation = "landscape"
158-
159-
# See https://developer.android.com/guide/topics/manifest/activity-element#exported
160-
#
161-
# Unset by default, or "true" when targeting Android >= 31 (S and up).
162-
#exported = "true"
163-
164-
# See https://developer.android.com/guide/topics/manifest/meta-data-element
165-
#
166-
# Note: there can be several .meta_data entries.
167-
# Note: the `resource` attribute is currently not supported.
168-
#[[package.metadata.android.application.activity.meta_data]]
169-
#name = "com.oculus.vr.focusaware"
170-
#value = "true"
171-
172-
# See https://developer.android.com/guide/topics/manifest/intent-filter-element
173-
#
174-
# Note: there can be several .intent_filter entries.
175-
#[[package.metadata.android.application.activity.intent_filter]]
176-
# See https://developer.android.com/guide/topics/manifest/action-element
177-
#actions = ["android.intent.action.VIEW", "android.intent.action.WEB_SEARCH"]
178-
# See https://developer.android.com/guide/topics/manifest/category-element
179-
#categories = ["android.intent.category.DEFAULT", "android.intent.category.BROWSABLE"]
180-
181-
# See https://developer.android.com/guide/topics/manifest/data-element
182-
#
183-
# Note: there can be several .data entries.
184-
# Note: not specifying an attribute excludes it from the final data specification.
185-
#[[package.metadata.android.application.activity.intent_filter.data]]
186-
#scheme = "https"
187-
#host = "github.com"
188-
#port = "8080"
189-
#path = "/rust-windowing/android-ndk-rs/tree/master/cargo-apk"
190-
#path_prefix = "/rust-windowing/"
191-
#mime_type = "image/jpeg"

na-mainloop/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Since this test doesn't require a custom `Activity` subclass it's
77
optionally possible to build this example with `cargo apk`.
88

99
# Gradle Build
10-
```
10+
```bash
1111
export ANDROID_NDK_HOME="path/to/ndk"
1212
export ANDROID_HOME="path/to/sdk"
1313

@@ -26,7 +26,8 @@ adb shell am start -n com.github.realfit_mobile.namainloop/android.app.NativeAct
2626
```
2727

2828
# Cargo APK Build
29-
```
29+
30+
```bash
3031
export ANDROID_NDK_HOME="path/to/ndk"
3132
export ANDROID_SDK_HOME="path/to/sdk"
3233

na-openxr-info/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ android_logger = "0.11.0"
1717
android-activity = { version = "0.4", features = ["native-activity"] }
1818

1919
[features]
20-
default = [ "linked" ]
20+
default = ["linked"]
2121

22-
android = [ "openxr/linked" ]
23-
desktop = [ "linked", "openxr/static"]
24-
linked = []
22+
android = ["linked"]
23+
desktop = ["linked", "openxr/static"]
24+
linked = ["openxr/linked"]
2525

2626
[lib]
27-
name="main"
28-
crate_type=["cdylib"]
27+
name = "main"
28+
crate_type = ["cdylib"]
2929

3030
[[bin]]
31-
path="src/lib.rs"
32-
name="test-winit-wgpu"
33-
required-features = [ "desktop" ]
31+
path = "src/lib.rs"
32+
name = "test-winit-wgpu"
33+
required-features = ["desktop"]

na-openxr-info/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
///! Based on https://github.com/Ralith/openxrs/blob/master/openxr/examples/hello.rs
1+
//! Based on <https://github.com/Ralith/openxrs/blob/master/openxr/examples/hello.rs>
22
use openxr as xr;
33

44
#[cfg(target_os = "android")]

na-openxr-wgpu/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ library to `app/src/main/jniLibs/<abi>`
2121
For example if building for arm64-v8a:
2222
`cp path/to/ovr_openxr_mobile_sdk_42.0/OpenXR/Libs/Android/arm64-v8a/Debug/libopenxr_loader.so app/src/main/jniLibs/arm64-v8a`
2323

24-
```
24+
```bash
2525
export ANDROID_NDK_HOME="path/to/ndk"
2626
export ANDROID_HOME="path/to/sdk"
2727

@@ -36,12 +36,13 @@ cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
3636
# Oculus Quest: Vulkan Validation Layer
3737

3838
To enable the Vulkan validation layer on the Oculus Quest run:
39-
```
39+
40+
```bash
4041
adb shell setprop debug.oculus.loadandinjectpackagedvvl.co.realfit.naopenxrwgpu 1
4142
```
4243

4344
# Desktop
4445

4546
To build for PC you need to build with the "desktop" feature
4647

47-
`cargo run --features=desktop`
48+
`cargo run --features=desktop`

na-subclass-jni/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Note: unlike the `na-mainloop` example, this one can't be built via
66
`cargo apk` since it needs to compile some Java code.
77

88
# Gradle Build
9-
```
9+
10+
```bash
1011
export ANDROID_NDK_HOME="path/to/ndk"
1112
export ANDROID_HOME="path/to/sdk"
1213

0 commit comments

Comments
 (0)