-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathOneKeyCompile.bat
103 lines (85 loc) · 1.9 KB
/
OneKeyCompile.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
91
92
93
94
95
96
97
98
99
100
101
102
103
@echo off
TITLE OneKey Compile
Color 0A
setlocal EnableDelayedExpansion
cd /d %~dp0
:setup_env
rem check vcvarsall commond
where vcvarsall >nul 2>&1
if errorlevel 1 (
set /p VCVARSALLPATH=Enter path to vcvarsall.bat:
if exist !VCVARSALLPATH! (
goto begin
) else (
goto setup_env
)
) else (
set VCVARSALLPATH=vcvarsall
)
:begin
REM exit on errors, else continue
if %errorlevel% neq 0 exit /b %errorlevel%
:buildnow
cls
set n=
echo.
echo ==== Building LuaJava =====
echo.
echo 1.Build 64 bit DLL and Jar
echo 2.Build 32 bit DLL and Jar
echo 3.Build 64 bit DLL
echo 4.Build 32 bit DLL
echo 5.Build Jar
echo 6.Clean Project
echo 7.Test Console
echo 8.Test nmake
echo 9.Exit
echo.
set /p n=please input number:
if "%n%"=="" cls&goto buildnow
if /i "%n%"=="1" (
echo Compiling dll-x64 and jar ...
call %VCVARSALLPATH% x64
nmake /NOLOGO /f Makefile.win
)
if /i "%n%"=="2" (
echo Compiling dll-x86 and jar...
call %VCVARSALLPATH% x86
nmake /NOLOGO /f Makefile.win
)
if /i "%n%"=="3" (
echo Compiling dll-x64 version...
call %VCVARSALLPATH% x64
nmake /NOLOGO /f Makefile.win /A dll
)
if /i "%n%"=="4" (
echo Compiling dll-x86 ...
call %VCVARSALLPATH% x86
nmake /NOLOGO /f Makefile.win /A dll
)
if /i "%n%"=="5" (
echo Compiling jar...
call %VCVARSALLPATH% x64
nmake /NOLOGO /f Makefile.win /A jar
)
if /i "%n%"=="6" (
echo clean...
call %VCVARSALLPATH% x64
nmake /NOLOGO /f Makefile.win clean
)
if /i "%n%"=="7" (
echo Test Console... "java -cp luajava-1.0.jar org/keplerproject/luajava/Console"
java -cp luajava-1.0.jar org/keplerproject/luajava/Console
)
if /i "%n%"=="8" (
echo Test nmake...
call %VCVARSALLPATH% x64
nmake /NOLOGO /f Makefile.win /A test
)
if /i "%n%"=="9" (
goto end
)
pause
goto buildnow
:end
exit /B