Skip to content

Commit

Permalink
Move back to non-WAP solution and fix package size increase caused by…
Browse files Browse the repository at this point in the history
… bringing PowerToys utilities (#2844)

* Remove WAP

* sign script

* pr feedback

---------

Co-authored-by: Nick Eubanks <[email protected]>
Co-authored-by: Darshak Bhatti <[email protected]>
  • Loading branch information
3 people authored May 9, 2024
1 parent e190cdd commit 548d868
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 191 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/DevHome-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
run: Compress-Archive -Force -Path extensions\HyperVExtension\src\DevSetupAgent\bin\arm64\${{ matrix.configuration }}\net8.0-windows10.0.22621.0\win-arm64\* -DestinationPath "extensions\HyperVExtension\src\DevSetupAgent\bin\arm64\${{ matrix.configuration }}\DevSetupAgent_arm64.zip"

- name: Build_DevHome
run: cmd /c "$env:VSDevCmd" "&" msbuild /p:Configuration=${{ matrix.configuration }},Platform=${{ matrix.platform }} /m:1 DevHome.sln
run: cmd /c "$env:VSDevCmd" "&" msbuild /p:Configuration=${{ matrix.configuration }},Platform=${{ matrix.platform }} DevHome.sln

- name: Find vstest.console.exe
if: ${{ matrix.platform != 'arm64' }}
Expand Down
14 changes: 5 additions & 9 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Try {
$uapAppExtension = [System.Xml.Linq.XName]::Get("{http://schemas.microsoft.com/appx/manifest/uap/windows10/3}AppExtension");

# Update the appxmanifest
$appxmanifestPath = (Join-Path $env:Build_RootDirectory "Packaging\Package.appxmanifest")
$appxmanifestPath = (Join-Path $env:Build_RootDirectory "src\Package.appxmanifest")
$appxmanifest = [System.Xml.Linq.XDocument]::Load($appxmanifestPath)
$appxmanifest.Root.Element($xIdentity).Attribute("Version").Value = $env:msix_version
if (-not ([string]::IsNullOrEmpty($newPackageName))) {
Expand Down Expand Up @@ -169,11 +169,7 @@ Try {
("/p:Configuration="+$configuration),
("/restore"),
("/binaryLogger:DevHome.$platform.$configuration.binlog"),
("/p:AppxBundle=Never"),
("/p:AppxPackageName=DevHome-$platform"),
("/p:AppxBundlePlatforms="+$platform),
("/p:AppxPackageDir=" + $appxPackageDir),
("/p:AppxPackageTestDir=" + (Join-Path $appxPackageDir "DevHome\")),
("/p:AppxPackageOutput=$appxPackageDir\DevHome-$platform.msix"),
("/p:AppxPackageSigningEnabled=false"),
("/p:GenerateAppxPackageOnBuild=true"),
("/p:BuildRing=$buildRing")
Expand All @@ -188,7 +184,7 @@ Try {
& $msbuildPath $msbuildArgs

if (-not($IsAzurePipelineBuild) -And $isAdmin) {
Invoke-SignPackage "$appxPackageDir\DevHome\DevHome-$platform.msix"
Invoke-SignPackage "$appxPackageDir\DevHome-$platform.msix"
}
}
}
Expand Down Expand Up @@ -241,7 +237,7 @@ Try {

if (($BuildStep -ieq "all") -Or ($BuildStep -ieq "msixbundle")) {
foreach ($configuration in $env:Build_Configuration.Split(",")) {
.\build\scripts\Create-AppxBundle.ps1 -InputPath (Join-Path $env:Build_RootDirectory "AppxPackages\$configuration\DevHome") -ProjectName DevHome -BundleVersion ([version]$env:msix_version) -OutputPath (Join-Path $env:Build_RootDirectory ("AppxBundles\$configuration\DevHome_" + $env:msix_version + "_8wekyb3d8bbwe.msixbundle"))
.\build\scripts\Create-AppxBundle.ps1 -InputPath (Join-Path $env:Build_RootDirectory "AppxPackages\$configuration") -ProjectName DevHome -BundleVersion ([version]$env:msix_version) -OutputPath (Join-Path $env:Build_RootDirectory ("AppxBundles\$configuration\DevHome_" + $env:msix_version + "_8wekyb3d8bbwe.msixbundle"))
if (-not($IsAzurePipelineBuild) -And $isAdmin) {
Invoke-SignPackage ("AppxBundles\$configuration\DevHome_" + $env:msix_version + "_8wekyb3d8bbwe.msixbundle")
}
Expand All @@ -265,7 +261,7 @@ WARNING: Cert signing requires admin privileges. To sign, run the following in
"@ -ForegroundColor GREEN
foreach ($platform in $env:Build_Platform.Split(",")) {
foreach ($configuration in $env:Build_Configuration.Split(",")) {
$appxPackageFile = (Join-Path $env:Build_RootDirectory ("AppxPackages\$configuration\DevHome\DevHome-$platform.msix"))
$appxPackageFile = (Join-Path $env:Build_RootDirectory "AppxPackages\$configuration\DevHome-$platform.msix")
Write-Host @"
powershell -command "& { . build\scripts\CertSignAndInstall.ps1; Invoke-SignPackage $appxPackageFile }"
"@ -ForegroundColor GREEN
Expand Down
20 changes: 0 additions & 20 deletions DevHome.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Solution.props = Solution.props
EndProjectSection
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Packaging", "Packaging\Packaging.wapproj", "{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome", "src\DevHome.csproj", "{60E0FD98-5396-436D-BAB7-187A853A5DC6}"
ProjectSection(ProjectDependencies) = postProject
{0689521A-1686-46DB-81E1-3B84AA0EF1AC} = {0689521A-1686-46DB-81E1-3B84AA0EF1AC}
Expand Down Expand Up @@ -154,24 +152,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|arm64.ActiveCfg = Debug|ARM64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|arm64.Build.0 = Debug|ARM64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|arm64.Deploy.0 = Debug|ARM64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|x64.ActiveCfg = Debug|x64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|x64.Build.0 = Debug|x64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|x64.Deploy.0 = Debug|x64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|x86.ActiveCfg = Debug|x86
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|x86.Build.0 = Debug|x86
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Debug|x86.Deploy.0 = Debug|x86
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|arm64.ActiveCfg = Release|ARM64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|arm64.Build.0 = Release|ARM64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|arm64.Deploy.0 = Release|ARM64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|x64.ActiveCfg = Release|x64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|x64.Build.0 = Release|x64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|x64.Deploy.0 = Release|x64
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|x86.ActiveCfg = Release|x86
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|x86.Build.0 = Release|x86
{05D4C6E5-D33D-4C15-91FE-3DD2B6A5D61C}.Release|x86.Deploy.0 = Release|x86
{60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug|arm64.ActiveCfg = Debug|arm64
{60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug|arm64.Build.0 = Debug|arm64
{60E0FD98-5396-436D-BAB7-187A853A5DC6}.Debug|arm64.Deploy.0 = Debug|arm64
Expand Down
119 changes: 0 additions & 119 deletions Packaging/Packaging.wapproj

This file was deleted.

2 changes: 1 addition & 1 deletion Test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ try {
Remove-AppPackage -Package $DevHomePackage.PackageFullName
}
Write-Host "Installing Dev Home"
Add-AppPackage (Join-Path "AppxPackages" "$configuration\DevHome\DevHome-$platform.msix")
Add-AppPackage (Join-Path "AppxPackages" "$configuration\DevHome-$platform.msix")

if ($true) {
# Start/stop the app once so that WinAppDriver doesn't time out during first time setup
Expand Down
6 changes: 3 additions & 3 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ extends:
- task: EsrpCodeSigning@2
inputs:
ConnectedServiceName: 'Xlang Code Signing'
FolderPath: '$(appxPackageDir)\${{ configuration }}\DevHome'
FolderPath: '$(appxPackageDir)\${{ configuration }}'
Pattern: '*.msix'
signConfigType: 'inlineSignParams'
inlineOperation: |
Expand Down Expand Up @@ -351,7 +351,7 @@ extends:
- output: pipelineArtifact
displayName: Publish MSIX Artifact
artifactName: msix_${{ platform }}_${{ configuration }}
targetPath: $(appxPackageDir)\${{ configuration }}\DevHome
targetPath: $(appxPackageDir)\${{ configuration }}
sbomPackageName: devhome.msixpackage
sbomPackageVersion: $(MSIXVersion)

Expand All @@ -367,7 +367,7 @@ extends:
inputs:
buildType: 'current'
artifactName: msix_${{ platform }}_${{ configuration }}
targetPath: $(appxPackageDir)\${{ configuration }}\DevHome
targetPath: $(appxPackageDir)\${{ configuration }}

- task: PowerShell@2
displayName: Create Stub Directory
Expand Down
1 change: 0 additions & 1 deletion extensions/HyperVExtension/BuildDevSetupAgentHelper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Try {

$msbuildArgs = @(
("extensions\HyperVExtension\DevSetupAgent.sln"),
("/m"),
("/p:Platform="+$platform),
("/p:Configuration="+$configuration),
("/restore"),
Expand Down
1 change: 0 additions & 1 deletion extensionsdk/BuildSDKHelper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Try {
foreach ($config in $Configuration.Split(",")) {
$msbuildArgs = @(
("$PSScriptRoot\DevHomeSDK.sln"),
("/m"),
("/p:Platform="+$platform),
("/p:Configuration="+$config),
("/binaryLogger:DevHome.SDK.$platform.$config.binlog"),
Expand Down
2 changes: 1 addition & 1 deletion src/DevHome.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>false</EnableMsixTooling>
<EnableMsixTooling>true</EnableMsixTooling>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
</PropertyGroup>
Expand Down
File renamed without changes.
Loading

0 comments on commit 548d868

Please sign in to comment.