Skip to content

Commit 8f0250c

Browse files
committed
Updated build scripts
======================== v1.3.0 done ======================== Ready to merge into `master`
1 parent 9967e49 commit 8f0250c

8 files changed

Lines changed: 70 additions & 32 deletions

File tree

config/build.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

config/icons/mac-icon.icns

26.8 KB
Binary file not shown.

config/linux_build.sh

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
#!/bin/bash
22

3+
ID="tdsm"
34
NAME="Top Down Sprite Maker"
5+
DEV="Jordan Bunke"
46

57
echo "Building $NAME for Linux..."
68

79
ARTIFACT_DIR="../out/artifacts/release"
810
OUTPUT_DIR="../out/artifacts/dist/linux"
911

12+
rm -rf "$OUTPUT_DIR/build"
13+
rm -rf "$OUTPUT_DIR/runtime"
1014
mkdir -p "$OUTPUT_DIR"
1115

1216
# Analyze Java module dependencies
1317
jdeps --multi-release 17 --print-module-deps "$ARTIFACT_DIR/tdsm.jar" > "$OUTPUT_DIR/modules.txt"
14-
echo "1/3: Analyzed dependencies"
18+
echo "1/4: Analyzed dependencies"
1519

1620
MODULES=$(cat "$OUTPUT_DIR/modules.txt")
1721
echo "Modules: $MODULES"
1822

1923
# Create custom runtime image with jlink
2024
jlink --module-path "$JAVA_HOME/jmods" --add-modules "$MODULES" --output "$OUTPUT_DIR/runtime"
21-
echo "2/3: Generated runtime image"
25+
echo "2/4: Generated runtime image"
2226

2327
# Package application with jpackage for Linux
2428
ICON_PATH="./icons/sources/icon-256px.png"
@@ -30,18 +34,39 @@ echo "Version: $VERSION"
3034
jpackage \
3135
--type deb \
3236
--input "$ARTIFACT_DIR" \
33-
--dest "$OUTPUT_DIR/build" \
37+
--dest "$OUTPUT_DIR/installer" \
3438
--name "$NAME" \
3539
--app-version "$VERSION" \
3640
--main-jar tdsm.jar \
3741
--runtime-image "$OUTPUT_DIR/runtime" \
3842
--icon "$ICON_PATH" \
39-
--linux-package-name "tdsm" \
40-
--linux-deb-maintainer "Jordan Bunke <jordanbunkework@gmail.com>" \
43+
--linux-package-name "$ID" \
44+
--linux-deb-maintainer "$DEV <jordanbunkework@gmail.com>" \
45+
--linux-shortcut \
46+
--description "$NAME"
47+
mv "$OUTPUT_DIR/installer/${ID}_${VERSION}-1_amd64.deb" \
48+
"$OUTPUT_DIR/installer/${ID}-${VERSION}-installer.deb"
49+
50+
if [[ $? -eq 0 ]]; then
51+
echo "3/4: Built Linux installer with jpackage"
52+
else
53+
echo "Failed to build Linux installer"
54+
fi
55+
56+
jpackage \
57+
--type app-image \
58+
--input "$ARTIFACT_DIR" \
59+
--dest "$OUTPUT_DIR/build" \
60+
--name "$ID" \
61+
--app-version "$VERSION" \
62+
--main-jar tdsm.jar \
63+
--runtime-image "$OUTPUT_DIR/runtime" \
64+
--icon "$ICON_PATH" \
65+
--vendor "$DEV" \
4166
--description "$NAME"
4267

4368
if [[ $? -eq 0 ]]; then
44-
echo "3/3: Built $NAME for Linux"
69+
echo "4/4: Built Linux executable with jpackage"
4570
else
46-
echo "Failed to build $NAME for Linux"
71+
echo "Failed to build Linux executable"
4772
fi

config/mac_build.sh

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
#!/bin/bash
22

3+
ID="tdsm"
34
NAME="Top Down Sprite Maker"
5+
DEV="Jordan Bunke"
6+
MAC_BUNDLE_ID="com.jordanbunke.tdsm"
47

58
echo "Building $NAME for macOS..."
69

710
ARTIFACT_DIR="../out/artifacts/release"
811
OUTPUT_DIR="../out/artifacts/dist/mac"
912

