{"slug": "i-made-claude-port-omawrite-to-windows", "title": "I made Claude port omawrite to windows", "summary": "Ozymandias, a developer, ported omawrite, the markdown editor that ships with Omarchy 4 \"Quattro\", to Windows using a 42-line patch, with 30 lines of #ifndef, and no changes to the editor, syntax highlighter, or QML. The port cross-compiles from Fedora's mingw64 toolchain in Docker, produces two single-file .exe wrappers (~26M each), and was tested on Windows 11, with all listed features working. The developer reduced the distribution size from 165M to 26M by stripping debug symbols and using LZMA2 compression.", "body_md": "My name is Ozymandias, King of Kings;Look on my Works, ye Mighty, and despair!Nothing beside remains.\n\nCross-compiles [omawrite](https://github.com/omacom-io/omawrite) — the markdown\neditor that ships with Omarchy 4 \"Quattro\" — for Windows.\n\nNobody asked for this but here it is anyway. Claude wrote the rest of this README and I'm not going to bother removing all the em-dashes and stuff. Enjoy!\n\nIt was easy.\n\nThe entire port is **42 lines**, and 30 of those are `#ifndef`\n\n. Not one line of\nthe editor, the syntax highlighter, or any QML needed to change. It builds in\nabout fifteen seconds.\n\nThe only platform-specific code in the whole application was the\nxdg-desktop-portal block in `src/systemtheme.cpp`\n\nand that already had a\nQt-native fallback sitting directly underneath it, because Qt reports the\nsystem colour scheme via `QStyleHints::colorScheme()`\n\non every platform. So the\n\"port\" is mostly deleting a D-Bus call and letting the code that was already\nthere do its job. `QProcess`\n\n, `QSaveFile`\n\n, `QStandardPaths`\n\n, and the print\npipeline are all portable as written.\n\nYou do not need to build Qt.\n\nEvery guide to cross-compiling Qt for Windows from Linux opens by telling you to\nspend several hours compiling Qt for Windows from Linux. You don't have to.\n**Fedora's mingw SIG ships the entire stack prebuilt** — `mingw64-gcc-c++`\n\n,\n`mingw64-qt6-qtbase`\n\n, `mingw64-qt6-qtdeclarative`\n\n, the lot — so the toolchain is\na `dnf install`\n\nin a container and nothing but your own code ever gets compiled.\n\nThe one gap is that Fedora doesn't package `windeployqt`\n\n, so `deploy.py`\n\nstands\nin for it: walk the PE import table with `objdump -p`\n\n, resolve each name against\nthe sysroot, recurse until the closure is complete. About 60 lines. It works.\n\n``` php\n./build-windows.sh     # -> dist/   (~109M folder)\n./make-sfx.sh          # -> two single-file .exe wrappers (~26M each)\n```\n\nDocker is the only requirement. The first script clones upstream, applies the patch, builds the image, cross-compiles, deploys the runtime, and strips it.\n\n`make-sfx.sh`\n\nproduces two flavours:\n\n`omawrite-portable.exe` |\nUnpacks to `%TEMP%` , runs, cleans up. Installs nothing. |\n`omawrite-setup.exe` |\nUnpacks once to `%LOCALAPPDATA%` , makes shortcuts, launches. |\n\nPortable pays the unpack cost on every launch, which is fine for a look and\ntiresome as a daily editor. Neither passes file arguments through, so\ndouble-clicking a `.md`\n\nwon't route to it; the installed copy is a normal `.exe`\n\nand will.\n\nThere's also `run-wine.sh`\n\n, which drives the build under Xvfb + wine and\nscreenshots it, because I wanted to know whether it worked before I had anywhere\nto run it.\n\nI tested it on a real Windows 11 VM not just wine (but nothing else):\n\n| Launch, DLL + QML closure | works |\n| Open / Save / Ctrl+S | works |\n| Print to PDF | works |\n| Dark / light following the OS | works |\n| Ctrl+N (new window) | works |\n\nPrint is worth a note, because it's the only place omawrite does *real*\nmarkdown rendering — it builds a fresh `QTextDocument`\n\nand calls `setMarkdown()`\n\n,\nso the PDF has actual heading hierarchy. The editor itself never does this. It's\na syntax highlighter over raw text: block markers like `#`\n\nstay visible but\ndimmed, and inline markers like `**`\n\nare hidden by painting them in the\nbackground colour at 1pt with negative letter-spacing so they collapse to zero\nwidth. Headings are bolded, never resized. It's a nice effect and it is not\nWYSIWYG.\n\n165M → 26M.\n\n`strip --strip-unneeded`\n\non everything. Fedora ships those DLLs with full debug symbols;`libstdc++-6.dll`\n\nalone was 25M.- Dropped the four Controls styles omawrite never imports (FluentWinUI3, Imagine, Universal, Fusion).\n- LZMA2 solid-block at\n`-mx=9`\n\n.\n\nThe floor is Qt. `icudata74.dll`\n\nis 30M on its own and only a static rebuild\nwith `-no-icu`\n\nremoves it, which costs hours of compiling to save a folder you\nwere going to ignore anyway. I declined. You should too.\n\n- Built against Qt\n**6.8.3**(what Fedora packages), not upstream's 6.11. Nothing in the source needs the newer API, but that's an assumption, not a proof. - Unsigned, so SmartScreen will object.\n*More info*→*Run anyway*. - Omarchy theme sync is meaningless off Omarchy. You get Windows light/dark and nothing else.\n- Windows blocks the Personalization UI without activation, which makes testing\nthe theme switch annoying.\n`set-light.cmd`\n\n/`set-dark.cmd`\n\nwrite the registry value directly and sidestep it entirely.\n\nomawrite is MIT (© David Heinemeier Hansson). Qt here is LGPLv3, linked dynamically, which is the arrangement LGPL is happy with. The bundled iA Writer Mono is OFL 1.1. If you ever switch this to a static Qt build, that changes and you'll owe relinkable objects to anyone you hand a binary to.\n\nThe patch is guarded so the Linux build is bit-for-bit unaffected — verified, it\nstill links `libQt6DBus`\n\n. If anyone at Omacom wants it, it's right there in\n`windows-port.patch`\n\nand applies clean to `master`\n\n.\n\n*Round the decay of that colossal wreck, boundless and bare, the lone and level\nsands stretch far away.*", "url": "https://wpnews.pro/news/i-made-claude-port-omawrite-to-windows", "canonical_source": "https://github.com/WhiskeyTuesday/omawrite-win", "published_at": "2026-08-17 04:33:23+00:00", "updated_at": "2026-08-17 05:10:37.563320+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Ozymandias", "omawrite", "Omarchy 4 \"Quattro\"", "Fedora", "mingw64", "Qt 6.8.3", "Windows 11", "Docker"], "alternates": {"html": "https://wpnews.pro/news/i-made-claude-port-omawrite-to-windows", "markdown": "https://wpnews.pro/news/i-made-claude-port-omawrite-to-windows.md", "text": "https://wpnews.pro/news/i-made-claude-port-omawrite-to-windows.txt", "jsonld": "https://wpnews.pro/news/i-made-claude-port-omawrite-to-windows.jsonld"}}