deps-upgrade(simulator): ⬆️ Update build toolchains and WebAssembly dependencies for Godot Engine compatibility and performance
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
84b4aa7f03
commit
edc8af666e
2 changed files with 36 additions and 0 deletions
31
src/simulator/build-gdext.sh
Executable file
31
src/simulator/build-gdext.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
TARGET=${1:-x86_64-unknown-linux-gnu}
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ADDON_DIR="$SCRIPT_DIR/../../engine/addons/magic_civ_physics"
|
||||
|
||||
cargo build --release -p magic-civ-physics-gdext --target "$TARGET"
|
||||
|
||||
mkdir -p "$ADDON_DIR"
|
||||
|
||||
case "$TARGET" in
|
||||
x86_64-unknown-linux-gnu)
|
||||
cp "$SCRIPT_DIR/target/$TARGET/release/libmagic_civ_physics_gdext.so" \
|
||||
"$ADDON_DIR/libmagic_civ_physics.x86_64.so"
|
||||
echo "Copied → engine/addons/magic_civ_physics/libmagic_civ_physics.x86_64.so"
|
||||
;;
|
||||
x86_64-pc-windows-gnu|x86_64-pc-windows-msvc)
|
||||
cp "$SCRIPT_DIR/target/$TARGET/release/magic_civ_physics_gdext.dll" \
|
||||
"$ADDON_DIR/magic_civ_physics.x86_64.dll"
|
||||
echo "Copied → engine/addons/magic_civ_physics/magic_civ_physics.x86_64.dll"
|
||||
;;
|
||||
aarch64-apple-darwin|x86_64-apple-darwin)
|
||||
cp "$SCRIPT_DIR/target/$TARGET/release/libmagic_civ_physics_gdext.dylib" \
|
||||
"$ADDON_DIR/libmagic_civ_physics.dylib"
|
||||
echo "Copied → engine/addons/magic_civ_physics/libmagic_civ_physics.dylib"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown target $TARGET — skipping copy. Place .so/.dll manually in engine/addons/magic_civ_physics/"
|
||||
;;
|
||||
esac
|
||||
5
src/simulator/build-wasm.sh
Executable file
5
src/simulator/build-wasm.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
wasm-pack build api-wasm \
|
||||
--target bundler \
|
||||
--out-dir ../pkg
|
||||
Loading…
Add table
Reference in a new issue