mirror of
https://github.com/Kak2X/wl.git
synced 2024-11-26 23:00:34 +00:00
Use single build script
This commit is contained in:
parent
173f70a535
commit
4d760abc10
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,4 +20,5 @@ tempconv.bin
|
||||
tempconv.asm
|
||||
shell.cmd
|
||||
temp.asm
|
||||
wl*.asm
|
||||
wl*.asm
|
||||
shell.lnk
|
52
_build.cmd
Normal file
52
_build.cmd
Normal file
@ -0,0 +1,52 @@
|
||||
@echo off
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
set source=%~1
|
||||
set filename=%~2
|
||||
set comparison=%~3
|
||||
if "%filename%" == "" (
|
||||
echo Don't execute this file directly.
|
||||
goto end
|
||||
)
|
||||
set searchStr=-nofix
|
||||
call:inStr %*
|
||||
set nofix=%ERRORLEVEL%
|
||||
|
||||
echo Assembling...
|
||||
rgbds\rgbasm -h -L -vo -v -o %filename%.o %source%.asm
|
||||
if %ERRORLEVEL% neq 0 goto assemble_fail
|
||||
|
||||
echo Linking...
|
||||
rgbds\rgblink -m %filename%.map -n %filename%.sym -d -o %filename%.gb %filename%.o
|
||||
if %ERRORLEVEL% neq 0 goto link_fail
|
||||
|
||||
echo ==========================
|
||||
echo Build Success.
|
||||
echo ==========================
|
||||
|
||||
if %nofix% equ 0 (
|
||||
echo Fixing header checksum...
|
||||
rgbds\rgbfix -v %filename%.gb
|
||||
)
|
||||
|
||||
if NOT "%comparison%" == "" if EXIST %comparison% ( fc /B %filename%.gb %comparison% | more )
|
||||
goto end
|
||||
|
||||
:assemble_fail
|
||||
echo Error while assembling.
|
||||
goto fail
|
||||
:link_fail
|
||||
echo Error while linking.
|
||||
:fail
|
||||
|
||||
echo ==========================
|
||||
echo Build failure.
|
||||
echo ==========================
|
||||
|
||||
:end
|
||||
pause
|
||||
exit /b
|
||||
|
||||
:inStr
|
||||
set args=%*
|
||||
if not "x!args:%searchStr%=!"=="x%args%" ( exit /b 1 )
|
||||
exit /b 0
|
@ -1,31 +1 @@
|
||||
@echo off
|
||||
echo Assembling...
|
||||
rgbds\rgbasm -h -L -vo -v -o wl.o config_nojunk.asm
|
||||
if %ERRORLEVEL% neq 0 goto assemble_fail
|
||||
|
||||
echo Linking...
|
||||
rgbds\rgblink -m wl.map -n wl.sym -d -o wl.gb wl.o
|
||||
if %ERRORLEVEL% neq 0 goto link_fail
|
||||
|
||||
echo ==========================
|
||||
echo Build Success.
|
||||
echo ==========================
|
||||
echo Fixing header checksum...
|
||||
rgbds\rgbfix -v wl.gb
|
||||
if EXIST original.gb ( fc /B wl.gb original.gb )
|
||||
|
||||
goto end
|
||||
|
||||
:assemble_fail
|
||||
echo Error while assembling.
|
||||
goto fail
|
||||
:link_fail
|
||||
echo Error while linking.
|
||||
:fail
|
||||
|
||||
echo ==========================
|
||||
echo Build failure.
|
||||
echo ==========================
|
||||
|
||||
:end
|
||||
pause
|
||||
@_build config-nojunk wl
|
@ -1,30 +1 @@
|
||||
@echo off
|
||||
echo Assembling...
|
||||
rgbds\rgbasm -v -o wl.o config_test.asm
|
||||
if %ERRORLEVEL% neq 0 goto assemble_fail
|
||||
|
||||
echo Linking...
|
||||
rgbds\rgblink -m wl.map -n wl.sym -d -o wl.gb wl.o
|
||||
if %ERRORLEVEL% neq 0 goto link_fail
|
||||
|
||||
echo ==========================
|
||||
echo Build Success.
|
||||
echo ==========================
|
||||
echo Fixing header checksum...
|
||||
rgbds\rgbfix -v wl.gb
|
||||
|
||||
goto end
|
||||
|
||||
:assemble_fail
|
||||
echo Error while assembling.
|
||||
goto fail
|
||||
:link_fail
|
||||
echo Error while linking.
|
||||
:fail
|
||||
|
||||
echo ==========================
|
||||
echo Build failure.
|
||||
echo ==========================
|
||||
|
||||
:end
|
||||
pause
|
||||
@_build config-test wl
|
32
build.cmd
32
build.cmd
@ -1,31 +1 @@
|
||||
@echo off
|
||||
echo Assembling...
|
||||
rgbds\rgbasm -h -L -vo -v -o wl.o config_original.asm
|
||||
if %ERRORLEVEL% neq 0 goto assemble_fail
|
||||
|
||||
echo Linking...
|
||||
rgbds\rgblink -m wl.map -n wl.sym -d -o wl.gb wl.o
|
||||
if %ERRORLEVEL% neq 0 goto link_fail
|
||||
|
||||
echo ==========================
|
||||
echo Build Success.
|
||||
echo ==========================
|
||||
echo Fixing header checksum...
|
||||
rgbds\rgbfix -v wl.gb
|
||||
if EXIST original.gb ( fc /B wl.gb original.gb )
|
||||
|
||||
goto end
|
||||
|
||||
:assemble_fail
|
||||
echo Error while assembling.
|
||||
goto fail
|
||||
:link_fail
|
||||
echo Error while linking.
|
||||
:fail
|
||||
|
||||
echo ==========================
|
||||
echo Build failure.
|
||||
echo ==========================
|
||||
|
||||
:end
|
||||
pause
|
||||
@_build config-original wl original.gb
|
Loading…
Reference in New Issue
Block a user