PackageDeploymentManager/PackageRuntimeManager v0 (experimental) (#3820)

Also

* Manually update DevChcek (awaiting Maestro to automate that thing it's supposed to be doing. Oh, Will...)
* Update TAEF from 10.75.221207001 to 10.82.230714001. Update C++/WinRT from 2.0.221121.5 to 2.0.230706.1
* Something weird's failing in the ARM64 tests. Disabling ARM64 temporarily
This commit is contained in:
Howard Kapustein 2023-09-04 17:01:12 -07:00 коммит произвёл GitHub
Родитель 2e6a398724
Коммит 874d66a256
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
164 изменённых файлов: 6999 добавлений и 121 удалений

Просмотреть файл

@ -192,10 +192,19 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CS", "CS", "{716C26A0-E6B0-4981-8412-D14A4D410531}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.ApplicationModel.DynamicDependency.Projection", "dev\Projections\CS\Microsoft.Windows.ApplicationModel.DynamicDependency\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.csproj", "{47D8D21D-F022-4D58-8DB2-8B467756E08C}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection", "dev\Projections\CS\Microsoft.Windows.ApplicationModel.WindowsAppRuntime\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.csproj", "{4782BB2A-2968-44B4-867C-5FAEB7A51C6B}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.AppLifecycle.Projection", "dev\Projections\CS\Microsoft.Windows.AppLifecycle\Microsoft.Windows.AppLifecycle.Projection.csproj", "{D417EDBE-D783-484F-83F3-710DEC7CB585}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsAppRuntime.Test.Singleton.Msix", "test\DynamicDependency\data\WindowsAppRuntime.Test.Singleton.Msix\WindowsAppRuntime.Test.Singleton.Msix.vcxproj", "{8F2C21F1-47AB-428C-A110-EE33FD7D9493}"
EndProject
@ -220,10 +229,19 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.WindowsAppRuntime.Bootstrap.Net", "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj", "{D6574FD6-8D13-4412-9FCB-308D44063CDA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.System.Power.Projection", "dev\Projections\CS\Microsoft.Windows.System.Power\Microsoft.Windows.System.Power.Projection.csproj", "{63ACBA4F-385A-4D04-98AD-263FED501A19}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.System.Projection", "dev\Projections\CS\Microsoft.Windows.System\Microsoft.Windows.System.Projection.csproj", "{85E9BB46-7841-4732-A039-9C902B71DEC3}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.PushNotifications.Projection", "dev\Projections\CS\Microsoft.Windows.PushNotifications.Projection\Microsoft.Windows.PushNotifications.Projection.csproj", "{F1F2F3A6-A7DE-45D1-9E96-E28171FD3147}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Deployment", "Deployment", "{68E63911-6283-4212-BFFE-3F972AF8F835}"
EndProject
@ -301,6 +319,9 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppNotifications", "dev\AppNotifications\AppNotifications.vcxitems", "{B4824897-88E0-4927-8FB9-E60106F01ED9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.AppNotifications.Projection", "dev\Projections\CS\Microsoft.Windows.AppNotifications.Projection\Microsoft.Windows.AppNotifications.Projection.csproj", "{2385A443-A1C2-4562-8D28-D0AD239EE5E7}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{82A73181-EA4A-431A-B82B-BE6734604CC9}"
EndProject
@ -344,6 +365,9 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppNotificationBuilderTests", "test\AppNotificationBuilderTests\AppNotificationBuilderTests.vcxproj", "{131DE0C4-AA1E-4649-B5BC-7B43508FA93A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.Security.AccessControl.Projection", "dev\Projections\CS\Microsoft.Windows.Security.AccessControl.Projection\Microsoft.Windows.Security.AccessControl.Projection.csproj", "{E6D59245-696F-4D13-ACF6-7ECE6E653367}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API", "API", "{0D6B1FF3-A075-4194-9FC0-AF7BB89D0519}"
EndProject
@ -401,6 +425,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test_DeploymentManagerAutoI
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.AppNotifications.Builder.Projection", "dev\Projections\CS\Microsoft.Windows.AppNotifications.Builder.Projection\Microsoft.Windows.AppNotifications.Builder.Projection.csproj", "{50BF3E96-3050-4053-B012-BF6993483DA5}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NotificationTests", "NotificationTests", "{1FDC307C-2DB7-4B40-8F18-F1057E9E0969}"
EndProject
@ -626,6 +653,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KozaniRemoteManagerLauncher", "KozaniRemoteManagerLauncher", "{C5408A09-CDB4-41C1-8766-7677757EB7F2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KozaniRemoteManagerLauncher", "dev\Kozani\KozaniRemoteManagerLauncher\KozaniRemoteManagerLauncher.vcxproj", "{45C50DA4-F2C7-4A4B-8493-50E5DF17B527}"
ProjectSection(ProjectDependencies) = postProject
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KozaniRemoteManager.Msix", "test\Kozani\data\KozaniRemoteManager.Msix\KozaniRemoteManager.Msix.vcxproj", "{A18E00C4-3668-4289-ABFC-D1DF330DA6BF}"
EndProject
@ -633,6 +663,46 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KozaniProtocol", "KozaniPro
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KozaniProtocol", "dev\Kozani\KozaniProtocol\KozaniProtocol.vcxproj", "{3F28C3ED-2548-4530-8B6C-832FAE0E993D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManager", "PackageManager", "{380C8BE1-1868-4860-BD32-ADCD8683285D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API", "API", "{CC969A0B-9B01-479D-A563-C9866BCC6F83}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManager", "dev\PackageManager\API\PackageManager.vcxitems", "{8A9A0C85-65A8-4BCA-A49E-45FC4FDBC7D2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManager", "PackageManager", "{B03C7C69-0A52-4553-B465-04C995161E42}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API", "API", "{4B85FB26-28B6-4072-85C2-DB7B5FEB98BE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManagerTests", "test\PackageManager\API\PackageManagerTests.vcxproj", "{4A38CB80-3580-4960-9B31-3301058B7AFE}"
ProjectSection(ProjectDependencies) = postProject
{09DDAE21-397F-4263-8561-7F2FF28127CF} = {09DDAE21-397F-4263-8561-7F2FF28127CF}
{4626E11F-A7A4-41A2-B22D-5A108BC369AC} = {4626E11F-A7A4-41A2-B22D-5A108BC369AC}
{58E95711-A12F-4C0E-A978-C6B4A0842AC8} = {58E95711-A12F-4C0E-A978-C6B4A0842AC8}
{66D0D8B1-FAF4-4C6A-8303-07F3BA356FE3} = {66D0D8B1-FAF4-4C6A-8303-07F3BA356FE3}
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2} = {D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}
{F2946790-DAF7-4DFF-A754-BA471A12E494} = {F2946790-DAF7-4DFF-A754-BA471A12E494}
{FBAE1876-C50A-4EFC-A686-3008B6438731} = {FBAE1876-C50A-4EFC-A686-3008B6438731}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data", "data", "{6213B1A3-E854-498F-AAFA-4CFC1E71023E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManager.Test.F.Red.Msix", "PackageManager.Test.F.Red.Msix", "{5188EBDF-87AE-4CA1-AA44-AD743583FF2D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManager.Test.F.Red.Msix", "test\PackageManager\data\PackageManager.Test.F.Red.Msix\PackageManager.Test.F.Red.Msix.vcxproj", "{F2946790-DAF7-4DFF-A754-BA471A12E494}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManager.Test.F.Green.Msix", "PackageManager.Test.F.Green.Msix", "{266AE21F-0D59-4422-A95C-4B3D2BA32A4C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManager.Test.F.Green.msix", "test\PackageManager\data\PackageManager.Test.F.Green.msix\PackageManager.Test.F.Green.msix.vcxproj", "{4626E11F-A7A4-41A2-B22D-5A108BC369AC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManager.Test.F.Blue.Msix", "PackageManager.Test.F.Blue.Msix", "{39A17DBB-F1DB-4D0C-B90E-D5F9BEC2283A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManager.Test.F.Blue.msix", "test\PackageManager\data\PackageManager.Test.F.Blue.msix\PackageManager.Test.F.Blue.msix.vcxproj", "{FBAE1876-C50A-4EFC-A686-3008B6438731}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManager.Test.F.Redder.Msix", "PackageManager.Test.F.Redder.Msix", "{B6B68924-6A0B-457E-AD53-018696EC8889}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PackageManager.Test.F.Redder.msix", "test\PackageManager\data\PackageManager.Test.F.Redder.msix\PackageManager.Test.F.Redder.msix.vcxproj", "{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -2243,6 +2313,86 @@ Global
{3F28C3ED-2548-4530-8B6C-832FAE0E993D}.Release|x64.Build.0 = Release|x64
{3F28C3ED-2548-4530-8B6C-832FAE0E993D}.Release|x86.ActiveCfg = Release|Win32
{3F28C3ED-2548-4530-8B6C-832FAE0E993D}.Release|x86.Build.0 = Release|Win32
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|Any CPU.ActiveCfg = Debug|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|Any CPU.Build.0 = Debug|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|ARM64.ActiveCfg = Debug|ARM64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|ARM64.Build.0 = Debug|ARM64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|x64.ActiveCfg = Debug|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|x64.Build.0 = Debug|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|x86.ActiveCfg = Debug|Win32
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Debug|x86.Build.0 = Debug|Win32
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|Any CPU.ActiveCfg = Release|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|Any CPU.Build.0 = Release|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|ARM64.ActiveCfg = Release|ARM64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|ARM64.Build.0 = Release|ARM64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|x64.ActiveCfg = Release|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|x64.Build.0 = Release|x64
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|x86.ActiveCfg = Release|Win32
{4A38CB80-3580-4960-9B31-3301058B7AFE}.Release|x86.Build.0 = Release|Win32
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|Any CPU.ActiveCfg = Debug|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|Any CPU.Build.0 = Debug|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|ARM64.ActiveCfg = Debug|ARM64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|ARM64.Build.0 = Debug|ARM64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|x64.ActiveCfg = Debug|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|x64.Build.0 = Debug|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|x86.ActiveCfg = Debug|Win32
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Debug|x86.Build.0 = Debug|Win32
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|Any CPU.ActiveCfg = Release|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|Any CPU.Build.0 = Release|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|ARM64.ActiveCfg = Release|ARM64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|ARM64.Build.0 = Release|ARM64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|x64.ActiveCfg = Release|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|x64.Build.0 = Release|x64
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|x86.ActiveCfg = Release|Win32
{F2946790-DAF7-4DFF-A754-BA471A12E494}.Release|x86.Build.0 = Release|Win32
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|Any CPU.ActiveCfg = Debug|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|Any CPU.Build.0 = Debug|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|ARM64.ActiveCfg = Debug|ARM64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|ARM64.Build.0 = Debug|ARM64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|x64.ActiveCfg = Debug|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|x64.Build.0 = Debug|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|x86.ActiveCfg = Debug|Win32
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Debug|x86.Build.0 = Debug|Win32
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|Any CPU.ActiveCfg = Release|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|Any CPU.Build.0 = Release|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|ARM64.ActiveCfg = Release|ARM64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|ARM64.Build.0 = Release|ARM64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|x64.ActiveCfg = Release|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|x64.Build.0 = Release|x64
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|x86.ActiveCfg = Release|Win32
{4626E11F-A7A4-41A2-B22D-5A108BC369AC}.Release|x86.Build.0 = Release|Win32
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|Any CPU.ActiveCfg = Debug|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|Any CPU.Build.0 = Debug|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|ARM64.ActiveCfg = Debug|ARM64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|ARM64.Build.0 = Debug|ARM64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|x64.ActiveCfg = Debug|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|x64.Build.0 = Debug|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|x86.ActiveCfg = Debug|Win32
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Debug|x86.Build.0 = Debug|Win32
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|Any CPU.ActiveCfg = Release|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|Any CPU.Build.0 = Release|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|ARM64.ActiveCfg = Release|ARM64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|ARM64.Build.0 = Release|ARM64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|x64.ActiveCfg = Release|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|x64.Build.0 = Release|x64
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|x86.ActiveCfg = Release|Win32
{FBAE1876-C50A-4EFC-A686-3008B6438731}.Release|x86.Build.0 = Release|Win32
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|Any CPU.ActiveCfg = Debug|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|Any CPU.Build.0 = Debug|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|ARM64.ActiveCfg = Debug|ARM64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|ARM64.Build.0 = Debug|ARM64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|x64.ActiveCfg = Debug|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|x64.Build.0 = Debug|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|x86.ActiveCfg = Debug|Win32
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Debug|x86.Build.0 = Debug|Win32
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|Any CPU.ActiveCfg = Release|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|Any CPU.Build.0 = Release|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|ARM64.ActiveCfg = Release|ARM64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|ARM64.Build.0 = Release|ARM64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|x64.ActiveCfg = Release|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|x64.Build.0 = Release|x64
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|x86.ActiveCfg = Release|Win32
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -2436,6 +2586,21 @@ Global
{A18E00C4-3668-4289-ABFC-D1DF330DA6BF} = {9CE0ED94-078A-405F-8599-BFC2D8D6E537}
{82197F64-3A88-4C48-AEF9-7E62E71D75BB} = {84F66485-4391-41C7-89CB-D5006EDF1383}
{3F28C3ED-2548-4530-8B6C-832FAE0E993D} = {82197F64-3A88-4C48-AEF9-7E62E71D75BB}
{380C8BE1-1868-4860-BD32-ADCD8683285D} = {448ED2E5-0B37-4D97-9E6B-8C10A507976A}
{CC969A0B-9B01-479D-A563-C9866BCC6F83} = {380C8BE1-1868-4860-BD32-ADCD8683285D}
{8A9A0C85-65A8-4BCA-A49E-45FC4FDBC7D2} = {CC969A0B-9B01-479D-A563-C9866BCC6F83}
{B03C7C69-0A52-4553-B465-04C995161E42} = {8630F7AA-2969-4DC9-8700-9B468C1DC21D}
{4B85FB26-28B6-4072-85C2-DB7B5FEB98BE} = {B03C7C69-0A52-4553-B465-04C995161E42}
{4A38CB80-3580-4960-9B31-3301058B7AFE} = {4B85FB26-28B6-4072-85C2-DB7B5FEB98BE}
{6213B1A3-E854-498F-AAFA-4CFC1E71023E} = {B03C7C69-0A52-4553-B465-04C995161E42}
{5188EBDF-87AE-4CA1-AA44-AD743583FF2D} = {6213B1A3-E854-498F-AAFA-4CFC1E71023E}
{F2946790-DAF7-4DFF-A754-BA471A12E494} = {5188EBDF-87AE-4CA1-AA44-AD743583FF2D}
{266AE21F-0D59-4422-A95C-4B3D2BA32A4C} = {6213B1A3-E854-498F-AAFA-4CFC1E71023E}
{4626E11F-A7A4-41A2-B22D-5A108BC369AC} = {266AE21F-0D59-4422-A95C-4B3D2BA32A4C}
{39A17DBB-F1DB-4D0C-B90E-D5F9BEC2283A} = {6213B1A3-E854-498F-AAFA-4CFC1E71023E}
{FBAE1876-C50A-4EFC-A686-3008B6438731} = {39A17DBB-F1DB-4D0C-B90E-D5F9BEC2283A}
{B6B68924-6A0B-457E-AD53-018696EC8889} = {B03C7C69-0A52-4553-B465-04C995161E42}
{D0A1DFB8-8CEE-4CFC-B57B-B7C574B411C2} = {B6B68924-6A0B-457E-AD53-018696EC8889}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4B3D7591-CFEC-4762-9A07-ABE99938FB77}
@ -2454,6 +2619,7 @@ Global
dev\Kozani\Common\Common.vcxitems*{829cdb09-eefe-4188-a045-3fc6be7bd96b}*SharedItemsImports = 4
dev\Common\Common.vcxitems*{8828053c-d6ec-4744-8624-f8c676c2d4df}*SharedItemsImports = 9
dev\Licensing\Licensing.vcxitems*{885a43fa-052d-4b0d-a2dc-13ee15796435}*SharedItemsImports = 9
dev\PackageManager\API\PackageManager.vcxitems*{8a9a0c85-65a8-4bca-a49e-45fc4fdbc7d2}*SharedItemsImports = 9
test\inc\inc.vcxitems*{8e52d7ea-a200-4a6b-ba74-8efb49468caf}*SharedItemsImports = 4
dev\Kozani\Common\Common.vcxitems*{a11c6664-f26a-4e71-b440-2e4e1ba09a93}*SharedItemsImports = 4
dev\AppNotifications\AppNotifications.vcxitems*{b4824897-88e0-4927-8fb9-e60106f01ed9}*SharedItemsImports = 9
@ -2461,6 +2627,7 @@ Global
dev\Common\Common.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
dev\DynamicDependency\API\DynamicDependency.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
dev\Licensing\Licensing.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
dev\PackageManager\API\PackageManager.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
dev\PowerNotifications\PowerNotifications.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
dev\UndockedRegFreeWinRT\UndockedRegFreeWinRT.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
dev\PowerNotifications\PowerNotifications.vcxitems*{b75c1b22-553c-40e4-b38e-6ab4d01fdb9d}*SharedItemsImports = 9

Просмотреть файл

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#ifndef __APPMODEL_IDENTITY_H
@ -6,6 +6,9 @@
#include <appmodel.h>
#include <memory>
#include <stdint.h>
namespace AppModel::Identity
{
inline bool IsPackagedProcess()
@ -46,6 +49,34 @@ constexpr PCWSTR GetCurrentArchitectureAsString()
#endif
}
constexpr PCWSTR GetArchitectureAsString(const std::uint32_t architecture)
{
switch (architecture)
{
case PROCESSOR_ARCHITECTURE_AMD64: return L"x64";
case PROCESSOR_ARCHITECTURE_ARM: return L"arm";
case PROCESSOR_ARCHITECTURE_ARM64: return L"arm64";
case PROCESSOR_ARCHITECTURE_IA32_ON_ARM64: return L"x86onArm64";
case PROCESSOR_ARCHITECTURE_INTEL: return L"x86";
case PROCESSOR_ARCHITECTURE_NEUTRAL: return L"neutral";
case PROCESSOR_ARCHITECTURE_UNKNOWN: return L"unknown";
default: THROW_HR_MSG(E_UNEXPECTED, "Unknown architecture 0x%X", architecture);
}
}
constexpr PCWSTR GetArchitectureAsString(const winrt::Windows::System::ProcessorArchitecture architecture)
{
static_assert(static_cast<int>(winrt::Windows::System::ProcessorArchitecture::Arm) == static_cast<int>(PROCESSOR_ARCHITECTURE_ARM), "winrt::Windows::System::ProcessorArchitecture::Arm != PROCESSOR_ARCHITECTURE_ARM");
static_assert(static_cast<int>(winrt::Windows::System::ProcessorArchitecture::Arm64) == static_cast<int>(PROCESSOR_ARCHITECTURE_ARM64), "winrt::Windows::System::ProcessorArchitecture::Arm64 != PROCESSOR_ARCHITECTURE_ARM64");
static_assert(static_cast<int>(winrt::Windows::System::ProcessorArchitecture::Neutral) == static_cast<int>(PROCESSOR_ARCHITECTURE_NEUTRAL), "winrt::Windows::System::ProcessorArchitecture::Neutral != PROCESSOR_ARCHITECTURE_NEUTRAL");
static_assert(static_cast<int>(winrt::Windows::System::ProcessorArchitecture::Unknown) == static_cast<int>(PROCESSOR_ARCHITECTURE_UNKNOWN), "winrt::Windows::System::ProcessorArchitecture::Unknown != PROCESSOR_ARCHITECTURE_UNKNOWN");
static_assert(static_cast<int>(winrt::Windows::System::ProcessorArchitecture::X64) == static_cast<int>(PROCESSOR_ARCHITECTURE_AMD64), "winrt::Windows::System::ProcessorArchitecture::X64 != PROCESSOR_ARCHITECTURE_AMD64");
static_assert(static_cast<int>(winrt::Windows::System::ProcessorArchitecture::X86) == static_cast<int>(PROCESSOR_ARCHITECTURE_INTEL), "winrt::Windows::System::ProcessorArchitecture::X86 != PROCESSOR_ARCHITECTURE_INTEL");
static_assert(static_cast<int>(winrt::Windows::System::ProcessorArchitecture::X86OnArm64) == static_cast<int>(PROCESSOR_ARCHITECTURE_IA32_ON_ARM64), "winrt::Windows::System::ProcessorArchitecture::X86OnArm64 != PROCESSOR_ARCHITECTURE_IA32_ON_ARM64");
return GetArchitectureAsString(static_cast<std::uint32_t>(architecture));
}
inline winrt::Windows::System::ProcessorArchitecture ParseArchitecture(_In_ PCWSTR architecture)
{
if (CompareStringOrdinal(architecture, -1, L"x64", -1, TRUE) == CSTR_EQUAL)
@ -109,6 +140,109 @@ inline winrt::Windows::System::ProcessorArchitecture ParseShortArchitecture(_In_
}
}
class PackageVersion : public PACKAGE_VERSION
{
public:
PackageVersion(const PackageVersion&) = default;
// Create an instance with the value `major.minor.build.revision`.
PackageVersion(std::uint16_t major, std::uint16_t minor = 0, std::uint16_t build = 0, std::uint16_t revision = 0) :
PACKAGE_VERSION()
{
Major = major;
Minor = minor;
Build = build;
Revision = revision;
}
// Create an instance from a version as a uint64.
PackageVersion(std::uint64_t version = 0)
{
Version = version;
}
template<typename TVersion>
PackageVersion(TVersion const& t) :
PackageVersion(t.Major, t.Minor, t.Build, t.Revision)
{
}
#if defined(WINRT_Windows_ApplicationModel_2_H)
PackageVersion(winrt::Windows::ApplicationModel::PackageVersion packageVersion) :
PACKAGE_VERSION()
{
Major = packageVersion.Major;
Minor = packageVersion.Minor;
Build = packageVersion.Build;
Revision = packageVersion.Revision;
}
#endif // defined(WINRT_Windows_ApplicationModel_2_H)
PackageVersion& operator=(const PackageVersion&) = default;
// Return the version as a uint64.
std::uint64_t ToVersion() const
{
return Version;
}
#if defined(____x_ABI_CWindows_CApplicationModel_CIPackageId_INTERFACE_DEFINED__)
ABI::Windows::ApplicationModel::PackageVersion ToPackageVersion() const
{
return ABI::Windows::ApplicationModel::PackageVersion{ Major, Minor, Build, Revision };
}
#endif // defined(____x_ABI_CWindows_CApplicationModel_CIPackageId_INTERFACE_DEFINED__)
#if defined(WINRT_Windows_ApplicationModel_2_H)
winrt::Windows::ApplicationModel::PackageVersion ToWinrtPackageVersion() const
{
return winrt::Windows::ApplicationModel::PackageVersion{ Major, Minor, Build, Revision };
}
#endif // defined(WINRT_Windows_ApplicationModel_2_H)
#if defined(_XSTRING_)
// Return the string as a formatted value "major.minor.build.revision".
std::wstring ToString() const
{
return ToString(Major, Minor, Build, Revision);
}
static std::wstring ToString(std::uint16_t major, std::uint16_t minor, std::uint16_t build, std::uint16_t revision)
{
#if (__cplusplus >= 202002L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 202002L))
return std::format(L"{}.{}.{}.{}", major, minor, build, revision);
#else
return std::to_wstring(major) + L"." + std::to_wstring(minor) + L"." + std::to_wstring(build) + L"." + std::to_wstring(revision);
#endif
}
#endif defined(_XSTRING_)
};
inline bool operator==(const PackageVersion& packageVersion1, const PackageVersion& packageVersion2)
{
return packageVersion1.Version == packageVersion2.Version;
}
inline bool operator!=(const PackageVersion& packageVersion1, const PackageVersion& packageVersion2)
{
return packageVersion1.Version != packageVersion2.Version;
}
inline bool operator<(const PackageVersion& packageVersion1, const PackageVersion& packageVersion2)
{
return packageVersion1.Version < packageVersion2.Version;
}
inline bool operator<=(const PackageVersion& packageVersion1, const PackageVersion& packageVersion2)
{
return packageVersion1.Version <= packageVersion2.Version;
}
inline bool operator>(const PackageVersion& packageVersion1, const PackageVersion& packageVersion2)
{
return packageVersion1.Version > packageVersion2.Version;
}
inline bool operator>=(const PackageVersion& packageVersion1, const PackageVersion& packageVersion2)
{
return packageVersion1.Version >= packageVersion2.Version;
}
inline bool IsValidVersionShortTag(
const std::wstring& versionShortTag)
{

Просмотреть файл

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#ifndef __APPMODEL_PACKAGE_H
@ -6,6 +6,8 @@
#include <appmodel.h>
#include <AppModel.Identity.h>
namespace AppModel::Package
{
/// Find all Main+Framework packages in a package family registered to the current user
@ -52,6 +54,31 @@ inline PACKAGE_VERSION ToPackageVersion(winrt::Windows::ApplicationModel::Packag
to.Revision = from.Revision;
return to;
}
inline std::tuple<std::wstring, PACKAGE_VERSION, std::uint32_t, std::wstring, std::wstring, std::wstring> ParsePackageFullName(PCWSTR packageFullName)
{
BYTE buffer[
sizeof(PACKAGE_ID) +
sizeof(WCHAR) * (PACKAGE_NAME_MAX_LENGTH + 1) +
sizeof(WCHAR) * (PACKAGE_VERSION_MAX_LENGTH + 1) +
sizeof(WCHAR) * (PACKAGE_ARCHITECTURE_MAX_LENGTH + 1) +
sizeof(WCHAR) * (PACKAGE_RESOURCEID_MAX_LENGTH + 1) +
sizeof(WCHAR) * (PACKAGE_PUBLISHERID_MAX_LENGTH + 1)]{};
UINT32 bufferLength{ ARRAYSIZE(buffer) };
THROW_IF_WIN32_ERROR_MSG(::PackageIdFromFullName(packageFullName, PACKAGE_INFORMATION_BASIC, &bufferLength, buffer), "%ls", packageFullName);
const auto& packageId{ *reinterpret_cast<PACKAGE_ID*>(buffer) };
WCHAR packageFamilyName[PACKAGE_FAMILY_NAME_MAX_LENGTH + 1]{};
UINT32 packageFamilyNameLength{ ARRAYSIZE(packageFamilyName) };
THROW_IF_WIN32_ERROR_MSG(::PackageFamilyNameFromId(&packageId, &packageFamilyNameLength, packageFamilyName), "%ls", packageFullName);
return { std::wstring(packageId.name), packageId.version, packageId.processorArchitecture, std::wstring(packageId.resourceId ? packageId.resourceId : L""), std::wstring(packageId.publisherId), std::wstring(packageFamilyName) };
}
inline std::tuple<std::wstring, PACKAGE_VERSION, std::uint32_t, std::wstring, std::wstring, std::wstring> ParsePackageFullName(const std::wstring& packageFullName)
{
return ParsePackageFullName(packageFullName.c_str());
}
}
#endif // __APPMODEL_PACKAGE_H

Просмотреть файл

@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT IT
// INPUT FILE: dev\common\TerminalVelocityFeatures-PackageManager.xml
// OPTIONS: -Channel Experimental -Language C++ -Namespace Microsoft.Windows.Management.Deployment -Path dev\common\TerminalVelocityFeatures-PackageManager.xml -Output dev\common\TerminalVelocityFeatures-PackageManager.h
#if defined(__midlrt)
namespace features
{
feature_name Feature_PackageManager = { DisabledByDefault, FALSE };
}
#endif // defined(__midlrt)
// Feature constants
#define WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_MANAGEMENT_DEPLOYMENT_FEATURE_PACKAGEMANAGER_ENABLED 1
#if defined(__cplusplus)
namespace Microsoft::Windows::Management::Deployment
{
__pragma(detect_mismatch("ODR_violation_WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_MANAGEMENT_DEPLOYMENT_FEATURE_PACKAGEMANAGER_ENABLED_mismatch", "AlwaysEnabled"))
struct Feature_PackageManager
{
static constexpr bool IsEnabled() { return WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_MANAGEMENT_DEPLOYMENT_FEATURE_PACKAGEMANAGER_ENABLED == 1; }
};
} // namespace Microsoft.Windows.Management.Deployment
#endif // defined(__cplusplus)

Просмотреть файл

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<features xmlns="http://microsoft.com/windowsappsdk/TerminalVelocity/20210729/TerminalVelocityFeatures.xsd">
<!-- Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See LICENSE in the project root for license information.
-->
<!-- See docs/TerminalVelocity.md for more info. -->
<!-- Enabled variants -->
<feature>
<name>Feature_PackageManager</name>
<description>Package Management APIs</description>
<state>AlwaysEnabled</state>
<alwaysDisabledChannelTokens>
<channelToken>Preview</channelToken>
<channelToken>Stable</channelToken>
</alwaysDisabledChannelTokens>
</feature>
</features>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -23,6 +23,7 @@
<ClCompile Include="$(MSBuildThisFileDirectory)M.AM.DD.PackageDependencyRank.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)MddDetourPackageGraph.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)MddLifetimeManagement.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)MddWin11.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)MddWinRT.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)MsixDynamicDependency.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)PackageDependency.cpp" />
@ -46,6 +47,7 @@
<ClInclude Include="$(MSBuildThisFileDirectory)MddDetourPackageGraph.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)MddLifetimeManagement.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)MddLifetimeManagementTest.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)MddWin11.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)MddWinRT.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)MsixDynamicDependency.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.AM.Converters.h" />
@ -69,8 +71,9 @@
<PublicHeaders Include="$(MSBuildThisFileDirectory)appmodel_msixdynamicdependency.h" />
<PublicHeaders Include="$(MSBuildThisFileDirectory)MddLifetimeManagement.h" />
<PublicHeaders Include="$(MSBuildThisFileDirectory)MddLifetimeManagementTest.h" />
<PublicHeaders Include="$(MSBuildThisFileDirectory)MddWin11.h" />
<PublicHeaders Include="$(MSBuildThisFileDirectory)MsixDynamicDependency.h" />
<PublicHeaders Include="$(MSBuildThisFileDirectory)..\..\common\TerminalVelocityFeatures-DynamicDependency.h" />
<PublicHeaders Include="$(MSBuildThisFileDirectory)wil_msixdynamicdependency.h" />
</ItemGroup>
</Project>
</Project>

Просмотреть файл

@ -50,6 +50,9 @@
<ClCompile Include="$(MSBuildThisFileDirectory)DataStore.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)MddWin11.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)MddWinRT.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -127,6 +130,9 @@
<ClInclude Include="$(MSBuildThisFileDirectory)DataStore.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)MddWin11.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)MddWinRT.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -152,4 +158,4 @@
<ItemGroup>
<Midl Include="$(MSBuildThisFileDirectory)M.AM.DynamicDependency.idl" />
</ItemGroup>
</Project>
</Project>

Просмотреть файл

@ -0,0 +1,256 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include <IsWindowsVersion.h>
#include "MddWin11.h"
namespace MddCore::Win11
{
static HMODULE g_dllApisetAppmodelRuntime_1_6{};
static decltype(&::TryCreatePackageDependency) g_win11TryCreatePackageDependency{};
static decltype(&::DeletePackageDependency) g_win11DeletePackageDependency{};
static decltype(&::AddPackageDependency) g_win11AddPackageDependency{};
static decltype(&::RemovePackageDependency) g_win11RemovePackageDependency{};
static decltype(&::GetResolvedPackageFullNameForPackageDependency) g_win11GetResolvedPackageFullNameForPackageDependency{};
static decltype(&::GetIdForPackageDependencyContext) g_win11GetIdForPackageDependencyContext{};
static decltype(&::GetPackageGraphRevisionId) g_win11GetPackageGraphRevisionId{};
constexpr PackageDependencyLifetimeKind ToLifetimeKind(MddPackageDependencyLifetimeKind lifetimeKind)
{
switch (lifetimeKind)
{
case MddPackageDependencyLifetimeKind::Process: return PackageDependencyLifetimeKind_Process;
case MddPackageDependencyLifetimeKind::FilePath: return PackageDependencyLifetimeKind_FilePath;
case MddPackageDependencyLifetimeKind::RegistryKey: return PackageDependencyLifetimeKind_RegistryKey;
default: THROW_HR_MSG(E_UNEXPECTED, "Unknown MddPackageDependencyLifetimeKind (%d)", lifetimeKind);
};
}
constexpr PackageDependencyLifetimeKind ToLifetimeKind(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyLifetimeArtifactKind lifetimeKind)
{
switch (lifetimeKind)
{
case winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyLifetimeArtifactKind::Process: return PackageDependencyLifetimeKind_Process;
case winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyLifetimeArtifactKind::FilePath: return PackageDependencyLifetimeKind_FilePath;
case winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyLifetimeArtifactKind::RegistryKey: return PackageDependencyLifetimeKind_RegistryKey;
default: THROW_HR_MSG(E_UNEXPECTED, "Unknown winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyLifetimeKind (%d)", lifetimeKind);
};
}
}
HRESULT WINAPI MddWin11Initialize() noexcept
{
if (!MddCore::Win11::IsSupported())
{
return S_OK;
}
HMODULE dllApisetAppmodelRuntime_1_6{ LoadLibraryExW(L"api-ms-win-appmodel-runtime-l1-1-6.dll", nullptr, 0) };
FAIL_FAST_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), dllApisetAppmodelRuntime_1_6);
auto win11TryCreatePackageDependency{ GetProcAddressByFunctionDeclaration(dllApisetAppmodelRuntime_1_6, TryCreatePackageDependency) };
RETURN_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), win11TryCreatePackageDependency);
auto win11DeletePackageDependency{ GetProcAddressByFunctionDeclaration(dllApisetAppmodelRuntime_1_6, DeletePackageDependency) };
RETURN_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), win11DeletePackageDependency);
auto win11AddPackageDependency{ GetProcAddressByFunctionDeclaration(dllApisetAppmodelRuntime_1_6, AddPackageDependency) };
RETURN_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), win11AddPackageDependency);
auto win11RemovePackageDependency{ GetProcAddressByFunctionDeclaration(dllApisetAppmodelRuntime_1_6, RemovePackageDependency) };
RETURN_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), win11RemovePackageDependency);
auto win11GetResolvedPackageFullNameForPackageDependency{ GetProcAddressByFunctionDeclaration(dllApisetAppmodelRuntime_1_6, GetResolvedPackageFullNameForPackageDependency) };
RETURN_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), win11GetResolvedPackageFullNameForPackageDependency);
auto win11GetIdForPackageDependencyContext{ GetProcAddressByFunctionDeclaration(dllApisetAppmodelRuntime_1_6, GetIdForPackageDependencyContext) };
RETURN_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), win11GetIdForPackageDependencyContext);
auto win11GetPackageGraphRevisionId{ GetProcAddressByFunctionDeclaration(dllApisetAppmodelRuntime_1_6, GetPackageGraphRevisionId) };
RETURN_HR_IF_NULL(HRESULT_FROM_WIN32(GetLastError()), win11GetPackageGraphRevisionId);
MddCore::Win11::g_dllApisetAppmodelRuntime_1_6 = dllApisetAppmodelRuntime_1_6;
MddCore::Win11::g_win11TryCreatePackageDependency = win11TryCreatePackageDependency;
MddCore::Win11::g_win11DeletePackageDependency = win11DeletePackageDependency;
MddCore::Win11::g_win11AddPackageDependency = win11AddPackageDependency;
MddCore::Win11::g_win11RemovePackageDependency = win11RemovePackageDependency;
MddCore::Win11::g_win11GetResolvedPackageFullNameForPackageDependency = win11GetResolvedPackageFullNameForPackageDependency;
MddCore::Win11::g_win11GetIdForPackageDependencyContext = win11GetIdForPackageDependencyContext;
MddCore::Win11::g_win11GetPackageGraphRevisionId = win11GetPackageGraphRevisionId;
return S_OK;
}
HRESULT WINAPI MddWin11Shutdown() noexcept
{
if (MddCore::Win11::g_dllApisetAppmodelRuntime_1_6)
{
MddCore::Win11::g_win11TryCreatePackageDependency = nullptr;
MddCore::Win11::g_win11DeletePackageDependency = nullptr;
MddCore::Win11::g_win11AddPackageDependency = nullptr;
MddCore::Win11::g_win11RemovePackageDependency = nullptr;
MddCore::Win11::g_win11GetResolvedPackageFullNameForPackageDependency = nullptr;
MddCore::Win11::g_win11GetIdForPackageDependencyContext = nullptr;
MddCore::Win11::g_win11GetPackageGraphRevisionId = nullptr;
FreeLibrary(MddCore::Win11::g_dllApisetAppmodelRuntime_1_6);
MddCore::Win11::g_dllApisetAppmodelRuntime_1_6 = nullptr;
}
return S_OK;
}
bool MddCore::Win11::IsSupported()
{
static bool s_isSupported{ WindowsVersion::IsWindows11_22H2OrGreater() };
return s_isSupported;
}
HRESULT MddCore::Win11::TryCreatePackageDependency(
PSID user,
const winrt::hstring& packageFamilyName,
const winrt::Windows::ApplicationModel::PackageVersion& minVersion,
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures packageDependencyProcessorArchitectures,
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& options,
_Outptr_result_maybenull_ PWSTR* packageDependencyId)
{
PCWSTR win11PackageFamilyName{ packageFamilyName.c_str() };
const ::AppModel::Identity::PackageVersion minPackageVersion{ minVersion };
const PACKAGE_VERSION win11MinVersion{ minPackageVersion };
auto win11PackageDependencyProcessorArchitectures{ PackageDependencyProcessorArchitectures_None };
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Neutral, WI_IsFlagSet(packageDependencyProcessorArchitectures, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Neutral));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86, WI_IsFlagSet(packageDependencyProcessorArchitectures, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X64, WI_IsFlagSet(packageDependencyProcessorArchitectures, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm, WI_IsFlagSet(packageDependencyProcessorArchitectures, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Arm));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm64, WI_IsFlagSet(packageDependencyProcessorArchitectures, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Arm64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86A64, WI_IsFlagSet(packageDependencyProcessorArchitectures, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86OnArm64));
const auto win11LifetimeKind{ ToLifetimeKind(options.LifetimeArtifactKind()) };
PCWSTR win11LifetimeArtifact{ options.LifetimeArtifact().c_str() };
auto win11Options{ CreatePackageDependencyOptions_None };
WI_SetFlagIf(win11Options, CreatePackageDependencyOptions_DoNotVerifyDependencyResolution, !options.VerifyDependencyResolution());
//TODO CreatePackageDependencyOptions_ScopeIsSystem
RETURN_IF_FAILED(g_win11TryCreatePackageDependency(user, win11PackageFamilyName, win11MinVersion,
win11PackageDependencyProcessorArchitectures, win11LifetimeKind, win11LifetimeArtifact,
win11Options, packageDependencyId));
return S_OK;
}
HRESULT MddCore::Win11::TryCreatePackageDependency(
PSID user,
_In_ PCWSTR packageFamilyName,
PACKAGE_VERSION minVersion,
MddPackageDependencyProcessorArchitectures packageDependencyProcessorArchitectures,
MddPackageDependencyLifetimeKind lifetimeKind,
PCWSTR lifetimeArtifact,
MddCreatePackageDependencyOptions options,
_Outptr_result_maybenull_ PWSTR* packageDependencyId)
{
const ::AppModel::Identity::PackageVersion win11MinVersion{ minVersion };
auto win11PackageDependencyProcessorArchitectures{ PackageDependencyProcessorArchitectures_None };
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Neutral, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Neutral));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X86));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Arm));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_Arm64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::Arm64));
WI_SetFlagIf(win11PackageDependencyProcessorArchitectures, PackageDependencyProcessorArchitectures_X86A64, WI_IsFlagSet(packageDependencyProcessorArchitectures, MddPackageDependencyProcessorArchitectures::X86OnArm64));
const auto win11LifetimeKind{ ToLifetimeKind(lifetimeKind) };
auto win11Options{ CreatePackageDependencyOptions_None };
WI_SetFlagIf(win11Options, CreatePackageDependencyOptions_DoNotVerifyDependencyResolution, WI_IsFlagSet(options, MddCreatePackageDependencyOptions::DoNotVerifyDependencyResolution));
WI_SetFlagIf(win11Options, CreatePackageDependencyOptions_ScopeIsSystem, WI_IsFlagSet(options, MddCreatePackageDependencyOptions::ScopeIsSystem));
RETURN_IF_FAILED(g_win11TryCreatePackageDependency(user, packageFamilyName, win11MinVersion,
win11PackageDependencyProcessorArchitectures, win11LifetimeKind, lifetimeArtifact,
win11Options, packageDependencyId));
return S_OK;
}
void MddCore::Win11::DeletePackageDependency(
const winrt::hstring& packageDependencyId)
{
DeletePackageDependency(packageDependencyId.c_str());
}
void MddCore::Win11::DeletePackageDependency(
_In_ PCWSTR packageDependencyId)
{
(void)LOG_IF_FAILED(g_win11DeletePackageDependency(packageDependencyId));
}
HRESULT MddCore::Win11::AddPackageDependency(
const winrt::hstring& packageDependencyId,
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& options,
_Out_ MDD_PACKAGEDEPENDENCY_CONTEXT* packageDependencyContext,
_Outptr_opt_result_maybenull_ PWSTR* packageFullName)
{
PCWSTR win11PackageDependencyId{ packageDependencyId.c_str() };
const auto win11Rank{ options.Rank() };
auto win11Options{ AddPackageDependencyOptions_None };
WI_SetFlagIf(win11Options, AddPackageDependencyOptions_PrependIfRankCollision, options.PrependIfRankCollision());
static_assert(sizeof(MDD_PACKAGEDEPENDENCY_CONTEXT) == sizeof(PACKAGEDEPENDENCY_CONTEXT));
auto win11PackageDependencyContext{ reinterpret_cast<PACKAGEDEPENDENCY_CONTEXT*>(packageDependencyContext) };
RETURN_IF_FAILED(g_win11AddPackageDependency(win11PackageDependencyId, win11Rank, win11Options, win11PackageDependencyContext, packageFullName));
return S_OK;
}
HRESULT MddCore::Win11::AddPackageDependency(
_In_ PCWSTR packageDependencyId,
INT32 rank,
MddAddPackageDependencyOptions options,
_Out_ MDD_PACKAGEDEPENDENCY_CONTEXT* packageDependencyContext,
_Outptr_opt_result_maybenull_ PWSTR* packageFullName)
{
auto win11Options{ AddPackageDependencyOptions_None };
WI_SetFlagIf(win11Options, AddPackageDependencyOptions_PrependIfRankCollision, WI_IsFlagSet(options, MddAddPackageDependencyOptions::PrependIfRankCollision));
static_assert(sizeof(MDD_PACKAGEDEPENDENCY_CONTEXT) == sizeof(PACKAGEDEPENDENCY_CONTEXT));
auto win11PackageDependencyContext{ reinterpret_cast<PACKAGEDEPENDENCY_CONTEXT*>(packageDependencyContext) };
RETURN_IF_FAILED(g_win11AddPackageDependency(packageDependencyId, rank, win11Options, win11PackageDependencyContext, packageFullName));
return S_OK;
}
void MddCore::Win11::RemovePackageDependency(
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId packageDependencyContextId)
{
return RemovePackageDependency(ToContext(packageDependencyContextId));
}
void MddCore::Win11::RemovePackageDependency(
_In_ MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext)
{
static_assert(sizeof(MDD_PACKAGEDEPENDENCY_CONTEXT) == sizeof(PACKAGEDEPENDENCY_CONTEXT));
auto win11PackageDependencyContext{ reinterpret_cast<PACKAGEDEPENDENCY_CONTEXT>(packageDependencyContext) };
g_win11RemovePackageDependency(win11PackageDependencyContext);
}
HRESULT MddCore::Win11::GetResolvedPackageFullNameForPackageDependency(
_In_ PCWSTR packageDependencyId,
_Outptr_result_maybenull_ PWSTR* packageFullName)
{
RETURN_IF_FAILED(g_win11GetResolvedPackageFullNameForPackageDependency(packageDependencyId, packageFullName));
return S_OK;
}
HRESULT MddCore::Win11::GetIdForPackageDependencyContext(
_In_ MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext,
_Outptr_result_maybenull_ PWSTR* packageDependencyId)
{
static_assert(sizeof(MDD_PACKAGEDEPENDENCY_CONTEXT) == sizeof(PACKAGEDEPENDENCY_CONTEXT));
auto win11PackageDependencyContext{ reinterpret_cast<PACKAGEDEPENDENCY_CONTEXT>(packageDependencyContext) };
RETURN_IF_FAILED(g_win11GetIdForPackageDependencyContext(win11PackageDependencyContext, packageDependencyId));
return S_OK;
}
UINT32 MddCore::Win11::GetPackageGraphRevisionId()
{
return g_win11GetPackageGraphRevisionId();
}

