Windows installer and Linux AppImage carry their engines; a runner probe
Both build on packaging/stage.sh. The NSIS installer takes the staged folder and removes only what it laid out; installer.sh drives it. The AppImage gives linuxdeploy the app, the workers and libcef.so. ElyPDF's test window installs the app's menus first, as ElyTree's does. probe.yml reports what each Gitea runner holds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9c9f9ab8f9
commit
c4495beb39
6 files changed
+92
-12
No files matched your search
@@ -0,0 +1,18 @@
|
||||
name: probe
|
||||
on: workflow_dispatch
|
||||
jobs:
|
||||
probe:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-arm64, windows, linux]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Where this runner is
|
||||
shell: bash
|
||||
run: |
|
||||
uname -a; echo "home=$HOME pwd=$PWD"; whoami
|
||||
for d in "$HOME/Documents/GitHub/ElyOffice" "$HOME/Documents/Github/ElyOffice" /c/Users/zhang/Documents/Github/ElyOffice; do
|
||||
[ -d "$d" ] && { echo "clone: $d"; ls "$d/engines" 2>/dev/null | tr '\n' ' '; echo; git -C "$d" log --oneline -1; }
|
||||
done
|
||||
which cargo rustc git python3 cmake ninja makensis 2>/dev/null || true
|
||||
df -h . | tail -1
|
||||
@@ -72,6 +72,12 @@ pub(crate) fn windowed<'a>(
|
||||
ely_ui::i18n::install(cx);
|
||||
});
|
||||
cx.update(crate::keys::bind);
|
||||
cx.update(|cx| {
|
||||
// As document_root does: menus before the window.
|
||||
let menus = crate::keys::menus(cx);
|
||||
let file = &ely_ui::commands::FILE;
|
||||
cx.set_menus(ely_ui::commands::menus(ely_platform::AppId::Pdf, file, true, menus, cx));
|
||||
});
|
||||
let held = match worker {
|
||||
true => Mupdf::with(Worker::spawn().expect("the worker")),
|
||||
false => Mupdf::default(),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds dist/<Name>-<arch>.AppImage. Usage: appimage.sh <slug> | --desktop <slug>
|
||||
# Builds dist/<Name>-<version>-linux-<arch>.AppImage. Usage: appimage.sh [--desktop] <slug>
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
@@ -72,15 +72,31 @@ fetch_tool "$pack" "https://github.com/AppImage/appimagetool/releases/download/1
|
||||
fetch_tool "$deploy" "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20251107-1/linuxdeploy-$arch.AppImage" "$deploy_sha"
|
||||
fetch_tool "$runtime" "https://github.com/AppImage/type2-runtime/releases/download/20251108/runtime-$arch" "$runtime_sha"
|
||||
|
||||
cargo build --manifest-path "$root/Cargo.toml" --release -p "$slug"
|
||||
stage=$root/target/stage/$slug
|
||||
"$root/packaging/stage.sh" "$slug" "$stage"
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
desktop_entry >"$work/$slug.desktop"
|
||||
appdir=$work/$name.AppDir
|
||||
bin=$appdir/usr/bin
|
||||
mkdir -p "$bin"
|
||||
cp -R "$stage"/. "$bin/"
|
||||
deployed=(--executable "$bin/$slug")
|
||||
for helper in ely-lok-worker ely-pdf-worker; do
|
||||
if [ -f "$bin/$helper" ]; then
|
||||
deployed+=(--executable "$bin/$helper")
|
||||
fi
|
||||
done
|
||||
if [ -f "$bin/libcef.so" ]; then
|
||||
deployed+=(--library "$bin/libcef.so")
|
||||
fi
|
||||
|
||||
# linuxdeploy bundles libraries and fails on a missing one.
|
||||
"$deploy" --appimage-extract-and-run --appdir "$work/$name.AppDir" \
|
||||
--executable "$root/target/release/$slug" --desktop-file "$work/$slug.desktop" --icon-file "$icon"
|
||||
"$deploy" --appimage-extract-and-run --appdir "$appdir" "${deployed[@]}" \
|
||||
--desktop-file "$work/$slug.desktop" --icon-file "$icon"
|
||||
|
||||
mkdir -p "$dist"
|
||||
ARCH=$arch "$pack" --appimage-extract-and-run --runtime-file "$runtime" "$work/$name.AppDir" "$dist/$name-$arch.AppImage"
|
||||
echo "$dist/$name-$arch.AppImage"
|
||||
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
|
||||
out=$dist/$name-$version-linux-$arch.AppImage
|
||||
ARCH=$arch "$pack" --appimage-extract-and-run --runtime-file "$runtime" "$appdir" "$out"
|
||||
echo "$out"
|
||||
Regular → Executable
File mode changed.
@@ -1,4 +1,4 @@
|
||||
; Per-user installer; pass APP_NAME, APP_SLUG, VERSION, EXE, ICON, TYPES.
|
||||
; Per-user installer; pass APP_NAME, APP_SLUG, VERSION, STAGE, ICON, TYPES.
|
||||
Unicode true
|
||||
!include "MUI2.nsh"
|
||||
|
||||
@@ -11,8 +11,8 @@ Unicode true
|
||||
!ifndef VERSION
|
||||
!error "pass -DVERSION"
|
||||
!endif
|
||||
!ifndef EXE
|
||||
!error "pass -DEXE"
|
||||
!ifndef STAGE
|
||||
!error "pass -DSTAGE, a folder from packaging/stage.sh"
|
||||
!endif
|
||||
!ifndef ICON
|
||||
!error "pass -DICON"
|
||||
@@ -47,7 +47,7 @@ LangString DeleteData ${LANG_ENGLISH} "Also delete the cache, accounts and local
|
||||
|
||||
Section "Install"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "/oname=${APP_SLUG}.exe" "${EXE}"
|
||||
File /r "${STAGE}\*.*"
|
||||
File "/oname=${APP_SLUG}.ico" "${ICON}"
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
CreateShortcut "$SMPROGRAMS\${APP_NAME}.lnk" "$INSTDIR\${APP_SLUG}.exe" "" "$INSTDIR\${APP_SLUG}.ico"
|
||||
@@ -63,9 +63,20 @@ Section "Install"
|
||||
SectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
Delete "$INSTDIR\${APP_SLUG}.exe"
|
||||
; What stage.sh lays out, and nothing else.
|
||||
RMDir /r "$INSTDIR\libreoffice"
|
||||
RMDir /r "$INSTDIR\tessdata"
|
||||
RMDir /r "$INSTDIR\git"
|
||||
RMDir /r "$INSTDIR\content"
|
||||
RMDir /r "$INSTDIR\locales"
|
||||
RMDir /r "$INSTDIR\licenses"
|
||||
Delete "$INSTDIR\*.exe"
|
||||
Delete "$INSTDIR\*.dll"
|
||||
Delete "$INSTDIR\*.pak"
|
||||
Delete "$INSTDIR\*.bin"
|
||||
Delete "$INSTDIR\*.dat"
|
||||
Delete "$INSTDIR\*.json"
|
||||
Delete "$INSTDIR\${APP_SLUG}.ico"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
RMDir "$INSTDIR"
|
||||
Delete "$SMPROGRAMS\${APP_NAME}.lnk"
|
||||
DeleteRegKey HKCU "Software\Ely Office\${APP_NAME}"
|
||||
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds dist/<Name>-<version>-windows-x86_64-setup.exe. Usage: installer.sh <slug>
|
||||
set -euo pipefail
|
||||
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
slug=${1:?app slug, such as ely-doc}
|
||||
dist=${ELY_DIST:-$root/dist}
|
||||
name=$(awk -F'\t' -v slug="$slug" '$1 == slug { print $2 }' "$root/packaging/apps.tsv")
|
||||
[ -n "$name" ] || {
|
||||
echo "installer.sh: unknown app $slug" >&2
|
||||
exit 1
|
||||
}
|
||||
version=$(awk -F'"' '/^version = / { print $2; exit }' "$root/Cargo.toml")
|
||||
makensis=${MAKENSIS:-"/c/Program Files (x86)/NSIS/makensis.exe"}
|
||||
[ -x "$makensis" ] || {
|
||||
echo "installer.sh: no makensis at $makensis; install NSIS" >&2
|
||||
exit 1
|
||||
}
|
||||
stage=$root/target/stage/$slug
|
||||
"$root/packaging/stage.sh" "$slug" "$stage"
|
||||
types=$root/target/stage/$slug-types.nsh
|
||||
"$root/packaging/windows/types.sh" "$slug" >"$types"
|
||||
mkdir -p "$dist"
|
||||
out=$dist/$name-$version-windows-x86_64-setup.exe
|
||||
"$makensis" -V2 -DAPP_NAME="$name" -DAPP_SLUG="$slug" -DVERSION="$version" \
|
||||
-DSTAGE="$(cygpath -w "$stage")" -DICON="$(cygpath -w "$root/assets/icons/$slug.ico")" \
|
||||
-DTYPES="$(cygpath -w "$types")" -DOUTFILE="$(cygpath -w "$out")" \
|
||||
"$(cygpath -w "$root/packaging/windows/installer.nsi")"
|
||||
echo "$out"
|
||||
Reference in new issue
Block a user