2024-01-01 16:20:30 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Creates a native linux installer for Perfin, in the .deb format (for Ubuntu, Debian, etc.)
|
|
|
|
|
2024-01-02 13:39:07 +00:00
|
|
|
./mvnw clean package
|
2024-01-01 16:20:30 +00:00
|
|
|
|
|
|
|
function join_by {
|
|
|
|
local d=${1-} f=${2-}
|
|
|
|
if shift 2; then
|
|
|
|
printf %s "$f" "${@/#/$d}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2024-01-02 19:34:11 +00:00
|
|
|
# Fix because H2 is not modular:
|
|
|
|
rm target/lib/h2-*.jar
|
|
|
|
|
2024-01-01 16:20:30 +00:00
|
|
|
# Gets a ":"-separated string of all the dependency jar-files.
|
|
|
|
module_jar_files=(target/lib/*)
|
|
|
|
module_jar_files_path=$(join_by ":" ${module_jar_files[@]})
|
|
|
|
module_path="target/classes:$module_jar_files_path"
|
|
|
|
|
|
|
|
# Fix because H2 is not modular:
|
|
|
|
module_path="$module_path:target/modules/h2-2.2.224.jar"
|
|
|
|
|
|
|
|
jpackage \
|
|
|
|
--name "Perfin" \
|
2024-02-07 14:09:30 +00:00
|
|
|
--app-version "1.7.1" \
|
2024-01-01 16:20:30 +00:00
|
|
|
--description "Desktop application for personal finance. Add your accounts, track transactions, and store receipts, invoices, and more." \
|
|
|
|
--icon design/perfin-logo_256.png \
|
|
|
|
--vendor "Andrew Lalis" \
|
2024-01-02 19:34:11 +00:00
|
|
|
--about-url https://github.com/andrewlalis/perfin \
|
2024-01-01 16:20:30 +00:00
|
|
|
--module com.andrewlalis.perfin/com.andrewlalis.perfin.PerfinApp \
|
|
|
|
--module-path $module_path \
|
|
|
|
--add-modules com.h2database \
|
2024-01-02 19:34:11 +00:00
|
|
|
--type deb \
|
2024-01-01 16:20:30 +00:00
|
|
|
--linux-deb-maintainer "andrewlalisofficial@gmail.com" \
|
|
|
|
--linux-shortcut \
|
|
|
|
--linux-menu-group "Office;Finance;Java" \
|