terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Guide for build and installation

Open ZgblKylin opened this issue 7 years ago • 262 comments

Tools needed

  1. VS2017 or higher with the following packages ("Workloads" tab in Visual Studio Installer) : 1.1 Desktop Development with C++. 1.2 Universal Windows Platform Development. 1.3 Windows 10 SDK (10.0.18362.0). 1.4 If you're running VS2019, you'll also need to install either v141 Toolset or v142 Toolset.
  2. Git command-line tool.
  3. Nuget.exe (Needed in build step 3, can be found in Terminal/dep/nuget).

Build Steps

  1. git clone this repository, not download .zip file.
  2. Run git submodule update --init --recursive in Terminal folder.
  3. Run nuget restore OpenConsole.sln (This step can be skipped, then Visual Studio should warn you that there are packages to restore - then restore).
  4. Open OpenConsole.sln with Visual Studio.
  5. Build whole solution(F7) with your platform(x86/x64) and release mode, you may need to fix some build errors: 5.1 C2220 and code page warnings: All errors and warnings are encoding error of unicode characters, a helpful workaround is to modify corresponding file encoding to UTF-8 BOM (Notepad++ is recommended). 5.2 Errors in src/tools/vtpipeterm/main.cpp: In addtion, you should also add u8 prefix before string literals with unicode characters, e.g. line 395, 398, 401 and 404.

Workaround

Try build with PR 458 or PR 549, both of them can build successfully.

Installation

Unfortunately, the generated .appx doesn't have any certificates, so it cannot be installed via double-click or powershell, the only way to install is to deploy the solution in VS.

  1. Open Windows Settings - Upgrade & Security - For Developers, switch App sources to Developer mode.
  2. Right click on CascadiaPackage project (under Solution/Terminal), select Deploy Solution to install, then you'll find Windows Terminal (Preview) in start menu.

Settings

After open the terminal, you can't see any menu buttons.

Just press Ctrl + T to open a new tab, and you'll see a drop-down button in the tab bar.

Click it and select Settings, then you can modify the configuration via opened profiles.json.

Add WSL

  1. Create a new session in profiles, with content copied from profiles/cmd.
  2. Give it a new guid.
  3. Give it a new name, such as WSL.
  4. Specify its commandline to wsl.exe.

Then you'll find WSL in the drop-down menu of tab bar.

Here're sample codes:

{
    "guid": "{09dc5eef-6840-4050-ae69-21e55e6a2e62}",
    "name": "WSL",
    "colorscheme": "Campbell",
    "historySize": 9001,
    "snapOnInput": true,
    "cursorColor": "#FFFFFF",
    "cursorShape": "bar",
    "commandline": "wsl.exe",
    "fontFace": "Consolas",
    "fontSize": 12,
    "acrylicOpacity": 0.75,
    "useAcrylic": true,
    "closeOnExit": false,
    "padding": "0, 0, 0, 0"
}

ZgblKylin avatar May 07 '19 10:05 ZgblKylin

Thank you.

kev-landry avatar May 07 '19 11:05 kev-landry

thanks!

yanke1311 avatar May 07 '19 11:05 yanke1311

Thanks a bunch!

ShrinkWrapper avatar May 07 '19 11:05 ShrinkWrapper

This information should be included in the Building the Code section of the README file.

ecampidoglio avatar May 07 '19 11:05 ecampidoglio

Windows 1903 is required to deploy Windows Terminal https://github.com/microsoft/Terminal/issues/437#issuecomment-489899822

pavelovcharov avatar May 07 '19 12:05 pavelovcharov

Can I build it with VS 2019?

AregevDev avatar May 07 '19 12:05 AregevDev

Can I build it with VS 2019?

I've been trying for a few hours with no success. I have given up and am currently installing VS 2017

NikolausWeiss avatar May 07 '19 12:05 NikolausWeiss

Same as you

AregevDev avatar May 07 '19 12:05 AregevDev

Can I build it with VS 2019?

I'm afraid you can't, I have got 23 FAILED to build with VS2019...

HowBoring avatar May 07 '19 12:05 HowBoring

Thanks! I am installing VS2017, can't wait to try the new Terminal out!

AregevDev avatar May 07 '19 12:05 AregevDev

hello. can I download the binary file of you build ? I don`t want to build it . no environment . 😆

clearcodecn avatar May 07 '19 12:05 clearcodecn

Can I build it with VS 2019?

I've been trying for a few hours with no success. I have given up and am currently installing VS 2017

Me, neither. Better try on VS2017 directly. \cry

DarryNobi avatar May 07 '19 12:05 DarryNobi

There is a pull request for a branch that fixes the VS 2019 errors: https://github.com/microsoft/Terminal/pull/449

NikolausWeiss avatar May 07 '19 12:05 NikolausWeiss

Can I build it with VS 2019?

Yes, with hours of patience, and fixing many bugs.

Berrysoft avatar May 07 '19 12:05 Berrysoft

There is a pull request for a branch that fixes the VS 2019 errors: #449

That single line of code worked for me in VS2019. I'm now installing insider build to get to 1903 or above.

noobhacker avatar May 07 '19 13:05 noobhacker

what dos the 'solution' mean exactly in step5, i'm new here

ob1231 avatar May 07 '19 13:05 ob1231

So, still, you need an insider build, right?

pulimento avatar May 07 '19 13:05 pulimento

what dos the 'solution' mean exactly in step5, i'm new here

The solution (top one) in the Solution Explorer.

Berrysoft avatar May 07 '19 13:05 Berrysoft

what dos the 'solution' mean exactly in step5, i'm new here

image

noobhacker avatar May 07 '19 13:05 noobhacker

I successfully built it, but wanted to ask, are all the features shown in the video implemented? I can only see the new UWP based console

AregevDev avatar May 07 '19 13:05 AregevDev