forked from MagicFoundation/Alcinoe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJava2OpLib.bat
54 lines (40 loc) · 1.21 KB
/
Java2OpLib.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
@echo off
REM ----------------------------------------------
REM Update the path below according to your system
REM ----------------------------------------------
setlocal EnableDelayedExpansion
set EMBARCADERO_BIN_DIR=c:\program files (x86)\embarcadero\studio\21.0\bin
REM ---------------
REM clean directory
REM ---------------
Set CurrDir="%CD%"
SET OutputDir="%CurrDir%\_outputjava2op_lib"
IF EXIST %OutputDir% rmdir /s /q %OutputDir%
IF EXIST %OutputDir% goto ERROR
mkdir %OutputDir%
REM ----------------
REM call initjava2op
REM ----------------
set filenames=
for /f %%G in ('dir .\Lib\jar\*.jar /s /b /a-d') do (
if not "%%~G" == "%CD%\Lib\jar\org.webrtc\webrtc.jar" (
if not "%%~G" == "%CD%\Lib\jar\org.jetbrains.kotlin\kotlin-stdlib.jar" (
set filenames=!filenames! %%~G
)
)
)
call initjava2op.bat
IF ERRORLEVEL 1 goto ERROR
call "%EMBARCADERO_BIN_DIR%\converters\java2op\java2op.exe" -jar%filenames% -unit %OutputDir%\JavaInterfaces.pas
IF ERRORLEVEL 1 goto ERROR
xcopy %CurrDir%\jar.log %OutputDir%\jar.log* /V
IF ERRORLEVEL 1 goto ERROR
del %CurrDir%\jar.log
IF ERRORLEVEL 1 goto ERROR
REM ----
REM EXIT
REM ----
goto EXIT
:ERROR
pause
:EXIT