Просмотреть файл

@ -0,0 +1,82 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#if !defined(MDDWIN11DYNAMICDEPENDENCY_H)
#define MDDWIN11DYNAMICDEPENDENCY_H
#include <MsixDynamicDependency.h>
#include <winrt/Microsoft.Windows.ApplicationModel.DynamicDependency.h>
HRESULT WINAPI MddWin11Initialize() noexcept;
HRESULT WINAPI MddWin11Shutdown() noexcept;
namespace MddCore::Win11
{
bool IsSupported();
HRESULT TryCreatePackageDependency(
PSID user,
const winrt::hstring& packageFamilyName,
const winrt::Windows::ApplicationModel::PackageVersion& minVersion,
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures packageDependencyProcessorArchitectures,
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& options,
_Outptr_result_maybenull_ PWSTR* packageDependencyId);
HRESULT TryCreatePackageDependency(
PSID user,
_In_ PCWSTR packageFamilyName,
PACKAGE_VERSION minVersion,
MddPackageDependencyProcessorArchitectures packageDependencyProcessorArchitectures,
MddPackageDependencyLifetimeKind lifetimeKind,
PCWSTR lifetimeArtifact,
MddCreatePackageDependencyOptions options,
_Outptr_result_maybenull_ PWSTR* packageDependencyId);
void DeletePackageDependency(
const winrt::hstring& packageDependencyId);
void DeletePackageDependency(
_In_ PCWSTR packageDependencyId);
HRESULT AddPackageDependency(
const winrt::hstring& packageDependencyId,
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& options,
_Out_ MDD_PACKAGEDEPENDENCY_CONTEXT* packageDependencyContext,
_Outptr_opt_result_maybenull_ PWSTR* packageFullName);
HRESULT AddPackageDependency(
_In_ PCWSTR packageDependencyId,
std::int32_t rank,
MddAddPackageDependencyOptions options,
_Out_ MDD_PACKAGEDEPENDENCY_CONTEXT* packageDependencyContext,
_Outptr_opt_result_maybenull_ PWSTR* packageFullName);
void RemovePackageDependency(
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId packageDependencyContextId);
void RemovePackageDependency(
_In_ MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext);
HRESULT GetResolvedPackageFullNameForPackageDependency(
_In_ PCWSTR packageDependencyId,
_Outptr_result_maybenull_ PWSTR* packageFullName);
HRESULT GetIdForPackageDependencyContext(
_In_ MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext,
_Outptr_result_maybenull_ PWSTR* packageDependencyId);
UINT32 GetPackageGraphRevisionId();
inline winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId ToContextId(MDD_PACKAGEDEPENDENCY_CONTEXT context)
{
return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId{ static_cast<uint64_t>(reinterpret_cast<INT_PTR>(context)) };
}
inline MDD_PACKAGEDEPENDENCY_CONTEXT ToContext(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId contextId)
{
return reinterpret_cast<MDD_PACKAGEDEPENDENCY_CONTEXT>(static_cast<INT_PTR>(contextId.Id));
}
}
#endif // MDDWIN11DYNAMICDEPENDENCY_H

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
<package id="Microsoft.WindowsAppSDK.Protobuf" version="3.21.12" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
<package id="Microsoft.WindowsAppSDK.Protobuf" version="3.21.12" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="net45" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="net45" />
</packages>

