Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use a shell script for the final ROM target #382

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -216,29 +216,16 @@ pokeplatinum_nds = custom_target('pokeplatinum.us.nds',
'pokeplatinum.us.nlf'
],
input: [
main,
banner_bnr,
rom_header_template,
rom_rsf,
ichneumon_sub,
ichneumon_sub_defs,
fixrom_exe,
nitrofs_files # Make sure this is always listed last
],
command : [
makerom_exe,
'-DTITLE_NAME=POKEMON PL',
'-DBNR=@INPUT1@',
'-DHEADER_TEMPLATE=@INPUT2@',
'-DARM7=@INPUT4@',
'-DARM7_DEFS=@INPUT5@',
'@INPUT3@',
'@OUTPUT0@',
'@OUTPUT1@',
'&&','sh', '-c',
'@INPUT6@ @OUTPUT0@ --secure-crc 0xF8B8 --game-code CPUE'
],
build_by_default: true
# makerom_exe must always be last, as it may contain a wine component
command : [ make_rom_sh, '@INPUT@', '@OUTPUT@', fixrom_exe, makerom_exe ],
build_by_default: true,
depends: [ main, nitrofs_files ],
)

############################################################
Expand Down
23 changes: 23 additions & 0 deletions tools/scripts/make_rom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -euo pipefail

BANNER_BNR="$1"; shift
HEADER_TEMPLATE="$1"; shift
ROM_RSF="$1"; shift
ARM7_BIN="$1"; shift
ARM7_DEFS="$1"; shift
NDS_OUT="$1"; shift
NLF_OUT="$1"; shift
FIXROM_EXE="$1"; shift

$@ -DTITLE_NAME="POKEMON PL" \
-DBNR=$BANNER_BNR \
-DHEADER_TEMPLATE=$HEADER_TEMPLATE \
-DARM7=$ARM7_BIN \
-DARM7_DEFS=$ARM7_DEFS \
$ROM_RSF \
$NDS_OUT \
$NLF_OUT

$FIXROM_EXE $NDS_OUT --secure-crc 0xF8B8 --game-code CPUE
1 change: 1 addition & 0 deletions tools/scripts/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
make_rom_sh = find_program('make_rom.sh', native: true)
make_pl_poke_icon_py = find_program('make_pl_poke_icon.py', native: true)
make_pl_pokegra_py = find_program('make_pl_pokegra.py', native: true)
make_pl_otherpoke_py = find_program('make_pl_otherpoke.py', native: true)
Expand Down