[PR #2644] ColorTool: Proofread the helper text, update Build.bat #25020

Closed
opened 2026-01-31 09:06:44 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/2644

State: closed
Merged: Yes


Summary of the Pull Request

  1. ColorTool: Proofread and improve the help text supplied to the user
  2. ColorTool: Update build.bat for Visual Studio 2019 and newer versions of MSBuild

References

None

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where the discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Hi.

This PR is exclusively related to the ColorTool.exe.

This is my first PR to the source code of a computer program, so I'm a little afraid I've done something wrong. Visual Studio surreptitiously made a large number of "noise" changes to the source code. I tried to upload only the relevant changes, so as to reduce the diff cross-section. I hope I didn't break anything in the process.

First, my changes to build.bat:

  1. Build.bat now looks for Visual Studio 2019 too.
  2. Build.bat now ensures that the linker places ColorTool.exe into \debug or \release folders, not \debug\net471 or \release\net471.
  3. Build.bat is now smarter in its search. It determines the operating system's CPU architecture before deciding whether to search in "Program Files (x86)" or "Program Files".

Second, my changes to the help text displayed to the user:

  1. The help text now makes it clear that some switches cannot be used with certain others.
  2. Some typos are fixed. e.g. "ct" to "ColorTool" (it took me two hours to figure this one out!) and "schemename" to "scheme name".

I've made a minor change to the order of switch (arg) in Program.cs too, to ensure that the terminating switches are analyzed first. This way, there will be fewer surprises if the user supplies malformed input. But feel free to reject this one.

Unresolved issues

Build.bat is inherently faulty. On a pristine computer, a user cannot just install the latest version of Microsoft Build Tool and run build.bat to build ColorTool. The reason is the absence of certain NuGet packages. Either NuGet or Visual Studio must download the dependencies first.

Validation Steps Performed

Since the changes to the code are minor, I don't know what test I can possibly devise, other than compiling it and seeing that it works.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2644 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request 1. ColorTool: Proofread and improve the help text supplied to the user 2. ColorTool: Update `build.bat` for Visual Studio 2019 and newer versions of MSBuild <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References None <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] ~~Closes #xxx~~ * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. ~~Issue number where the discussion took place: #xxx~~ <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments Hi. This PR is exclusively related to the **`ColorTool.exe`**. This is my first PR to the source code of a computer program, so I'm a little afraid I've done something wrong. Visual Studio surreptitiously made a large number of "noise" changes to the source code. I tried to upload only the relevant changes, so as to reduce the diff cross-section. I hope I didn't break anything in the process. First, my changes to `build.bat`: 1. `Build.bat` now looks for Visual Studio 2019 too. 2. `Build.bat` now ensures that the linker places ColorTool.exe into `\debug` or `\release` folders, not `\debug\net471` or `\release\net471`. 3. `Build.bat` is now smarter in its search. It determines the operating system's CPU architecture before deciding whether to search in "Program Files (x86)" or "Program Files". Second, my changes to the help text displayed to the user: 1. The help text now makes it clear that some switches cannot be used with certain others. 2. Some typos are fixed. e.g. "ct" to "ColorTool" (it took me two hours to figure this one out!) and "schemename" to "scheme name". I've made a minor change to the order of `switch (arg)` in Program.cs too, to ensure that the terminating switches are analyzed first. This way, there will be fewer surprises if the user supplies malformed input. But feel free to reject this one. ### Unresolved issues `Build.bat` is inherently faulty. On a pristine computer, a user cannot just install the latest version of Microsoft Build Tool and run `build.bat` to build ColorTool. The reason is the absence of certain NuGet packages. Either NuGet or Visual Studio must download the dependencies first. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Since the changes to the code are minor, I don't know what test I can possibly devise, other than compiling it and seeing that it works.
claunia added the pull-request label 2026-01-31 09:06:44 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25020