Просмотреть файл

@ -3,5 +3,5 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
</packages>

Просмотреть файл

@ -0,0 +1,171 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include <IsWindowsVersion.h>
#include "M.W.M.D.AddPackageOptions.h"
#include "Microsoft.Windows.Management.Deployment.AddPackageOptions.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Microsoft::Windows::Management::Deployment::PackageVolume AddPackageOptions::TargetVolume()
{
return m_targetVolume;
}
void AddPackageOptions::TargetVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& value)
{
m_targetVolume = value;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> AddPackageOptions::DependencyPackageUris()
{
if (!m_dependencyPackageUris)
{
m_dependencyPackageUris = winrt::single_threaded_vector<winrt::Windows::Foundation::Uri>();
}
return m_dependencyPackageUris;
}
winrt::Windows::Foundation::Collections::IVector<hstring> AddPackageOptions::OptionalPackageFamilyNames()
{
if (!m_optionalPackageFamilyNames)
{
m_optionalPackageFamilyNames = winrt::single_threaded_vector<hstring>();
}
return m_optionalPackageFamilyNames;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> AddPackageOptions::OptionalPackageUris()
{
if (!m_optionalPackageUris)
{
m_optionalPackageUris = winrt::single_threaded_vector<winrt::Windows::Foundation::Uri>();
}
return m_optionalPackageUris;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> AddPackageOptions::RelatedPackageUris()
{
if (!m_relatedPackageUris)
{
m_relatedPackageUris = winrt::single_threaded_vector<winrt::Windows::Foundation::Uri>();
}
return m_relatedPackageUris;
}
winrt::Windows::Foundation::Uri AddPackageOptions::ExternalLocationUri()
{
return m_externalLocationUri;
}
void AddPackageOptions::ExternalLocationUri(winrt::Windows::Foundation::Uri const& value)
{
m_externalLocationUri = value;
}
winrt::Microsoft::Windows::Management::Deployment::StubPackageOption AddPackageOptions::StubPackageOption()
{
return m_stubPackageOption;
}
void AddPackageOptions::StubPackageOption(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption const& value)
{
m_stubPackageOption = value;
}
bool AddPackageOptions::AllowUnsigned()
{
return m_allowUnsigned;
}
void AddPackageOptions::AllowUnsigned(bool value)
{
m_allowUnsigned = value;
}
bool AddPackageOptions::DeveloperMode()
{
return m_developerMode;
}
void AddPackageOptions::DeveloperMode(bool value)
{
m_developerMode = value;
}
bool AddPackageOptions::ForceAppShutdown()
{
return m_forceAppShutdown;
}
void AddPackageOptions::ForceAppShutdown(bool value)
{
m_forceAppShutdown = value;
}
bool AddPackageOptions::ForceTargetAppShutdown()
{
return m_forceTargetAppShutdown;
}
void AddPackageOptions::ForceTargetAppShutdown(bool value)
{
m_forceTargetAppShutdown = value;
}
bool AddPackageOptions::ForceUpdateFromAnyVersion()
{
return m_forceUpdateFromAnyVersion;
}
void AddPackageOptions::ForceUpdateFromAnyVersion(bool value)
{
m_forceUpdateFromAnyVersion = value;
}
bool AddPackageOptions::InstallAllResources()
{
return m_installAllResources;
}
void AddPackageOptions::InstallAllResources(bool value)
{
m_installAllResources = value;
}
bool AddPackageOptions::RequiredContentGroupOnly()
{
return m_requiredContentGroupOnly;
}
void AddPackageOptions::RequiredContentGroupOnly(bool value)
{
m_requiredContentGroupOnly = value;
}
bool AddPackageOptions::RetainFilesOnFailure()
{
return m_retainFilesOnFailure;
}
void AddPackageOptions::RetainFilesOnFailure(bool value)
{
m_retainFilesOnFailure = value;
}
bool AddPackageOptions::StageInPlace()
{
return m_stageInPlace;
}
void AddPackageOptions::StageInPlace(bool value)
{
m_stageInPlace = value;
}
bool AddPackageOptions::DeferRegistrationWhenPackagesAreInUse()
{
return m_deferRegistrationWhenPackagesAreInUse;
}
void AddPackageOptions::DeferRegistrationWhenPackagesAreInUse(bool value)
{
m_deferRegistrationWhenPackagesAreInUse = value;
}
bool AddPackageOptions::IsExpectedDigestsSupported()
{
// Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
return WindowsVersion::IsWindows11_22H2OrGreater();
}
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> AddPackageOptions::ExpectedDigests()
{
return m_expectedDigests;
}
bool AddPackageOptions::IsLimitToExistingPackagesSupported()
{
// Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
return WindowsVersion::IsWindows11_22H2OrGreater();
}
bool AddPackageOptions::LimitToExistingPackages()
{
return m_limitToExistingPackages;
}
void AddPackageOptions::LimitToExistingPackages(bool value)
{
m_limitToExistingPackages = value;
}
}

Просмотреть файл

@ -0,0 +1,78 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.AddPackageOptions.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct AddPackageOptions : AddPackageOptionsT<AddPackageOptions>
{
AddPackageOptions() = default;
winrt::Microsoft::Windows::Management::Deployment::PackageVolume TargetVolume();
void TargetVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& value);
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> DependencyPackageUris();
winrt::Windows::Foundation::Collections::IVector<hstring> OptionalPackageFamilyNames();
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> OptionalPackageUris();
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> RelatedPackageUris();
winrt::Windows::Foundation::Uri ExternalLocationUri();
void ExternalLocationUri(winrt::Windows::Foundation::Uri const& value);
winrt::Microsoft::Windows::Management::Deployment::StubPackageOption StubPackageOption();
void StubPackageOption(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption const& value);
bool AllowUnsigned();
void AllowUnsigned(bool value);
bool DeveloperMode();
void DeveloperMode(bool value);
bool ForceAppShutdown();
void ForceAppShutdown(bool value);
bool ForceTargetAppShutdown();
void ForceTargetAppShutdown(bool value);
bool ForceUpdateFromAnyVersion();
void ForceUpdateFromAnyVersion(bool value);
bool InstallAllResources();
void InstallAllResources(bool value);
bool RequiredContentGroupOnly();
void RequiredContentGroupOnly(bool value);
bool RetainFilesOnFailure();
void RetainFilesOnFailure(bool value);
bool StageInPlace();
void StageInPlace(bool value);
bool IsDeferRegistrationWhenPackagesAreInUseSupported();
bool DeferRegistrationWhenPackagesAreInUse();
void DeferRegistrationWhenPackagesAreInUse(bool value);
bool IsExpectedDigestsSupported();
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> ExpectedDigests();
bool IsLimitToExistingPackagesSupported();
bool LimitToExistingPackages();
void LimitToExistingPackages(bool value);
private:
winrt::Microsoft::Windows::Management::Deployment::PackageVolume m_targetVolume{};
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> m_dependencyPackageUris{};
winrt::Windows::Foundation::Collections::IVector<hstring> m_optionalPackageFamilyNames{};
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> m_optionalPackageUris{};
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> m_relatedPackageUris{};
winrt::Windows::Foundation::Uri m_externalLocationUri{ nullptr };
winrt::Microsoft::Windows::Management::Deployment::StubPackageOption m_stubPackageOption{};
bool m_allowUnsigned{};
bool m_developerMode{};
bool m_forceAppShutdown{};
bool m_forceTargetAppShutdown{};
bool m_forceUpdateFromAnyVersion{};
bool m_installAllResources{};
bool m_requiredContentGroupOnly{};
bool m_retainFilesOnFailure{};
bool m_stageInPlace{};
bool m_deferRegistrationWhenPackagesAreInUse{};
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> m_expectedDigests;
bool m_limitToExistingPackages{};
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct AddPackageOptions : AddPackageOptionsT<AddPackageOptions, implementation::AddPackageOptions>
{
};
}

Просмотреть файл

@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include <IsWindowsVersion.h>
#include "M.W.M.D.EnsureIsReadyOptions.h"
#include "Microsoft.Windows.Management.Deployment.EnsureIsReadyOptions.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Microsoft::Windows::Management::Deployment::DeploymentProcessingModel EnsureIsReadyOptions::DeploymentProcessingModel()
{
return m_deploymentProcessingModel;
}
void EnsureIsReadyOptions::DeploymentProcessingModel(winrt::Microsoft::Windows::Management::Deployment::DeploymentProcessingModel const& value)
{
m_deploymentProcessingModel = value;
}
winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority EnsureIsReadyOptions::DeploymentPriority()
{
return m_deploymentPriority;
}
void EnsureIsReadyOptions::DeploymentPriority(winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority const& value)
{
m_deploymentPriority = value;
}
}

