2017-11-08 21:47:12 -08:00
|
|
|
@echo off
|
|
|
|
if "%1" equ "clean" (
|
|
|
|
echo y|1>nul rd build /s
|
|
|
|
goto :EOF
|
|
|
|
)
|
2019-05-02 22:19:55 -07:00
|
|
|
|
2019-06-13 19:54:03 -07:00
|
|
|
setlocal enabledelayedexpansion
|
2019-05-02 22:19:55 -07:00
|
|
|
set BUILDDISK=build\passport
|
|
|
|
|
2018-05-26 10:54:48 -07:00
|
|
|
set ACME=acme
|
2020-03-11 15:23:51 -07:00
|
|
|
set EXOMIZER=exomizer
|
2018-05-26 10:54:48 -07:00
|
|
|
set CADIUS=cadius
|
2017-11-08 21:47:12 -08:00
|
|
|
2>nul md build
|
|
|
|
cd src\mods
|
2018-05-26 10:54:48 -07:00
|
|
|
%ACME% universalrwts.a
|
2017-11-08 21:47:12 -08:00
|
|
|
cd ..\..\build
|
2020-03-11 15:23:51 -07:00
|
|
|
%EXOMIZER% mem -lnone -q -P23 -f universalrwts.bin@0xb800 -o universalrwts.pak
|
2017-11-08 21:47:12 -08:00
|
|
|
cd ..\src\mods
|
2018-09-26 10:20:03 -07:00
|
|
|
%ACME% -r ..\..\build\t00only.lst t00only.a
|
2017-11-08 21:47:12 -08:00
|
|
|
cd ..\..\build
|
2021-04-29 13:46:53 -07:00
|
|
|
2>nul del vars.a
|
2020-03-11 15:23:51 -07:00
|
|
|
%EXOMIZER% mem -lnone -q -P23 -f t00only.bin@0x2000 -o t00only.pak
|
2017-11-08 21:47:12 -08:00
|
|
|
cd ..\src
|
2019-06-13 19:54:03 -07:00
|
|
|
2>..\build\out.txt %ACME% -DFORWARD_DECRUNCHING=1 passport.a
|
|
|
|
for /f "tokens=2,3 delims=)" %%q in ('find "RELBASE =" ..\build\out.txt') do set _make=%%q
|
|
|
|
2>..\build\out.txt %ACME% -r ..\build\passport.lst -DRELBASE=$%_make:~-4% -DFORWARD_DECRUNCHING=1 passport.a
|
2021-04-19 21:17:23 -04:00
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "ThisSlot=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
2019-06-15 12:23:02 -07:00
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "PrintByID=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "WaitForKey=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "CleanExit=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
2021-06-18 20:50:19 -04:00
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "OpenFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "ReadFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "CloseFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
2019-06-15 12:23:02 -07:00
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "GetVolumeName=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "GetVolumeInfo=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "PREFSVER=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "PREFSFILE=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
2021-06-18 20:15:15 -04:00
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "SLOT=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "DRIVE=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
2021-06-18 21:13:59 -04:00
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "MainMenu=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
|
|
|
for /f "tokens=4,* delims=:(" %%q in ('find "CheckCache=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
2019-06-13 19:54:03 -07:00
|
|
|
cd ..\build
|
2020-03-11 15:23:51 -07:00
|
|
|
%EXOMIZER% raw -q -P23 -T4 -b passport.tmp -o passport.pak
|
2019-06-13 19:54:03 -07:00
|
|
|
cd ..\src
|
2019-06-15 12:23:02 -07:00
|
|
|
%ACME% -DFORWARD_DECRUNCHING=0 wrapper.a
|
2017-11-08 21:47:12 -08:00
|
|
|
cd ..
|
2019-06-15 12:23:02 -07:00
|
|
|
1>nul copy res\work.po %BUILDDISK%.po
|
2018-05-26 10:54:48 -07:00
|
|
|
1>nul copy res\_FileInformation.txt build\
|
2019-06-15 12:23:02 -07:00
|
|
|
%CADIUS% ADDFILE "%BUILDDISK%.po" "/PASSPORT/" "build\PASSPORT.SYSTEM"
|
2019-05-02 22:19:55 -07:00
|
|
|
cscript /nologo bin/po2do.js build\ build\
|
|
|
|
2>nul del "%BUILDDISK%.po"
|
2020-03-11 15:23:51 -07:00
|
|
|
|
2018-05-26 10:54:48 -07:00
|
|
|
rem third-party tools required to build (must be in path)
|
|
|
|
rem https://sourceforge.net/projects/acme-crossass/
|
|
|
|
rem https://bitbucket.org/magli143/exomizer/wiki/Home
|
|
|
|
rem https://www.brutaldeluxe.fr/products/crossdevtools/cadius/
|
|
|
|
rem https://github.com/mach-kernel/cadius
|