Fcitx 5 integration for the WeType Android ARM64 input engine, running through QEMU user mode. The AppImage ships only this project's code plus redistributable runtime pieces; the official WeType APK is downloaded from Tencent at install time, verified, and patched locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1009 B
Bash
Executable File
28 lines
1009 B
Bash
Executable File
#!/bin/bash
|
|
# e2_img.sh — AppImage packaging with a pinned appimagetool release.
|
|
set -eo pipefail
|
|
BASE="$(cd "$(dirname "$0")/.." && pwd)"
|
|
cd "$BASE"
|
|
TOOL="${APPIMAGETOOL:-$BASE/.deps/tools/appimagetool-1.9.1-x86_64.AppImage}"
|
|
if [ ! -x "$TOOL" ]; then
|
|
echo "== 下载 appimagetool 1.9.1 =="
|
|
mkdir -p "$(dirname "$TOOL")"
|
|
curl -fL --retry 3 -o "$TOOL" \
|
|
https://github.com/AppImage/appimagetool/releases/download/1.9.1/appimagetool-x86_64.AppImage
|
|
chmod +x "$TOOL"
|
|
fi
|
|
bash scripts/e1_appdir.sh
|
|
cp AppDir/usr/share/applications/wetype-ime.desktop AppDir/
|
|
ARCH="${ARCH:-$(uname -m)}"
|
|
OUT="WeTypeIME-Engine-${ARCH}.AppImage"
|
|
rm -f WeTypeIME-Engine-*.AppImage
|
|
TOOL_ARGS=(--comp zstd)
|
|
if [ -n "${APPIMAGE_RUNTIME:-}" ]; then
|
|
TOOL_ARGS+=(--runtime-file "$APPIMAGE_RUNTIME")
|
|
fi
|
|
ARCH="$ARCH" "$TOOL" "${TOOL_ARGS[@]}" AppDir "$OUT" 2>&1 | tail -3
|
|
ls -la "$OUT" | awk '{print $5, $9}'
|
|
if [ -f WeTypeIME-Engine-x86_64.AppImage ]; then
|
|
ls -la WeTypeIME-Engine-x86_64.AppImage | awk '{print $5, $9}'
|
|
fi
|