Просмотреть файл

@ -0,0 +1,29 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.EnsureIsReadyOptions.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct EnsureIsReadyOptions : EnsureIsReadyOptionsT<EnsureIsReadyOptions>
{
EnsureIsReadyOptions() = default;
winrt::Microsoft::Windows::Management::Deployment::DeploymentProcessingModel DeploymentProcessingModel();
void DeploymentProcessingModel(winrt::Microsoft::Windows::Management::Deployment::DeploymentProcessingModel const& value);
winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority DeploymentPriority();
void DeploymentPriority(winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority const& value);
private:
winrt::Microsoft::Windows::Management::Deployment::DeploymentProcessingModel m_deploymentProcessingModel{};
winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority m_deploymentPriority{ winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority::Normal };
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct EnsureIsReadyOptions : EnsureIsReadyOptionsT<EnsureIsReadyOptions, implementation::EnsureIsReadyOptions>
{
};
}

Просмотреть файл

@ -0,0 +1,18 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.FindPackageSetOptions.h"
#include "Microsoft.Windows.Management.Deployment.FindPackageSetOptions.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
bool FindPackageSetOptions::TODO_MustHaveAtLeastOneInterfaceOrStaticFactoryPlaceholder()
{
throw hresult_not_implemented();
}
void FindPackageSetOptions::TODO_MustHaveAtLeastOneInterfaceOrStaticFactoryPlaceholder(bool value)
{
throw hresult_not_implemented();
}
}

Просмотреть файл

@ -0,0 +1,23 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.FindPackageSetOptions.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct FindPackageSetOptions : FindPackageSetOptionsT<FindPackageSetOptions>
{
FindPackageSetOptions() = default;
bool TODO_MustHaveAtLeastOneInterfaceOrStaticFactoryPlaceholder();
void TODO_MustHaveAtLeastOneInterfaceOrStaticFactoryPlaceholder(bool value);
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct FindPackageSetOptions : FindPackageSetOptionsT<FindPackageSetOptions, implementation::FindPackageSetOptions>
{
};
}

Просмотреть файл

@ -0,0 +1,450 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageDeploymentManager.h"
#include "Microsoft.Windows.Management.Deployment.PackageDeploymentManager.g.cpp"
#include "M.W.M.D.PackageDeploymentResult.h"
#include "M.W.M.D.PackageDeploymentProgress.h"
#include "M.W.M.D.PackageVolumeManager.h"
#include "MsixPackageManager.h"
#include "PackageDeploymentResolver.h"
static_assert(static_cast<int>(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::Default) == static_cast<int>(winrt::Windows::Management::Deployment::StubPackageOption::Default),
"winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::Default != winrt::Windows::Management::Deployment::StubPackageOption::Default");
static_assert(static_cast<int>(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::InstallFull) == static_cast<int>(winrt::Windows::Management::Deployment::StubPackageOption::InstallFull),
"winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::InstallFull != winrt::Windows::Management::Deployment::StubPackageOption::InstallFull");
static_assert(static_cast<int>(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::InstallStub) == static_cast<int>(winrt::Windows::Management::Deployment::StubPackageOption::InstallStub),
"winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::InstallStub != winrt::Windows::Management::Deployment::StubPackageOption::InstallStub");
static_assert(static_cast<int>(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::UsePreference) == static_cast<int>(winrt::Windows::Management::Deployment::StubPackageOption::UsePreference),
"winrt::Microsoft::Windows::Management::Deployment::StubPackageOption::UsePreference != winrt::Windows::Management::Deployment::StubPackageOption::UsePreference");
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager PackageDeploymentManager::GetDefault()
{
return winrt::make<winrt::Microsoft::Windows::Management::Deployment::implementation::PackageDeploymentManager>();
}
bool PackageDeploymentManager::IsPackageSetReady(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet)
{
Validate(packageSet);
for (const winrt::Microsoft::Windows::Management::Deployment::PackageSetItem& packageSetItem : packageSet.PackageSetItems())
{
if (!IsReady(packageSetItem))
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_FAILED,
"Id=%ls PackageFamilyName=%ls MinVersion=%hu.%hu.%hu.%hu ArchitectureFilter:0x%X",
packageSetItem.Id().c_str(),
packageSetItem.PackageFamilyName().c_str(),
packageSetItem.MinVersion().Major,
packageSetItem.MinVersion().Minor,
packageSetItem.MinVersion().Build,
packageSetItem.MinVersion().Revision,
packageSetItem.ProcessorArchitectureFilter());
return false;
}
}
return true;
}
bool PackageDeploymentManager::IsPackageSetReadyById(hstring const& packageSetId)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::EnsurePackageSetIsReadyAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet, winrt::Microsoft::Windows::Management::Deployment::EnsureIsReadyOptions options)
{
//TODO auto logTelemetry{ PackageDeploymentTelemetry::CreateChannelAsync::Start(g_telemetryHelper, remoteId) };
auto strong = get_strong(); //TODO why?
auto cancellation{ co_await winrt::get_cancellation_token() };
cancellation.enable_propagation(true);
//TODO logTelemetry.IgnoreCurrentThread();
// Allow to register the progress and complete handler
co_await resume_background();
//TODO auto logTelemetryContinuation = logTelemetry.ContinueOnCurrentThread();
auto progress{ co_await winrt::get_progress_token() };
auto packageDeploymentProgress{
winrt::make<
winrt::Microsoft::Windows::Management::Deployment::implementation::PackageDeploymentProgress>(
PackageDeploymentProgressStatus::Queued, 0) };
progress(packageDeploymentProgress);
// Check parameter(s)
Validate(packageSet);
// Is there any work to do?
packageDeploymentProgress.status(PackageDeploymentProgressStatus::InProgress);
const double c_progressPercentageStartOfIsReady{ 0.01 };
packageDeploymentProgress.percentage(c_progressPercentageStartOfIsReady);
progress(packageDeploymentProgress);
if (IsPackageSetReady(packageSet))
{
co_return winrt::make<PackageDeploymentResult>(
PackageDeploymentStatus::CompletedSuccess, S_OK, true, /*TODO*/winrt::guid{});
}
const double c_progressPercentageStartOfInstalls{ 0.10 };
packageDeploymentProgress.percentage(c_progressPercentageStartOfInstalls);
progress(packageDeploymentProgress);
auto packageSetItems{ packageSet.PackageSetItems() };
const double progressIncrementPerPackageSetItem{ (1.0 - c_progressPercentageStartOfInstalls) / packageSetItems.Size() };
for (const winrt::Microsoft::Windows::Management::Deployment::PackageSetItem& packageSetItem : packageSetItems)
{
try
{
EnsureIsReadyAsync(packageSetItem, options);
packageDeploymentProgress.percentage(packageDeploymentProgress.percentage() + progressIncrementPerPackageSetItem);
progress(packageDeploymentProgress);
}
catch (...)
{
auto exception{ hresult_error(to_hresult(), take_ownership_from_abi) };
co_return winrt::make<PackageDeploymentResult>(
PackageDeploymentStatus::CompletedFailure, exception.code(), false, /*TODO*/winrt::guid{});
}
}
co_return winrt::make<PackageDeploymentResult>(
PackageDeploymentStatus::CompletedSuccess, S_OK, true, /*TODO*/winrt::guid{});
//TODO logTelemetry.Stop();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::EnsurePackageSetIsReadyByIdAsync(hstring packageSetId, winrt::Microsoft::Windows::Management::Deployment::EnsureIsReadyOptions options)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::AddPackageAsync(hstring package, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options)
{
const winrt::Windows::Foundation::Uri packageUri{ package };
const auto packageAbsoluteUri{ packageUri.AbsoluteUri() };
if (!packageAbsoluteUri.empty())
{
const std::wstring packageAsString{ package.c_str() };
if (packageAsString.ends_with(L".appinstaller"))
{
//TODO: return AddPackageByAppInstallerFileAsync(packageUri);
}
else
{
return AddPackageByUriAsync(packageUri, options);
}
}
THROW_HR_MSG(E_INVALIDARG, "%ls", package.c_str());
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::AddPackageByUriAsync(winrt::Windows::Foundation::Uri packageUri, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options)
{
//TODO auto logTelemetry{ PackageDeploymentTelemetry::CreateChannelAsync::Start(g_telemetryHelper, remoteId) };
auto strong = get_strong(); //TODO why?
auto cancellation{ co_await winrt::get_cancellation_token() };
cancellation.enable_propagation(true);
//TODO logTelemetry.IgnoreCurrentThread();
// Allow to register the progress and complete handler
co_await resume_background();
//TODO auto logTelemetryContinuation = logTelemetry.ContinueOnCurrentThread();
auto progress{ co_await winrt::get_progress_token() };
auto packageDeploymentProgress{
winrt::make<
winrt::Microsoft::Windows::Management::Deployment::implementation::PackageDeploymentProgress>(
PackageDeploymentProgressStatus::Queued, 0) };
progress(packageDeploymentProgress);
// Check parameter(s)
//TODO Validate(packageSet);
winrt::Windows::Management::Deployment::AddPackageOptions addOptions/*TODO { ToOptions(options) }*/;
try
{
auto deploymentOperation{ m_packageManager.AddPackageByUriAsync(packageUri, addOptions) };
deploymentOperation.get();
const auto deploymentResult{ deploymentOperation.GetResults() };
if (deploymentOperation.Status() != winrt::Windows::Foundation::AsyncStatus::Completed)
{
co_return winrt::make<PackageDeploymentResult>(
PackageDeploymentStatus::CompletedSuccess, S_OK, deploymentResult.IsRegistered(), /*TODO*/winrt::guid{});
}
else if (deploymentOperation.Status() == winrt::Windows::Foundation::AsyncStatus::Error)
{
const winrt::hresult hr{ static_cast<HRESULT>(deploymentOperation.ErrorCode()) };
const winrt::hresult extendedHr{ deploymentResult.ExtendedErrorCode() };
FAIL_FAST_HR_IF_MSG(E_UNEXPECTED, SUCCEEDED(hr) && SUCCEEDED(extendedHr), "%ls", packageUri.ToString().c_str());
const winrt::hresult resultHr{ FAILED(hr) ? hr : extendedHr };
co_return winrt::make<PackageDeploymentResult>(
PackageDeploymentStatus::CompletedFailure, resultHr, deploymentResult.IsRegistered(), /*TODO*/winrt::guid{});
}
else if (deploymentOperation.Status() == winrt::Windows::Foundation::AsyncStatus::Canceled)
{
THROW_WIN32_MSG(ERROR_CANCELLED, "%ls", packageUri.ToString().c_str());
}
FAIL_FAST_HR_MSG(E_UNEXPECTED, "Status:%d Uri:%ls", static_cast<int>(deploymentOperation.Status()), packageUri.ToString().c_str());
}
catch (...)
{
auto exception{ hresult_error(to_hresult(), take_ownership_from_abi) };
(void)LOG_HR_MSG(exception.code(), "%ls", packageUri.ToString().c_str());
co_return winrt::make<PackageDeploymentResult>(
PackageDeploymentStatus::CompletedFailure, exception.code(), false, /*TODO*/winrt::guid{});
}
//TODO logTelemetry.Stop();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::AddPackageSetAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::AddPackageSetByIdAsync(hstring packageSetId, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::RemovePackageByFullNameNameAsync(hstring packageFullName, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::RemovePackageByFamilyNameNameAsync(hstring packageFamilyName, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::RemovePackageSetAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress>
PackageDeploymentManager::RemovePackageSetByIdAsync(hstring packageSetId, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options)
{
throw hresult_not_implemented();
}
bool PackageDeploymentManager::IsReady(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem)
{
const AppModel::Identity::PackageVersion minVersion{ packageSetItem.MinVersion() };
const auto processorArchitectureFilter{ packageSetItem.ProcessorArchitectureFilter() };
return ::Microsoft::Windows::ApplicationModel::PackageDeploymentResolver::FindAny(m_packageManager, packageSetItem.PackageFamilyName(), minVersion, processorArchitectureFilter);
}
void PackageDeploymentManager::Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet) const
{
THROW_HR_IF(E_INVALIDARG, packageSet.Id().empty());
const auto& packageSetItems{ packageSet.PackageSetItems() };
THROW_HR_IF(E_INVALIDARG, packageSetItems.Size() == 0);
for (const winrt::Microsoft::Windows::Management::Deployment::PackageSetItem& packageSetItem : packageSetItems)
{
Validate(packageSetItem);
}
}
void PackageDeploymentManager::Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem) const
{
const auto packageFamilyName{ packageSetItem.PackageFamilyName() };
THROW_IF_WIN32_ERROR_MSG(VerifyPackageFamilyName(packageFamilyName.c_str()), "PackageFamilyName:%ls", packageFamilyName.c_str());
const auto packageUri{ packageSetItem.PackageUri() };
THROW_HR_IF_NULL_MSG(E_INVALIDARG, packageUri, "PackageUri:<null>");
}
void PackageDeploymentManager::EnsureIsReadyAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem, winrt::Microsoft::Windows::Management::Deployment::EnsureIsReadyOptions const& options)
{
if (IsReady(packageSetItem))
{
return;
}
auto packageUri{ packageSetItem.PackageUri() };
winrt::Windows::Management::Deployment::AddPackageOptions addOptions/*TODO { ToOptions(options) }*/;
auto deploymentOperation{ m_packageManager.AddPackageByUriAsync(packageUri, addOptions) };
deploymentOperation.get();
try
{
const auto deploymentResult{ deploymentOperation.GetResults() };
if (deploymentOperation.Status() == winrt::Windows::Foundation::AsyncStatus::Error)
{
const winrt::hresult hr{ static_cast<HRESULT>(deploymentOperation.ErrorCode()) };
THROW_IF_FAILED_MSG(hr, "%ls", packageUri.ToString().c_str());
const winrt::hresult extendedHr{ deploymentResult.ExtendedErrorCode() };
THROW_IF_FAILED_MSG(extendedHr, "%ls", packageUri.ToString().c_str());
FAIL_FAST_HR_MSG(E_UNEXPECTED, "%ls", packageUri.ToString().c_str());
}
else if (deploymentOperation.Status() == winrt::Windows::Foundation::AsyncStatus::Canceled)
{
THROW_WIN32_MSG(ERROR_CANCELLED, "%ls", packageUri.ToString().c_str());
}
FAIL_FAST_HR_IF_MSG(E_UNEXPECTED, deploymentOperation.Status() != winrt::Windows::Foundation::AsyncStatus::Completed, "%ls", packageUri.ToString().c_str());
}
catch (...)
{
auto exception{ hresult_error(to_hresult(), take_ownership_from_abi) };
THROW_HR_MSG(exception.code(), "%ls", packageUri.ToString().c_str());
}
}
winrt::Windows::Management::Deployment::PackageVolume PackageDeploymentManager::ToPackageVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& packageVolume) const
{
auto toPackageVolume{ m_packageManager.FindPackageVolume(packageVolume.Name()) };
return toPackageVolume;
}
winrt::Windows::Management::Deployment::AddPackageOptions PackageDeploymentManager::ToOptions(winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions const& options) const
{
winrt::Windows::Management::Deployment::AddPackageOptions toOptions;
if (options.TargetVolume())
{
toOptions.TargetVolume(ToPackageVolume(options.TargetVolume()));
}
for (const auto uri : options.DependencyPackageUris())
{
toOptions.DependencyPackageUris().Append(uri);
}
for (const auto packageFamilyName : options.OptionalPackageFamilyNames())
{
toOptions.OptionalPackageFamilyNames().Append(packageFamilyName);
}
for (const auto uri : options.OptionalPackageUris())
{
toOptions.OptionalPackageUris().Append(uri);
}
for (const auto uri : options.RelatedPackageUris())
{
toOptions.RelatedPackageUris().Append(uri);
}
toOptions.ExternalLocationUri(options.ExternalLocationUri());
toOptions.StubPackageOption(static_cast<winrt::Windows::Management::Deployment::StubPackageOption>(options.StubPackageOption()));
toOptions.AllowUnsigned(options.AllowUnsigned());
toOptions.DeveloperMode(options.DeveloperMode());
toOptions.ForceAppShutdown(options.ForceAppShutdown());
toOptions.ForceTargetAppShutdown(options.ForceTargetAppShutdown());
toOptions.ForceUpdateFromAnyVersion(options.ForceUpdateFromAnyVersion());
toOptions.InstallAllResources(options.InstallAllResources());
toOptions.RequiredContentGroupOnly(options.RequiredContentGroupOnly());
toOptions.RetainFilesOnFailure(options.RetainFilesOnFailure());
toOptions.StageInPlace(options.StageInPlace());
toOptions.DeferRegistrationWhenPackagesAreInUse(options.DeferRegistrationWhenPackagesAreInUse());
if (options.IsExpectedDigestsSupported())
{
auto toExpectedDigests = toOptions.ExpectedDigests();
for (const auto expectedDigest : options.ExpectedDigests())
{
toExpectedDigests.Insert(expectedDigest.Key(), expectedDigest.Value());
}
}
if (options.IsLimitToExistingPackagesSupported())
{
toOptions.LimitToExistingPackages(options.LimitToExistingPackages());
}
return toOptions;
}
winrt::Windows::Management::Deployment::StagePackageOptions PackageDeploymentManager::ToOptions(winrt::Microsoft::Windows::Management::Deployment::StagePackageOptions const& options) const
{
winrt::Windows::Management::Deployment::StagePackageOptions toOptions;
if (options.TargetVolume())
{
toOptions.TargetVolume(ToPackageVolume(options.TargetVolume()));
}
for (const auto uri : options.DependencyPackageUris())
{
toOptions.DependencyPackageUris().Append(uri);
}
for (const auto packageFamilyName : options.OptionalPackageFamilyNames())
{
toOptions.OptionalPackageFamilyNames().Append(packageFamilyName);
}
for (const auto uri : options.OptionalPackageUris())
{
toOptions.OptionalPackageUris().Append(uri);
}
for (const auto uri : options.RelatedPackageUris())
{
toOptions.RelatedPackageUris().Append(uri);
}
toOptions.ExternalLocationUri(options.ExternalLocationUri());
toOptions.StubPackageOption(static_cast<winrt::Windows::Management::Deployment::StubPackageOption>(options.StubPackageOption()));
toOptions.DeveloperMode(options.DeveloperMode());
toOptions.ForceUpdateFromAnyVersion(options.ForceUpdateFromAnyVersion());
toOptions.InstallAllResources(options.InstallAllResources());
toOptions.RequiredContentGroupOnly(options.RequiredContentGroupOnly());
toOptions.StageInPlace(options.StageInPlace());
toOptions.AllowUnsigned(options.AllowUnsigned());
if (options.IsExpectedDigestsSupported())
{
auto toExpectedDigests = toOptions.ExpectedDigests();
for (const auto expectedDigest : options.ExpectedDigests())
{
toExpectedDigests.Insert(expectedDigest.Key(), expectedDigest.Value());
}
}
return toOptions;
}
winrt::Windows::Management::Deployment::RegisterPackageOptions PackageDeploymentManager::ToOptions(winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions const& options) const
{
winrt::Windows::Management::Deployment::RegisterPackageOptions toOptions;
if (options.AppDataVolume())
{
toOptions.AppDataVolume(ToPackageVolume(options.AppDataVolume()));
}
for (const auto uri : options.DependencyPackageUris())
{
toOptions.DependencyPackageUris().Append(uri);
}
for (const auto packageFamilyName : options.OptionalPackageFamilyNames())
{
toOptions.OptionalPackageFamilyNames().Append(packageFamilyName);
}
toOptions.ExternalLocationUri(options.ExternalLocationUri());
toOptions.DeveloperMode(options.DeveloperMode());
toOptions.ForceAppShutdown(options.ForceAppShutdown());
toOptions.ForceTargetAppShutdown(options.ForceTargetAppShutdown());
toOptions.ForceUpdateFromAnyVersion(options.ForceUpdateFromAnyVersion());
toOptions.InstallAllResources(options.InstallAllResources());
toOptions.StageInPlace(options.StageInPlace());
toOptions.AllowUnsigned(options.AllowUnsigned());
toOptions.DeferRegistrationWhenPackagesAreInUse(options.DeferRegistrationWhenPackagesAreInUse());
if (options.IsExpectedDigestsSupported())
{
auto toExpectedDigests = toOptions.ExpectedDigests();
for (const auto expectedDigest : options.ExpectedDigests())
{
toExpectedDigests.Insert(expectedDigest.Key(), expectedDigest.Value());
}
}
return toOptions;
}
winrt::Windows::Management::Deployment::RemovalOptions PackageDeploymentManager::ToOptions(winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions const& options) const
{
auto toOptions{ winrt::Windows::Management::Deployment::RemovalOptions::None };
if (options.PreserveApplicationData())
{
toOptions |= winrt::Windows::Management::Deployment::RemovalOptions::PreserveApplicationData;
}
if (options.PreserveRoamableApplicationData())
{
toOptions |= winrt::Windows::Management::Deployment::RemovalOptions::PreserveRoamableApplicationData;
}
if (options.RemoveForAllUsers())
{
toOptions |= winrt::Windows::Management::Deployment::RemovalOptions::RemoveForAllUsers;
}
//TODO DeploymentPriority Priority;
return toOptions;
}
}

