Skip to content

[desktop] Add Linux packaging support#387

Draft
maxnoller wants to merge 3 commits intocodex/electron-mac-appfrom
codex/electron-linux-support
Draft

[desktop] Add Linux packaging support#387
maxnoller wants to merge 3 commits intocodex/electron-mac-appfrom
codex/electron-linux-support

Conversation

@maxnoller
Copy link
Copy Markdown
Member

Stacked on top of #316.

What changed

  • Wrap build:icon in desktop/scripts/build-icon.mjs, a Node script that:
    • On darwin, runs the existing swift scripts/generate-mac-icon.swift (same behavior as before).
    • On other platforms, skips icon generation and uses the committed build/icon.png / build/icon.icns assets. Errors loudly if those are missing.
  • Add an electron-builder linux target (AppImage, deb) with build/icon.png and Office category.
  • Add dist:linux and pack:linux scripts in desktop/package.json mirroring the mac counterparts.
  • Add root desktop:linux script mirroring desktop:mac.

Why

PR #316 ships a macOS wrapper, but the Swift icon generator breaks npm run build:desktop on Linux, and there's no electron-builder Linux target wired up. This unblocks building and packaging the desktop app on Linux without changing any mac behavior.

Validation

  • Smoke tested locally on Linux (GNOME/Wayland): npm installnpm --prefix container installnpm run build:desktopnpm --workspace desktop run start launches the native Electron windows with the bundled gateway. Build succeeds without Swift installed.
  • pack:linux / dist:linux not yet exercised on CI.

Not included

  • CI job for Linux artifacts (ubuntu runner invoking dist:linux).
  • README update mentioning Linux install path.
  • Window chrome / menu polish for the Linux native decorations.

Wraps build:icon in a cross-platform node script so the Swift-based mac
icon generator only runs on darwin, and falls back to the committed
build/icon.* assets elsewhere. Adds electron-builder linux target
(AppImage, deb), linux dist/pack scripts in the desktop workspace, and a
root desktop:linux script mirroring desktop:mac.
The .icns bundle is only consumed by the mac electron-builder target.
Requiring it on Linux/Windows blocks the cross-platform build
unnecessarily.
…ty linux category

Non-darwin build:icon now checks icon.png plus icon.icns/background.png/background@2x.png so a cross-platform `dist:mac` from a Linux host fails early in build:icon instead of deep inside appdmg.

linux.category changes from Office to Utility to better reflect the AI/chat/admin UI content.
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.

1 participant