magicciv/scripts/run/build.sh

25 lines
682 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# Build commands: wasm, gdext
cmd_build_wasm() {
echo -e "${BLUE}Building WASM (simulator → guide)...${NC}"
(cd "$SIMULATOR_DIR" && bash build-wasm.sh "$@")
echo -e "${GREEN}✓ WASM built → src/simulator/pkg/${NC}"
}
cmd_build_gdext() {
echo -e "${BLUE}Building GDExtension (simulator → game)...${NC}"
(cd "$SIMULATOR_DIR" && bash build-gdext.sh "$@")
echo -e "${GREEN}✓ GDExtension built → src/game/addons/magic_civ_physics/${NC}"
}
cmd_build() {
local exit_code=0
cmd_build_info || exit_code=$?
echo ""
cmd_build_wasm || exit_code=$?
echo ""
cmd_build_gdext || exit_code=$?
return $exit_code
}