Skip to content

Conversation

@DRSDavidSoft
Copy link
Contributor

No description provided.

@DRSDavidSoft DRSDavidSoft requested a review from Copilot July 2, 2025 02:19
@DRSDavidSoft DRSDavidSoft added this to the 1.4 milestone Jul 2, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Add support for Windows Terminal alongside ConEmu and enable packing/building specific terminals via a new -terminal option. Updates include:

  • Introduce -terminal parameter in pack.ps1 and build.ps1 to select which emulator artifacts to include.
  • Extend the C++ launcher (CmderLauncher.cpp) to detect and launch Windows Terminal, migrate config logic, and rename conEmu references to generic terminal.
  • Update CI workflow to produce and upload separate artifacts for each terminal type and adjust documentation and packaging rules.

Reviewed Changes

Copilot reviewed 11 out of 30 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/pack.ps1 Added $terminal param and conditional target sets; duplicate branch.
scripts/build.ps1 Added $terminal param, Windows Terminal backup/restore logic; used return inside loop.
packignore Include new config\user_* pattern.
launcher/src/strings.rc2 Updated switch help to include Windows Terminal flags.
launcher/src/resource.rc Adjusted #endif comment label.
launcher/src/CmderLauncher.cpp Renamed variables and added Windows Terminal detection/logic; scattered typos and grouping bug.
launcher/CmderLauncher.vcxproj Added icon image entry to project.
README.md Updated usage docs to use -- instead of /X.
Cmder.bat Dispatch to ConEmu or Windows Terminal based on existence.
CHANGELOG.md Added unreleased section documenting the new Windows Terminal support.
.github/workflows/build.yml Updated build steps to pass -terminal and upload new artifacts.

Comment on lines +59 to +63
} elseif ($terminal -eq "windows-terminal") {
$targets = @{
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`"";
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`"";
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`"";
Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

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

This branch duplicates the previous elseif for windows-terminal. It looks like one should target conemu-maximus5 instead of repeating windows-terminal.

Suggested change
} elseif ($terminal -eq "windows-terminal") {
$targets = @{
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`"";
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`"";
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`"";
} elseif ($terminal -eq "conemu-maximus5") {
$targets = @{
"cmder_conemu.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`"";
"cmder_conemu.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`"";
"cmder_conemu_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`"";

Copilot uses AI. Check for mistakes.
}
}
else if (_wcsicmp(L"/task", szArgList[i]) == 0)
else if (_wcsicmp(L"/task", szArgList[i]) == 0 || PathFileExists(windowsTerminalDir) || PathFileExists(conEmuDir))
Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

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

The OR conditions will match whenever a terminal exists, not just on the /task flag. You likely want to group the checks as (_wcsicmp(...) == 0) && (PathFileExists(...) || ...) to avoid unintended matches.

Suggested change
else if (_wcsicmp(L"/task", szArgList[i]) == 0 || PathFileExists(windowsTerminalDir) || PathFileExists(conEmuDir))
else if (_wcsicmp(L"/task", szArgList[i]) == 0 && (PathFileExists(windowsTerminalDir) || PathFileExists(conEmuDir)))

Copilot uses AI. Check for mistakes.
@DRSDavidSoft DRSDavidSoft requested review from a team July 2, 2025 02:24
@DRSDavidSoft DRSDavidSoft marked this pull request as draft July 2, 2025 02:24
@DRSDavidSoft
Copy link
Contributor Author

@copilot Hmm, I appreciate the detailed review, I'll address the issues raised in a local branch.

@DRSDavidSoft DRSDavidSoft removed request for a team July 2, 2025 02:33
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.

4 participants