Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ jobs:
name: Rust Build Check (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: frontend-build
env:
# Keep the workspace check plus desktop test profiles within hosted-runner disk limits.
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_PROFILE_TEST_DEBUG: "0"
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -123,7 +128,7 @@ jobs:

- uses: swatinem/rust-cache@v2
with:
shared-key: "ci-check-v2-${{ runner.os }}-no-cargo-bin-v1"
shared-key: "ci-check-v3-${{ runner.os }}-no-cargo-bin-v1"
cache-bin: false
# PR caches are scoped to merge refs; main pushes own shared cache refreshes.
save-if: ${{ github.event_name != 'pull_request' }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/desktop-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,14 @@ jobs:
APPINDICATOR_PKG=libayatana-appindicator3-dev
fi

# Tauri pins AppImage GTK input methods to its bundled cache, so the
# fcitx5 GTK3 bridge must be present before linuxdeploy builds it.
sudo apt-get install -y --no-install-recommends \
pkg-config \
xdg-utils \
libglib2.0-dev \
libgtk-3-dev \
fcitx5-frontend-gtk3 \
libxdo-dev \
"$WEBKIT_PKG" \
"$APPINDICATOR_PKG" \
Expand Down Expand Up @@ -220,6 +223,11 @@ jobs:
- name: Build desktop app
run: ${{ matrix.platform.build_command }}

- name: Verify AppImage fcitx5 GTK module
if: runner.os == 'Linux'
shell: bash
run: bash scripts/ci/verify-appimage-fcitx.sh "${{ matrix.platform.target }}"

- name: Upload bundles
uses: actions/upload-artifact@v6
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,14 @@ jobs:
APPINDICATOR_PKG=libayatana-appindicator3-dev
fi

# Tauri pins AppImage GTK input methods to its bundled cache, so the
# fcitx5 GTK3 bridge must be present before linuxdeploy builds it.
sudo apt-get install -y --no-install-recommends \
pkg-config \
xdg-utils \
libglib2.0-dev \
libgtk-3-dev \
fcitx5-frontend-gtk3 \
libxdo-dev \
"$WEBKIT_PKG" \
"$APPINDICATOR_PKG" \
Expand Down Expand Up @@ -192,6 +195,11 @@ jobs:
- name: Build desktop app
run: ${{ matrix.platform.build_command }}

- name: Verify AppImage fcitx5 GTK module
if: runner.os == 'Linux'
shell: bash
run: bash scripts/ci/verify-appimage-fcitx.sh "${{ matrix.platform.target }}"

- name: Upload bundles
uses: actions/upload-artifact@v6
with:
Expand Down
43 changes: 43 additions & 0 deletions scripts/ci/verify-appimage-fcitx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

set -euo pipefail

target="${1:?usage: verify-appimage-fcitx.sh <rust-target>}"
bundle_dir="target/${target}/release/bundle/appimage"

mapfile -t appimages < <(find "$bundle_dir" -maxdepth 1 -type f -name '*.AppImage' -print | sort)
if [[ ${#appimages[@]} -ne 1 ]]; then
echo "Expected exactly one AppImage in ${bundle_dir}, found ${#appimages[@]}" >&2
exit 1
fi

appimage="$(realpath "${appimages[0]}")"
work_dir="$(mktemp -d)"
trap 'rm -rf "$work_dir"' EXIT

(
cd "$work_dir"
chmod +x "$appimage"
"$appimage" --appimage-extract >/dev/null

module_path="$(find squashfs-root -name 'im-fcitx5.so' -print -quit)"
if [[ -z "$module_path" ]]; then
echo "AppImage does not contain the fcitx5 GTK3 input method module" >&2
exit 1
fi

cache_path=""
while IFS= read -r candidate; do
if grep -qi 'fcitx' "$candidate"; then
cache_path="$candidate"
break
fi
done < <(find squashfs-root -name 'immodules.cache' -type f -print)

if [[ -z "$cache_path" ]]; then
echo "AppImage GTK immodules.cache does not register fcitx5" >&2
exit 1
fi

echo "Verified AppImage fcitx5 GTK module: module=${module_path}, cache=${cache_path}"
)
16 changes: 14 additions & 2 deletions src/apps/desktop/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,20 @@
"linux": {
"deb": {
"depends": [
"libwebkit2gtk-4.1-0",
"libgtk-3-0"
"libc6",
"libcairo2",
"libgcc-s1",
"libgdk-pixbuf-2.0-0",
"libglib2.0-0",
"libjavascriptcoregtk-4.1-0",
"liblept5",
"liblzma5",
"libsoup-3.0-0",
"libtesseract5",
"libxcb1",
"libxdo3",
"tesseract-ocr-eng",
"zlib1g"
],
"files": {
"/usr/share/icons/hicolor/16x16/apps/bitfun-desktop.png": "icons/hicolor/16x16/apps/bitfun-desktop.png",
Expand Down
Loading