Skip to content

Commit 02eb73e

Browse files
jcelerierclaude
andcommitted
tools: name custom app packages so they survive a release upload
create-app-{linux,macos,windows}.sh named their output after APP_NAME verbatim. For any app whose name has a space, GitHub rewrites the space to a dot when the file is uploaded as a release asset, so what CI produces and what users download are two different file names. That silently broke the Linux launcher: create-app-linux.sh writes a .sh next to the AppImage that execs it by name, so every published launcher pointed at a file that does not exist under that name. Four sat-mtl apps ship one today, all dead: exec "$SCRIPT_DIR/Spatial Protocol Mapper-linux-x86_64.AppImage" # asset is actually Spatial.Protocol.Mapper-linux-x86_64.AppImage Use APP_NAME_SAFE for the file names, which create-app.sh already derives and create-app-wasm.sh already uses. APP_NAME still names the app itself: the .desktop entry, the DMG volume, the window title. Also make --qml absolute the way --score and --local-installer already are. The platform scripts cd into their work directory before copying, so a relative --qml resolved to nothing there and the copy is guarded with `|| true` -- the app was packaged with an empty qml directory and no error. Only reachable from the command line: the package-custom-app action passes absolute paths already. Verified by packaging a wasm bundle with a relative --qml and a name with spaces: the qml now arrives, and the output is Spatial-Protocol-Mapper-wasm.zip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VxtUwsfk4JN46WropbwfqC
1 parent 0ac638e commit 02eb73e

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

tools/create-app-linux.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ fi
231231

232232
# Repackage the AppImage
233233
echo "Repackaging AppImage..."
234-
OUTPUT_APPIMAGE="${APP_NAME}-${PLATFORM}.AppImage"
234+
OUTPUT_APPIMAGE="${APP_NAME_SAFE}-${PLATFORM}.AppImage"
235235

236236
./appimagetool-${ARCH}.AppImage -n squashfs-root "$OUTPUT_APPIMAGE" \
237237
--runtime-file "runtime-${ARCH}"
@@ -249,13 +249,13 @@ mv "$OUTPUT_APPIMAGE" "$OUTPUT_DIR/"
249249
echo "✓ Created: $OUTPUT_DIR/$OUTPUT_APPIMAGE"
250250

251251
# Create a simple run script
252-
cat > "$OUTPUT_DIR/${APP_NAME}-${PLATFORM}.sh" << EOF
252+
cat > "$OUTPUT_DIR/${APP_NAME_SAFE}-${PLATFORM}.sh" << EOF
253253
#!/bin/bash
254254
# Launcher script for ${APP_NAME}
255255
SCRIPT_DIR="\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" && pwd)"
256256
exec "\$SCRIPT_DIR/$OUTPUT_APPIMAGE" "\$@"
257257
EOF
258258

259-
chmod +x "$OUTPUT_DIR/${APP_NAME}-${PLATFORM}.sh"
259+
chmod +x "$OUTPUT_DIR/${APP_NAME_SAFE}-${PLATFORM}.sh"
260260

261261
echo "✓ Linux package created successfully"

tools/create-app-macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ fi
366366

367367
# Create a DMG
368368
echo "Creating DMG..."
369-
OUTPUT_DMG="${APP_NAME}-${PLATFORM}.dmg"
369+
OUTPUT_DMG="${APP_NAME_SAFE}-${PLATFORM}.dmg"
370370

371371
# Simple method using hdiutil
372372
rm -f "$OUTPUT_DMG"

tools/create-app-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ cd "$WORK_DIR"
208208

209209
# Create a ZIP package
210210
echo "Creating ZIP package..."
211-
OUTPUT_ZIP="${APP_NAME}-windows.zip"
211+
OUTPUT_ZIP="${APP_NAME_SAFE}-windows.zip"
212212

213213
if command -v zip &> /dev/null; then
214214
(cd "$INSTALL_DIR" && zip -r -q "$WORK_DIR/$OUTPUT_ZIP" .)

tools/create-app.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ while [[ $# -gt 0 ]]; do
100100
case $1 in
101101
--qml)
102102
if [[ -f "$2" ]]; then
103-
QML_FILES+=("$2")
103+
QML_FILES+=("$(cd "$(dirname "$2")" && pwd)/$(basename "$2")")
104104
elif [[ -d "$2" ]]; then
105-
QML_DIRS+=("$2")
105+
QML_DIRS+=("$(cd "$2" && pwd)")
106106
else
107107
echo "Error: QML path does not exist: $2"
108108
exit 1

0 commit comments

Comments
 (0)