Skip to content

Merging Cmder's development branch to master branch#2898

Draft
DRSDavidSoft wants to merge 288 commits into
masterfrom
development
Draft

Merging Cmder's development branch to master branch#2898
DRSDavidSoft wants to merge 288 commits into
masterfrom
development

Conversation

@DRSDavidSoft

@DRSDavidSoft DRSDavidSoft commented Nov 21, 2023

Copy link
Copy Markdown
Contributor

Summary

This PR merges the current development branch on top of master and brings in the accumulated Cmder work since the last sync.

The biggest themes in this branch are:

  • Windows Terminal support and related launcher/runtime updates
  • A refactor of the build/pack scripts around package profiles
  • Workflow/CI cleanup and consistency fixes
  • A batch of shell, launcher, and configuration improvements
  • Documentation and repo hygiene updates

What’s included

Windows Terminal support

This branch adds and refines support for launching Cmder in Windows Terminal, including:

  • new/default Windows Terminal settings
  • launcher updates in Cmder.bat and launcher/src/CmderLauncher.cpp
  • new helper scripts for Git Bash, Mintty, and profile generation
  • updates to shell integration files like vendor/cmder.sh, vendor/profile.ps1, and vendor/psmodules/Cmder.ps1
  • support files for Windows Terminal defaults in vendor/windows_terminal_default_settings.json

Build and packaging refactor

The build system has been modernized to use package profiles and shared helpers:

  • new scripts/package-profiles.json
  • new helper logic in scripts/utils.ps1
  • updated scripts/build.ps1, scripts/pack.ps1, and scripts/update.ps1
  • refreshed examples and documentation in scripts/README.md

This makes the packaging flow more structured and easier to extend.

Workflow and CI updates

The GitHub Actions workflows were cleaned up and aligned with the new scripts:

  • build workflow updates
  • tests workflow updates
  • CodeQL workflow updates
  • vendor workflow updates
  • summary formatting and artifact handling improvements

Cmder launcher and runtime improvements

This branch also includes a substantial update to the launcher and core runtime behavior:

  • launcher project and resource updates
  • CmderLauncher.cpp changes for the new launch flow
  • improvements to Cmder.bat
  • updates to vendor/init.bat, vendor/lib/lib_base.cmd, and vendor/lib/lib_path.cmd
  • shell startup and environment setup cleanup

Documentation and repo hygiene

A number of documentation and maintenance updates are included as well:

  • README.md and config/Readme.md adjustments
  • CHANGELOG.md updates
  • .gitignore and packignore additions
  • .git-blame-ignore-revs for cleaner blame history

Notes

This branch is mostly a consolidation of the Windows Terminal work, launcher/runtime improvements, and packaging refactors that have been developed on development.

Verification

The updated workflows were run successfully on development, including:

  • Build
  • Tests
  • CodeQL

Files touched

This merge includes changes across:

  • GitHub Actions workflows
  • build and pack scripts
  • launcher source
  • Cmder startup and shell integration scripts
  • Windows Terminal defaults and profile generation
  • documentation and changelog files

Comment thread scripts/build.ps1 Outdated
@daxgames

daxgames commented Jun 15, 2026

Copy link
Copy Markdown
Member

See my last comment in #3090 (comment)

I edited it like 20 times so just want to make sure you see it in its final glory @DRSDavidSoft.

We should continue the discussion here since this pr is actually open.

@daxgames

This comment was marked as resolved.

@DRSDavidSoft

Copy link
Copy Markdown
Contributor Author

@daxgames Working on it right now with Codex; seems like PowerShell 5.1 doesn't like UTF-8 encoded scripts without BOM while PowerShell 7 allows it. Since both my machine and GitHub actions' infrastructure ran on pwsh v7, adding the emojis didn't cause an issue there. So I'm applying the BOM now, which would hopefully fix the problem and allow the CI/CD to keep the emojis. Sorry for the regression! 😅

Nice diff by the way, how was it generated?

Back to the previous discussion we were having soon 🙏🏻

@DRSDavidSoft

Copy link
Copy Markdown
Contributor Author

@daxgames thanks for catching this. I reproduced the Windows PowerShell 5.1 failure locally: the emojis themselves are valid, but scripts/utils.ps1 was UTF-8 without BOM, so Windows PowerShell decoded it as the legacy ANSI codepage and the emoji bytes became mojibake that broke parsing.

I pushed a fix in 8155738 that keeps the emojis by making scripts/utils.ps1 UTF-8 with BOM. While testing the build script locally, I also found/fixed a Windows PowerShell 5.1 issue where scripts/build.ps1 default paths based on $PSScriptRoot evaluated too early under powershell.exe -File.

Could you please share:

  • exactly how you invoked the build script, including shell, command, and working directory
  • any logs/output from the failing run before your local workaround
  • what generated the nice side-by-side diff in the screenshot you posted

Comment posted by ChatGPT Codex on behalf of the user (@DRSDavidSoft)

@daxgames

daxgames commented Jun 19, 2026

Copy link
Copy Markdown
Member

I use delta as my git pager. You can cind it on github. I also use bat as replacemwnt for cat that looks very similar to delta in that it does colored syntax when displaying a file. Both are pretty cool.

As far as the other asks.

I do not have the failed run output handy but if you need it I can get it.

I ran the command ./scripts/build.ps1 -verbose -compile

Shell was Visual Studio 2022 Powershell x64 terminal.

@DRSDavidSoft

Copy link
Copy Markdown
Contributor Author

@daxgames Thanks dax, I hope the build script is now working correctly as before the regression.

Will switch to the ongoing previous discussion from #3090 (comment) soon; as agreed we'll continue discussion from the old PR here after I fully read and review your excellent points.

Will notify soon 🙏🏻

Comment thread vendor/user_init.cmd.template Outdated
@@ -0,0 +1,163 @@
@echo off

:: This file was autogenerated by Cmder init.bat

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex, to make the intent more clear, let's add the word initially like this:

This file was initially autogenerated by Cmder init.bat

Comment thread vendor/user_init.cmd.template Outdated
:: It is yours to edit and will not be touched again by Cmder.
::
:: If you wish to recreate this file simply rename it and Cmder will re-create it the next time it is run
:: or run the followin command from a Cmder shell:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex, please apply typo corrections to "followin" and other possible ones where required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants