Skip to content

Launcher refactor - #3148

Closed
daxgames wants to merge 12 commits into
cmderdev:mainfrom
daxgames:launcher-refactor
Closed

daxgames wants to merge 12 commits into
cmderdev:mainfrom
daxgames:launcher-refactor

Conversation

@daxgames

@daxgames daxgames commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Refactor launcher terminal selection around an explicit terminal model that detects the bundled executable, not only its directory.
  • Keep Windows Terminal as the automatic preference, preserve native ConEmu executable selection, and fall back to the console when neither bundled emulator is available.
  • Add first-argument terminal selectors matching Cmder.bat:
    • Cmder.exe conemu ...
    • Cmder.exe windows-terminal ...
      The launcher reports a clear error if the requested bundled terminal is unavailable.
  • Make ConEmu /c configuration selection deterministic: machine-specific settings, then user settings, then the bundled fallback.
  • Consolidate legacy configuration migration into a Unicode-safe, non-overwriting helper and close process handles after a successful launch.
  • Report a specific error when ConEmu-only /title, /icon, /single, or /m options are used while Windows Terminal is selected. Raw /x and -- arguments remain pass-through arguments for the selected terminal.

Compatibility

  • Automatic behavior is unchanged when only one bundled terminal is available.
  • Windows Terminal uses shared installation settings for /c roots because it cannot select a settings file per launch.
  • ConEmu-specific options remain supported when ConEmu is selected, either automatically or through the conemu selector.

Tests

  • Extended native launcher regression tests for executable-based detection, x86/x64/ARM64 ConEmu selection, Windows Terminal priority, /c machine-specific ConEmu settings, legacy configuration migration, explicit terminal selectors, unavailable requested terminals, and unsupported-option diagnostics.
  • Run Tests passed on the PR, including Win32 and x64 launcher regression tests.

* upstream/main: (23 commits)
  docs: keep status prose undated and compare branch tips
  docs: keep unfinished work active regardless of age
  fix(legacy): derive product versions only from release tags
  Preserve native 32-bit Git layout selection
  Fix code review finding in vendor name end anchoring
  Fix Git for Windows UCRT64 startup paths
  fix: address vendor release badge review findings
  Report successful regression checks to the Actions shell
  Fix build helper argument handling and vendor name validation
  Fix code review finding: document shared startup cache precedence
  Complete PR head-ref environment handling across all workflows
  ci: read the PR head ref from the environment instead of interpolating it into PowerShell
  Fix code review finding: restore native ConEmu architecture selection
  Fix code review finding: initialize shared terminal settings on first user-root launch
  Prepare 2.0 RC package names and preserve upgrade paths
  fix: restore TCC and TCCLE shell defaults
  Fix code review finding: reject malformed launcher options safely
  Use main for current work and retire automatic development sync
  Fix code review finding: bound launcher path copies and API capacities
  Fix code review guidance and finish pending launcher help requests
  ...

# Conflicts:
#	launcher/src/CmderLauncher.cpp
@daxgames

Copy link
Copy Markdown
Member Author

The command-line construction issue from #3117 is now included here in 167bc19, with regression coverage in d46db30. The launcher no longer builds its command line by overlapping swprintf_s input and output buffers; it preserves the existing argument order and quoting while using dynamically sized construction and a mutable buffer for CreateProcess.

@daxgames daxgames closed this Nov 16, 2026
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