Skip to content

Feat/linux support#548

Open
jcadmin wants to merge 16 commits into
dohooo:mainfrom
jcadmin:feat/linux-support
Open

Feat/linux support#548
jcadmin wants to merge 16 commits into
dohooo:mainfrom
jcadmin:feat/linux-support

Conversation

@jcadmin
Copy link
Copy Markdown

@jcadmin jcadmin commented May 14, 2026

适配了linux,本地运行基本正常

jcadmin and others added 16 commits May 13, 2026 15:54
Remove hardcoded rustc-wrapper = sccache from .cargo/config.toml so dev
machines without sccache (Linux included) don't fail cargo check/build.

CI still wires sccache via RUSTC_WRAPPER env in
.github/actions/setup-rust-tauri/action.yml, so behavior on CI is
unchanged.
setup-rust-tauri previously hardcoded the macOS sccache object dir
(~/Library/Caches/Mozilla.sccache) and a macos-only rust-cache shared
key. To support Linux runners alongside macOS:

- Inject SCCACHE_DIR per OS (Linux: ~/.cache/sccache, otherwise the
  macOS default) so actions/cache can target the right directory.
- Key the actions/cache step on ${{ runner.os }} to avoid cross-OS
  cache pollution.
- Switch rust-cache shared-key to ${{ runner.os }}-tauri-v1 for the
  same reason.

No Windows branch added — out of scope for this fork.
Extend stage-vendor.ts to handle Linux hosts and the
x86_64-unknown-linux-gnu / aarch64-unknown-linux-gnu target triples
in addition to the existing macOS paths.

- detectTarget(): accept linux hosts and the Linux Tauri triples; the
  old darwin-only throw is gone.
- TargetInfo gets a 'platform' field; infoForArch() becomes
  infoForPlatform(platform, arch) with Linux variants of the npm
  sub-packages (@anthropic-ai/claude-code-linux-{x64,arm64},
  @openai/codex-linux-{x64,arm64}).
- gh: Linux releases are gh_${VER}_linux_{amd64,arm64}.tar.gz (tar.gz,
  not zip) — added a Linux branch in stageGhBinary and the matching
  GH_SHA256_LINUX table.
- glab: Linux uses the capitalized 'Linux' slug; added GLAB_SHA256_LINUX
  and a platform-keyed lookup in stageGlabBinary.
- claude-code / codex SHA256 tables now carry an optional 'linux'
  sub-table; cross-arch download paths read it when the target is Linux.
- sha256OfFile() falls back to sha256sum on Linux.
- maybeSignMacBinary() short-circuits on non-darwin hosts.

The Linux SHA256 entries are placeholders ('TODO_LINUX_*_SHA') so the
first staging run on Linux fails at the verify step with a clear
message — the upstream digests have to be filled in once we run a
real build. macOS staging is unaffected.
Tauri 2 deep-merges tauri.<platform>.conf.json into tauri.conf.json at
build time. This file carries the Linux-only bits that don't belong in
the shared macOS config:

- main window uses a visible/decorated title bar (no traffic-light
  overlay, no hiddenTitle).
- bundle.linux.deb.depends pins the runtime libs that ship with the
  dev packages we install in Ubuntu 24.04 (libwebkit2gtk-4.1-0,
  libsoup-3.0-0, libgtk-3-0t64, librsvg2-2,
  libayatana-appindicator3-1).
- AppImage bundles the media framework so video/audio works without
  the host having gstreamer installed.
- bundle.icon points at the existing PNGs (32/128/128@2x/icon); .icns
  is intentionally skipped because Linux doesn't read it.
Phase 2 follow-ups discovered while running tauri build on Linux x86_64:

- Replace TODO_LINUX_*_SHA placeholders with real digests for gh,
  glab, codex, and claude-code (both x64 and arm64). gh/glab digests
  pulled from upstream release artifacts; npm tarballs verified by
  sha256sum on the cached files.

