Skip to content

Commit 4834999

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
Experimental Appx resource discovery extension
1 parent ad75d30 commit 4834999

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

build.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ if ($GetPackageVersion) {
3838
}
3939

4040
$filesForWindowsPackage = @(
41+
'appx.dsc.extension.json',
42+
'appx-discover.ps1',
4143
'dsc.exe',
4244
'dsc_default.settings.json',
4345
'dsc.settings.json',
@@ -250,7 +252,7 @@ if (!$SkipBuild) {
250252
}
251253

252254
# make sure dependencies are built first so clippy runs correctly
253-
$windows_projects = @("pal", "registry", "reboot_pending", "wmi-adapter", "configurations/windows")
255+
$windows_projects = @("pal", "registry", "reboot_pending", "wmi-adapter", "configurations/windows", 'extensions/appx')
254256
$macOS_projects = @("resources/brew")
255257
$linux_projects = @("resources/apt")
256258

extensions/appx/appx-discover.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Get-AppxPackage | ForEach-Object {
2+
Get-ChildItem -LiteralPath $_.InstallLocation -File -Include '*.dsc.resource.json','*.dsc.resource.yaml','*.dsc.resource.yml' | ForEach-Object {
3+
@{ resourceManifestPath = $_.FullName } | ConvertTo-Json -Compress
4+
}
5+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
3+
"type": "Microsoft.Windows.AppX/Discover",
4+
"version": "0.1.0",
5+
"description": "Discovers DSC resources packaged as AppX packages.",
6+
"author": "Microsoft Corporation",
7+
"discover": {
8+
"executable": "pwsh",
9+
"args": [
10+
"-NoLogo",
11+
"-NonInteractive",
12+
"-NoProfile",
13+
"-Command",
14+
"./appx-discover.ps1"
15+
]
16+
}
17+
}

extensions/appx/copy_files.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
appx-discover.ps1
2+
appx.dsc.extension.json

0 commit comments

Comments
 (0)