forked from AvaAvarai/Java_Tabular_Vis_Toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
51 lines (40 loc) · 1.39 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
@echo off
REM Requirements to run this script:
REM - Java Development Kit (JDK) installed and configured
REM - The script should be run from the project root directory
echo Building JTabViz...
REM Create the output directory if it doesn't exist
if not exist out (
mkdir out
)
REM Copy all resources to the output directory if they don't exist
echo Copying resources...
xcopy /E /I /Y resources\graphics out\graphics
xcopy /E /I /Y resources\icons out\icons
REM Copy the README.md file to the output directory if it exists
if exist README.md (
copy README.md out\
)
REM Compile all Java files explicitly
echo Compiling Java files...
javac --enable-preview --release 21 -d out -cp "libs/*" src/Main.java src/classifiers/*.java src/utils/*.java src/managers/*.java src/table/*.java src/plots/*.java src/*.java
REM Check if compilation was successful
if %errorlevel% neq 0 (
echo Compilation failed.
pause
exit /b %errorlevel%
)
REM Create the manifest file
echo Main-Class: src.Main> out\MANIFEST.MF
REM Package everything into a single JAR file
echo Creating JAR file...
jar cfm out\JTabViz.jar out\MANIFEST.MF -C out .
REM Check if JAR creation was successful
if %errorlevel% neq 0 (
echo JAR creation failed.
pause
exit /b %errorlevel%
)
echo Build successful! JAR file created at out\JTabViz.jar
echo Running the application...
start /min java --enable-preview -jar out\JTabViz.jar