forked from rime/weasel
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.bat
59 lines (49 loc) · 1.42 KB
/
build.bat
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
set work=%cd%
cd %work%\librime
call vcbuild.bat
cd %work%
if exist output\weaselserver.exe (
output\weaselserver.exe /q
)
set build_option=/Build
set build_all=1
:parse_cmdline_options
if "%1" == "" goto end_parsing_cmdline_options
if "%1" == "rebuild" set build_option=/Rebuild
if "%1" == "all" set build_all=1
if "%1" == "some" set build_all=0
shift
goto parse_cmdline_options
:end_parsing_cmdline_options
if %build_all% == 1 (
call :build_essay
copy %work%\LICENSE.txt output\
copy %work%\README.txt output\
copy %work%\brise\essay.kct output\data\
copy %work%\brise\default.yaml output\data\
copy %work%\brise\symbols.yaml output\data\
copy %work%\brise\preset\*.yaml output\data\
copy %work%\brise\supplement\*.yaml output\data\
copy %work%\brise\extra\*.yaml output\expansion\
)
if %build_all% == 1 (
devenv weasel.sln %build_option% "ReleaseHant|x64"
if errorlevel 1 goto error
devenv weasel.sln %build_option% "ReleaseHant|Win32"
if errorlevel 1 goto error
)
devenv weasel.sln %build_option% "Release|x64"
if errorlevel 1 goto error
devenv weasel.sln %build_option% "Release|Win32"
if errorlevel 1 goto error
goto end
:build_essay
copy %work%\librime\thirdparty\bin\kctreemgr.exe %work%\brise\
copy %work%\librime\thirdparty\bin\zlib1.dll %work%\brise\
cd %work%\brise
call make_essay.bat
cd %work%
:error
echo error building weasel...
:end
cd %work%