-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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 can one deploy Windows Terminal from command line? #926
Comments
No this is not enough as the deploy is actually deploying a UWP app, which isn't from MSBuild. Using things like the WinAppDeployCmd SDK tool might be an option here, but I think also a powershell script is probably the easiest...I haven't looked to see if anyone started one or not. |
I've got a work item assigned to me for this. It's possible to deploy it as a "dev build" with The long-winded way to install it is to create a self-signed certificate ( When you deploy the Cascadia project with Visual Studio, it handles the certificate part for you. |
@oising I can't locate the AppManifest.xml file in the project. Does one need to create it manually? If yes what exactly should be in it? |
AppManifest.xml is auto-generated by visual studio when building the package. It's possible that msbuild would build it too, but I'm not 100% positive on that. I know it's generated from |
So I think self-signed is fine for dev builds but for official released builds, a proper certificate i needed. To put in simple terms, it's easier to grab the appx bundle from Artifacts from latest commit and install it (either double-click or PS script) than to have to grab Visual Studio and build the solution. Right now attempting to grab an appx from Artifacts and installing it will fail unless you have Developer-Mode on as there is no cert or it's considered untrusted by Windows. Unfortunately Developer Mode breaks Win32-OpenSSH, which I and a bunch of other people use (It can be more convenient than opening a WSL session just to remote into another host). |
I mean, both building it from source and trying to run it from the build artifacts are both harder than just installing it from either the store or github, both of which have been available for some time now... |
??? |
There's a known bug for it but appears to only affect some hosts. I believe having to install some software on an isolated network tends to make installations a bit more difficult (can't grab Dev Mode packages, SmartScreen prevents some app installs since it can't verify trustworthiness) and in Terminal's case, installation outside of Store and Chocolately, even with proper dependencies installed result in Terminal being unable to run with Windows thinking there's a network connection error (not sure why it's looking for a network connection to start with but suspect it's due to not finding the local file path to the executable, which is even stranger). |
Also idea of self-signing the dev builds is basically to add the equivalent of the ConEmu feature where you get to choose between stable, beta, and alpha (which is essentially in most cases master branch). The process would need to be manual for now but since the software needs to be physically moved in some cases to a different network (via USB or portable HDD/SSD) , it's a manual process regardless. |
I am trying to build and run Windows Terminal from the command-line. I did manage to build it using the PowerShell module, but I am unable to launch either WindowsTerminal.exe or wt.exe. There's a mention that one cannot launch it outside of Visual Studio, but why is that? Is code signing mandatory in order to launch Windows Terminal? I have successfully copied the files from an existing MSIX installation into a temporary directory and launched it from there, so what's different from trying to launch one that was just built from source? |
So, VS lays the app out correctly on disk and registers that layout with the OS as a "loose package". It's not code signing, just... a bunch of sqlite gunk in a database somewhere plus a folder in the right layout with a If you want to figure out how to possibly maybe get it running from the CLI, check out the VSCode project configuration, where we have an obnoxiously long deployment command. |
How does the Windows Terminal team automate their builds, then? I'm pretty sure it's not someone pushing a button in Visual Studio from their work laptop, and then deploying it for millions of people to use :) Or at least I hope that's not the case! |
Hah! So, our release builds are produced by that "list of loose files -> msix package" step I mentioned above for the CLI build. It produces a single unsigned msix which you can (1) extract to a temporary folder and run or (2) codesign and install directly. |
|
Unfortunately, does not come up with a good inner loop for buidling the package from the commandline. The inner loop for the resources just sucks. * [x] closes #926
Unfortunately, does not come up with a good inner loop for buidling the package from the commandline. The inner loop for the resources just sucks. * [x] closes #926
Note to self: After the changes to unpackaged, portable, etc in 1.18, there might be better ways of doing this from the commandline in the near future. Refer to #15133 - that was one of the tip PRs for calling Now, if only we could get the FastUpToDate check |
I've built successful from command line using the following command.
msbuild /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v142 /p:TargetPlatformVersion=10.0.18362.0 /p:PreferredToolArchitecture=x64 OpenConsole.sln
I'm trying to find a possible solution for deploying from the command line. Is adding
/p:DeployOnBuild=true
enough? What other things need be done if necessary? Any guidance on what Deploy does, e.g. copying files to where, writing some environmental variables?The text was updated successfully, but these errors were encountered: