diff --git a/aw-server/Cargo.toml b/aw-server/Cargo.toml index 845a3f49..ec1d9a2a 100644 --- a/aw-server/Cargo.toml +++ b/aw-server/Cargo.toml @@ -29,7 +29,7 @@ gethostname = "0.4" uuid = { version = "1.3", features = ["serde", "v4"] } clap = { version = "4.1", features = ["derive", "cargo"] } log-panics = { version = "2", features = ["with-backtrace"]} -rust-embed = { version = "8.0.0", features = ["interpolate-folder-path"] } +rust-embed = { version = "8.0.0", features = ["interpolate-folder-path", "debug-embed"] } aw-datastore = { path = "../aw-datastore" } aw-models = { path = "../aw-models" } diff --git a/aw-server/build.rs b/aw-server/build.rs index 9609a026..3ff85687 100644 --- a/aw-server/build.rs +++ b/aw-server/build.rs @@ -3,7 +3,8 @@ use std::error::Error; fn main() -> Result<(), Box> { // if aw-webui/dist does not exist or is empty, print a warning let path = std::path::Path::new("../aw-webui/dist"); - if !path.exists() || path.read_dir()?.next().is_none() { + let path_index = path.join("index.html"); + if !path_index.exists() { println!("cargo:warning=`./aw-webui/dist` is not built, compiling without webui"); } diff --git a/aw-webui b/aw-webui index d2fa8588..cf74080d 160000 --- a/aw-webui +++ b/aw-webui @@ -1 +1 @@ -Subproject commit d2fa858812b1d4cf57ab9f3d70e736a505260067 +Subproject commit cf74080d12ffd53d37c83e3e0eddaf952fe14a62 diff --git a/compile-android.sh b/compile-android.sh index e6d72440..62a229d8 100755 --- a/compile-android.sh +++ b/compile-android.sh @@ -3,6 +3,14 @@ set -e platform="$(uname -s | tr '[:upper:]' '[:lower:]')" +# if args, use them to select targets (x86_64, arm64, etc) +if [ $# -gt 0 ]; then + targets="$@" +else + # otherwise, default to all targets + targets="arm64 x86_64 x86 arm" +fi + ORIG_PATH="$PATH" ORIG_RUSTFLAGS="$RUSTFLAGS" @@ -39,9 +47,12 @@ for archtargetstr in \ target=$(echo $archtargetstr | cut -d " " -f 2) target_underscore=$(echo $target | sed 's/-/_/g') - echo ARCH $arch echo TARGET $target + if ! echo "$targets" | grep -q "$arch"; then + echo "Skipping $arch..." + continue + fi NDK_ARCH_DIR="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$platform-x86_64/bin" if [ ! -d "$NDK_ARCH_DIR" ]; then