mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
Add some notes on building package from commandline (#13350)
I was messing around with trying to build & deploy from the commandline. I discovered this, which is progress. However, the inner-loop commandline build for the Terminal is still egregiously long. * just a docs update * is EIM work
This commit is contained in:
parent
feabe41a08
commit
6c2316df44
1
.github/actions/spelling/allow/apis.txt
vendored
1
.github/actions/spelling/allow/apis.txt
vendored
@ -5,6 +5,7 @@ aclapi
|
||||
alignas
|
||||
alignof
|
||||
APPLYTOSUBMENUS
|
||||
appxrecipe
|
||||
bitfield
|
||||
bitfields
|
||||
BUILDBRANCH
|
||||
|
||||
@ -139,3 +139,18 @@ powershell -Command Set-Location -Path %OPENCON%\src\cascadia\CascadiaPackage\Ap
|
||||
(yes, the cmd version is just calling powershell to do the powershell version. Too lazy to convert the rest by hand, I'm already copying from `.vscode\tasks.json`)
|
||||
|
||||
Building the package from VS generates the loose layout to begin with, and then registers the loose manifest, skipping the msix stop. It's a lot faster than the commandline inner loop here, unfortunately.
|
||||
|
||||
### 2022 Update
|
||||
|
||||
The following command can be used to build the terminal package, and then deploy it.
|
||||
|
||||
```cmd
|
||||
pushd %OPENCON%\src\cascadia\CascadiaPackage
|
||||
bx
|
||||
"C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\DeployAppRecipe.exe" bin\%ARCH%\%_LAST_BUILD_CONF%\CascadiaPackage.build.appxrecipe
|
||||
popd
|
||||
```
|
||||
|
||||
The `bx` will build just the Terminal package, critically, populating the `CascadiaPackage.build.appxrecipe` file. Once that's been built, then the `DeployAppRecipe.exe` command can be used to deploy a loose layout in the same way that Visual Studio does.
|
||||
|
||||
Notably, this method of building the Terminal package can't leverage the FastUpToDate check in Visual Studio, so the builds end up being considerably slower for the whole package, as cppwinrt does a lot of work before confirming that it's up to date and doing nothing.
|
||||
|
||||
@ -72,7 +72,8 @@ if "%_SKIP_NUGET_RESTORE%" == "1" (
|
||||
nuget.exe restore %OPENCON%\OpenConsole.sln
|
||||
)
|
||||
|
||||
set _BUILD_CMDLINE="%MSBUILD%" %OPENCON%\OpenConsole.sln /t:"%_MSBUILD_TARGET%" /m /p:Configuration=%_LAST_BUILD_CONF% /p:Platform=%ARCH% %_APPX_ARGS%
|
||||
@rem /p:GenerateAppxPackageOnBuild=false will prevent us from building the whole .msix package when building the wapproj project.
|
||||
set _BUILD_CMDLINE="%MSBUILD%" %OPENCON%\OpenConsole.sln /t:"%_MSBUILD_TARGET%" /m /p:Configuration=%_LAST_BUILD_CONF% /p:GenerateAppxPackageOnBuild=false /p:Platform=%ARCH% %_APPX_ARGS%
|
||||
|
||||
echo %_BUILD_CMDLINE%
|
||||
echo Starting build...
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# in this directory. Parses the solution's .metaproj file looking for the
|
||||
# project file in this directory, to be able to get the project's name.
|
||||
|
||||
$projects = Get-Childitem -Path .\ -Filter *.vcxproj -File
|
||||
$projects = Get-ChildItem -Path * -Include *.vcxproj,*.wapproj
|
||||
if ($projects.length -eq 0)
|
||||
{
|
||||
exit -1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user