Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How Do I Build it to Begin With? #461

Closed
CassettiStafford opened this issue May 7, 2019 · 53 comments
Closed

How Do I Build it to Begin With? #461

CassettiStafford opened this issue May 7, 2019 · 53 comments
Labels
Issue-Question For questions or discussion Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@CassettiStafford
Copy link

Okay I am very new to this whole building repository thing and I just really need to be told how to build the project. I have no clue where to start and I just need guidance.

@AnderssonPeter
Copy link

AnderssonPeter commented May 7, 2019

The Readme has a section for that
https://github.com/microsoft/Terminal/blob/master/README.md#building-the-code

@martinmine
Copy link

There are some instructions on how to get started on the repo readme file, but some prerequisites (which version of Windows, Visual Studio, what do I need enabled of SDKs and whatnot) would be nice.

@will
Copy link

will commented May 7, 2019

I'm in a somewhat similar situation. The git submodules and nuget was all fine, but I cant figure out how to build it fully correctly. I've been poking around some of the other issues and pull requests to piece together information.

I got msbuild openconsole.sln /p:Platform=x64 to successfully build, no errors and a few warnings. However the openterm tool doesn't work

λ  .\tools\openterm.cmd
Could not locate the CascadiaWin32.exe in \bin\\. Double check that it has been built and try again.

With the formatting of the path in the error message, it looks like several variables aren't set. I don’t how they're supposed to be set.

I've also tried building through visual studio and figured out how to set it as x86 there also. That one I did in release mode.

Looking at what the openterm does, it eventually runs CascadiaWin32.exe, however that doesn't appear to exist

    Directory: C:\code\Terminal\bin\x64\release


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----         5/6/2019   9:34 PM          34304 buffersize.exe
-a----         5/6/2019   9:34 PM          51200 CloseTest.exe
-a----         5/6/2019   9:34 PM          36352 ConEchoKey.exe
-a----         5/6/2019   9:36 PM          60416 ConTerm.Parser.FuzzWrapper.exe
-a----         5/6/2019   9:36 PM          32256 FontList.exe
-a----         5/6/2019   9:34 PM          10240 Nihilist.exe
-a----         5/6/2019   9:45 PM         915968 OpenConsole.exe
-a----         5/6/2019   9:36 PM          10240 Scratch.exe
-a----         8/9/2018   1:14 AM         351744 TE.exe
-a----         8/9/2018   1:14 AM          22528 TE.ProcessHost.exe
-a----         8/9/2018   1:14 AM          22528 TE.ProcessHost.UAP.exe
-a----         5/6/2019   9:34 PM           9728 VTApp.exe
-a----         5/6/2019   9:36 PM          80384 VTCommandFuzzer.exe
-a----         5/6/2019   9:34 PM          66048 VtPipeTerm.exe
-a----         5/6/2019   3:50 PM         133040 WinAppDriver.exe

(neither in the debug directory from the command line build)

Some of the other issues people say to set it as the startup package. I don’t know what that means really but I tried pressing this
Screen Shot 2019-05-06 at 10 37 37 PM
but it doesn't seem to do anything.

I'm not sure where to go from here.

@lizy14
Copy link
Member

lizy14 commented May 7, 2019

Deploy CascadiaPackage then you can see it in Start.
image

@rw3iss
Copy link

rw3iss commented May 7, 2019

Same.
I spent the last 4 hours trying to build this on Windows 10, after downloading the 2019 MSBuild tools, realizing it wants VS2017 tools (the link to them is broken on MS site).
I installed the 2019 tools and changed the paths in razzle.bat to point to MSBuild.exe in the 2019 directory.
That runs, and the other scripts run, but building fails.
First it was telling me it wanted v141 build tools, so I installed those from the visual studio installer.
Still complains they're missing.
I then opened the project in Visual Studio, and upgraded it to 2019 (using v142 tools).
Running the command line build still fails, saying it can't find v142 tools.
If I clean and build in Visual Studio, it fails with a bunch of syntax errors.
Anyone know why the syntax errors, at least?

========== Build: 18 succeeded, 24 failed, 0 up-to-date, 0 skipped ==========

@lizy14
Copy link
Member

lizy14 commented May 7, 2019

@rw3iss see #449

@will
Copy link

will commented May 7, 2019

Thanks @lizy14 . I tried that, but got this error:

DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.18362.0 or higher. You currently are running version 10.0.17763.475. Please update your OS, or change your deployment target to a device with the appropriate version. | CascadiaPackage

However windows says that I am up to date, so I don't know how to get 10.0.18362.0

image

@lizy14
Copy link
Member

lizy14 commented May 7, 2019

@will I'm in Windows Insider Program (Release Preview ring), so I'm on 18362.

It seems that if you want to run it you need 1903.

@rw3iss
Copy link

rw3iss commented May 7, 2019

@rw3iss see #449

Ah thank you! Fixed those.
Only a few remaining:

3 of these:
Error C1083 Cannot open include file: 'winrt/TerminalApp.h': No such file or directory WindowsTerminal C:\Users\Ryan\Sites\Terminal\src\cascadia\WindowsTerminal\AppHost.h 7

1 of these:
Error Specified EntryPointExe 'WindowsTerminal.exe' was not found in the project outputs. CascadiaPackage C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets 413

(I think the latter because of the 3 former errors).

@MarcusXe
Copy link

MarcusXe commented May 7, 2019

same error,bull shit

@imfht
Copy link

imfht commented May 7, 2019

any built exe download?

@rw3iss
Copy link

rw3iss commented May 7, 2019

winrt I think needs the Windows Insider 10.0.18362.* build.
It's not hard to join Windows Insider program, just sign up, then go to Windows Insider Program in Win10 Settings, set the preferences there (set mine to 'Active Development of Windows'), then go to "Windows Update" tab, and search for updates, and it will download.
I'll do some more digging into the WinRT solution and report back.

But so far, seems to almost compile by just importing the solution into Visual Studio and upgrading it to the 2019/v142 library tools (have to install the v142 tools from the Visual Studio Installer > Individual Components, but I think they're default with 2019 anyway).

Before this worked I also ran these commands in the README:
git submodule update --init --recursive
nuget restore OpenConsole.sln

I also ran tools/razzle.bat, after changing the MSBuild path their to the 2019 location of MSBuild.exe
ie:

if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe" (
    set MSBUILD="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"
    goto :FOUND_MSBUILD
)

...but not sure that's necessary if importing to VS2019 and building from there. Just listing what I did.

Then I imported the project to VS2019, make sure Configuration is set to x64, cleaned it, and built it.
Now just the above winrt/terminalApp.h error.

@rw3iss
Copy link

rw3iss commented May 7, 2019

Guys I think that worked. I didn't need the Insider build (was not finished installing yet), but I did need to install the WinRT package:
https://marketplace.visualstudio.com/items?itemName=CppWinRTTeam.cppwinrt101804264

========== Rebuild All: 47 succeeded, 0 failed, 0 skipped ==========

However, the built x64/Debug WindowsTerminal.exe file throws an error upon trying to run it:
2019-05-07 02_40_49-Window

Humbugh.
At least building it is solved, with VS2019, I think!

@rw3iss
Copy link

rw3iss commented May 7, 2019

Running Debug on the WindowsTerminal (Windows Store 10 version) from within VS2019 throws exception here:

Exception thrown at 0x00007FFA64CE9129 in WindowsTerminal.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x000000A58C91F2F8. occurred

inside base.h line 4321.

So, very esoteric error there, related to WinRT, if anyone has any ideas. I am not a C++/desktop developer (web mostly).

I'm gonna finish installing Insider build (another 10 mins), restart, see what happens.

@spacecowgirl314
Copy link

None of the suggestions in here have allowed me to build it. Please provide build instructions for VS2019.

Much appreciated

@Supernalboot
Copy link

#449 should fix some issues with VS2019 not working, some other fixes are also in here

@will
Copy link

will commented May 7, 2019

@lizy14 and @rw3iss thanks, I did the windows insider and got on 10.0.18362.30 and the Deploy menu item did put it into my start menu. Thank you.

This was all on VS2017 for that data point.

@rw3iss
Copy link

rw3iss commented May 7, 2019

None of the suggestions in here have allowed me to build it. Please provide build instructions for VS2019.

Much appreciated

Chloe follow #449 for the first fix to remove all the syntax errors, it's easy, literally just this change:
https://github.com/microsoft/Terminal/pull/449/files

Second, open the project in VS2019, and right click solution, select Retarget solution, and change it to VS2019, x64, etc.

Try to build it and see what errors it's giving, and let us know. That helps.

If you get the winrt/TerminalApp.h errors, install the WinRT C++ library as above.

