2022-08-07 10:48:24 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
function join_by {
|
|
|
|
local d=${1-} f=${2-}
|
|
|
|
if shift 2; then
|
|
|
|
printf %s "$f" "${@/#/$d}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2022-08-07 11:41:16 +00:00
|
|
|
mvn clean package
|
2022-08-07 10:48:24 +00:00
|
|
|
cd target
|
|
|
|
module_jars=(lib/*)
|
2022-08-07 11:41:16 +00:00
|
|
|
eligible_main_jars=("*.jar")
|
2022-08-07 10:48:24 +00:00
|
|
|
main_jar=(${eligible_main_jars[0]})
|
2022-08-07 11:41:16 +00:00
|
|
|
module_path=$(join_by ":" ${module_jars[@]})
|
|
|
|
module_path="$main_jar:$module_path"
|
|
|
|
echo $module_path
|
2022-08-07 10:48:24 +00:00
|
|
|
jpackage \
|
|
|
|
--name "Ace of Shades Launcher" \
|
|
|
|
--app-version "1.0.0" \
|
|
|
|
--description "Launcher app for Ace of Shades, a voxel-based first-person shooter." \
|
2022-08-07 14:17:01 +00:00
|
|
|
--icon ../icon.ico \
|
2022-08-07 10:48:24 +00:00
|
|
|
--linux-shortcut \
|
|
|
|
--linux-deb-maintainer "andrewlalisofficial@gmail.com" \
|
|
|
|
--linux-menu-group "Game" \
|
2022-08-07 10:49:59 +00:00
|
|
|
--linux-app-category "Game" \
|
2022-08-07 11:41:16 +00:00
|
|
|
--module-path "$module_path" \
|
2022-08-07 13:07:29 +00:00
|
|
|
--module aos2_launcher/nl.andrewl.aos2_launcher.Launcher \
|
|
|
|
--add-modules jdk.crypto.cryptoki
|
2022-08-07 10:48:24 +00:00
|
|
|
|