diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 511afa1fcd..1b497ec4ee 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -281,7 +281,7 @@ Try { { # TODO: $windowsAppSdkBinariesPath may not be defined. Remove the temp downgrade to 1.0 once this issue has been fixed (b#52130179). Set-StrictMode -Version 1.0 - .\build\CopyFilesToStagingDir.ps1 -BuildOutputDir 'BuildOutput' -OverrideDir "$buildOverridePath" -PublishDir "$windowsAppSdkBinariesPath" -NugetDir "$BasePath" -Platform $PlatformToRun -Configuration $ConfigurationToRun + .\build\CopyFilesToStagingDir.ps1 -BuildOutputDir 'BuildOutput' -PublishDir "$windowsAppSdkBinariesPath" -NugetDir "$BasePath" -Platform $PlatformToRun -Configuration $ConfigurationToRun Set-StrictMode -Version 3.0 if ($lastexitcode -ne 0) { @@ -456,6 +456,29 @@ Try { 'native\PushNotificationsLongRunningTask.ProxyStub.dll', 'native\RestartAgent.exe') ` -TargetDir "$ComponentBasePath\runtimes-framework\win-$platformToRun" + + build\scripts\CopyContents.ps1 ` + -SourceDir "$PSScriptRoot\$BasePath\runtimes\win10-$platformToRun" ` + -ContentsList @( + 'native\DynamicDependency.DataStore.exe', + 'native\DynamicDependency.DataStore.ProxyStub.dll') ` + -TargetDir "$ComponentBasePath\runtimes-main\win-$platformToRun" + + build\scripts\CopyContents.ps1 ` + -SourceDir "$PSScriptRoot\$BasePath\runtimes\win10-$platformToRun" ` + -ContentsList @( + 'native\DynamicDependencyLifetimeManager.exe', + 'native\DynamicDependencyLifetimeManager.ProxyStub.dll', + 'native\DynamicDependencyLifetimeManagerShadow.exe') ` + -TargetDir "$ComponentBasePath\runtimes-ddlm\win-$platformToRun" + + build\scripts\CopyContents.ps1 ` + -SourceDir "$PSScriptRoot\$BasePath\runtimes\win10-$platformToRun" ` + -ContentsList @( + 'native\PushNotificationsLongRunningTask.exe', + 'native\PushNotificationsLongRunningTask.ProxyStub.dll', + 'native\PushNotificationsLongRunningTask.StartupTask.exe') ` + -TargetDir "$ComponentBasePath\runtimes-singleton\win-$platformToRun" } # Populate ARM64EC folders with x64 content @@ -475,6 +498,9 @@ Try { } Copy-Item -Path "$nuSpecsPath\package.appxfragment" -Destination "$ComponentBasePath\runtimes-framework\package.appxfragment" + Copy-Item -Path "$nuSpecsPath\main.appxfragment" -Destination "$ComponentBasePath\runtimes-main\package.appxfragment" + Copy-Item -Path "$buildOverridePath\ddlm.appxfragment" -Destination "$ComponentBasePath\runtimes-ddlm\package.appxfragment" + Copy-Item -Path "$nuSpecsPath\singleton.appxfragment" -Destination "$ComponentBasePath\runtimes-singleton\package.appxfragment" # Populate Intellisense files $IntellisensePath = "$PSScriptRoot\build\NuSpecs\Intellisense" diff --git a/build/CopyFilesToStagingDir.ps1 b/build/CopyFilesToStagingDir.ps1 index 487e5a62fa..6df68b440a 100644 --- a/build/CopyFilesToStagingDir.ps1 +++ b/build/CopyFilesToStagingDir.ps1 @@ -1,7 +1,6 @@ [CmdLetBinding()] Param( [string]$BuildOutputDir, - [string]$OverrideDir, [string]$PublishDir, [string]$NugetDir, [string]$Platform, @@ -36,9 +35,6 @@ function PublishFile { } } -PublishFile $OverrideDir\DynamicDependency-Override.json $FullPublishDir\ -PublishFile $OverrideDir\PushNotifications-Override.json $FullPublishDir\ - PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Microsoft.WindowsAppRuntime.dll $FullPublishDir\Microsoft.WindowsAppRuntime\ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Microsoft.WindowsAppRuntime.pdb $FullPublishDir\Microsoft.WindowsAppRuntime\ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Microsoft.WindowsAppRuntime.lib $FullPublishDir\Microsoft.WindowsAppRuntime\ @@ -151,13 +147,6 @@ PublishFile $FullBuildOutput\Microsoft.Windows.System.Power.Projection\Microsoft PublishFile $FullBuildOutput\Microsoft.Windows.System.Projection\Microsoft.Windows.System.Projection.dll $NugetDir\lib\net6.0-windows10.0.17763.0 PublishFile $FullBuildOutput\Microsoft.Windows.System.Projection\Microsoft.Windows.System.Projection.pdb $NugetDir\lib\net6.0-windows10.0.17763.0 -# -# Dynamic Dependency build overrides -PublishFile $OverrideDir\DynamicDependency-Override.json $NugetDir\runtimes\win10-$Platform\native -# -# Push Notifications build overrides -PublishFile $OverrideDir\PushNotifications-Override.json $NugetDir\runtimes\win10-$Platform\native -# # Includes (*.h) PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h $NugetDir\include PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\decimal.h $NugetDir\include @@ -244,8 +233,4 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\DeploymentManagerAutoInitiali # # UndockedRegFreeWinRT (URFW) Auto-Initializer Files PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\UndockedRegFreeWinRT-AutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\UndockedRegFreeWinRT-AutoInitializer.cs $NugetDir\include -# -# Build overrides -PublishFile $OverrideDir\DynamicDependency-Override.json $NugetDir\runtimes\win10-$Platform\native -PublishFile $OverrideDir\PushNotifications-Override.json $NugetDir\runtimes\win10-$Platform\native +PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\UndockedRegFreeWinRT-AutoInitializer.cs $NugetDir\include \ No newline at end of file diff --git a/build/NuSpecs/ddlm.appxfragment b/build/NuSpecs/ddlm.appxfragment new file mode 100644 index 0000000000..2aa03b49e5 --- /dev/null +++ b/build/NuSpecs/ddlm.appxfragment @@ -0,0 +1,64 @@ + + + + + + + + + + + + + $(DynDep.LifetimeManager.CLSID.UUID) + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/NuSpecs/main.appxfragment b/build/NuSpecs/main.appxfragment new file mode 100644 index 0000000000..e5872774dc --- /dev/null +++ b/build/NuSpecs/main.appxfragment @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/NuSpecs/singleton.appxfragment b/build/NuSpecs/singleton.appxfragment new file mode 100644 index 0000000000..b2b27d21ad --- /dev/null +++ b/build/NuSpecs/singleton.appxfragment @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/GenerateDynamicDependencyOverrides.ps1 b/tools/GenerateDynamicDependencyOverrides.ps1 index c91fa6be39..5df0b6ec92 100644 --- a/tools/GenerateDynamicDependencyOverrides.ps1 +++ b/tools/GenerateDynamicDependencyOverrides.ps1 @@ -44,26 +44,13 @@ else $lifetimemanager_clsid_uuid = New-Guid $lifetimemanager_clsid_guid = Convert-Guid $lifetimemanager_clsid_uuid -# Generate the json file -$content_json=@" -{ - "LIBID": "1BF712E5-41ED-46a5-8402-2D40725F691E", - "DataStore": { - "CLSID": { - "UUID": "D1AD16C7-EC59-4765-BF95-9A243EB00507" - } - }, - "LifetimeManager": { - "CLSID": { - "UUID": "$lifetimemanager_clsid_uuid", - "GUID": "$lifetimemanager_clsid_guid" - } - } -} -"@ -$file_json = Join-Path $Path 'DynamicDependency-Override.json' -Write-Output "Writing $file_json..." -"$content_json" | Out-File $file_json -Encoding utf8 +# Replace the GUID in the appxfragment.xml +$appxfragment_path = 'build\NuSpecs\ddlm.appxfragment' +$appxfragment_overrides_path = Join-Path $Path 'ddlm.appxfragment' +$appxfragment = Get-Content $appxfragment_path +$appxfragment = $appxfragment.Replace('$(DynDep.LifetimeManager.CLSID.UUID)', "$lifetimemanager_clsid_uuid") +Write-Output "Writing $appxfragment_overrides_path..." +Set-Content -Value $appxfragment $appxfragment_overrides_path # Generate the header file $content_h=@" diff --git a/tools/GeneratePushNotificationsOverrides.ps1 b/tools/GeneratePushNotificationsOverrides.ps1 index 85729900c5..c2a18e5100 100644 --- a/tools/GeneratePushNotificationsOverrides.ps1 +++ b/tools/GeneratePushNotificationsOverrides.ps1 @@ -6,28 +6,6 @@ Param( [string]$Path ) -function Convert-Guid -{ - Param([string]$uuid) - - $fields = $uuid -Split '-', 5 - $field0 = $fields[0] - $field1 = $fields[1] - $field2 = $fields[2] - $field3 = $fields[3] - $b0 = $field3.SubString(0, 2) - $b1 = $field3.SubString(2, 2) - $field4 = $fields[4] - $b2 = $field4.SubString(0, 2) - $b3 = $field4.SubString(2, 2) - $b4 = $field4.SubString(4, 2) - $b5 = $field4.SubString(6, 2) - $b6 = $field4.SubString(8, 2) - $b7 = $field4.SubString(10, 2) - $guid = "0x$field0, 0x$field1, 0x$field2, { 0x$b0, 0x$b1, 0x$b2, 0x$b3, 0x$b4, 0x$b5, 0x$b6, 0x$b7 }" - return $guid -} - Set-StrictMode -Version 3.0 $ErrorActionPreference = 'Stop' @@ -41,39 +19,6 @@ else Write-Output "$Path exists" } -# Generate the json file -$content_json=@" -{ - "LIBID": "CE96C745-3017-460E-895B-4FD98E1194F2", - "ComServer": { - "CLSID": { - "UUID": "E739C755-0D09-48DF-A468-A5DF0B5422DC" - } - }, - "ComInterfaces": { - "LRP": { - "CLSID": { - "UUID": "60FC21B2-B396-4D49-94F0-7555869FB93C" - } - }, - "ForegroundSink": { - "CLSID": { - "UUID": "25604D55-9B17-426F-9D67-2B11B3A65598" - } - }, - "ForegroundSink2": { - "CLSID": { - "UUID": "559B4205-F810-4947-B02B-3EA9A311C6AD" - } - } - } -} -"@ - -$file_json = Join-Path $Path 'PushNotifications-Override.json' -Write-Output "Writing $file_json..." -"$content_json" | Out-File $file_json -Encoding utf8 - # Generate the Push Notifications header file $content_h=@" // Copyright (c) Microsoft Corporation. All rights reserved.