No description
Find a file
2026-04-30 11:54:50 +10:00
.gitignore Fix .gitignore: exclude MightyText-linux/ distribution folder 2026-04-30 11:44:40 +10:00
README.md Add README with usage instructions 2026-04-30 11:54:50 +10:00
repack.py Initial commit 2026-04-30 11:40:48 +10:00

MightyText Linux Repack

A small Python tool that repackages the macOS MightyText DMG into a runnable Linux build (or AppImage).

What it does

  1. Extracts the app.asar from the official macOS DMG.
  2. Extracts the app source and applies small Electron compatibility patches for Linux.
  3. Downloads a Linux Electron runtime and rebuilds any native modules against it.
  4. Assembles a MightyText-linux/ folder with a launcher script and desktop entry.
  5. Optionally builds a self-contained MightyText.AppImage.

Requirements

  • Python 3
  • udisksctl (usually provided by udisks2)
  • Node.js / npm (for asar, node-gyp, and dependency installs)
  • Standard build tools (for compiling native modules)

Usage

Build a local runnable folder

python3 repack.py /path/to/MightyText-*.dmg

This creates a MightyText-linux/ folder next to the DMG.

Build an AppImage as well

python3 repack.py /path/to/MightyText-*.dmg --appimage

This produces both the MightyText-linux/ folder and a MightyText.AppImage.

Build only an AppImage

python3 repack.py /path/to/MightyText-*.dmg --appimage-only

This creates only the MightyText.AppImage and removes the staging folder afterwards.

Custom output directory or Electron version

python3 repack.py /path/to/MightyText-*.dmg \
  --output-dir ./my-build \
  --electron-version 41.3.0

Running the app

After building, you can launch it with:

./MightyText-linux/mightytext

A desktop entry is also installed to ~/.local/share/applications/ so MightyText appears in your app menu.

Patching

The script automatically patches a few macOS-specific Electron APIs so the app runs on Linux (e.g. replacing new-window handlers with setWindowOpenHandler, removing macOS-only title-bar styles, and fixing click-drag dead zones).

Caching

Downloaded files (Electron, extracted DMG contents) are cached in ~/.cache/mightytext-repack/ to speed up subsequent runs.