13+
rm -rf "$OUTPUT_DIR/build"
14+
rm -rf "$OUTPUT_DIR/runtime"
1015
mkdir -p "$OUTPUT_DIR"
1116

1217
# Analyze Java module dependencies
1318
jdeps --multi-release 17 --print-module-deps "$ARTIFACT_DIR/tdsm.jar" > "$OUTPUT_DIR/modules.txt"
14-
echo "1/3: Analyzed dependencies"
19+
echo "1/4: Analyzed dependencies"
1520

1621
MODULES=$(cat "$OUTPUT_DIR/modules.txt")
1722
echo "Modules: $MODULES"
1823

1924
# Create custom runtime image with jlink
2025
jlink --module-path "$JAVA_HOME/jmods" --add-modules "$MODULES" --output "$OUTPUT_DIR/runtime"
21-
echo "2/3: Generated runtime image"
26+
echo "2/4: Generated runtime image"
2227

2328
# Package application with jpackage for macOS
24-
ICON_PATH="./icons/sources/icon-256px.png"
29+
ICON_PATH="./icons/mac-icon.icns"
2530
VERSION_FILE="../res/version"
2631

2732
VERSION=$(cat "$VERSION_FILE")
@@ -30,17 +35,38 @@ echo "Version: $VERSION"
3035
jpackage \
3136
--type dmg \
3237
--input "$ARTIFACT_DIR" \
33-
--dest "$OUTPUT_DIR/build" \
38+
--dest "$OUTPUT_DIR/installer" \
3439
--name "$NAME" \
3540
--app-version "$VERSION" \
3641
--main-jar tdsm.jar \
3742
--runtime-image "$OUTPUT_DIR/runtime" \
3843
--icon "$ICON_PATH" \
39-
--mac-package-identifier "tdsm" \
44+
--vendor "$DEV" \
45+
--mac-package-identifier "$MAC_BUNDLE_ID" \
46+
--description "$NAME"
47+
mv "$OUTPUT_DIR/installer/${NAME}-${VERSION}.dmg" \
48+
"$OUTPUT_DIR/installer/${ID}-${VERSION}-installer.dmg"
49+
50+
if [[ $? -eq 0 ]]; then
51+
echo "3/4: Built macOS installer with jpackage"
52+
else
53+
echo "Failed to build macOS installer"
54+
fi
55+
56+
jpackage \
57+
--type app-image \
58+
--input "$ARTIFACT_DIR" \
59+
--dest "$OUTPUT_DIR/build" \
60+
--name "$ID" \
61+
--app-version "$VERSION" \
62+
--main-jar tdsm.jar \
63+
--runtime-image "$OUTPUT_DIR/runtime" \
64+
--icon "$ICON_PATH" \
65+
--vendor "$DEV" \
4066
--description "$NAME"
4167

4268
if [[ $? -eq 0 ]]; then
43-
echo "3/3: Built $NAME for macOS"
69+
echo "4/4: Built macOS executable with jpackage"
4470
else
45-
echo "Failed to build $NAME for macOS"
71+
echo "Failed to build macOS executable"
4672
fi

config/win_build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jpackage ^
5555
--win-dir-chooser ^
5656
--win-shortcut ^
5757
--win-menu ^
58-
--win-menu-group "Top Down Sprite Maker" ^
58+
--win-menu-group "%NAME%" ^
5959
--description "%NAME%"
6060
move "%OUTPUT_DIR%\installer\%NAME%-%VERSION%.exe" "%OUTPUT_DIR%\installer\%ID%-%VERSION%-installer.exe"
6161

res/program.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "Top Down Sprite Maker",
3-
"version": "1.3.0.171",
4-
"devbuild": true
3+
"version": "1.3.0",
4+
"devbuild": false
55
}

res/text/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ v1.3.0 - 2026-01-19 - Major update
2020
> Last used export folder now persists across program sessions
2121

2222
Fixed:
23+
#64 - macOS app icon is default Java icon
2324
#79 - Switching sprite styles can sometimes cause the program to crash
2425
#80 - Asset choice buttons can still be clicked when partially beyond scroll box
2526
#82 - App crashes or shows unhelpful error screen when loading JSON metadata

res/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0.171
1+
1.3.0

0 commit comments

Comments
 (0)