I'm able to compile on Windows 10 VS2019 without errors, but it will not run.

@rw3iss
Copy link

rw3iss commented May 7, 2019

@lizy14 and @rw3iss thanks, I did the windows insider and got on 10.0.18362.30 and the Deploy menu item did put it into my start menu. Thank you.

This was all on VS2017 for that data point.

@will Are you saying you got the WindowsTerminal app to run? Am still waiting for Insider build 18362 to finish installing.

@will
Copy link

will commented May 7, 2019

Yes, I'm all set now

image

@Supernalboot
Copy link

Supernalboot commented May 7, 2019

@W3iss it does seem to be a windows insider requirement just see if it will work when insider is done, I unfortunately haven't had time to test everything yet but hopefully when I do we can make a proper list of fixes.

@rw3iss
Copy link

rw3iss commented May 7, 2019

@will @DimitriLambrou Cool, thanks! Will give it another go here in a bit.

@rw3iss
Copy link

rw3iss commented May 7, 2019

@will @Supernalboot Got it! Debugging it doesn't work, have to actually right click the solution and Deploy, as @will implied, then it will show in start menu. Thanks. Everyone else, just follow the few steps previously mentioned above and it should work.

@Supernalboot
Copy link

Supernalboot commented May 7, 2019

Steps:

If you get an error like this
DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.18362.0 or higher.
You might need windows Insider. Still unconfirmed.

@rw3iss Nice work.

@codeex
Copy link

codeex commented May 7, 2019

why nobody publish zip or exe file?

@rw3iss
Copy link

rw3iss commented May 7, 2019

why nobody publish zip or exe file?

Because you can't. Running the built .exe crashes. It only works if you choose 'Deploy Solution' in VS2019, then it automatically shows up in your start menu. I don't know why.

@phuclv90
Copy link

phuclv90 commented May 7, 2019

why nobody publish zip or exe file?

Because you can't. Running the built .exe crashes. It only works if you choose 'Deploy Solution' in VS2019, then it automatically shows up in your start menu. I don't know why.

because a UWP app can't run standalone. It's not a win32 app

@Paul-Weisser
Copy link

Paul-Weisser commented May 7, 2019

Steps:

* Follow #449. (https://github.com/microsoft/Terminal/pull/449/files)

* If using VS2019, open the project in VS2019, and right click solution, select Retarget solution.

* If you get the winrt/TerminalApp.h errors, install the WinRT C++ library.

* Run in build Mode, not Debugger.

If you get an error like this
DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.18362.0 or higher.
You might need windows Insider. Still unconfirmed.

@rw3iss Nice work.

installed the Microsoft.Windows.CppWinRT nuget Package via VS 2019 Community
still got
"Cannot open include file: 'winrt/Microsoft.Terminal.Settings.h': No such file or directory TerminalCore ~\Documents\Terminal\src\cascadia\TerminalCore\Terminal.cpp 13"
and
"Cannot open include file: 'winrt/Microsoft.Terminal.TerminalControl.h': No such file or directory WindowsTerminal ~\Documents\Terminal\src\cascadia\WindowsTerminal\AppHost.h 6"
Error.
(The second Error apears twice in Apphost.h and Islandwindow.h)

Any possible solutions?

@rw3iss
Copy link

rw3iss commented May 7, 2019

@Paul-Weissner I installed winrt from the standalone exe linked above. Maybe try that after uninstalling from vs/nuget/windows first.

@Cibifang
Copy link

Cibifang commented May 7, 2019

@Paul-Weissner I installed winrt from the standalone exe linked above. Maybe try that after uninstalling from vs/nuget/windows first.

Yes, I'm all set now

image

I build it successfully, but if I click the "Windows Terminal", it just like original cmder without tab.
Capture
Do you know why?
or maybe I should open a new issus for this?

More:
I just deploy CascadiaPackage(because it still have many new errors when deploy whole project), but I am not sure if it is relative...

@rw3iss
Copy link

rw3iss commented May 7, 2019

Yea that's all it is, hah. Should have tab support though (ctrl+t) and also wsl and powershell baked in, and stuff.

@Cibifang
Copy link

Cibifang commented May 7, 2019

Yea that's all it is, hah. Should have tab support though (ctrl+t) and also wsl and powershell baked in, and stuff.

wow....Thank you!
Do you know how to turn to other tabs using keyboard? or any documents about it?

@nikanorov
Copy link

