File: make_win.bat

package info (click to toggle)
adlibtracker2 2.4.24-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,848 kB
  • sloc: pascal: 70,856; makefile: 31; sh: 3
file content (66 lines) | stat: -rw-r--r-- 1,967 bytes parent folder | download | duplicates (3)
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
@echo off
set homedir=%~d1\AT2_Compilation_Environment
cd %homedir%\git
set ERR_RESULT=???
rem -------------------------------------
set VERSION=2.4.24
rem -------------------------------------
echo.
echo ************************************
echo **                                **
echo **  STEP 1/4                      **
echo **  Validating version info       **
echo **                                **
echo ************************************
echo.
copy /y utils\val_win.exe validate.exe >nul
validate.exe %VERSION%
del validate.exe >nul
echo.
echo ************************************
echo **                                **
echo **  STEP 2/4                      **
echo **  Compiling sources             **
echo **                                **
echo ************************************
echo.
call makefile.bat >!log
if not exist adtrack2.exe goto :compile_error
if not %ERR_RESULT% == "OK" GOTO :compile_error
if not exist *.ppu goto :no_ppu_file
del /F /Q *.ppu >nul
:no_ppu_file
if not exist *.o goto :no_o_file
del /F /Q *.o >nul
:no_o_file
if not exist *.or goto :no_or_file
del /F /Q *.or >nul
:no_or_file
if not exist *.res goto :no_res_file
del /F /Q *.res >nul
:no_res_file
if not exist !log goto :no_log_file
del /F /Q !log >nul
:no_log_file
echo.
echo ************************************
echo **                                **
echo **  STEP 3/4                      **
echo **  UPX: Compressing EXE file     **
echo **                                **
echo ************************************
echo.
upx -9 adtrack2.exe >nul
echo.
echo ************************************
echo **                                **
echo **  STEP 4/4                      **
echo **  Executing program             **
echo **                                **
echo ************************************
echo.
start adtrack2
goto :end
:compile_error
start %windir%\notepad.exe !log.
:end