Updated to v0.0.2 with windows package script.

This commit is contained in:
Andrew Lalis 2024-01-02 14:34:11 -05:00
parent 7682c569eb
commit 064819e2ad
5 changed files with 33 additions and 5 deletions

View File

@ -37,12 +37,13 @@ jobs:
- name: Build Windows MSI Package for Release - name: Build Windows MSI Package for Release
if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows' }} if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows' }}
run: powershell.exe -File scripts/package-windows-msi.ps1 run: powershell.exe -File scripts\package-windows-msi.ps1
- name: Create Release - name: Create Release
if: ${{ startsWith(github.ref, 'refs/tags/') }} if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
fail_on_unmatched_files: false fail_on_unmatched_files: true
files: | files: |
*.deb *.deb
*.msi

BIN
design/perfin-logo_256.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -6,7 +6,7 @@
<groupId>com.andrewlalis</groupId> <groupId>com.andrewlalis</groupId>
<artifactId>perfin</artifactId> <artifactId>perfin</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.2</version>
<properties> <properties>
<maven.compiler.source>21</maven.compiler.source> <maven.compiler.source>21</maven.compiler.source>

View File

@ -11,13 +11,15 @@ function join_by {
fi fi
} }
# Fix because H2 is not modular:
rm target/lib/h2-*.jar
# Gets a ":"-separated string of all the dependency jar-files. # Gets a ":"-separated string of all the dependency jar-files.
module_jar_files=(target/lib/*) module_jar_files=(target/lib/*)
module_jar_files_path=$(join_by ":" ${module_jar_files[@]}) module_jar_files_path=$(join_by ":" ${module_jar_files[@]})
module_path="target/classes:$module_jar_files_path" module_path="target/classes:$module_jar_files_path"
# Fix because H2 is not modular: # Fix because H2 is not modular:
rm target/lib/h2-*.jar
module_path="$module_path:target/modules/h2-2.2.224.jar" module_path="$module_path:target/modules/h2-2.2.224.jar"
jpackage \ jpackage \
@ -26,9 +28,11 @@ jpackage \
--description "Desktop application for personal finance. Add your accounts, track transactions, and store receipts, invoices, and more." \ --description "Desktop application for personal finance. Add your accounts, track transactions, and store receipts, invoices, and more." \
--icon design/perfin-logo_256.png \ --icon design/perfin-logo_256.png \
--vendor "Andrew Lalis" \ --vendor "Andrew Lalis" \
--about-url https://github.com/andrewlalis/perfin \
--module com.andrewlalis.perfin/com.andrewlalis.perfin.PerfinApp \ --module com.andrewlalis.perfin/com.andrewlalis.perfin.PerfinApp \
--module-path $module_path \ --module-path $module_path \
--add-modules com.h2database \ --add-modules com.h2database \
--type deb \
--linux-deb-maintainer "andrewlalisofficial@gmail.com" \ --linux-deb-maintainer "andrewlalisofficial@gmail.com" \
--linux-shortcut \ --linux-shortcut \
--linux-menu-group "Office;Finance;Java" \ --linux-menu-group "Office;Finance;Java" \

View File

@ -2,4 +2,27 @@ $projectDir = $PSScriptRoot
./mvnw.cmd clean package ./mvnw.cmd clean package
$modules = Get-ChildItem -Path target/lib -Name | ForEach-Object { "lib\$_" } # Fix because H2 is not modular:
Remove-Item -Path target\lib\h2-*.jar -Force
$modules = Get-ChildItem -Path target\lib -Name | ForEach-Object { "target\lib\$_" }
$modulePath = $modules -join ';'
$modulePath = "target\classes;$modulePath"
# Fix because H2 is not modular:
$modulePath = "$modulePath;target\modules\h2-2.2.224.jar"
jpackage `
--name "Perfin" `
--app-version "0.0.1" `
--description "Desktop application for personal finance. Add your accounts, track transactions, and store receipts, invoices, and more." `
--icon design\perfin-logo_256.ico `
--vendor "Andrew Lalis" `
--about-url https://github.com/andrewlalis/perfin `
--module com.andrewlalis.perfin/com.andrewlalis.perfin.PerfinApp `
--module-path $modulePath `
--add-modules com.h2database `
--type msi `
--win-menu `
--win-shortcut-prompt `
--win-help-url https://github.com/andrewlalis/perfin `