Skip to content

Add Ubuntu .deb packaging for Basil - #2

Closed
michaelstaake wants to merge 2 commits into
mainfrom
cursor/linux-deb-51d9
Closed

michaelstaake wants to merge 2 commits into
mainfrom
cursor/linux-deb-51d9

Conversation

@michaelstaake

Copy link
Copy Markdown
Owner

Summary

Adds an x64 Debian package for Basil alongside the existing Windows portable and NSIS builds. AppImage, snap, and Flatpak are not targets.

npm run build and npm run build:dir still pass --win. npm run build:deb runs the same version wrapper with --linux deb --x64 and writes release/Basil-<version>-amd64.deb.

The package installs as basil (/usr/bin/basil, files under /opt/Basil). electron-builder installs com.basil.editor.desktop (applications menu, StartupWMClass, and Open With for common text types) plus hicolor icons. Locale packs other than en-US are still stripped in afterPack.

Ubuntu 26.04 dropped transitional library names such as libgtk-3-0, so Depends lists the t64 packages first, with the older name as an alternative. The Electron 43 binary's highest glibc symbol is 2.25, and it links libudev directly, so the package depends on libc6 (>= 2.25) and libudev1. Ubuntu 26.04 ships glibc 2.43.

Linux behavior

  • System theme on Linux uses Electron nativeTheme. The Windows AppsUseLightTheme registry probe still returns immediately off win32.
  • attrib +h on ~/.basil runs only on Windows. The leading dot hides the folder on Linux.
  • The tray icon prefers the packaged PNG on Linux. Windows still asks for the exe icon, then the .ico.
  • Start with boot on Linux writes ~/.config/autostart/com.basil.editor.desktop ($XDG_CONFIG_HOME when set) that launches /opt/Basil/basil --hidden. Electron's login-item API is Windows/macOS only, so the Windows NSIS Run key is unchanged. npm run dev removes that autostart file so a dev Electron binary is not registered. Sessions that ignore XDG autostart, or that have no StatusNotifier tray, will not show a hidden Basil. Ubuntu's desktop provides a tray host; libayatana-appindicator3-1 is recommended.

CI

  • release.yml gains a build-linux job that uploads the .deb when a GitHub Release is published. The Windows job is unchanged.
  • linux-deb.yml builds the .deb on pull requests and workflow_dispatch and uploads it as a workflow artifact. It does not publish a release.

Test plan

  • npm test, npm run typecheck, and npm run lint
  • npm run build:deb on Linux produced release/Basil-26.7.1-amd64.deb
  • Control file: package basil, arch amd64, maintainer Michael Staake, section editors, t64 Depends, libudev1, glibc >= 2.25
  • Desktop entry, hicolor icons, resources/icon.png, and only en-US.pak
  • apt-get install -s ./Basil-26.7.1-amd64.deb resolved on Ubuntu 24.04 (t64 packages already present; it would pull the recommended ayatana tray library)
  • On an Ubuntu 26.04 desktop (a DigitalOcean server image has no display): sudo apt install ./Basil-<version>-amd64.deb, launch Basil from the menu, confirm Open With on a .txt, and toggle Start with boot
Open in Web Open in Cursor 

electron-builder produces Basil-<version>-amd64.deb for x64, with a
desktop entry, MIME types, and hicolor icons. Windows portable and NSIS
builds stay on the existing scripts. Linux skips attrib and the registry
theme probe, uses a PNG tray icon, and writes an XDG autostart file for
start-with-boot.
Electron 43's highest glibc symbol is 2.25, and the binary links libudev
directly. Ubuntu 26.04's glibc 2.43 still satisfies that dependency.
@michaelstaake

Copy link
Copy Markdown
Owner Author

Superseded by #3 / v26.10.1, which includes the Ubuntu .deb packaging on main.

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