From 8d2d2426fe40ea73c8d6abedbda2f88d9efa8e35 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Tue, 3 Nov 2020 12:00:47 -0800 Subject: [PATCH] rename example and readme titles (#781) --- .github/workflows/ci.yml | 2 +- Cargo.toml | 4 ++-- examples/README.md | 14 +++++++------- examples/android/{bevy_android.rs => android.rs} | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) rename examples/android/{bevy_android.rs => android.rs} (65%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42c5ebcd27..c022847a2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: - name: Install Cargo APK run: cargo install cargo-apk - name: Build APK - run: cargo apk build --example bevy_android + run: cargo apk build --example android clean: runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 9b4f5195bc..b1abcd731a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -321,8 +321,8 @@ path = "examples/wasm/assets_wasm.rs" required-features = ["bevy_winit"] [[example]] -name = "bevy_android" -path = "examples/android/bevy_android.rs" +name = "android" +path = "examples/android/android.rs" crate-type = ["cdylib"] [package.metadata.android] diff --git a/examples/README.md b/examples/README.md index de7343e1cc..f2eb9ed257 100644 --- a/examples/README.md +++ b/examples/README.md @@ -120,14 +120,14 @@ Example | File | Description ## WASM -#### Pre-requirements +#### Setup ```sh rustup target add wasm32-unknown-unknown cargo install wasm-bindgen-cli ``` -#### Build & run +#### Build & Run Following is an example for `headless_wasm`. For other examples in wasm/ directory, change the `headless_wasm` in the following commands **and edit** `examples/wasm/index.html` @@ -146,14 +146,14 @@ basic-http-server examples/wasm ## iOS -#### Pre-requirements +#### Setup ```sh rustup target add aarch64-apple-ios x86_64-apple-ios cargo install cargo-lipo ``` -#### Build & run +#### Build & Run Using bash: @@ -190,7 +190,7 @@ used for the `Makefile`. ## Android -#### Pre-requirements +#### Setup ```sh rustup target add aarch64-linux-android armv7-linux-androideabi @@ -201,12 +201,12 @@ The Android SDK must be installed, and the environment variable `ANDROID_SDK_ROO When using `NDK (Side by side)`, the environment variable `ANDROID_NDK_ROOT` must also be set to one of the NDKs in `sdk\ndk\[NDK number]`. -#### Build & run +#### Build & Run To run on a device setup for Android development, run: ```sh -cargo apk run --example bevy_android +cargo apk run --example android ``` :warning: At this time Bevy does not work in Android Emulator. diff --git a/examples/android/bevy_android.rs b/examples/android/android.rs similarity index 65% rename from examples/android/bevy_android.rs rename to examples/android/android.rs index 7541aedf40..a95a69ed03 100644 --- a/examples/android/bevy_android.rs +++ b/examples/android/android.rs @@ -3,7 +3,7 @@ include!("../3d/3d_scene.rs"); #[cfg_attr( target_os = "android", - ndk_glue::main(logger(level = "trace", tag = "bevy_android"), backtrace = "full") + ndk_glue::main(logger(level = "trace", tag = "android"), backtrace = "full") )] pub fn android_main() { main();