-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildWindows.bat
More file actions
42 lines (34 loc) · 1.02 KB
/
buildWindows.bat
File metadata and controls
42 lines (34 loc) · 1.02 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
@echo off
REM Clean previous folder
rd /s /q buildWindows
mkdir buildWindows
REM Compile all source files
cd Easy-WWW\src
echo Compiling the source files...
javac -d out *.java
REM Package the project into a .jar
cd out
echo Packaging the project into a jar file...
jar -cvf Easy-WWW.jar * > nul
move Easy-WWW.jar ../../../buildWindows/Easy-WWW.jar > nul
cd ../../..
REM Build a custom JRE runtime
REM jdeps --list-deps all.jar
REM java.base
REM java.desktop
cd buildWindows
echo Building a custom JRE runtime...
jlink --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop --output java-runtime
REM Add launchers and package the project
echo Creating launcher scripts...
copy ..\buildResources\startServer.bat . > nul
echo Compressing everything into a zip archive...
tar -acf all-build-Windows.zip java-runtime startServer.bat Easy-WWW.jar
REM Cleanup
echo Final cleanup...
del startServer.bat
del Easy-WWW.jar
rd /s /q java-runtime
rd /s /q ..\Easy-WWW\src\out
echo Done.
pause