Build example gba files into examples/target

This commit is contained in:
Gwilym Kuiper 2022-01-12 22:57:47 +00:00
parent c0bf88e771
commit 0aa5d51c6f
2 changed files with 4 additions and 3 deletions

View file

@ -17,10 +17,12 @@ function build_rom() {
(cd "$GAME_FOLDER" && cargo build --release --verbose --target thumbv4t-none-eabi)
mkdir -p examples/target/examples
arm-none-eabi-objcopy -O binary "$TARGET_FOLDER/thumbv4t-none-eabi/release/$GAME_NAME" "$GBA_FILE"
gbafix -p "-t${INTERNAL_NAME:0:12}" "-c${INTERNAL_NAME:0:4}" -mGC "$GBA_FILE"
cp -v "$GBA_FILE" "examples/$GAME_NAME.gba"
cp -v "$GBA_FILE" "examples/target/examples/$GAME_NAME.gba"
}
mkdir -p examples/target
@ -30,4 +32,4 @@ build_rom "examples/the-hat-chooses-the-wizard" "HATWIZARD"
build_rom "book/games/pong" "PONG"
zip examples/target/examples.zip examples/*.gba
(cd examples/target && zip examples.zip examples/*.gba)

1
examples/.gitignore vendored
View file

@ -1 +0,0 @@
*.gba