-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAKE_HACK_full.cmd
70 lines (44 loc) · 1.7 KB
/
MAKE_HACK_full.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
@rem USAGE: "MAKE HACK_full.cmd" [quick]
@rem If first argument is "quick", then this will not update text, tables, maps, or generate a patch
@rem "MACK HACK_quick.cmd" simply calls this but with the quick argument, for convenience
@rem defining buildfile config
set "source_rom=%~dp0FE7_clean.gba"
set "main_event=%~dp0ROMBuildfile.event"
set "target_rom=%~dp0FE7_Translated.gba"
set "target_ups=%~dp0FE7_Translated.ups"
@rem defining tools
set "c2ea=%~dp0Tools\C2EA\c2ea.exe"
set "textprocess=%~dp0Tools\TextProcess\text-process-classic.exe"
set "ups=%~dp0Tools\ups\ups.exe"
set "parsefile=%~dp0EventAssembler\Tools\ParseFile.exe"
set "tmx2ea=%~dp0Tools\tmx2ea\tmx2ea.exe"
set "symcombo=%~dp0Tools\sym\SymCombo.exe"
@rem set %~dp0 into a variable because batch is stupid and messes with it when using conditionals?
set "base_dir=%~dp0"
@rem do the actual building
echo Copying ROM
copy "%source_rom%" "%target_rom%"
if /I not [%1]==[quick] (
@rem only do the following if this isn't a make hack quick
rem echo:
rem echo Processing tables
rem cd "%base_dir%Tables"
rem echo: | ("%c2ea%" "%source_rom%" -installer "%base_dir%Tables/TableInstaller.event")
echo:
echo Processing text
cd "%base_dir%Text"
echo: | ("%textprocess%" text_buildfile.txt --parser-exe "%parsefile%" --installer "InstallTextData.event" --definitions "TextDefinitions.event")
)
echo:
echo Assembling
cd "%base_dir%EventAssembler"
ColorzCore A FE7 "-output:%target_rom%" "-input:%main_event%" "--nocash-sym" "--build-times"
type "%~dp0FE7_clean.sym" >> "%~dp0FE7_Translated.sym"
echo:
echo Generating patch
cd "%base_dir%"
"%ups%" diff -b "%source_rom%" -m "%target_rom%" -o "%target_ups%"
echo:
echo Done!
pause