nikanorov commented May 7, 2019

Do you know how to turn to other tabs using keyboard? or any documents about it?

Ctrl+Tab - forward, Ctrl+Shift+Tab - back.

@ankitbko
Copy link
Member

ankitbko commented May 7, 2019

I managed to build it is VS2019 without changing target to v142 and without any code change. Followed this to install WinRT and then right-clicked on solution -> install missing feature.

@itzjustzee
Copy link

Its ALIVE!!

image

FINALLY!!! just doing some minor personalizing now :)

@isaacrlevin
Copy link

isaacrlevin commented May 7, 2019

Which project do you set as startup? WindowsTerminal? If I deploy solution with VS2017, I get this when I open it up. I get no dropdown or settings. What am I doing wrong?

image

@zadjii-msft
Copy link
Member

@isaac2004 CascadiaPackage

@zadjii-msft
Copy link
Member

I'm going to close this issue, and route all discussion on the topic of getting the terminal to build to #489

@zadjii-msft zadjii-msft added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Issue-Question For questions or discussion labels May 7, 2019
@isaacrlevin
Copy link

@zadjii-msft look above, why am I not getting dropdown or settings?

@zadjii-msft
Copy link
Member

@isaac2004 Try pressing ctrl+t. The defaults intentionally look much like the old Console.

We're still working on the UI, so be patient :)

@mc1brew
Copy link

mc1brew commented May 8, 2019

@isaac2004 FYI: you can change the profile.json (C:\Users{userName}\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState on my machine...) to have "alwaysShowTabs": true. This way when you open the terminal it will be clear you're working with the new windows terminal AND you'll have immediate access to the drop down.

@rw3iss
Copy link

rw3iss commented May 8, 2019

@ALL Fair warning: I installed Insider Build a day ago, got this all working, things were fine, nothing intense running, all the sudden the computer just gave me nonstop BSOD, and nothing worked, no system restores, couldn't boot into safemode. Only thing that worked was resetting pc and keeping files, but have to reinstall all software, grumble. Not really sure why it happened, but maybe related.

@bmmcwhirt
Copy link

I installed the WinRT packaged linked above and I still get the error:

Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "winrt/Microsoft.Terminal.Settings.h" TerminalCore C:\Users\bmcwhirt\Downloads\Terminal\src\cascadia\TerminalCore\Terminal.cpp 13

@ankitbko
Copy link
Member

ankitbko commented May 8, 2019

I installed the WinRT packaged linked above and I still get the error:

Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "winrt/Microsoft.Terminal.Settings.h" TerminalCore C:\Users\bmcwhirt\Downloads\Terminal\src\cascadia\TerminalCore\Terminal.cpp 13

Right click on solution and check if there is option to "Install Missing Features". This solved the error for me.

@baddate
Copy link

baddate commented May 10, 2019

Its ALIVE!!

image

FINALLY!!! just doing some minor personalizing now :)

what's your windows version?

@3rikk
Copy link

3rikk commented May 11, 2019

Hello!
Just built it but it just shows up with this upon opening:
image

I tried changing "commandline":"powershell.exe" to "commandline":C:/Windows/System32/powershell.exe" but i still get the same issue. Changing the / to \ causes this error:

image

Even though I have that WinRT package installed. Any ideas? (Also, making a new cmd tab opens and instantly closes one)
Thanks!

@phuclv90
Copy link

I tried changing "commandline":"powershell.exe" to "commandline":C:/Windows/System32/powershell.exe" but i still get the same issue. Changing the / to \ causes this error:

@MrErikDev did you escape \ with \\ in the json string?

@mKay00
Copy link
Contributor

mKay00 commented May 13, 2019

I tried changing "commandline":"powershell.exe" to "commandline":C:/Windows/System32/powershell.exe" but i still get the same issue. Changing the / to \ causes this error:

@MrErikDev did you escape \ with \\ in the json string?

@MrErikDev and you miss a quotation mark in your second command in front of the C:..

@Iam-AyAn18
Copy link

Hey fellas,
I am just new to git hub and how to install a repository.

Can anybody help me how to start debugging??
I have the latest version of vs code...
cheers.

@bugproof
Copy link

Ideally, releases should contain an executable to test. I hate the fact that you have to use the Windows Store to install it.

@phuclv90
Copy link

@wrathofodin because it's a modern application, you cannot run the exe file directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question For questions or discussion Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests