Skip to content

Commit 813d9ca

Browse files
merge: integrate AppImage release channel with Windows setup
Resolve release.yml / docs conflicts so both installable artifacts ship.
2 parents 06e4bb2 + f8dbfd0 commit 813d9ca

4 files changed

Lines changed: 90 additions & 8 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,20 @@ jobs:
135135
- name: Build Linux (release)
136136
run: flutter build linux --release
137137

138-
- name: Zip Linux artifact
138+
- name: Zip Linux artifact (portable)
139139
run: |
140140
cd build/linux/x64/release/bundle
141141
zip -r "${GITHUB_WORKSPACE}/Querya-Desktop-${{ steps.version.outputs.version }}-linux.zip" .
142142
143+
- name: Build Linux AppImage (installable)
144+
run: ./scripts/linux/build_appimage.sh
145+
143146
- uses: actions/upload-artifact@v4
144147
with:
145148
name: bundle-linux
146-
path: Querya-Desktop-${{ steps.version.outputs.version }}-linux.zip
149+
path: |
150+
Querya-Desktop-${{ steps.version.outputs.version }}-linux.zip
151+
Querya-Desktop-${{ steps.version.outputs.version }}-linux.AppImage
147152
if-no-files-found: error
148153

149154
build-macos:
@@ -260,6 +265,7 @@ jobs:
260265
find artifacts \( -name '*.zip' -o -name '*.AppImage' -o -name '*-windows-setup.exe' \) \
261266
-exec mv -t dist/ {} +
262267
test "$(find dist -name '*.zip' | wc -l)" -eq 3
268+
test "$(find dist -name '*.AppImage' | wc -l)" -eq 1
263269
test "$(find dist -name '*-windows-setup.exe' | wc -l)" -eq 1
264270
cd dist
265271
sha256sum *.* | tee SHA256SUMS.txt
@@ -283,10 +289,8 @@ jobs:
283289
echo "Optional USB-style profile: set \`QUERYA_PORTABLE=1\` or create a \`QueryaData/\` folder next to the binary (see docs/packaging.md)."
284290
echo ""
285291
echo "#### Installable"
292+
echo "- **Linux AppImage**: \`Querya-Desktop-${VERSION}-linux.AppImage\` (\`chmod +x\` then run)"
286293
echo "- **Windows setup**: \`Querya-Desktop-${VERSION}-windows-setup.exe\` (Inno Setup)"
287-
if [[ -f "dist/Querya-Desktop-${VERSION}-linux.AppImage" ]]; then
288-
echo "- **Linux AppImage**: \`Querya-Desktop-${VERSION}-linux.AppImage\`"
289-
fi
290294
echo ""
291295
echo "Verify checksums: \`SHA256SUMS.txt\`"
292296
echo ""
@@ -310,7 +314,6 @@ jobs:
310314
tag_name: ${{ steps.rel.outputs.tag }}
311315
name: Querya Desktop ${{ needs.build-windows.outputs.version }}
312316
body_path: release-notes.md
313-
# AppImage may be absent until the Linux AppImage job lands (#382).
314317
fail_on_unmatched_files: false
315318
files: |
316319
dist/*.zip

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ coverage/
4242
dist-windows/
4343
design-front/
4444
docker/sqlite/data/
45+
46+
# Local packaging outputs
47+
Querya-Desktop-*.AppImage
48+
Querya-Desktop-*.zip

‎docs/tags-and-releases.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141

4242
| Artifact | Notes |
4343
|----------|--------|
44+
| `Querya-Desktop-X.Y.Z-linux.AppImage` | [`scripts/linux/build_appimage.sh`](../scripts/linux/build_appimage.sh) (`chmod +x` then run) |
4445
| `Querya-Desktop-X.Y.Z-windows-setup.exe` | Inno Setup (`packaging/windows/querya.iss`) |
45-
| `Querya-Desktop-X.Y.Z-linux.AppImage` | When Linux AppImage CI is merged (#382) |
4646

47-
Другие форматы (deb/rpm/Flatpak): [#386](https://github.com/QueryaHub/Querya-Desktop/issues/386) / epic [#379](https://github.com/QueryaHub/Querya-Desktop/issues/379).
47+
deb / rpm / Flatpak: [#386](https://github.com/QueryaHub/Querya-Desktop/issues/386) / epic [#379](https://github.com/QueryaHub/Querya-Desktop/issues/379).
4848

4949
## Changelog в GitHub Release
5050

‎scripts/linux/build_appimage.sh‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/usr/bin/env bash
2+
# Build Querya-Desktop-*.AppImage from a Flutter linux release bundle.
3+
#
4+
# Usage:
5+
# ./scripts/linux/build_appimage.sh [bundle_dir] [output_appimage]
6+
#
7+
# Defaults:
8+
# bundle_dir = build/linux/x64/release/bundle
9+
# output = Querya-Desktop-<pubspec-semver>-linux.AppImage
10+
set -euo pipefail
11+
12+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
13+
BUNDLE="${1:-$ROOT/build/linux/x64/release/bundle}"
14+
BINARY_NAME="querya_desktop"
15+
ICON_SRC="$ROOT/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png"
16+
17+
if [[ ! -d "$BUNDLE" ]]; then
18+
echo "error: Flutter linux bundle not found: $BUNDLE" >&2
19+
echo "Run: flutter build linux --release" >&2
20+
exit 1
21+
fi
22+
if [[ ! -x "$BUNDLE/$BINARY_NAME" ]]; then
23+
echo "error: missing executable: $BUNDLE/$BINARY_NAME" >&2
24+
exit 1
25+
fi
26+
if [[ ! -f "$ICON_SRC" ]]; then
27+
echo "error: icon not found: $ICON_SRC" >&2
28+
exit 1
29+
fi
30+
31+
VERSION="$(grep '^version:' "$ROOT/pubspec.yaml" | sed 's/^version: //; s/+.*//')"
32+
OUT="${2:-$ROOT/Querya-Desktop-${VERSION}-linux.AppImage}"
33+
34+
WORKDIR="$(mktemp -d "${TMPDIR:-/tmp}/querya-appimage.XXXXXX")"
35+
cleanup() { rm -rf "$WORKDIR"; }
36+
trap cleanup EXIT
37+
38+
APPDIR="$WORKDIR/AppDir"
39+
mkdir -p "$APPDIR"
40+
cp -a "$BUNDLE"/. "$APPDIR/"
41+
42+
cp "$ICON_SRC" "$APPDIR/${BINARY_NAME}.png"
43+
44+
cat > "$APPDIR/${BINARY_NAME}.desktop" <<EOF
45+
[Desktop Entry]
46+
Type=Application
47+
Name=Querya Desktop
48+
Comment=Multi-database desktop client
49+
Exec=${BINARY_NAME}
50+
Icon=${BINARY_NAME}
51+
Categories=Development;Database;
52+
Terminal=false
53+
StartupWMClass=querya_desktop
54+
X-AppImage-Version=${VERSION}
55+
EOF
56+
57+
cat > "$APPDIR/AppRun" <<'EOF'
58+
#!/bin/bash
59+
set -euo pipefail
60+
HERE="$(dirname "$(readlink -f "$0")")"
61+
export LD_LIBRARY_PATH="${HERE}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
62+
cd "$HERE"
63+
exec "$HERE/querya_desktop" "$@"
64+
EOF
65+
chmod +x "$APPDIR/AppRun" "$APPDIR/$BINARY_NAME"
66+
67+
TOOL="$WORKDIR/appimagetool"
68+
# Prefer type-2 continuous tool; --appimage-extract-and-run avoids FUSE on CI.
69+
curl -fsSL -o "$TOOL" \
70+
"https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
71+
chmod +x "$TOOL"
72+
73+
ARCH=x86_64 "$TOOL" --appimage-extract-and-run "$APPDIR" "$OUT"
74+
chmod +x "$OUT"
75+
echo "Wrote $OUT"

0 commit comments

Comments
 (0)