This commit is contained in:
jonatanrek committed 2025-02-05 18:45:52 +01:00
1 parent 01137f3cb8
commit 8da045562c
65 files changed
+13163 -12

No files matched your search

+8 -7
View File
@@ -1,8 +1,8 @@
$version = "v1.8.6"
$version = "1.8.6"
if (-not (Test-Path -Path $version -PathType Container)) {
Invoke-WebRequest -Uri "https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/archive/refs/tags/v1.8.6.zip" -OutFile "v1.8.6.zip"
Expand-Archive -Path "v1.8.6.zip" -Force
Remove-Item -Path "v1.8.6.zip"
Invoke-WebRequest -Uri ("https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool/archive/refs/tags/v{0}.zip" -f $version) -OutFile ("v{0}.zip" -f $version)
Expand-Archive -Path ("v{0}.zip" -f $version) -Force
Remove-Item -Path ("v{0}.zip" -f $version)
}
foreach ($folder in (Get-ChildItem -Path "./apps/" )) {
@@ -10,14 +10,15 @@ foreach ($folder in (Get-ChildItem -Path "./apps/" )) {
$sourceFolder = $folder.FullName
$sourceFile = $null
foreach ($wntrypoint in @('install.bat', 'install.ps1', '*.msi')) {
foreach ($wntrypoint in @('install.bat', 'install.ps1', '*.msi', '*.exe')) {
$sourceFile = (Get-ChildItem -Path $sourceFolder -Filter $wntrypoint | Select-Object -First 1 )
if ($null -ne $sourceFile){
break
}
}
$buildArgs = " -c ", $folder.FullName, " -s ", $sourceFile.FullName, " -s ", $folder.FullName, " -q"
Start-Process -FilePath ('./{0}/Microsoft-Win32-Content-Prep-Tool-1.8.6/IntuneWinAppUtil.exe' -f $version) -ArgumentList "$buildArgs" -Wait
$buildArgs = "-c", $folder.FullName, "-s", $sourceFile.FullName, "-o", "./build/", "-q"
Start-Process -FilePath ('./v{0}/Microsoft-Win32-Content-Prep-Tool-{0}/IntuneWinAppUtil.exe' -f $version) -ArgumentList "$buildArgs" -Wait
Move-Item -Path ("./build/{0}.intunewin" -f ($sourceFile.Name -split "\.")[0]) -Destination ("./build/{0}.intunewin" -f $folder.Name)
}