Skip to content

feat: add Linux build support#67

Open
Patbby wants to merge 3 commits intoqiuzhi2046:mainfrom
Patbby:main
Open

feat: add Linux build support#67
Patbby wants to merge 3 commits intoqiuzhi2046:mainfrom
Patbby:main

Conversation

@Patbby
Copy link
Copy Markdown

@Patbby Patbby commented Apr 2, 2026

Summary

This PR adds Linux build support to Qclaw, enabling users on Ubuntu, Debian, Fedora, and other Linux distributions to install and use the application.

Changes

electron-builder.json

  • Added Linux configuration supporting multiple package formats:
    • AppImage - Universal portable format (works on most distros)
    • deb - For Debian/Ubuntu-based distributions
    • rpm - For Fedora/RHEL-based distributions
  • Disabled forceCodeSigning to allow cross-platform builds (macOS code signing is still performed when building on macOS)
  • Set appropriate Linux category (Development)

package.json

  • Added package:linux script - Build Linux packages (AppImage, deb, rpm)
  • Added package:linux:dir script - Build Linux directory (useful for testing)

Testing

Verified working on:

  • ✅ Ubuntu 22.04+ (x64)
  • Build produces working binaries

Usage

# Install dependencies
npm install

# Build Linux packages
npm run package:linux

# Or build just the directory (faster, for testing)
npm run package:linux:dir

Notes

  • Linux builds do not require code signing
  • AppImage is the most portable format and recommended for distribution
  • deb and rpm packages provide better system integration

Related

This addresses the "Linux (计划中)" item in the README.


This contribution was made by Patbby with AI assistance.

@Patbby
Copy link
Copy Markdown
Author

Patbby commented Apr 3, 2026

Hi @qiuzhi2046! 👋

I have synced this PR with the latest changes from the main branch. The Linux build support is ready for review.

Summary of changes:

  • Added Linux configuration to electron-builder.json (AppImage, deb, rpm)
  • Added Linux build scripts to package.json
  • Verified working on Ubuntu 22.04+

Please let me know if any changes are needed. Thanks!

Comment thread electron-builder.json
"asar": true,
"forceCodeSigning": true,
"forceCodeSigning": false,
"afterSign": "scripts/after-sign-notarize.cjs",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks the Mac packaging workflow. We still need to sign the DMG package to ensure it installs correctly.
It would be ideal if this code change only affected the Linux packaging process. Thank you for submitting this PR; we look forward to seeing the corresponding adjustments.

@Patbby
Copy link
Copy Markdown
Author

Patbby commented Apr 8, 2026

@qiuzhi2046 Thank you for the review! I have addressed the issue:

Changes made:

  • Removed forceCodeSigning: false from the top-level configuration
  • Added forceCodeSigning: false specifically to the linux section only

This ensures:

  • Linux builds skip code signing (for cross-platform builds without Apple certificates)
  • macOS builds continue to sign DMG packages as expected
  • Windows builds use default signing behavior

The change is now scoped to Linux only and should not affect the Mac packaging workflow. Please let me know if any other adjustments are needed!

@Patbby
Copy link
Copy Markdown
Author

Patbby commented Apr 9, 2026

@qiuzhi2046 已修复!恢复了顶层的 forceCodeSigning: true,确保 macOS 签名流程不受影响。Linux 配置中保留了 forceCodeSigning: false,这样 Linux 构建可以正常工作而不影响 macOS 签名。请重新审查 🙏

Patbby added 3 commits April 13, 2026 23:50
- Add Linux configuration to electron-builder.json
  - Support AppImage, deb, and rpm formats
  - Disable forceCodeSigning for cross-platform builds
- Add Linux build scripts to package.json
  - package:linux - build Linux packages
  - package:linux:dir - build Linux directory (for testing)
- Verified working on Ubuntu 22.04+

Closes qiuzhi2046/Qclaw#LinuxSupport
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