24 lines
682 B
Bash
24 lines
682 B
Bash
#!/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 → .local/build/wasm/${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
|
|
}
|