For the last few days Marcus has been stressed. Because you see I've been battling and stressing and obsessing about 2 Microsoft issues.
a) 2019 Microsoft Windows Server
b) Upcoming Improvements to Microsoft Windows
A rewritten CMD.EXE terminal including tabs
(including a Linux kernel inside Windows this year)
Right now I'll talk about the new Windows Terminal ...
Let's compile that terminal
This was going to be an easy to follow guide on how to Compile the new Windows Terminal .exe Instead you will have to accept the substitute:
A rant about trying to compile the Windows Terminal :-)
I can't give you an exact guide, as the steps were not straightforward and after a while I was just totally guessing. I have to admit this as my familiarity with Visual Studio is poor and its differences over time and between 2017 and 2019 and paid and free iterations even less. Here are the rough steps that I made
This is the reference from which I worked
02 Install Visual Studio 2019 Community Edition
04 Install all the components
(Hint: You better have a good Internet connection)
05 Install Windows Software Development Kit
06 Use the Clone option in VS2019 to get files from Github
07 Double click on the OpenConsole.sln file from within file manager
08 Retarget Projects
Not as the graphic shows. Use the pull down so there is no change! to either SDK or Platform.
09 Select x64 and Release and Cascadia
10 Build then Deploy Solution
Pressing Windows key to get the popup menu reveals two top entries one is the new tab-able (control T) Terminal and the second is the OldFashioned one.
Here is the new working Terminal. Now that was easy ... not.
What Did I learn
- It took a ****** long time
- I rebuilt the environment and filetree multiple times
After each failure I deleted all files and went back to the import github step. And tried different options. It was like GroundHog day
- I had to phone a friend (thanks Richard!!)
- Lots of time for coffee since the compilation steps took **** ages
- Popquiz - How many and how large
So the new WindowsTerminal.exe has a baseline size under 2MB but there are a few catches and this is the point of the article
After compilation there were a staggering 16,000 plus files occupying over 14GB of disk space.
All to compile up the command line :-(
This is the toplevel tree structure.
The compilation on my 16GB, 8 Core Virtual machine, with NVMe disk took literally more than 5 minutes. In the process literally hundreds of compilation steps were executed.
It was a jaw dropping exercise in unbelievable complexity. I was so astonished that anything actually worked eventually, and that it seems thousands of files were needed to make a command line with tabs. I am basically speechless.
All in All
Windows Development is not for the faint hearted. Perhaps I am getting old, but to me: inefficient, verbose and complicated.
Terminal on Github
Terminal Build Notes and Woes
Microsoft just sent me this video to persuade me how wonderful the new Terminal is. I do see how maintaining backward compatibility is both important and also impossibly difficult. Please check out the above video for the backstory.