- Fix codexTriple for Linux from x86_64-unknown-linux-gnu to
  x86_64-unknown-linux-musl (and arm64 likewise). The codex npm
  package nests its Linux binaries under vendor/<arch>-linux-musl/
  because upstream ships statically-linked musl builds; the previous
  triple caused stage-vendor to look in the wrong directory and fail
  with 'codex binary missing'.

- Fix glab Linux slug from capital 'Linux' to lowercase 'linux'. The
  GitLab release-API asset list uses lowercase, so the previous URL
  template returned 404 instead of the tarball.
… code

- Linux reads ~/.claude/.credentials.json (no keychain/dbus)
- Tightens cfg(target_os = "macos") on keychain.rs, lib.rs menu IDs,
  and system_commands.rs AppleScript helpers so cargo clippy passes
  cleanly on Linux

This unblocks subsequent Linux work (Task dohooo#6 keychain refactor, Task
dohooo#7/dohooo#8/dohooo#9 platform impls). Functional macOS path is unchanged.
* fix model settings for action helpers

* polish action model setting copy
Adds .github/workflows/publish-linux.yml producing Linux x86_64 .deb +
.AppImage release artifacts for the jcadmin/helmor fork. Mirrors the
upstream macOS publish.yml structure but:

- Runs on ubuntu-22.04 for glibc 2.35 runtime compatibility (24.04
  ships glibc 2.39 which fails on Ubuntu 22.04 desktops).
- Drops every Apple signing/notarization step and APPLE_* secret —
  not relevant for Linux, would only add silent failure paths.
- Adds an apt-get step installing the WebKit/GTK headers Tauri v2
  needs to compile plus runtime deps (libfuse2 for AppImage's
  linuxdeploy, patchelf for the AppImage post-processor, librsvg2 +
  libayatana-appindicator3 for tray rendering).
- Triggers on `v*-linux*` tag pushes so the fork's Linux releases
  don't collide with upstream's plain `v*` macOS tags.
- Final step verifies both bundles are produced and prints sizes /
  dpkg-deb info — there's no .app shape on Linux so the
  verify-bundled-cli.sh helper isn't reusable here.

Does not touch publish.yml; that pipeline keeps producing the macOS
DMGs unchanged so rebases against upstream stay clean.
…ned binaries

linuxdeploy walks every executable in the AppDir and runs ldd /
patchelf on it before squashing into a .AppImage. Helmor's
self-contained binaries break that:

- helmor-sidecar / vendor/claude-code / vendor/codex are produced by
  `bun build --compile`. The runtime+bytecode embedding format upsets
  ldd (exits 1 with no output) and linuxdeploy aborts with
  "Failed to run ldd: exited with code 1".

- vendor/gh / vendor/glab are static Go binaries with no .dynamic
  section, so linuxdeploy's patchelf step aborts with
  "cannot find section .dynamic".

The .deb bundle from the same `tauri build` invocation is unaffected
(Debian packaging doesn't use linuxdeploy), but .AppImage never gets
written.

scripts/bundle-appimage-linux.sh stashes the offending binaries
outside the AppDir, lets linuxdeploy deploy real shared-lib deps for
the well-behaved binaries, restores the stashed binaries, then runs
linuxdeploy-plugin-appimage to squash the AppDir — that step doesn't
re-traverse with ldd, so the self-contained binaries end up in the
final .AppImage untouched. A trap restores stashed entries on failure.

Documents the manual repackage workflow in LINUX_BUILD.md and adds a
TODO comment to publish-linux.yml so we remember to swap the wrapper
in before the workflow goes live (kept out of the active CI path
since the Linux release flow isn't being triggered yet).
Pulls in c1e0fa1 'Fix model settings for action helpers (dohooo#536)'.
0 file conflicts — upstream change touches src/App.tsx, src/features/settings,
src/lib/{settings,commit-button-prompts}; Linux fork only touches sidecar/,
src-tauri/, .github/, LINUX_BUILD.md, README.md, scripts/, tauri.linux.conf.json.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

@jcadmin is attempting to deploy a commit to the Caspian's Team Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants