Skip to content

Commit

Permalink
Improve the mac installer images
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Feb 23, 2024
1 parent d04e3c7 commit add64a2
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 10 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/build.yml
Expand Up @@ -56,8 +56,8 @@ jobs:
run: |
projectVersion=$(grep '^mavenVersion=' gradle.properties | cut -d'=' -f2)
projectVersionStripped=${projectVersion/-SNAPSHOT/}
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-linux.cfg" --type rpm
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-linux.cfg" --type deb
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@installer/jpackage.cfg" "@installer/jpackage-linux.cfg" --type rpm
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@installer/jpackage.cfg" "@installer/jpackage-linux.cfg" --type deb
- name: Upload installer
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
run: |
$projectVersion = Select-String -Path gradle.properties -Pattern '^mavenVersion=' | ForEach-Object { $_.ToString().Split('=')[1] }
$projectVersionStripped = $projectVersion -replace '-SNAPSHOT', ''
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-windows.cfg"
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@installer/jpackage.cfg" "@installer/jpackage-windows.cfg"
- name: Upload installer
uses: actions/upload-artifact@v4
with:
Expand All @@ -109,16 +109,11 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
- name: Prepare environment
run: |
mkdir mac-resources
cp src/main/resources/icons/icon.png mac-resources/SoulFire-background.png
cp src/main/resources/icons/icon.png mac-resources/SoulFire-background-darkAqua.png
- name: Package with jpackage
run: |
projectVersion=$(grep '^mavenVersion=' gradle.properties | cut -d'=' -f2)
projectVersionStripped=${projectVersion/-SNAPSHOT/}
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@jpackage.cfg" "@jpackage-mac.cfg"
jpackage --app-version $projectVersionStripped --main-jar "SoulFire-$projectVersion.jar" "@installer/jpackage.cfg" "@installer/jpackage-mac.cfg"
- name: Upload installer
uses: actions/upload-artifact@v4
with:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion jpackage-mac.cfg → installer/jpackage-mac.cfg
@@ -1,4 +1,4 @@
--mac-package-identifier net.pistonmaster.SoulFire
--icon src/main/resources/icons/icon.icns
--resource-dir mac-resources
--resource-dir installer/mac
--type pkg
File renamed without changes.
File renamed without changes.
Binary file added installer/mac/SoulFire-background-darkAqua.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installer/mac/SoulFire-background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions scripts/create-icons.sh
Expand Up @@ -27,3 +27,11 @@ convert -background transparent -density 1000 -resize 512x512 \
src/main/resources/icons/icon.svg output_512x512.png
png2icns src/main/resources/icons/icon.icns output_*.png
rm output_*.png

# pkg background
convert src/main/resources/icons/icon.png \
-background transparent -density 1000 -resize 123x123^ -gravity center -extent 143x222 \
installer/mac/SoulFire-background.png

cp installer/mac/SoulFire-background.png \
installer/mac/SoulFire-background-darkAqua.png
Binary file modified src/main/resources/icons/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit add64a2

Please sign in to comment.