Просмотреть файл

@ -0,0 +1,48 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageDeploymentManager.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageDeploymentManager : PackageDeploymentManagerT<PackageDeploymentManager>
{
PackageDeploymentManager() = default;
static winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentManager GetDefault();
bool IsPackageSetReady(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet);
bool IsPackageSetReadyById(hstring const& packageSetId);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> EnsurePackageSetIsReadyAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet, winrt::Microsoft::Windows::Management::Deployment::EnsureIsReadyOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> EnsurePackageSetIsReadyByIdAsync(hstring packageSetId, winrt::Microsoft::Windows::Management::Deployment::EnsureIsReadyOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> AddPackageAsync(hstring package, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> AddPackageByUriAsync(winrt::Windows::Foundation::Uri packageUri, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> AddPackageSetAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> AddPackageSetByIdAsync(hstring packageSetId, winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> RemovePackageByFullNameNameAsync(hstring packageFullName, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> RemovePackageByFamilyNameNameAsync(hstring packageFamilyName, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> RemovePackageSetAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSet packageSet, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options);
winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentResult, winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgress> RemovePackageSetByIdAsync(hstring packageSetId, winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions options);
private:
bool IsReady(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSet);
void Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet) const;
void Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem) const;
void EnsureIsReadyAsync(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem, winrt::Microsoft::Windows::Management::Deployment::EnsureIsReadyOptions const& options);
winrt::Windows::Management::Deployment::PackageVolume ToPackageVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& packageVolume) const;
winrt::Windows::Management::Deployment::AddPackageOptions ToOptions(winrt::Microsoft::Windows::Management::Deployment::AddPackageOptions const& options) const;
winrt::Windows::Management::Deployment::StagePackageOptions ToOptions(winrt::Microsoft::Windows::Management::Deployment::StagePackageOptions const& options) const;
winrt::Windows::Management::Deployment::RegisterPackageOptions ToOptions(winrt::Microsoft::Windows::Management::Deployment::RegisterPackageOptions const& options) const;
winrt::Windows::Management::Deployment::RemovalOptions ToOptions(winrt::Microsoft::Windows::Management::Deployment::RemovePackageOptions const& options) const;
private:
winrt::Windows::Management::Deployment::PackageManager m_packageManager;
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageDeploymentManager : PackageDeploymentManagerT<PackageDeploymentManager, implementation::PackageDeploymentManager>
{
};
}

Просмотреть файл

@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageDeploymentProgress.h"
#include "Microsoft.Windows.Management.Deployment.PackageDeploymentProgress.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
PackageDeploymentProgress::PackageDeploymentProgress(
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgressStatus const& status,
double percentage) :
m_status(status),
m_percentage(percentage)
{
}
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgressStatus PackageDeploymentProgress::status()
{
return m_status;
}
void PackageDeploymentProgress::status(winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgressStatus const& value)
{
m_status = value;
}
double PackageDeploymentProgress::percentage()
{
return m_percentage;
}
void PackageDeploymentProgress::percentage(double value)
{
m_percentage = value;
}
}

Просмотреть файл

@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageDeploymentProgress.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageDeploymentProgress : PackageDeploymentProgressT<PackageDeploymentProgress>
{
PackageDeploymentProgress() = default;
PackageDeploymentProgress(
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgressStatus const& status,
double percentage);
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgressStatus status();
void status(winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgressStatus const& value);
double percentage();
void percentage(double value);
private:
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentProgressStatus m_status{};
double m_percentage{};
};
}

Просмотреть файл

@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageDeploymentResult.h"
#include "Microsoft.Windows.Management.Deployment.PackageDeploymentResult.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
PackageDeploymentResult::PackageDeploymentResult(winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentStatus status, winrt::hresult const& extendedError, bool isRegistered, winrt::guid const& activityId) :
m_status(status),
m_extendedError(extendedError),
m_isRegistered(isRegistered),
m_activityId(activityId)
{
}
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentStatus PackageDeploymentResult::Status()
{
return m_status;
}
winrt::hresult PackageDeploymentResult::ExtendedError()
{
return m_extendedError;
}
bool PackageDeploymentResult::IsRegistered()
{
return m_isRegistered;
}
winrt::guid PackageDeploymentResult::ActivityId()
{
return m_activityId;
}
}

Просмотреть файл

@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageDeploymentResult.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageDeploymentResult : PackageDeploymentResultT<PackageDeploymentResult>
{
PackageDeploymentResult() = default;
PackageDeploymentResult(winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentStatus status, winrt::hresult const& extendedError, bool isRegistered, winrt::guid const& activityId);
winrt::Microsoft::Windows::Management::Deployment::PackageDeploymentStatus Status();
winrt::hresult ExtendedError();
winrt::guid ActivityId();
bool IsRegistered();
private:
PackageDeploymentStatus m_status{};
winrt::hresult m_extendedError;
bool m_isRegistered{};
winrt::guid m_activityId{};
};
}

Просмотреть файл

@ -0,0 +1,125 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageRuntimeManager.h"
#include "Microsoft.Windows.Management.Deployment.PackageRuntimeManager.g.cpp"
#include "M.W.M.D.PackageSetItemRuntimeDisposition.h"
#include "M.W.M.D.PackageSetRuntimeDisposition.h"
#include <MddWin11.h>
#include <MsixDynamicDependency.h>
#include <wil_msixdynamicdependency.h>
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Microsoft::Windows::Management::Deployment::PackageRuntimeManager PackageRuntimeManager::GetDefault()
{
return winrt::make<winrt::Microsoft::Windows::Management::Deployment::implementation::PackageRuntimeManager>();
}
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition PackageRuntimeManager::AddPackageSet(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet)
{
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions createOptions;
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions addOptions;
return AddPackageSet(packageSet, createOptions, addOptions);
}
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition PackageRuntimeManager::AddPackageSet(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& createOptions, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& addOptions)
{
// Check parameter(s)
Validate(packageSet);
Validate(createOptions);
Validate(addOptions);
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition packageSetRuntimeDisposition;
packageSetRuntimeDisposition.PackageSetId(packageSet.Id());
auto packageSetItemRuntimeDispositions{ packageSetRuntimeDisposition.PackageSetItemRuntimeDispositions() };
const auto packageSetItems{ packageSet.PackageSetItems() };
for (const winrt::Microsoft::Windows::Management::Deployment::PackageSetItem& packageSetItem : packageSetItems)
{
auto packageSetItemRuntimeDisposition{ AddPackageSetItem(packageSetItem, createOptions, addOptions) };
packageSetItemRuntimeDispositions.Append(packageSetItemRuntimeDisposition);
}
return packageSetRuntimeDisposition;
}
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition PackageRuntimeManager::AddPackageSetById(hstring const& packageSetId)
{
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions createOptions;
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions addOptions;
return AddPackageSetById(packageSetId, createOptions, addOptions);
}
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition PackageRuntimeManager::AddPackageSetById(hstring const& packageSetId, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& createOptions, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& addOptions)
{
throw hresult_not_implemented();
}
void PackageRuntimeManager::RemovePackageSet(winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition const& packageSetRuntimeDisposition)
{
const auto packageSetItemRuntimeDispositions{ packageSetRuntimeDisposition.PackageSetItemRuntimeDispositions() };
for (const winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition& packageSetItemRuntimeDisposition : packageSetItemRuntimeDispositions)
{
RemovePackageSetItem(packageSetItemRuntimeDisposition);
}
}
winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition PackageRuntimeManager::AddPackageSetItem(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& createOptions, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& addOptions)
{
auto createPackageDependencyOptions{ MddCreatePackageDependencyOptions::None };
WI_SetFlagIf(createPackageDependencyOptions, MddCreatePackageDependencyOptions::DoNotVerifyDependencyResolution, !createOptions.VerifyDependencyResolution());
wil::unique_process_heap_string packageDependencyId;
THROW_IF_FAILED(MddCore::Win11::TryCreatePackageDependency(nullptr, packageSetItem.PackageFamilyName(),
packageSetItem.MinVersion(), packageSetItem.ProcessorArchitectureFilter(),
createOptions, &packageDependencyId));
auto addPackageDependencyOptions{ MddAddPackageDependencyOptions::None };
WI_SetFlagIf(addPackageDependencyOptions, MddAddPackageDependencyOptions::PrependIfRankCollision, addOptions.PrependIfRankCollision());
wil::unique_mdd_package_dependency_context mddPackageDependencyContext{};
wil::unique_process_heap_string packageFullName;
THROW_IF_FAILED(MddCore::Win11::AddPackageDependency(packageDependencyId.get(), addOptions, &mddPackageDependencyContext, &packageFullName));
auto packageSetItemRuntimeDisposition{ winrt::make<winrt::Microsoft::Windows::Management::Deployment::implementation::PackageSetItemRuntimeDisposition>(
packageSetItem.Id(), packageFullName.get(), packageDependencyId.get(), mddPackageDependencyContext.get()) };
mddPackageDependencyContext.reset();
return packageSetItemRuntimeDisposition;
}
void PackageRuntimeManager::RemovePackageSetItem(winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition const& packageSetItemRuntimeDisposition)
{
const auto packageDependencyContextId{ packageSetItemRuntimeDisposition.PackageDependencyContextId() };
MddCore::Win11::RemovePackageDependency(packageDependencyContextId);
const auto packageDependencyId{ packageSetItemRuntimeDisposition.PackageDependencyId() };
MddCore::Win11::DeletePackageDependency(packageDependencyId);
}
void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet) const
{
THROW_HR_IF(E_INVALIDARG, packageSet.Id().empty());
const auto& packageSetItems{ packageSet.PackageSetItems() };
THROW_HR_IF(E_INVALIDARG, packageSetItems.Size() == 0);
for (const winrt::Microsoft::Windows::Management::Deployment::PackageSetItem& packageSetItem : packageSetItems)
{
Validate(packageSetItem);
}
}
void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem) const
{
const auto packageFamilyName{ packageSetItem.PackageFamilyName() };
THROW_IF_WIN32_ERROR_MSG(VerifyPackageFamilyName(packageFamilyName.c_str()), "PackageFamilyName:%ls", packageFamilyName.c_str());
const auto packageUri{ packageSetItem.PackageUri() };
THROW_HR_IF_NULL_MSG(E_INVALIDARG, packageUri, "PackageUri:<null>");
}
void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& options) const
{
// Nothing to do!
}
void PackageRuntimeManager::Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& options) const
{
// Nothing to do!
}
}

Просмотреть файл

@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageRuntimeManager.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageRuntimeManager : PackageRuntimeManagerT<PackageRuntimeManager>
{
PackageRuntimeManager() = default;
static winrt::Microsoft::Windows::Management::Deployment::PackageRuntimeManager GetDefault();
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition AddPackageSet(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet);
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition AddPackageSet(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& createOptions, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& addOptions);
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition AddPackageSetById(hstring const& packageSetId);
winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition AddPackageSetById(hstring const& packageSetId, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& createOptions, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& addOptions);
void RemovePackageSet(winrt::Microsoft::Windows::Management::Deployment::PackageSetRuntimeDisposition const& packageSetRuntimeDisposition);
private:
winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition AddPackageSetItem(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& createOptions, winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& addOptions);
void RemovePackageSetItem(winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition const& packageSetItemRuntimeDisposition);
void Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet) const;
void Validate(winrt::Microsoft::Windows::Management::Deployment::PackageSetItem const& packageSetItem) const;
void Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::CreatePackageDependencyOptions const& options) const;
void Validate(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::AddPackageDependencyOptions const& options) const;
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageRuntimeManager : PackageRuntimeManagerT<PackageRuntimeManager, implementation::PackageRuntimeManager>
{
};
}

Просмотреть файл

@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageSet.h"
#include "Microsoft.Windows.Management.Deployment.PackageSet.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
hstring PackageSet::Id()
{
return m_id;
}
void PackageSet::Id(hstring const& value)
{
m_id = value;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItem> PackageSet::PackageSetItems()
{
if (!m_packageSetItems)
{
m_packageSetItems = winrt::single_threaded_vector<Microsoft::Windows::Management::Deployment::PackageSetItem>();
}
return m_packageSetItems;
}
}

Просмотреть файл

@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageSet.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageSet : PackageSetT<PackageSet>
{
PackageSet() = default;
hstring Id();
void Id(hstring const& value);
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItem> PackageSetItems();
private:
hstring m_id;
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItem> m_packageSetItems;
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageSet : PackageSetT<PackageSet, implementation::PackageSet>
{
};
}

Просмотреть файл

@ -0,0 +1,50 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageSetItem.h"
#include "Microsoft.Windows.Management.Deployment.PackageSetItem.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
hstring PackageSetItem::Id()
{
return m_id;
}
void PackageSetItem::Id(hstring const& value)
{
m_id = value;
}
hstring PackageSetItem::PackageFamilyName()
{
return m_packageFamilyName;
}
void PackageSetItem::PackageFamilyName(hstring const& value)
{
m_packageFamilyName = value;
}
winrt::Windows::ApplicationModel::PackageVersion PackageSetItem::MinVersion()
{
return m_minVersion;
}
void PackageSetItem::MinVersion(winrt::Windows::ApplicationModel::PackageVersion const& value)
{
m_minVersion = value;
}
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures PackageSetItem::ProcessorArchitectureFilter()
{
return m_processorArchitectureFilter;
}
void PackageSetItem::ProcessorArchitectureFilter(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures const& value)
{
m_processorArchitectureFilter = value;
}
winrt::Windows::Foundation::Uri PackageSetItem::PackageUri()
{
return m_packageUri;
}
void PackageSetItem::PackageUri(winrt::Windows::Foundation::Uri const& value)
{
m_packageUri = value;
}
}

Просмотреть файл

@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageSetItem.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageSetItem : PackageSetItemT<PackageSetItem>
{
PackageSetItem() = default;
hstring Id();
void Id(hstring const& value);
hstring PackageFamilyName();
void PackageFamilyName(hstring const& value);
winrt::Windows::ApplicationModel::PackageVersion MinVersion();
void MinVersion(winrt::Windows::ApplicationModel::PackageVersion const& value);
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures ProcessorArchitectureFilter();
void ProcessorArchitectureFilter(winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures const& value);
winrt::Windows::Foundation::Uri PackageUri();
void PackageUri(winrt::Windows::Foundation::Uri const& value);
private:
hstring m_id;
hstring m_packageFamilyName;
winrt::Windows::ApplicationModel::PackageVersion m_minVersion{};
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures m_processorArchitectureFilter{};
winrt::Windows::Foundation::Uri m_packageUri{ nullptr };
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageSetItem : PackageSetItemT<PackageSetItem, implementation::PackageSetItem>
{
};
}

Просмотреть файл

@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageSetItemRuntimeDisposition.h"
#include "Microsoft.Windows.Management.Deployment.PackageSetItemRuntimeDisposition.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
hstring PackageSetItemRuntimeDisposition::PackageSetItemId()
{
return m_packageSetItemId;
}
hstring PackageSetItemRuntimeDisposition::PackageFullName()
{
return m_packageFullName;
}
hstring PackageSetItemRuntimeDisposition::PackageDependencyId()
{
return m_packageDependencyId;
}
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId PackageSetItemRuntimeDisposition::PackageDependencyContextId()
{
return m_packageDependencyContextId;
}
}

Просмотреть файл

@ -0,0 +1,56 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageSetItemRuntimeDisposition.g.h"
#include "MsixDynamicDependency.h"
#include <winrt/Microsoft.Windows.ApplicationModel.DynamicDependency.h>
#include "MddWin11.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageSetItemRuntimeDisposition : PackageSetItemRuntimeDispositionT<PackageSetItemRuntimeDisposition>
{
PackageSetItemRuntimeDisposition() = default;
PackageSetItemRuntimeDisposition(winrt::hstring const& packageSetItemId,
winrt::hstring const& packageFullName,
winrt::hstring const& packageDependencyId,
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId packageDependencyContextId) :
m_packageSetItemId(packageSetItemId),
m_packageFullName(packageFullName),
m_packageDependencyId(packageDependencyId),
m_packageDependencyContextId(packageDependencyContextId)
{
}
PackageSetItemRuntimeDisposition(winrt::hstring const& packageSetItemId,
winrt::hstring const& packageFullName,
winrt::hstring const& packageDependencyId,
MDD_PACKAGEDEPENDENCY_CONTEXT mddPackageDependencyContext) :
m_packageSetItemId(packageSetItemId),
m_packageFullName(packageFullName),
m_packageDependencyId(packageDependencyId),
m_packageDependencyContextId(MddCore::Win11::ToContextId(mddPackageDependencyContext))
{
}
hstring PackageSetItemId();
hstring PackageFullName();
hstring PackageDependencyId();
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId PackageDependencyContextId();
private:
hstring m_packageSetItemId;
hstring m_packageFullName;
hstring m_packageDependencyId;
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyContextId m_packageDependencyContextId;
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageSetItemRuntimeDisposition : PackageSetItemRuntimeDispositionT<PackageSetItemRuntimeDisposition, implementation::PackageSetItemRuntimeDisposition>
{
};
}

