Skip to main content
This guide will walk you through building OpenComic from source on Windows, macOS, and Linux.

Requirements

Before building OpenComic, ensure you have the following installed:

Git

For cloning the repository

Node.js

Version 14 or higher recommended

npm

Comes with Node.js

Development setup

Clone and install

1

Clone the repository

git clone https://github.com/ollm/OpenComic.git
cd OpenComic
2

Install dependencies

npm install
This will install all required packages and run post-install scripts.
3

Start development mode

npm start
This launches OpenComic in development mode with the Electron framework.
The first run may take longer as it compiles TypeScript files and generates necessary resources.

Development scripts

ScriptPurpose
npm startLaunch OpenComic in development mode
npm run watchWatch for TypeScript changes and recompile
npm testRun tests and ESLint
npm run eslintRun ESLint on source files

Building for production

Update from main branch

Before building, ensure you have the latest code:
npm pull origin master
npm install

Build commands

Use the following commands to build for specific platforms:
# Standard installer
npm run build-nsis

# Portable version
npm run build-portable

# Folder portable version
npm run build-folder-portable

# Windows ARM64
npm run build-win-arm

# All Windows builds
npm run build-win

Build output

All build artifacts are created in the dist/ directory:
OpenComic/
├── dist/
│   ├── OpenComic.Setup.1.6.6.exe          # Windows installer
│   ├── OpenComic-1.6.6.dmg                # macOS disk image
│   ├── opencomic_1.6.6_amd64.deb          # Debian package
│   ├── opencomic-1.6.6.x86_64.rpm         # RPM package
│   ├── OpenComic-1.6.6.AppImage           # Linux AppImage
│   └── ...

Troubleshooting build issues

This error typically occurs with native dependencies. To fix:
cd ./build/node-zstd-native-dependencies
npm install --force
cd ../..
npm install
Then retry your build command.
Ensure you have build tools installed:Windows:
npm install --global windows-build-tools
macOS:
xcode-select --install
Linux:
# Debian/Ubuntu
sudo apt-get install build-essential

# Fedora/RHEL
sudo dnf install @development-tools

# Arch
sudo pacman -S base-devel
If you encounter errors with Sharp or other native modules:
npm rebuild
# or
npm install --force
Clear Electron cache and reinstall:
rm -rf node_modules
npm cache clean --force
npm install
Ensure TypeScript is compiled before building:
npm run prebuild

Build customization

Electron Builder configuration

Build settings are configured in package.json under the build section:
{
  "build": {
    "appId": "org.opencomic.app",
    "productName": "OpenComic",
    "asar": true,
    ...
  }
}

Changing app metadata

Edit package.json to change:
  • Application name: name and productName
  • Version: version
  • Description: description
  • Author: author
  • License: license

Custom build scripts

You can create custom build scripts by adding them to the scripts section in package.json:
{
  "scripts": {
    "build-custom": "npm run prebuild && electron-builder --linux deb rpm"
  }
}

Platform-specific notes

  • Portable builds: Create self-contained executables that don’t require installation
  • Folder portable: Includes app data folder alongside executable for true portability
  • Code signing: Required for production releases to avoid Windows SmartScreen warnings
  • Notarization: Required for distribution outside the Mac App Store
  • Universal builds: Use --universal flag to create Intel + Apple Silicon builds
  • Certificates: Requires Apple Developer account and certificates
  • Configure notarization in ./build/notarize.env
  • Snap: Requires snapcraft installed: sudo snap install snapcraft --classic
  • Flatpak: May require additional flatpak-builder dependencies
  • AppImage: Most portable option, works on most distributions
  • Repository builds: Available on AUR for Arch Linux users

Contributing builds

If you’re building OpenComic for contribution:
  1. Fork the repository on GitHub
  2. Create a feature branch for your changes
  3. Test your build thoroughly
  4. Submit a pull request with detailed description
See CONTRIBUTING.md for more details.

Continuous Integration

OpenComic uses GitHub Actions for automated builds. See .github/workflows/ for CI configuration.

Additional resources

Build docs developers (and LLMs) love