-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.bat
More file actions
79 lines (58 loc) · 2.06 KB
/
Copy pathbuild.bat
File metadata and controls
79 lines (58 loc) · 2.06 KB
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
71
72
73
74
75
76
77
78
@ECHO OFF
REM // make sure we can write to the file ps4built.bin
REM // also make a backup to ps4built.prev.bin
IF NOT EXIST ps4built.bin goto LABLNOCOPY
IF EXIST ps4built.prev.bin del ps4built.prev.bin
IF EXIST ps4built.prev.bin goto LABLNOCOPY
move /Y ps4built.bin ps4built.prev.bin
IF EXIST ps4built.bin goto LABLERROR3
:LABLNOCOPY
REM // delete some intermediate assembler output just in case
IF EXIST ps4.p del ps4.p
IF EXIST ps4.p goto LABLERROR2
IF EXIST ps4.h del ps4.h
IF EXIST ps4.h goto LABLERROR1
REM // clear the output window
REM cls
REM // run the assembler
REM // -xx shows the most detailed error output
REM // -E creates log file for errors/warnings
REM // -A gives us a small speedup
set AS_MSGPATH=AS/win32
set USEANSI=n
REM // allow the user to choose to output error messages to file by supplying the -logerrors parameter
IF "%1"=="-logerrors" ( "AS/win32/asw.exe" -xx -c -E -A -L ps4.asm ) ELSE "AS/win32/asw.exe" -xx -c -E -A -L ps4.asm
REM // if there were errors, a log file is produced
IF EXIST ps4.log goto LABLERROR4
REM // combine the assembler output into a rom
IF EXIST ps4.p "AS/win32/ps4p2bin" ps4.p ps4built.bin ps4.h
REM // done -- pause if we seem to have failed, then exit
IF NOT EXIST ps4.p goto LABLPAUSE
IF NOT EXIST ps4built.bin goto LABLPAUSE
fixheader ps4built.bin
exit /b
:LABLPAUSE
pause
exit /b
:LABLERROR1
echo Failed to build because write access to ps4.h was denied.
pause
exit /b
:LABLERROR2
echo Failed to build because write access to ps4.p was denied.
pause
exit /b
:LABLERROR3
echo Failed to build because write access to ps4built.bin was denied.
pause
exit /b
:LABLERROR4
REM // display a noticeable message
echo.
echo ***************************************************************************
echo * *
echo * There were build errors/warnings. See ps4.log for more details. *
echo * *
echo ***************************************************************************
echo.
pause