Просмотреть файл

@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageSetManager.h"
#include "Microsoft.Windows.Management.Deployment.PackageSetManager.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Microsoft::Windows::Management::Deployment::PackageSetManager PackageSetManager::GetDefault()
{
throw hresult_not_implemented();
}
void PackageSetManager::Add(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet)
{
throw hresult_not_implemented();
}
void PackageSetManager::Update(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet)
{
throw hresult_not_implemented();
}
void PackageSetManager::Remove(hstring const& packageSetId)
{
throw hresult_not_implemented();
}
winrt::Microsoft::Windows::Management::Deployment::PackageSet PackageSetManager::Get(hstring const& packageSetId)
{
throw hresult_not_implemented();
}
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSet> PackageSetManager::Find(winrt::Microsoft::Windows::Management::Deployment::FindPackageSetOptions const& options)
{
throw hresult_not_implemented();
}
}

Просмотреть файл

@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageSetManager.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageSetManager : PackageSetManagerT<PackageSetManager>
{
PackageSetManager() = default;
static winrt::Microsoft::Windows::Management::Deployment::PackageSetManager GetDefault();
void Add(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet);
void Update(winrt::Microsoft::Windows::Management::Deployment::PackageSet const& packageSet);
void Remove(hstring const& packageSetId);
winrt::Microsoft::Windows::Management::Deployment::PackageSet Get(hstring const& packageSetId);
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSet> Find(winrt::Microsoft::Windows::Management::Deployment::FindPackageSetOptions const& options);
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageSetManager : PackageSetManagerT<PackageSetManager, implementation::PackageSetManager>
{
};
}

Просмотреть файл

@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageSetRuntimeDisposition.h"
#include "Microsoft.Windows.Management.Deployment.PackageSetRuntimeDisposition.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
hstring PackageSetRuntimeDisposition::PackageSetId()
{
return m_packageSetId;
}
void PackageSetRuntimeDisposition::PackageSetId(hstring const& value)
{
m_packageSetId = value;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition> PackageSetRuntimeDisposition::PackageSetItemRuntimeDispositions()
{
if (!m_packageSetItemRuntimeDispositions)
{
m_packageSetItemRuntimeDispositions = winrt::single_threaded_vector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition>();
}
return m_packageSetItemRuntimeDispositions;
}
}

Просмотреть файл

@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "M.W.M.D.PackageSetRuntimeDisposition.h"
#include "Microsoft.Windows.Management.Deployment.PackageSetRuntimeDisposition.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageSetRuntimeDisposition : PackageSetRuntimeDispositionT<PackageSetRuntimeDisposition>
{
PackageSetRuntimeDisposition() = default;
#if 0
PackageSetRuntimeDisposition(winrt::hstring const& packageSetId) :
m_packageSetId(packageSetId)
{
}
PackageSetRuntimeDisposition(winrt::hstring const& packageSetId, winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition>& packageSetItemRuntimeDispositions) :
m_packageSetId(packageSetId),
m_packageSetItemRuntimeDispositions(packageSetItemRuntimeDispositions)
{
}
#endif
hstring PackageSetId();
void PackageSetId(hstring const& value);
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition> PackageSetItemRuntimeDispositions();
private:
hstring m_packageSetId;
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageSetItemRuntimeDisposition> m_packageSetItemRuntimeDispositions{};
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageSetRuntimeDisposition : PackageSetRuntimeDispositionT<PackageSetRuntimeDisposition, implementation::PackageSetRuntimeDisposition>
{
};
}

Просмотреть файл

@ -0,0 +1,57 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageVolume.h"
#include "Microsoft.Windows.Management.Deployment.PackageVolume.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
PackageVolume::PackageVolume(winrt::Windows::Management::Deployment::PackageVolume const& value)
{
m_isSystemVolume = value.IsSystemVolume();
m_mountPoint = value.MountPoint();
m_name = value.Name();
m_packageStorePath = value.PackageStorePath();
m_supportsHardLinks = value.SupportsHardLinks();
m_isFullTrustPackageSupported = value.IsFullTrustPackageSupported();
m_isAppxInstallSupported = value.IsAppxInstallSupported();
//TODO m_packageStatus = value.Status();
}
bool PackageVolume::IsSystemVolume()
{
return m_isSystemVolume;
}
hstring PackageVolume::MountPoint()
{
return m_mountPoint;
}
hstring PackageVolume::Name()
{
return m_name;
}
hstring PackageVolume::PackageStorePath()
{
return m_packageStorePath;
}
bool PackageVolume::SupportsHardLinks()
{
return m_supportsHardLinks;
}
bool PackageVolume::IsFullTrustPackageSupported()
{
return m_isFullTrustPackageSupported;
}
bool PackageVolume::IsAppxInstallSupported()
{
return m_isAppxInstallSupported;
}
winrt::Microsoft::Windows::Management::Deployment::PackageVolumeStatus PackageVolume::Status()
{
throw hresult_not_implemented();
}
void PackageVolume::FixMe()
{
throw hresult_not_implemented();
}
}

Просмотреть файл

@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageVolume.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageVolume : PackageVolumeT<PackageVolume>
{
PackageVolume() = default;
PackageVolume(winrt::Windows::Management::Deployment::PackageVolume const& value);
bool IsSystemVolume();
hstring MountPoint();
hstring Name();
hstring PackageStorePath();
bool SupportsHardLinks();
bool IsFullTrustPackageSupported();
bool IsAppxInstallSupported();
winrt::Microsoft::Windows::Management::Deployment::PackageVolumeStatus Status();
void FixMe();
private:
bool m_isSystemVolume{};
hstring m_mountPoint;
hstring m_name;
hstring m_packageStorePath;
bool m_supportsHardLinks{};
bool m_isFullTrustPackageSupported{};
bool m_isAppxInstallSupported{};
//TODO winrt::Microsoft::Windows::Management::Deployment::PackageVolumeStatus m_status{};
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageVolume : PackageVolumeT<PackageVolume, implementation::PackageVolume>
{
};
}

Просмотреть файл

@ -0,0 +1,53 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "pch.h"
#include "M.W.M.D.PackageVolumeManager.h"
#include "Microsoft.Windows.Management.Deployment.PackageVolumeManager.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageVolume> PackageVolumeManager::FindPackageVolumes()
{
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageVolume> microsoftPackageVolumes{ winrt::single_threaded_vector<winrt::Microsoft::Windows::Management::Deployment::PackageVolume>() };
winrt::Windows::Management::Deployment::PackageManager packageManager;
winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Management::Deployment::PackageVolume> windowsPackageVolumes{ packageManager.FindPackageVolumes() };
for (winrt::Windows::Management::Deployment::PackageVolume windowsPackageVolume : windowsPackageVolumes)
{
auto microsoftPackageVolume{ winrt::make<winrt::Microsoft::Windows::Management::Deployment::implementation::PackageVolume>(windowsPackageVolume) };
microsoftPackageVolumes.Append(microsoftPackageVolume);
}
return microsoftPackageVolumes;
}
winrt::Microsoft::Windows::Management::Deployment::PackageVolume PackageVolumeManager::FindPackageVolumeByPath(hstring const& path)
{
const auto c_volumePathNameMaxLength{ MAX_PATH };
wchar_t volumePathName[c_volumePathNameMaxLength]{};//AKA volumeMountPoint
THROW_IF_WIN32_BOOL_FALSE_MSG(::GetVolumePathNameW(path.c_str(), volumePathName, ARRAYSIZE(volumePathName)), "Path:%ls", path.c_str());
GUID mediaId{};
const size_t c_volumeNameMaxLength{ 50 }; // "\\?\Volume{GUID}\" == 11 + 11111111-2222-3333-4444-555555555555 + 2 + null-terminator == 11 + 36 + 3 = 50
wchar_t volumeName[c_volumeNameMaxLength]{};
THROW_IF_WIN32_BOOL_FALSE_MSG(::GetVolumeNameForVolumeMountPoint(volumePathName, volumeName, ARRAYSIZE(volumeName)), "Path:%ls VolumePathName:%ls", path.c_str(), volumePathName);
const auto volumeNameLength{ wcslen(volumeName) };
THROW_HR_IF_MSG(E_UNEXPECTED, volumeNameLength == 0, "Path:%ls VolumePathName:%ls", path.c_str(), volumePathName);
const auto offset{ volumeNameLength - 1 };
if (volumeName[offset] == L'\\')
{
volumeName[offset] = L'\0';
}
return FindPackageVolumeByName(winrt::hstring{ volumeName });
}
winrt::Microsoft::Windows::Management::Deployment::PackageVolume PackageVolumeManager::FindPackageVolumeByMediaId(hstring const& mediaId)
{
winrt::Windows::Management::Deployment::PackageManager packageManager;
winrt::Windows::Management::Deployment::PackageVolume windowsPackageVolume{ packageManager.FindPackageVolume(mediaId) };
return winrt::make<winrt::Microsoft::Windows::Management::Deployment::implementation::PackageVolume>(windowsPackageVolume);
}
winrt::Microsoft::Windows::Management::Deployment::PackageVolume PackageVolumeManager::FindPackageVolumeByName(hstring const& name)
{
throw hresult_not_implemented();
}
}

Просмотреть файл

@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageVolumeManager.g.h"
#include "M.W.M.D.PackageVolume.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageVolumeManager
{
PackageVolumeManager() = default;
static winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::Windows::Management::Deployment::PackageVolume> FindPackageVolumes();
static winrt::Microsoft::Windows::Management::Deployment::PackageVolume FindPackageVolumeByPath(hstring const& path);
static winrt::Microsoft::Windows::Management::Deployment::PackageVolume FindPackageVolumeByMediaId(hstring const& mediaId);
static winrt::Microsoft::Windows::Management::Deployment::PackageVolume FindPackageVolumeByName(hstring const& name);
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageVolumeManager : PackageVolumeManagerT<PackageVolumeManager, implementation::PackageVolumeManager>
{
};
}

Просмотреть файл

@ -0,0 +1,34 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.PackageVolumeStatus.h"
#include "Microsoft.Windows.Management.Deployment.PackageVolumeStatus.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
bool PackageVolumeStatus::IsOK()
{
throw hresult_not_implemented();
}
void PackageVolumeStatus::IsOK(bool value)
{
throw hresult_not_implemented();
}
bool PackageVolumeStatus::IsOffline()
{
throw hresult_not_implemented();
}
void PackageVolumeStatus::IsOffline(bool value)
{
throw hresult_not_implemented();
}
bool PackageVolumeStatus::IsBroken()
{
throw hresult_not_implemented();
}
void PackageVolumeStatus::IsBroken(bool value)
{
throw hresult_not_implemented();
}
}

Просмотреть файл

@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.PackageVolumeStatus.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct PackageVolumeStatus : PackageVolumeStatusT<PackageVolumeStatus>
{
PackageVolumeStatus() = default;
bool IsOK();
void IsOK(bool value);
bool IsOffline();
void IsOffline(bool value);
bool IsBroken();
void IsBroken(bool value);
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct PackageVolumeStatus : PackageVolumeStatusT<PackageVolumeStatus, implementation::PackageVolumeStatus>
{
};
}

Просмотреть файл

@ -0,0 +1,118 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include <IsWindowsVersion.h>
#include "M.W.M.D.RegisterPackageOptions.h"
#include "Microsoft.Windows.Management.Deployment.RegisterPackageOptions.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Microsoft::Windows::Management::Deployment::PackageVolume RegisterPackageOptions::AppDataVolume()
{
return m_appDataVolume;
}
void RegisterPackageOptions::AppDataVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& value)
{
m_appDataVolume = value;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> RegisterPackageOptions::DependencyPackageUris()
{
if (!m_dependencyPackageUris)
{
m_dependencyPackageUris = winrt::single_threaded_vector<winrt::Windows::Foundation::Uri>();
}
return m_dependencyPackageUris;
}
winrt::Windows::Foundation::Collections::IVector<hstring> RegisterPackageOptions::OptionalPackageFamilyNames()
{
if (!m_optionalPackageFamilyNames)
{
m_optionalPackageFamilyNames = winrt::single_threaded_vector<hstring>();
}
return m_optionalPackageFamilyNames;
}
winrt::Windows::Foundation::Uri RegisterPackageOptions::ExternalLocationUri()
{
return m_externalLocationUri;
}
void RegisterPackageOptions::ExternalLocationUri(winrt::Windows::Foundation::Uri const& value)
{
m_externalLocationUri = value;
}
bool RegisterPackageOptions::DeveloperMode()
{
return m_developerMode;
}
void RegisterPackageOptions::DeveloperMode(bool value)
{
m_developerMode = value;
}
bool RegisterPackageOptions::ForceAppShutdown()
{
return m_forceAppShutdown;
}
void RegisterPackageOptions::ForceAppShutdown(bool value)
{
m_forceAppShutdown = value;
}
bool RegisterPackageOptions::ForceTargetAppShutdown()
{
return m_forceTargetAppShutdown;
}
void RegisterPackageOptions::ForceTargetAppShutdown(bool value)
{
m_forceTargetAppShutdown = value;
}
bool RegisterPackageOptions::ForceUpdateFromAnyVersion()
{
return m_forceUpdateFromAnyVersion;
}
void RegisterPackageOptions::ForceUpdateFromAnyVersion(bool value)
{
m_forceUpdateFromAnyVersion = value;
}
bool RegisterPackageOptions::InstallAllResources()
{
return m_installAllResources;
}
void RegisterPackageOptions::InstallAllResources(bool value)
{
m_installAllResources = value;
}
bool RegisterPackageOptions::StageInPlace()
{
return m_stageInPlace;
}
void RegisterPackageOptions::StageInPlace(bool value)
{
m_stageInPlace = value;
}
bool RegisterPackageOptions::AllowUnsigned()
{
return m_allowUnsigned;
}
void RegisterPackageOptions::AllowUnsigned(bool value)
{
m_allowUnsigned = value;
}
bool RegisterPackageOptions::DeferRegistrationWhenPackagesAreInUse()
{
return m_deferRegistrationWhenPackagesAreInUse;
}
void RegisterPackageOptions::DeferRegistrationWhenPackagesAreInUse(bool value)
{
m_deferRegistrationWhenPackagesAreInUse = value;
}
bool RegisterPackageOptions::IsExpectedDigestsSupported()
{
// Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
return WindowsVersion::IsWindows11_22H2OrGreater();
}
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> RegisterPackageOptions::ExpectedDigests()
{
return m_expectedDigests;
}
}

Просмотреть файл

@ -0,0 +1,61 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.RegisterPackageOptions.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct RegisterPackageOptions : RegisterPackageOptionsT<RegisterPackageOptions>
{
RegisterPackageOptions() = default;
winrt::Microsoft::Windows::Management::Deployment::PackageVolume AppDataVolume();
void AppDataVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& value);
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> DependencyPackageUris();
winrt::Windows::Foundation::Collections::IVector<hstring> OptionalPackageFamilyNames();
winrt::Windows::Foundation::Uri ExternalLocationUri();
void ExternalLocationUri(winrt::Windows::Foundation::Uri const& value);
bool DeveloperMode();
void DeveloperMode(bool value);
bool ForceAppShutdown();
void ForceAppShutdown(bool value);
bool ForceTargetAppShutdown();
void ForceTargetAppShutdown(bool value);
bool ForceUpdateFromAnyVersion();
void ForceUpdateFromAnyVersion(bool value);
bool InstallAllResources();
void InstallAllResources(bool value);
bool StageInPlace();
void StageInPlace(bool value);
bool AllowUnsigned();
void AllowUnsigned(bool value);
bool IsDeferRegistrationWhenPackagesAreInUseSupported();
bool DeferRegistrationWhenPackagesAreInUse();
void DeferRegistrationWhenPackagesAreInUse(bool value);
bool IsExpectedDigestsSupported();
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> ExpectedDigests();
private:
winrt::Microsoft::Windows::Management::Deployment::PackageVolume m_appDataVolume{};
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> m_dependencyPackageUris{};
winrt::Windows::Foundation::Collections::IVector<hstring> m_optionalPackageFamilyNames{};
winrt::Windows::Foundation::Uri m_externalLocationUri{ nullptr };
bool m_developerMode{};
bool m_forceAppShutdown{};
bool m_forceTargetAppShutdown{};
bool m_forceUpdateFromAnyVersion{};
bool m_installAllResources{};
bool m_stageInPlace{};
bool m_allowUnsigned{};
bool m_deferRegistrationWhenPackagesAreInUse{};
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> m_expectedDigests;
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct RegisterPackageOptions : RegisterPackageOptionsT<RegisterPackageOptions, implementation::RegisterPackageOptions>
{
};
}

Просмотреть файл

@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include "M.W.M.D.RemovePackageOptions.h"
#include "Microsoft.Windows.Management.Deployment.RemovePackageOptions.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
bool RemovePackageOptions::PreserveApplicationData()
{
return m_preserveApplicationData;
}
void RemovePackageOptions::PreserveApplicationData(bool value)
{
m_preserveApplicationData = value;
}
bool RemovePackageOptions::PreserveRoamableApplicationData()
{
return m_preserveRoamableApplicationData;
}
void RemovePackageOptions::PreserveRoamableApplicationData(bool value)
{
m_preserveRoamableApplicationData = value;
}
bool RemovePackageOptions::RemoveForAllUsers()
{
return m_removeForAllUsers;
}
void RemovePackageOptions::RemoveForAllUsers(bool value)
{
m_removeForAllUsers = value;
}
winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority RemovePackageOptions::Priority()
{
return m_priority;
}
void RemovePackageOptions::Priority(winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority const& value)
{
m_priority = value;
}
}

Просмотреть файл

@ -0,0 +1,35 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.RemovePackageOptions.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct RemovePackageOptions : RemovePackageOptionsT<RemovePackageOptions>
{
RemovePackageOptions() = default;
bool PreserveApplicationData();
void PreserveApplicationData(bool value);
bool PreserveRoamableApplicationData();
void PreserveRoamableApplicationData(bool value);
bool RemoveForAllUsers();
void RemoveForAllUsers(bool value);
winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority Priority();
void Priority(winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority const& value);
private:
bool m_preserveApplicationData{};
bool m_preserveRoamableApplicationData{};
bool m_removeForAllUsers{};
winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority m_priority{ winrt::Microsoft::Windows::Management::Deployment::DeploymentPriority::Normal };
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct RemovePackageOptions : RemovePackageOptionsT<RemovePackageOptions, implementation::RemovePackageOptions>
{
};
}

