terminal/tools
Michael Ratanapintha 2f88c46350 Allow tools\razzle & nuget restore to work with NuGet 5 and later (#1046)
Since version 5.0.2, NuGet has used the PATH environment variable
to find MSBuild.exe before looking in other file paths.
See NuGet change
21f2b07f2c
(https://github.com/NuGet/NuGet.Client/pull/2687 ).

Unfortunately, in PR
https://github.com/microsoft/terminal/pull/606 ,
`tools\razzle.cmd` was changed to add the MSBuild.exe folder path
in _quotes_ to the PATH environment variable.
Windows itself is fine with this (you can type `msbuild` and
MSBuild runs), but some tools are not, including NuGet itself,
so you would get errors like this:

```
D:\GitHub\metathinker\console> where nuget
C:\ProgramData\chocolatey\bin\nuget.exe
D:\GitHub\metathinker\console\dep\nuget\nuget.exe

D:\GitHub\metathinker\console> nuget restore OpenConsole.sln
Illegal characters in path.
```

`razzle.cmd` runs NuGet itself, but does so before adding
the MSBuild folder to the PATH, so it was not affected by this
problem.

This change fixes the issue by dequotifying the PATH,
so that if you already had a newer version of NuGet on your PATH
before running `tools\razzle.cmd`, that version will continue
to work should you need to run `nuget restore` again
(such as after a `git clean -dx`).
2019-05-29 10:02:48 -07:00
..
bcz.cmd Update razzle to use vswhere (#13) (#606) 2019-05-10 10:40:25 -07:00
bz.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
ConsoleTypes.natvis Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
echokey.cmd make copying of files windows localization agnostic (#741) 2019-05-21 16:25:54 +00:00
openbash.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
opencon.cmd make copying of files windows localization agnostic (#741) 2019-05-21 16:25:54 +00:00
OpenConsole.psm1 Switch to v5 UUIDs as profile GUIDs for the default profiles (#913) 2019-05-21 13:29:16 -07:00
openps.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
openvt.cmd make copying of files windows localization agnostic (#741) 2019-05-21 16:25:54 +00:00
razzle.cmd Allow tools\razzle & nuget restore to work with NuGet 5 and later (#1046) 2019-05-29 10:02:48 -07:00
README.md Update razzle to use vswhere (#13) (#606) 2019-05-10 10:40:25 -07:00
runft.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
runuia.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
runut.cmd Switch to v5 UUIDs as profile GUIDs for the default profiles (#913) 2019-05-21 13:29:16 -07:00
testcon.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
tests.xml Switch to v5 UUIDs as profile GUIDs for the default profiles (#913) 2019-05-21 13:29:16 -07:00
vso_ut.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
WindbgExtension.js Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00

OpenConsole Tools

These are a collection of tools and scripts to make your life building the OpenConsole project easier. Many of them are designed to be functional clones of tools that we used to use when developing inside the Windows build system.

Razzle

This is a script that quickly sets up your environment variables so that these tools can run easily. It's named after another script used by Windows developers to similar effect.

  • It adds msbuild to your path.
  • It adds the tools directory to your path as well, so all these scripts are easily available.
  • It executes \tools\.razzlerc.cmd to add any other personal configuration to your environment as well, or creates one if it doesn't exist.
  • It sets up the default build configuration to be 'Debug'. If you'd like to manually specify a build configuration, pass the parameter dbg for Debug, and rel for Release.

bcz

bcz can quick be used to clean and build the project. By default, it builds the %DEFAULT_CONFIGURATION% configuration, which is Debug if you use razzle.cmd.

  • bcz dbg can be used to manually build the Debug configuration.
  • bcz rel can be used to manually build the Release configuration.

opencon (and openbash, openps)

opencon can be used to launch the last built OpenConsole binary. If given an argument, it will try and run that program in the launched window. Otherwise it will default to cmd.exe.

openbash is similar, it immediately launches bash.exe (the Windows Subsystem for Linux entrypoint) in your ~ directory.

Likewise, openps launches powershell.

testcon, runut, runft

runut will automatically run all of the unit tests through TAEF. runft will run the feature tests, and testcon runs all of them. They'll pass any arguments through to TAEF, so you can more finely control the testing.

A recommended workflow is the following command:

bcz dbg && runut /name:*<name of test>*

Where <name of test> is the name of the test testing the relevant feature area you're working on. For example, if I was working on the VT Mouse input support, I would use MouseInputTest as that string, to isolate the mouse input tests. If you'd like to run all the tests, just ignore the /name param: bcz dbg && runut

To make sure your code is ready for a pull request, run the build, then launch the built console, then run the tests in it. The built console will inherit all of the razzle environment, so you can immediately start using the macros:

  1. bcz
  2. opencon
  3. testcon (in the new console window)

If they all come out green, then you're ready for a pull request!