From 398ca5590575124493539b7c93893301e47369d6 Mon Sep 17 00:00:00 2001 From: Gowtham Date: Sun, 16 Aug 2026 12:00:55 +0530 Subject: [PATCH 1/2] release: bump version to v1.0.4 --- core/version.py | 2 +- setup.py | 2 +- version_info.txt | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/version.py b/core/version.py index 998e45d..9893231 100644 --- a/core/version.py +++ b/core/version.py @@ -4,4 +4,4 @@ ``setup.py`` when bumping. """ -APP_VERSION = "1.0.3" \ No newline at end of file +APP_VERSION = "1.0.4" \ No newline at end of file diff --git a/setup.py b/setup.py index 40faf5f..077ced5 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="flint-native", - version="1.0.3", + version="1.0.4", description="Optional native writer extension for Flint", ext_modules=[ Extension( diff --git a/version_info.txt b/version_info.txt index 1edd127..2f4cf46 100644 --- a/version_info.txt +++ b/version_info.txt @@ -1,7 +1,7 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(1, 0, 3, 0), - prodvers=(1, 0, 3, 0), + filevers=(1, 0, 4, 0), + prodvers=(1, 0, 4, 0), mask=0x3F, flags=0x0, OS=0x40004, @@ -17,11 +17,11 @@ VSVersionInfo( [ StringStruct("CompanyName", "Flint"), StringStruct("FileDescription", "Flint — bootable USB writer"), - StringStruct("FileVersion", "1.0.3"), + StringStruct("FileVersion", "1.0.4"), StringStruct("InternalName", "flint"), StringStruct("OriginalFilename", "flint.exe"), StringStruct("ProductName", "Flint"), - StringStruct("ProductVersion", "1.0.3"), + StringStruct("ProductVersion", "1.0.4"), ], ) ] From ccb8efd136dafdbcf76412379cb691bdd770983e Mon Sep 17 00:00:00 2001 From: Gowtham Date: Sun, 16 Aug 2026 12:12:48 +0530 Subject: [PATCH 2/2] fix(main): detour to the CLI on any argument so unknown commands can't open a window The packaged exe is launched with sys.argv for CLI invocations; filtering only known top-level commands meant 'flint frobnicate' fell through to the GUI and hung scripts. A bare launch with no arguments is the GUI; any argument at all goes headless, where the cli module explains unknown arguments with usage text and exit code 3. --- main.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/main.py b/main.py index c4f97ca..a61287a 100644 --- a/main.py +++ b/main.py @@ -197,17 +197,12 @@ def main() -> int: _log(f"start: pid={os.getpid()} argv={sys.argv}") _install_crash_logging() args = sys.argv[1:] - if "--cli" in args or ( - args - and ( - args[0] in cli.TOP_LEVEL_COMMANDS - or args[0] in ("--version", "--help", "-h") - ) - ): - # Headless mode: no elevation prompt loop, no single-instance lock, - # no window. Exit codes and machine-readable output come from the - # cli module (modern top-level commands, the --cli compat alias and - # the global --version/--help flags all detour here). + if args: + # Any argument detours to headless mode: no elevation prompt loop, + # no single-instance lock, no window. Exit codes and machine-readable + # output come from the cli module (which also explains unknown args, + # so 'flint frobnicate' can never silently open a window). A bare + # launch with no arguments starts the GUI. return cli.main() _ensure_admin() app = QApplication(sys.argv)