-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.bat
More file actions
57 lines (50 loc) · 1.53 KB
/
Copy pathcompile.bat
File metadata and controls
57 lines (50 loc) · 1.53 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
@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
echo ===========================================
echo FastAnimation Builder (v0.1.0)
echo ===========================================
echo.
:: 1. Setup Java Environment
if not defined JAVA_HOME (
echo JAVA_HOME not defined. Searching for JDK...
for /d %%i in ("C:\Program Files\Java\jdk-*") do (
set "JAVA_HOME=%%i"
)
)
if not defined JAVA_HOME (
echo ERROR: Could not find a JDK in C:\Program Files\Java.
echo Please set JAVA_HOME manually.
pause
exit /b 1
)
echo Using JDK: %JAVA_HOME%
:: 2. Setup VS Environment (Blueprint Standard)
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if not exist "%VSWHERE%" (
echo NOTE: vswhere.exe not found. Skipping native build.
) else (
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set "VS_INSTALL=%%i"
)
if defined VS_INSTALL (
set "VCVARS=!VS_INSTALL!\VC\Auxiliary\Build\vcvars64.bat"
echo Found Visual Studio at: !VS_INSTALL!
if exist "!VCVARS!" call "!VCVARS!" > nul
)
)
:: 3. Build Java Library (Quiet Mode)
echo.
echo Building Java Library...
call mvn clean install -DskipTests -q
if %errorlevel% neq 0 (
echo.
echo ERROR: Build failed.
pause
exit /b %errorlevel%
)
echo.
echo ===========================================
echo BUILD SUCCESSFUL!
echo ===========================================
pause