Просмотреть файл

@ -0,0 +1,126 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include <IsWindowsVersion.h>
#include "M.W.M.D.StagePackageOptions.h"
#include "Microsoft.Windows.Management.Deployment.StagePackageOptions.g.cpp"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
winrt::Microsoft::Windows::Management::Deployment::PackageVolume StagePackageOptions::TargetVolume()
{
return m_targetVolume;
}
void StagePackageOptions::TargetVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& value)
{
m_targetVolume = value;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> StagePackageOptions::DependencyPackageUris()
{
if (!m_dependencyPackageUris)
{
m_dependencyPackageUris = winrt::single_threaded_vector<winrt::Windows::Foundation::Uri>();
}
return m_dependencyPackageUris;
}
winrt::Windows::Foundation::Collections::IVector<hstring> StagePackageOptions::OptionalPackageFamilyNames()
{
if (!m_optionalPackageFamilyNames)
{
m_optionalPackageFamilyNames = winrt::single_threaded_vector<hstring>();
}
return m_optionalPackageFamilyNames;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> StagePackageOptions::OptionalPackageUris()
{
if (!m_optionalPackageUris)
{
m_optionalPackageUris = winrt::single_threaded_vector<winrt::Windows::Foundation::Uri>();
}
return m_optionalPackageUris;
}
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> StagePackageOptions::RelatedPackageUris()
{
if (!m_relatedPackageUris)
{
m_relatedPackageUris = winrt::single_threaded_vector<winrt::Windows::Foundation::Uri>();
}
return m_relatedPackageUris;
}
winrt::Windows::Foundation::Uri StagePackageOptions::ExternalLocationUri()
{
return m_externalLocationUri;
}
void StagePackageOptions::ExternalLocationUri(winrt::Windows::Foundation::Uri const& value)
{
m_externalLocationUri = value;
}
winrt::Microsoft::Windows::Management::Deployment::StubPackageOption StagePackageOptions::StubPackageOption()
{
return m_stubPackageOption;
}
void StagePackageOptions::StubPackageOption(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption const& value)
{
m_stubPackageOption = value;
}
bool StagePackageOptions::DeveloperMode()
{
return m_developerMode;
}
void StagePackageOptions::DeveloperMode(bool value)
{
m_developerMode = value;
}
bool StagePackageOptions::ForceUpdateFromAnyVersion()
{
return m_forceUpdateFromAnyVersion;
}
void StagePackageOptions::ForceUpdateFromAnyVersion(bool value)
{
m_forceUpdateFromAnyVersion = value;
}
bool StagePackageOptions::InstallAllResources()
{
return m_installAllResources;
}
void StagePackageOptions::InstallAllResources(bool value)
{
m_installAllResources = value;
}
bool StagePackageOptions::RequiredContentGroupOnly()
{
return m_requiredContentGroupOnly;
}
void StagePackageOptions::RequiredContentGroupOnly(bool value)
{
m_requiredContentGroupOnly = value;
}
bool StagePackageOptions::StageInPlace()
{
return m_stageInPlace;
}
void StagePackageOptions::StageInPlace(bool value)
{
m_stageInPlace = value;
}
bool StagePackageOptions::AllowUnsigned()
{
return m_allowUnsigned;
}
void StagePackageOptions::AllowUnsigned(bool value)
{
m_allowUnsigned = value;
}
bool StagePackageOptions::IsExpectedDigestsSupported()
{
// Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
return WindowsVersion::IsWindows11_22H2OrGreater();
}
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> StagePackageOptions::ExpectedDigests()
{
return m_expectedDigests;
}
}

Просмотреть файл

@ -0,0 +1,61 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include "Microsoft.Windows.Management.Deployment.StagePackageOptions.g.h"
namespace winrt::Microsoft::Windows::Management::Deployment::implementation
{
struct StagePackageOptions : StagePackageOptionsT<StagePackageOptions>
{
StagePackageOptions() = default;
winrt::Microsoft::Windows::Management::Deployment::PackageVolume TargetVolume();
void TargetVolume(winrt::Microsoft::Windows::Management::Deployment::PackageVolume const& value);
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> DependencyPackageUris();
winrt::Windows::Foundation::Collections::IVector<hstring> OptionalPackageFamilyNames();
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> OptionalPackageUris();
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> RelatedPackageUris();
void ExternalLocationUri(winrt::Windows::Foundation::Uri const& value);
winrt::Windows::Foundation::Uri ExternalLocationUri();
winrt::Microsoft::Windows::Management::Deployment::StubPackageOption StubPackageOption();
void StubPackageOption(winrt::Microsoft::Windows::Management::Deployment::StubPackageOption const& value);
bool DeveloperMode();
void DeveloperMode(bool value);
bool ForceUpdateFromAnyVersion();
void ForceUpdateFromAnyVersion(bool value);
bool InstallAllResources();
void InstallAllResources(bool value);
bool RequiredContentGroupOnly();
void RequiredContentGroupOnly(bool value);
bool StageInPlace();
void StageInPlace(bool value);
bool AllowUnsigned();
void AllowUnsigned(bool value);
bool IsExpectedDigestsSupported();
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> ExpectedDigests();
private:
winrt::Microsoft::Windows::Management::Deployment::PackageVolume m_targetVolume{};
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> m_dependencyPackageUris{};
winrt::Windows::Foundation::Collections::IVector<hstring> m_optionalPackageFamilyNames{};
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> m_optionalPackageUris{};
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::Uri> m_relatedPackageUris{};
winrt::Windows::Foundation::Uri m_externalLocationUri{ nullptr };
winrt::Microsoft::Windows::Management::Deployment::StubPackageOption m_stubPackageOption{};
bool m_developerMode{};
bool m_forceUpdateFromAnyVersion{};
bool m_installAllResources{};
bool m_requiredContentGroupOnly{};
bool m_stageInPlace{};
bool m_allowUnsigned{};
winrt::Windows::Foundation::Collections::IMap<winrt::Windows::Foundation::Uri, hstring> m_expectedDigests;
};
}
namespace winrt::Microsoft::Windows::Management::Deployment::factory_implementation
{
struct StagePackageOptions : StagePackageOptionsT<StagePackageOptions, implementation::StagePackageOptions>
{
};
}

Просмотреть файл

@ -0,0 +1,19 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#if !defined(MSIXPACKAGEMANAGER_H)
#define MSIXPACKAGEMANAGER_H
/// MSIX Package Manager: Scanning for an applicable package
#define MSIXPACKAGEMANAGER_E_PACKAGE_SCAN _HRESULT_TYPEDEF_(0x80040301L)
/// MSIX Package Manager: Found a package but doesn't match the criteria
#define MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_NOT_MATCH _HRESULT_TYPEDEF_(0x80040302L)
/// MSIX Package Manager: Found a package that does match the criteria
#define MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_MATCH _HRESULT_TYPEDEF_(0x80040303L)
/// MSIX Package Manager: Found no applicable package matching the criteria
#define MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_FAILED _HRESULT_TYPEDEF_(0x80040304L)
#endif // MSIXPACKAGEMANAGER_H

Просмотреть файл

@ -0,0 +1,272 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include <winrt/Microsoft.Windows.ApplicationModel.DynamicDependency.h>
#include "PackageDeploymentResolver.h"
#include "MsixPackageManager.h"
namespace Microsoft::Windows::ApplicationModel::PackageDeploymentResolver
{
winrt::hstring Find(
const winrt::Windows::Management::Deployment::PackageManager& packageManager,
const winrt::hstring& packageFamilyName,
const AppModel::Identity::PackageVersion& minVersion,
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures processorArchitectureFilter,
bool stopOnFirstMatch);
static winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures ToPackageDependencyProcessorArchitectures(const winrt::Windows::System::ProcessorArchitecture architecture)
{
switch (architecture)
{
case winrt::Windows::System::ProcessorArchitecture::X86: return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86;
case winrt::Windows::System::ProcessorArchitecture::X64: return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X64;
case winrt::Windows::System::ProcessorArchitecture::Arm: return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Arm;
case winrt::Windows::System::ProcessorArchitecture::Arm64: return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Arm64;
case winrt::Windows::System::ProcessorArchitecture::X86OnArm64: return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86OnArm64;
case winrt::Windows::System::ProcessorArchitecture::Neutral: return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Neutral;
case winrt::Windows::System::ProcessorArchitecture::Unknown: THROW_HR_MSG(E_UNEXPECTED, "Unsupported architecture 0x%X", architecture);
default: THROW_HR_MSG(E_UNEXPECTED, "Unknown architecture 0x%X", architecture);
}
}
static bool IsArchitectureInArchitectures(
const winrt::Windows::System::ProcessorArchitecture architecture,
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures architectures)
{
const auto architectureAsArchitectures{ ToPackageDependencyProcessorArchitectures(architecture) };
return WI_IsAnyFlagSet(architectures, architectureAsArchitectures);
}
static USHORT GetSystemArchitecture()
{
USHORT processMachine{ IMAGE_FILE_MACHINE_UNKNOWN };
USHORT nativeMachine{ IMAGE_FILE_MACHINE_UNKNOWN };
THROW_IF_WIN32_BOOL_FALSE(::IsWow64Process2(::GetCurrentProcess(), &processMachine, &nativeMachine));
return nativeMachine;
}
static winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures GetSystemSupportedArchitectures(const std::uint16_t nativeMachine)
{
switch (nativeMachine)
{
case IMAGE_FILE_MACHINE_I386:
return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Neutral |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86;
case IMAGE_FILE_MACHINE_AMD64:
return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Neutral |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86 |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X64;
case IMAGE_FILE_MACHINE_ARM:
return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Neutral |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86 |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X64 |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Arm;
case IMAGE_FILE_MACHINE_ARM64:
return winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Neutral |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86 |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X64 |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Arm |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::Arm64 |
winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::X86OnArm64;
default:
THROW_HR_MSG(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), "nativeMachine=%hu", nativeMachine);
}
}
static winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures GetSystemSupportedArchitectures()
{
const auto nativeMachine{ GetSystemArchitecture() };
return GetSystemSupportedArchitectures(nativeMachine);
}
static PCWSTR GetSystemArchitectureAsString(const std::uint16_t nativeMachine)
{
switch (nativeMachine)
{
case IMAGE_FILE_MACHINE_I386: return L"x86";
case IMAGE_FILE_MACHINE_AMD64:return L"x64";
case IMAGE_FILE_MACHINE_ARM: return L"arm";
case IMAGE_FILE_MACHINE_ARM64:return L"arm64";
default: THROW_HR_MSG(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), "nativeMachine=%hu", nativeMachine);
}
}
static PCWSTR GetSystemSupportedArchitecturesAsString(const std::uint16_t nativeMachine)
{
switch (nativeMachine)
{
case IMAGE_FILE_MACHINE_I386: return L"neutral,x86";
case IMAGE_FILE_MACHINE_AMD64:return L"neutral,x86,x64";
case IMAGE_FILE_MACHINE_ARM: return L"neutral,x86,arm";
case IMAGE_FILE_MACHINE_ARM64:return L"neutral,x86,x64,arm,arm64,x86onArm64";
default: THROW_HR_MSG(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), "nativeMachine=%hu", nativeMachine);
}
}
static PCWSTR GetSystemSupportedArchitecturesAsString()
{
const auto nativeMachine{ GetSystemArchitecture() };
return GetSystemSupportedArchitecturesAsString(nativeMachine);
}
static bool IsArchitectureSupporedByHostMachine(
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures architecture)
{
const auto supportedArchitectures{ GetSystemSupportedArchitectures() };
return WI_IsAnyFlagSet(supportedArchitectures, architecture);
}
static bool IsArchitectureSupporedByHostMachine(
const winrt::Windows::System::ProcessorArchitecture architecture)
{
const auto architectureAsPackageDependencyProcessorArchitectures{ ToPackageDependencyProcessorArchitectures(architecture) };
return IsArchitectureSupporedByHostMachine(architectureAsPackageDependencyProcessorArchitectures);
}
}
winrt::hstring Microsoft::Windows::ApplicationModel::PackageDeploymentResolver::FindBestFit(
const winrt::Windows::Management::Deployment::PackageManager& packageManager,
const winrt::hstring& packageFamilyName,
const AppModel::Identity::PackageVersion& minVersion,
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures processorArchitectureFilter)
{
return Find(packageManager, packageFamilyName, minVersion, processorArchitectureFilter, false);
}
bool Microsoft::Windows::ApplicationModel::PackageDeploymentResolver::FindAny(
const winrt::Windows::Management::Deployment::PackageManager& packageManager,
const winrt::hstring& packageFamilyName,
const AppModel::Identity::PackageVersion& minVersion,
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures processorArchitectureFilter)
{
winrt::hstring packageFullName{ Find(packageManager, packageFamilyName, minVersion, processorArchitectureFilter, true) };
return !packageFullName.empty();
}
winrt::hstring Microsoft::Windows::ApplicationModel::PackageDeploymentResolver::Find(
const winrt::Windows::Management::Deployment::PackageManager& packageManager,
const winrt::hstring& packageFamilyName,
const AppModel::Identity::PackageVersion& minVersion,
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures processorArchitectureFilter,
bool stopOnFirstMatch)
{
// Find the 'best fit' or 'first matching' package in the family (if any)
winrt::hstring bestFitPackageFullName;
AppModel::Identity::PackageVersion bestFitVersion;
// Determine the packages in the family that could match
const auto packageTypes{ winrt::Windows::Management::Deployment::PackageTypes::Framework |
winrt::Windows::Management::Deployment::PackageTypes::Main };
auto packages{ packageManager.FindPackagesForUserWithPackageTypes(winrt::hstring(), packageFamilyName, packageTypes) };
// Find the/any match
auto criteria{ wil::str_printf<wil::unique_cotaskmem_string>(L"PackageFamilyName=%ls MinVersion=%hu.%hu.%hu.%hu ArchitectureFilter:0x%X",
packageFamilyName.c_str(),
minVersion.Major, minVersion.Minor,
minVersion.Build, minVersion.Revision,
static_cast<std::uint32_t>(processorArchitectureFilter)) };
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN,
"PackageDeploymentResolver: Scanning packages (%ls)",
criteria.get());
if (packages)
{
for (const winrt::Windows::ApplicationModel::Package& candidate : packages)
{
// Do we already have a higher version under consideration?
auto packageId{ candidate.Id() };
const AppModel::Identity::PackageVersion candidateVersion{ packageId.Version() };
if (!bestFitPackageFullName.empty() && (bestFitVersion > candidateVersion))
{
continue;
}
// Package version must meet the minVersion filter
auto candidateFullName{ packageId.FullName() };
if (candidateVersion < minVersion)
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_NOT_MATCH,
"PackageDeploymentResolver: %ls not applicable. Version doesn't match MinVersion criteria (%ls)",
candidateFullName.c_str(), criteria.get());
continue;
}
// Do we already have a higher version under consideration?
if (!bestFitPackageFullName.empty() && (bestFitVersion > candidateVersion))
{
continue;
}
// Package architecture must meet the architecture filter
// Filter=None ==> architecture must match system supported architectures
// Filter!=None => architecture must match one of the specified architectures
const auto candidateArchitecture{ packageId.Architecture() };
if (processorArchitectureFilter == winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures::None)
{
const auto nativeMachine{ GetSystemArchitecture() };
const auto supportedArchitectures{ GetSystemSupportedArchitectures(nativeMachine) };
if (!IsArchitectureInArchitectures(candidateArchitecture, supportedArchitectures))
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_NOT_MATCH,
"PackageDeploymentResolver: %ls not applicable. Architecture (%ls) doesn't match system supported architectures (0x%X %ls)",
candidateFullName.c_str(), ::AppModel::Identity::GetArchitectureAsString(candidateArchitecture),
static_cast<std::uint32_t>(supportedArchitectures), GetSystemSupportedArchitecturesAsString(nativeMachine));
continue;
}
}
else
{
if (!IsArchitectureInArchitectures(candidateArchitecture, processorArchitectureFilter))
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_NOT_MATCH,
"PackageDeploymentResolver: %ls not applicable. Architecture (%ls) doesn't match specified architectures (0x%X)",
candidateFullName.c_str(), ::AppModel::Identity::GetArchitectureAsString(candidateArchitecture),
static_cast<std::uint32_t>(processorArchitectureFilter));
continue;
}
}
// Package status must be OK to use a package
winrt::hstring currentUser;
auto status{ candidate.Status() };
if (!status.VerifyIsOK())
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_NOT_MATCH,
"PackageDeploymentResolver: %ls not applicable. Status not OK (%ls)",
candidateFullName.c_str(), criteria.get());
continue;
}
// Are we looking for any match?
if (stopOnFirstMatch)
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_FAILED,
"PackageDeploymentResolver: Stopping on 1st match %ls (%ls)",
candidateFullName.c_str(), criteria.get());
return candidateFullName;
}
// The new candidate is better than the current champion
bestFitPackageFullName = std::move(candidateFullName);
bestFitVersion = candidateVersion;
}
}
// Did we find what we're looking for?
if (bestFitPackageFullName.empty())
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_FAILED,
"PackageDeploymentResolver: No match (%ls)",
criteria.get());
}
else
{
(void)LOG_HR_MSG(MSIXPACKAGEMANAGER_E_PACKAGE_SCAN_MATCH,
"PackageDeploymentResolver: %ls is applicable (%ls)",
bestFitPackageFullName.c_str(), criteria.get());
}
return bestFitPackageFullName;
}

Просмотреть файл

@ -0,0 +1,24 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#if !defined(PACKAGERESOLVER_H)
#define PACKAGERESOLVER_H
namespace Microsoft::Windows::ApplicationModel::PackageDeploymentResolver
{
// Return the best fit package's full name (or .empty if no match found)
winrt::hstring FindBestFit(
const winrt::Windows::Management::Deployment::PackageManager& packageManager,
const winrt::hstring& packageFamilyName,
const AppModel::Identity::PackageVersion& minVersion,
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures processorArchitectureFilter);
// Return true if any package meets the criteria
bool FindAny(
const winrt::Windows::Management::Deployment::PackageManager& packageManager,
const winrt::hstring& packageFamilyName,
const AppModel::Identity::PackageVersion& minVersion,
const winrt::Microsoft::Windows::ApplicationModel::DynamicDependency::PackageDependencyProcessorArchitectures processorArchitectureFilter);
}
#endif // PACKAGERESOLVER_H

Просмотреть файл

