Skip to content

Console EXE for the command line, and colors in Windows consoles - #3

Merged
TheAbider merged 3 commits into
masterfrom
release-exes
Oct 28, 2026
Merged

TheAbider merged 3 commits into
masterfrom
release-exes

Conversation

@TheAbider

@TheAbider TheAbider commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

QuickPRS.exe is built as a windowed program. A console neither waits for a windowed program nor shows its output, so QuickPRS.exe validate radio.PRS typed in cmd or PowerShell printed nothing (true since 1.0.0; redirected output still worked). build.py now also builds QuickPRS-cli.exe, a console build with the same modules, for the command line. The README says which to use.

Classic Windows console windows also showed color codes as text (←[1m around every heading, from python -m quickprs too): a Windows console needs the program to turn ANSI handling on. colors.py now turns it on, leaves colors out where it cannot, and honors NO_COLOR.

Also: the version text and the GUI said 50+ commands (there are 63), and the 1.1.0 changelog takes the release date.

Testing

  • tests/test_build_script.py: both builds, same options apart from windowed/console, extra options passed through, output paths reported. Each of five mutations of build.py (including the version on master) fails the test meant for it.
  • TestColorsInWindowsConsoles: seven mutations of colors.py, each caught by its test.
  • Checked in a real console (cmd, reading the console's screen buffer): the windowed build prints nothing; the console build prints --version, create, validate and radio scan output; color codes no longer show as text.

QuickPRS.exe is a windowed program: a console that starts it does not
wait for it or show its output, so `QuickPRS.exe validate radio.PRS`
typed in cmd or PowerShell printed nothing. build.py now also builds
QuickPRS-cli.exe, a console build with the same modules, and passes
extra options (e.g. --workpath) to PyInstaller.

Also: the version text and the GUI said 50+ commands (there are 63),
and the 1.1.0 changelog takes the release date.
A Windows console prints ANSI codes as text unless the program turns
their handling on, so validate and friends showed a left arrow and [1m
around every heading in a classic console window. Turn it on for the
console (Windows 10 and later) and leave colors out where that fails.
NO_COLOR is honored.
@TheAbider TheAbider changed the title Build a console EXE for the command line Console EXE for the command line, and colors in Windows consoles Oct 28, 2026
@TheAbider
TheAbider merged commit 62336b2 into master Oct 28, 2026
4 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