Skip to content

Two native windows, and an installer that says something - #15

Merged
MAXAWER merged 1 commit into
mainfrom
feat/native-front-ends
Aug 27, 2026
Merged

Two native windows, and an installer that says something#15
MAXAWER merged 1 commit into
mainfrom
feat/native-front-ends

Conversation

@MAXAWER

@MAXAWER MAXAWER commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Windows users who installed MThread Draw got the Tk window - slowly - and never
saw the WinUI one, because the Tk window was what the installer installed. And
the installer had no interface at all: "gathering required information", then
silence. This fixes both, and gives macOS a native window of its own.

The installer

There is a UI now: welcome, install location, progress, finished, and a ticked
"Start MThread Draw" on the last dialog. It installs the WinUI 3 publish, so
what lands in C:\Program Files\MThread Draw is the native window with Python,
OpenCV and adb folded into it. ARPINSTALLLOCATION is set, so Apps & features
shows the folder instead of a blank line.

Verified on this machine: 649 files installed per-machine, the Start Menu entry
works, the finish dialog's offer starts the program, and InstallUISequence in
the built MSI has WelcomeDlg at 1297 conditioned NOT Installed OR PATCH.

The Tk window is gone

mthread_draw/app.py, tests/test_gui.py, tools/pyinstaller_entry.py, the
gui extra and the customtkinter dependency. The spec file builds only the
engine now. Linux keeps the command line and the library.

macOS

A SwiftUI front end in macos/, frosted glass over NSVisualEffectView with
.behindWindow blending, driving the same JSON engine over a pipe.
tools/build_macos.py hand-assembles the bundle around swift build and can
make the disk image.

It has never been compiled. There is no Mac here; the macOS release job is
the first thing that will build it, which is why the release workflow now runs
on pull requests that touch packaging.

Builds happen outside the checkout

This tree lives in OneDrive on one machine and the sync client holds handles on
files while it uploads them. Writing several thousand of them into a synced
folder failed at a different step every time - deleting last build's output,
zipping a DLL, harvesting for the installer - always with an access denied that
named a file rather than the cause. Everything is staged in temp and only the
finished installer and zip are copied into dist/.

Two things worth knowing about WiX

A double dash is illegal inside an XML comment, so a comment in a .wxs cannot
name a command line flag: WiX rejects the entire file with WIX0104, pointing
at the comment. And the finish dialog starts the program with a plain exe custom
action rather than WixShellExec, which needs a BinaryRef to a binary whose
name only the extension knows.

205 tests pass.

The Windows front end is WinUI 3 and the macOS one is SwiftUI, and the
Tk window that stood in for both is gone. It was the thing the installer
actually installed, so people who installed MThread Draw on Windows got
the old interface, slowly, and never saw the native one at all.

The installer now has a user interface. Without one an MSI shows
"gathering required information", installs, and closes without a word,
which is indistinguishable from failing - and it was read that way.
Welcome, install location, progress, finished, and an offer to start the
program. It carries the WinUI publish, so what gets installed is the
native window with the engine folded into it.

Everything is built in a scratch directory outside the checkout now.
This tree lives in OneDrive on at least one machine and the sync client
holds handles on files while it uploads them: writing several thousand
of them into a synced folder failed at a different step every time,
always with an access denied that named a file rather than the cause.
Copying four finished artifacts in at the end does not collide.

Two notes for whoever touches the .wxs next. A double dash is illegal
inside an XML comment, so prose there cannot name a command line flag -
WiX refuses the whole file with WIX0104. And the finish dialog starts
the program with a plain exe action rather than the utility extension's
shell helper, which needs the name of a binary only the extension knows.

The Swift front end has not been compiled anywhere yet. There is no Mac
here, and the macOS release job is the first thing that will build it.
@MAXAWER
MAXAWER merged commit dd07e32 into main Aug 27, 2026
11 of 13 checks passed
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