@ -0,0 +1,427 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include <TerminalVelocityFeatures-PackageManager.h>
import "M.AM.DynamicDependency.idl";
namespace Microsoft.Windows.Management.Deployment
{
runtimeclass PackageVolume;
[feature(Feature_PackageManager)]
[contractversion(1)]
apicontract PackageDeploymentContract{};
// How should we handle deployment operations?
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
enum DeploymentProcessingModel
{
Sequential,
Parallel
};
// Do deployment operations need non-default priority?
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
enum DeploymentPriority
{
Low,
Normal,
Immediate
};
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageVolumeStatus
{
PackageVolumeStatus();
Boolean IsOK;
Boolean IsOffline;
Boolean IsBroken;
};
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageVolume
{
PackageVolume();
Boolean IsSystemVolume{ get; };
String MountPoint{ get; };
String Name{ get; };
String PackageStorePath{ get; };
Boolean SupportsHardLinks{ get; };
Boolean IsFullTrustPackageSupported{ get; };
Boolean IsAppxInstallSupported{ get; };
PackageVolumeStatus Status { get; };
void FixMe();
};
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageVolumeManager
{
static IVector<PackageVolume> FindPackageVolumes();
static PackageVolume FindPackageVolumeByPath(String path);
static PackageVolume FindPackageVolumeByMediaId(String mediaId);
static PackageVolume FindPackageVolumeByName(String name);
};
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageSetItem
{
PackageSetItem();
// Unique id
String Id; //required
// Package criteria to identify if a matching package is ready for use and to use at runtime
String PackageFamilyName; //required
Windows.ApplicationModel.PackageVersion MinVersion; //required
Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependencyProcessorArchitectures ProcessorArchitectureFilter;
// Source where a package can be retrieved from if/when needed for install, remediation, etc
Windows.Foundation.Uri PackageUri;
// ??? Additional info potentially needed for deployment operations
//TODO see AddPackageOptions
// Additional info for runtime use
//TODO see CreatePackageDependencyOptions
//TODO see AddPackageDependencyOptions
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageSet
{
PackageSet();
// Unique id
String Id;
// Package(s) in the set
IVector<PackageSetItem> PackageSetItems { get; };
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageSetItemRuntimeDisposition
{
PackageSetItemRuntimeDisposition();
String PackageSetItemId{ get; };
String PackageFullName{ get; };
String PackageDependencyId{ get; };
Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependencyContextId PackageDependencyContextId{ get; };
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageSetRuntimeDisposition
{
PackageSetRuntimeDisposition();
String PackageSetId;
IVector<PackageSetItemRuntimeDisposition> PackageSetItemRuntimeDispositions { get; };
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass FindPackageSetOptions
{
FindPackageSetOptions();
//TODO
Boolean TODO_MustHaveAtLeastOneInterfaceOrStaticFactoryPlaceholder;
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageSetManager
{
static PackageSetManager GetDefault();
void Add(PackageSet packageSet); // Create/Write/Save
void Update(PackageSet packageSet); // Update/Write/Save
void Remove(String packageSetId); // Delete
PackageSet Get(String packageSetId); // Read/Load
IVector<PackageSet> Find(FindPackageSetOptions options);// Enumerate
};
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
enum PackageDeploymentStatus
{
InProgress = 0, // The request is in progress
CompletedSuccess = 1, // The request completed successfully
CompletedFailure = 2, // The request failed with some critical internal error. //TODO:Check ExtendedError for HRESULT
};
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
enum PackageDeploymentProgressStatus
{
Queued = 0, // The request is queued
InProgress = 1, // The request is in progress
CompletedSuccess = 2, // The request completed successfully
CompletedFailure = 3, // The request failed with some critical internal error. //TODO:Check ExtendedError for HRESULT
};
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageDeploymentProgress
{
PackageDeploymentProgressStatus status;
Double percentage;
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageDeploymentResult
{
PackageDeploymentStatus Status { get; };
HRESULT ExtendedError { get; };
Boolean IsRegistered{ get; };
Guid ActivityId { get; };
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass EnsureIsReadyOptions
{
EnsureIsReadyOptions();
// Options influencing deployment if/when needed
DeploymentProcessingModel DeploymentProcessingModel;
DeploymentPriority DeploymentPriority;
// ??? Additional info potentially needed for deployment operations
//TODO see AddPackageOptions
//TODO see RegisterPackageOptions
//TODO see StagePackageOptions
// Additional info for runtime use
//TODO see CreatePackageDependencyOptions
//TODO see AddPackageDependencyOptions
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
enum StubPackageOption
{
Default,
InstallFull,
InstallStub,
UsePreference,
};
// Requires Windows >- 10.0.19041.0 (aka 2004 aka 20H1)
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass AddPackageOptions
{
AddPackageOptions();
PackageVolume TargetVolume;
IVector<Windows.Foundation.Uri> DependencyPackageUris { get; };
IVector<String> OptionalPackageFamilyNames { get; };
IVector<Windows.Foundation.Uri> OptionalPackageUris { get; };
IVector<Windows.Foundation.Uri> RelatedPackageUris { get; };
Windows.Foundation.Uri ExternalLocationUri;
Microsoft.Windows.Management.Deployment.StubPackageOption StubPackageOption;
Boolean AllowUnsigned;
Boolean DeveloperMode;
Boolean ForceAppShutdown;
Boolean ForceTargetAppShutdown;
Boolean ForceUpdateFromAnyVersion;
Boolean InstallAllResources;
Boolean RequiredContentGroupOnly;
Boolean RetainFilesOnFailure;
Boolean StageInPlace;
Boolean DeferRegistrationWhenPackagesAreInUse;
Boolean IsExpectedDigestsSupported { get; }; // Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
IMap<Windows.Foundation.Uri, String> ExpectedDigests{ get; };
Boolean IsLimitToExistingPackagesSupported { get; }; // Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
Boolean LimitToExistingPackages;
}
// Requires Windows >- 10.0.19041.0 (aka 2004 aka 20H1)
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass StagePackageOptions
{
StagePackageOptions();
PackageVolume TargetVolume;
IVector<Windows.Foundation.Uri> DependencyPackageUris { get; };
IVector<String> OptionalPackageFamilyNames { get; };
IVector<Windows.Foundation.Uri> OptionalPackageUris { get; };
IVector<Windows.Foundation.Uri> RelatedPackageUris { get; };
Windows.Foundation.Uri ExternalLocationUri;
Microsoft.Windows.Management.Deployment.StubPackageOption StubPackageOption;
Boolean DeveloperMode;
Boolean ForceUpdateFromAnyVersion;
Boolean InstallAllResources;
Boolean RequiredContentGroupOnly;
Boolean StageInPlace;
Boolean AllowUnsigned;
Boolean IsExpectedDigestsSupported { get; }; // Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
IMap<Windows.Foundation.Uri, String> ExpectedDigests{ get; };
}
// Requires Windows >- 10.0.19041.0 (aka 2004 aka 20H1)
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass RegisterPackageOptions
{
RegisterPackageOptions();
PackageVolume AppDataVolume;
IVector<Windows.Foundation.Uri> DependencyPackageUris { get; };
IVector<String> OptionalPackageFamilyNames { get; };
Windows.Foundation.Uri ExternalLocationUri;
Boolean DeveloperMode;
Boolean ForceAppShutdown;
Boolean ForceTargetAppShutdown;
Boolean ForceUpdateFromAnyVersion;
Boolean InstallAllResources;
Boolean StageInPlace;
Boolean AllowUnsigned;
Boolean DeferRegistrationWhenPackagesAreInUse;
Boolean IsExpectedDigestsSupported { get; }; // Requires Windows >= 10.0.22621.0 (aka Win11 22H2)
IMap<Windows.Foundation.Uri, String> ExpectedDigests{ get; };
}
// Requires Windows >- 10.0.19041.0 (aka 2004 aka 20H1)
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass RemovePackageOptions
{
RemovePackageOptions();
Boolean PreserveApplicationData;
Boolean PreserveRoamableApplicationData;
Boolean RemoveForAllUsers;
DeploymentPriority Priority;
}
// The API surface is strongly consistent:
// 1. Modification operations involving incoming packages...
// - <verb>PackageAsync (string, options)
// - <verb>PackageByUriAsync (uri, options)
// - <verb>PackageSetAsync (packageset, options)
// - <verb>PackageSetByIdAsync(id, options)
// where
// <verb> = Add | Register | Stage
// 2. Modification operations involving existing packages...
// - <verb>PackageAsync (string, options)
// - <verb>PackageByPackageFamilyNameAsync(string, options)
// - <verb>PackageByPackageFullNameAsync (string, options)
// where
// <verb> = Deprovision | Provision | Register | Remove
//
// TODO: AppInstaller
// TODO: Move
// TODO: Find
// TODO: Properties (Status, StubPreference)
// TODO: RequestAdd
//
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageDeploymentManager
{
// Get an instance of the manager
static PackageDeploymentManager GetDefault();
// Return true if the necessary package(s) are present and available for use
Boolean IsPackageSetReady(PackageSet packageSet);
Boolean IsPackageSetReadyById(String packageSetId);
// Check if the necessary package(s) are present
// and available for use and if not then Make It So.
// If the necessary packages(s) are not present on the system
// then make them available (download, install, etc).
// If the necessary packages are present and available this is equivalent to IsReady(id).
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
EnsurePackageSetIsReadyAsync(PackageSet packageSet, EnsureIsReadyOptions options);
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
EnsurePackageSetIsReadyByIdAsync(String packageSetId, EnsureIsReadyOptions options);
// Add packages
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
AddPackageByUriAsync(Windows.Foundation.Uri packageUri, AddPackageOptions options);
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
AddPackageSetAsync(PackageSet packageSet, AddPackageOptions options);
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
AddPackageSetByIdAsync(String packageSetId, AddPackageOptions options);
// Remove packages
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
RemovePackageByFullNameNameAsync(String packageFullName, RemovePackageOptions options);
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
RemovePackageByFamilyNameNameAsync(String packageFamilyName, RemovePackageOptions options);
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
RemovePackageSetAsync(PackageSet packageSet, RemovePackageOptions options);
Windows.Foundation.IAsyncOperationWithProgress<PackageDeploymentResult, PackageDeploymentProgress>
RemovePackageSetByIdAsync(String packageSetId, RemovePackageOptions options);
// Ditto PackageSet operations of Stage, Register, Repair, Reset
}
[feature(Feature_PackageManager)]
[contract(PackageDeploymentContract, 1)]
runtimeclass PackageRuntimeManager
{
// Get an instance of the manager
static PackageRuntimeManager GetDefault();
// Make the package(s) in the package set available to the calling process
// i.e. dynamically add the package(s) in the package set to the caller's package graph.
// This is equivalent to
// FOREACH p IN PackageSetManager.Get(id).PackageSetItems
// pd = TryCreatePackageDependency(p)
// AddPackageDependency(pd)
Microsoft.Windows.Management.Deployment.PackageSetRuntimeDisposition AddPackageSet(
PackageSet packageSet);
[method_name("AddPackageSetWithOptions")]
Microsoft.Windows.Management.Deployment.PackageSetRuntimeDisposition AddPackageSet(
PackageSet packageSet,
Microsoft.Windows.ApplicationModel.DynamicDependency.CreatePackageDependencyOptions createOptions,
Microsoft.Windows.ApplicationModel.DynamicDependency.AddPackageDependencyOptions addOptions);
Microsoft.Windows.Management.Deployment.PackageSetRuntimeDisposition AddPackageSetById(
String packageSetId);
[method_name("AddPackageSetByIdWithOptions")]
Microsoft.Windows.Management.Deployment.PackageSetRuntimeDisposition AddPackageSetById(
String packageSetId,
Microsoft.Windows.ApplicationModel.DynamicDependency.CreatePackageDependencyOptions createOptions,
Microsoft.Windows.ApplicationModel.DynamicDependency.AddPackageDependencyOptions addOptions);
void RemovePackageSet(
Microsoft.Windows.Management.Deployment.PackageSetRuntimeDisposition packageSetRuntimeDisposition);
}
}

Просмотреть файл

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<ItemsProjectGuid>{8a9a0c85-65a8-4bca-a49e-45fc4fdbc7d2}</ItemsProjectGuid>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectCapability Include="SourceItemsFromImports" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.AddPackageOptions.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.EnsureIsReadyOptions.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.FindPackageSetOptions.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentManager.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentProgress.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentResult.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageRuntimeManager.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSet.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItem.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItemRuntimeDisposition.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetRuntimeDisposition.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetManager.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolume.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeManager.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeStatus.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.RegisterPackageOptions.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.RemovePackageOptions.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.StagePackageOptions.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)PackageDeploymentResolver.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.AddPackageOptions.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.EnsureIsReadyOptions.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.FindPackageSetOptions.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentManager.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentProgress.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentResult.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageRuntimeManager.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSet.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItem.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItemRuntimeDisposition.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetRuntimeDisposition.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetManager.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolume.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeManager.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeStatus.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.RegisterPackageOptions.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.RemovePackageOptions.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.StagePackageOptions.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)MsixPackageManager.h" />
<ClInclude Include="$(MSBuildThisFileDirectory)PackageDeploymentResolver.h" />
</ItemGroup>
<ItemGroup>
<Midl Include="$(MSBuildThisFileDirectory)PackageManager.idl">
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(RepoRoot)\dev\DynamicDependency\API;%(OutDir)</AdditionalIncludeDirectories>
</Midl>
</ItemGroup>
<ItemGroup>
<PublicHeaders Include="$(MSBuildThisFileDirectory)MsixPackageManager.h" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.AddPackageOptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.FindPackageSetOptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentProgress.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentResult.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageRuntimeManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSet.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItem.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItemRuntimeDisposition.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetRuntimeDisposition.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolume.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeStatus.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.RegisterPackageOptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.StagePackageOptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)PackageDeploymentResolver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.EnsureIsReadyOptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(MSBuildThisFileDirectory)M.W.M.D.RemovePackageOptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.AddPackageOptions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.FindPackageSetOptions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentProgress.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageDeploymentResult.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageRuntimeManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSet.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItem.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetItemRuntimeDisposition.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetRuntimeDisposition.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageSetManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolume.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.PackageVolumeStatus.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.RegisterPackageOptions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.StagePackageOptions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)MsixPackageManager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)PackageDeploymentResolver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.EnsureIsReadyOptions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)M.W.M.D.RemovePackageOptions.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Midl Include="$(MSBuildThisFileDirectory)PackageManager.idl" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#pragma once
#include <Windows.h>
#include <unknwn.h>
#include <appmodel.h>
#include <filesystem>
#include <thread>
#include <mutex>
#include <wil/cppwinrt.h>
#include <wil/resource.h>
#include <wil/result_macros.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>
#include <winrt/Windows.ApplicationModel.h>
#include <winrt/Windows.Management.Core.h>
#include <winrt/Windows.Management.Deployment.h>
#include <winrt/Windows.System.h>
#include <winrt/Microsoft.Windows.ApplicationModel.DynamicDependency.h>
#include <appmodel.identity.h>
#include <appmodel.package.h>
#include "MsixPackageManager.h"

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -97,6 +97,7 @@
<Import Project="..\EnvironmentManager\API\Microsoft.Process.Environment.vcxitems" Label="EnvironmentManager" />
<Import Project="..\EnvironmentManager\ChangeTracker\ChangeTracker.vcxitems" Label="ChangeTracker" />
<Import Project="..\VersionInfo\VersionInfo.vcxitems" Label="VersionInfo" />
<Import Project="..\PackageManager\API\PackageManager.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@ -261,7 +262,7 @@
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="WindowsAppRunTime.rc">
<ResourceCompile Include="WindowsAppRunTime.rc">
<AdditionalIncludeDirectories>$(RepoRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>

Просмотреть файл

@ -1,8 +1,9 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
#include <MddWin11.h>
#include <MddDetourPackageGraph.h>
#include <urfw.h>
@ -30,6 +31,7 @@ static HRESULT DetoursInitialize()
DetourRestoreAfterWith();
FAIL_FAST_IF_WIN32_ERROR(DetourTransactionBegin());
FAIL_FAST_IF_FAILED(MddWin11Initialize());
FAIL_FAST_IF_FAILED(MddDetourPackageGraphInitialize());
FAIL_FAST_IF_FAILED(UrfwInitialize());

Просмотреть файл

@ -3,6 +3,6 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -29,9 +29,9 @@
<Dependency Name="Microsoft.Build.Tasks.Git" Version="1.1.1"/>
<Dependency Name="Microsoft.SourceLink.Common" Version="1.1.1"/>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.1.1"/>
<Dependency Name="Microsoft.Taef" Version="10.75.221207001"/>
<Dependency Name="Microsoft.Taef" Version="10.82.230714001"/>
<Dependency Name="Microsoft.Telemetry.Inbox.Native" Version="10.0.19041.1-191206-1406.vb-release.x86fre" />
<Dependency Name="Microsoft.Windows.CppWinRT" Version="2.0.221121.5"/>
<Dependency Name="Microsoft.Windows.CppWinRT" Version="2.0.230706.1"/>
<Dependency Name="Microsoft.Windows.ImplementationLibrary" Version="1.0.220914.1"/>
<Dependency Name="Microsoft.WindowsAppSDK.Protobuf" Version="3.21.12"/>
</Dependencies>

Просмотреть файл

@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation and Contributors.
# Copyright (c) Microsoft Corporation and Contributors.
# Licensed under the MIT License.
<#

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -77,6 +77,28 @@
<ActivatableClass ActivatableClassId="Microsoft.Windows.AppNotifications.AppNotificationActivatedEventArgs" ThreadingModel="both" />
</InProcessServer>
</Extension>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>Microsoft.WindowsAppRuntime.dll</Path>
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.AddPackageOptions" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.EnsureIsReadyOptions" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.FindPackageOptions" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageDeploymentManager" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageDeploymentProgress" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageDeploymentResult" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageRuntimeManager" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageSet" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageSetItem" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageSetManager" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageVolume" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageVolume;" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageVolumeManager" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.PackageVolumeStatus" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.RegisterPackageOptions" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.RemovePackageOptions" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="Microsoft.Windows.Management.Deployment.StagePackageOptions" ThreadingModel="both" />
</InProcessServer>
</Extension>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>Microsoft.WindowsAppRuntime.dll</Path>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
#include "pch.h"
@ -33,13 +33,13 @@ HRESULT RegisterDVCPluginIfNeeded()
const HINSTANCE hInst{ ShellExecute(nullptr, nullptr, L"reg.exe", regCommand, nullptr, SW_SHOW) };
WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ShellExecute reg add finished with code: %d", hInst));
if ((int)hInst > 32)
if (reinterpret_cast<INT_PTR>(hInst) > 32)
{
WEX::Logging::Log::Comment(L"Successfully created DVC plugin key!");
}
else
{
const HRESULT hr{ HRESULT_FROM_WIN32(reinterpret_cast<DWORD>(hInst)) };
const HRESULT hr{ HRESULT_FROM_WIN32(static_cast<HRESULT>(reinterpret_cast<INT_PTR>(hInst))) };
WEX::Logging::Log::Comment(WEX::Common::String().Format(L"ShellExecute failed with: 0x%x", hr));
return hr;
}

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Просмотреть файл

@ -3,7 +3,7 @@
<package id="Microsoft.Build.Tasks.Git" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.1.1" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.Taef" version="10.75.221207001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.221121.5" targetFramework="native" />
<package id="Microsoft.Taef" version="10.82.230714001" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" />
</packages>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше