-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakedata.bat
90 lines (73 loc) · 1.24 KB
/
makedata.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@echo off
cls
pushd %~dp0
pushd tools\scripts\
call common_config.bat
popd
if %ERRORLEVEL% neq 0 (
goto end
)
rem check SVN
echo used tools:
echo ------------
echo|set /p="SVN with command line tools: "
call svn --version --quiet
if %ERRORLEVEL% neq 0 (
goto end
)
rem check Python
call python -V
if %ERRORLEVEL% neq 0 (
goto end
)
rem check Lua
call lua -v
if %ERRORLEVEL% neq 0 (
goto end
)
rem check Java
call java -version
if %ERRORLEVEL% neq 0 (
goto end
)
echo ------------
echo.
set GET_REVISION=1
set arg1=%1
if "%1" neq "" (
@setlocal enableextensions enabledelayedexpansion
if not x%arg1:-=%==x!arg1! (
endlocal
set GET_REVISION=0
) else (
endlocal
)
)
setlocal enabledelayedexpansion
if %GET_REVISION% neq 0 (
echo Getting revision, please wait
call tools\scripts\get_revision.bat nopause updateheader
if !ERRORLEVEL! neq 0 (
goto end
)
echo.
)
pushd tools\scripts\buildData
lua makedata.lua %1 %2
popd
:end
echo.
call tools\scripts\notify.bat "Make data done." "Make data failed!"
set FAILED=0
if %ERRORLEVEL% neq 0 (
%CECHO% {red}SCRIPT FAILED! Please check error information carefully, fix and run script again.{#}
echo.
echo.
set FAILED=1
)
if not "%3"=="nopause" (
pause
)
if "%FAILED%" == "1" (
exit /B 1
)