-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.cmd
More file actions
68 lines (51 loc) · 1.72 KB
/
Copy pathbuild.cmd
File metadata and controls
68 lines (51 loc) · 1.72 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
@echo off
rem Builds and packages Wakan completely.
call setupvars.cmd
if errorlevel 1 goto setupvars_fail
pushd ..
set BINOUT=%~dp0..\Release
set UNITTEST_DEFINES=CONSOLE_TESTRUNNER
echo Building jp-tools...
msbuild %JPTOOLS%\Tests\Tests.dproj /t:build /p:config=Release
if errorlevel 1 goto end
echo Testing jp-tools
"%JPTOOLS%\Release\Tests.exe" /nospeed /halt
if errorlevel 1 goto end
rem Build configuration:
rem /p:OutputPath build everything into a clean folder.
rem /p:DCC_ExeOutput same (Delphi needs this)
rem /p:DCC_BplOutput can't rebuild BPLs if Delphi is running, but Wakan is static linked so we only want fresh DCUs -- put BPLs wherever.
msbuild Wakan.groupproj /t:build /p:config=Release /p:OutputPath="%BINOUT%" /p:DCC_ExeOutput="%BINOUT%" /p:DCC_BplOutput="%BINOUT%"
if errorlevel 1 goto end
rem Download/update standard resources -- some are needed for tests
start /wait "" "%BINOUT%\wakan.exe" download radkfile wordfreq_ck edict2 ccedict kanjidic unihan examples_j.pkg /console
if errorlevel 1 goto end
rem Running tests...
"%BINOUT%\WakanTests.exe" /nospeed /halt
if errorlevel 1 goto end
rem TODO: Update + rebuild character info? "wakan /updatechars ..."
echo.
echo Rebuilding RAD/SOD from sources...
cd "%BINOUT%"
"%BINOUT%\Wakan.exe" makerad
if errorlevel 1 goto end
"%BINOUT%\Wakan.exe" makesod
if errorlevel 1 goto end
echo.
echo Packaging installation...
iscc "%~dp0wakan-setup.iss" /O+
echo.
echo.
rem TODO: Include: history.txt, licence.txt?
:success
echo.
echo Build completed.
echo.
goto end
:setupvars_fail
echo.
echo To build Wakan, please copy setupvars.cmd.example as setupvars.cmd and customize paths.
echo.
:end
popd
pause