mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
refactor(stores): share the Cargo workspace
This commit is contained in:
1 parent
d80e4485ac
commit
2770a481c2
9 files changed
+29
-1771
No files matched your search
@@ -25,7 +25,7 @@ PACKED_LIBRARIES = ['lib/arm64-v8a/libopencv_java4.so', 'lib/arm64-v8a/libmediap
|
||||
PACK_NAMES = ['proot', 'directaudio', 'tracking', 'xbox', 'comet', 'amazon']
|
||||
SOURCE_PATHS = ['app/build.gradle', 'app/src/main/cpp/fakeinput_steam.cpp', 'app/src/main/assets/pulseaudio.tzst',
|
||||
'app/src/main/rust/stores/src', 'app/src/main/rust/stores/Cargo.toml',
|
||||
'app/src/main/rust/amazon/Cargo.toml', 'app/src/main/rust/amazon/Cargo.lock', 'tools/stores',
|
||||
'app/src/main/rust/stores/amazon/Cargo.toml', 'app/src/main/rust/stores/Cargo.lock', 'tools/stores',
|
||||
'tools/linuxfs', 'tools/proot', 'tools/aaudio-sink', 'tools/directaudio', 'tools/packs',
|
||||
'tools/gamescope/release.env', 'tools/droiddeck-esync/release.env',
|
||||
'tools/mangoapp', 'tools/msitools', 'tools/pipewire', 'tools/comet', 'tools/xbox', 'tools/components', 'tools/ci', 'tools/build_local.sh',
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
The APK keeps GOG and Epic in `libdroiddeckstores.so`. Amazon is compiled separately
|
||||
as `libdroiddeckamazon.so`, using the same reviewed Rust sources and shared download
|
||||
implementation. Cargo features determine the exported stores; the source is not copied.
|
||||
Both crates share one Cargo workspace and the existing lockfile/target cache.
|
||||
The separate library duplicates some linked Rust dependencies. Measure combined
|
||||
download size before extending this model to other stores.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
def inputs(root=ROOT):
|
||||
paths = ['app/src/main/rust/amazon/Cargo.toml', 'app/src/main/rust/amazon/Cargo.lock',
|
||||
paths = ['app/src/main/rust/stores/amazon/Cargo.toml', 'app/src/main/rust/stores/Cargo.lock', 'app/src/main/rust/stores/Cargo.toml',
|
||||
'app/src/main/rust/stores/src/lib.rs', 'app/src/main/rust/stores/src/stores_jni.rs',
|
||||
'app/src/main/rust/stores/src/amazon', 'app/src/main/rust/stores/src/fetch_core.rs',
|
||||
'app/src/main/rust/stores/src/fetch_tuning.rs', 'app/src/main/rust/stores/src/priority.rs',
|
||||
|
||||
@@ -7,7 +7,7 @@ export ANDROID_NDK_HOME=${ANDROID_NDK_HOME:-${ANDROID_NDK_ROOT:-${NDK:-${ANDROID
|
||||
export CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-"$repo/app/src/main/rust/stores/target"}
|
||||
export RUSTC=$(rustup which --toolchain stable rustc)
|
||||
mkdir -p "$out"
|
||||
cd "$repo/app/src/main/rust/amazon"
|
||||
cd "$repo/app/src/main/rust/stores/amazon"
|
||||
rustup run stable cargo ndk --target arm64-v8a --platform 26 --output-dir "$repo/app/build/amazon-native" build --release --locked
|
||||
cp "$repo/app/build/amazon-native/arm64-v8a/libdroiddeckamazon.so" "$out/libdroiddeckamazon.so"
|
||||
python3 "$repo/tools/stores/amazon-manifest.py" "$out" "$ANDROID_NDK_HOME"
|
||||
Reference in new issue
Block a user