-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
42 lines (35 loc) · 1.06 KB
/
build.sh
File metadata and controls
42 lines (35 loc) · 1.06 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
#!/bin/bash
# Function to display usage
usage() {
echo "Usage: $0 [java-8|java-21]"
exit 1
}
# Check for profile argument
if [ "$#" -ne 1 ]; then
usage
fi
PROFILE=$1
if [[ "$PROFILE" != "java-8" && "$PROFILE" != "java-21" ]]; then
usage
fi
# Clean and build the project with the selected profile
mvn clean install -P$PROFILE
if [ "$PROFILE" == "java-21" ]; then
# Run jpackage only for Java 21
jpackage \
--input "target/" \
--name "equipmentforge" \
--main-jar "EquipmentForge.jar" \
--main-class "xruisu.project.equipmentforge.App" \
--type exe \
--dest "equipmentforge-installer" \
--icon "target/classes/assets/images/equipmentforge/equipmentforge-icon.ico" \
--app-version "1.2.6" \
--win-shortcut \
--win-menu \
--description "Data Solutions Made Easier" \
--vendor "Louis Harris, xRuisu"
echo "Build and packaging complete. Executable is in the equipmentforge-installer directory."
else
echo "Build complete. No packaging done for Java 8."
fi