PowerToys/.pipelines/versionAndSignCheck.ps1
Stefan Markovic 27c4b1be0e
[settings-ui] Settings WinUI3 (#17797)
* Add Settings.WinUI3 project

* New namespace

* Activation and Services

* Assets and Behaviors

* Converters and Helpers

* Controls

* View and ViewModels

* Styles and Themes

* OOBE

* Strings

* Small App moves

* [check] Project files - publish profiles and launchSettings.json

* [using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name workaround

* [WIP] Workarounds to make it work

* Fix suppressed warnings - naming

* Add code analysis

* Fix KBMPage and App dispatcher
Fix MessageBox - replace with MessageDialog

* Fix ImageResizerPage & mark ColorPickerButton with TODO

* Add icon to windows
Cleanup MainWindow.xaml.cs and OobeWindow.xaml.cs
MainWindows and OobeWindow management

* App Icon
No framework and runtime subdirs

* Remove PowerToys.Settings and Settings.UI from solution
Update output paths

* Installer work & publish.cmd

* Fix dispatcher crashes

* Fix crashes

* Add all dlls to installer
Cleanup installer
Add OpenOOBE and OpenScoobe logic
Fix minor issues
Fix update scenario - REINSTALLMODE

* Rename back namespaces, project name and project dir

* [wip] move to winappsdk 1.1

* Fix propagating isElevated & installer runtimes dlls

* Remove obsolete dir/file

* PowerToys.Interop to netstandard2.0

* Move everything to .Net6

* [Settings] Always launch settings process non-elevated (#17791)

* Move back to WinAppSdk 1.0.1

* Add Settings.WinUI3 project

* New namespace

* Activation and Services

* Assets and Behaviors

* Converters and Helpers

* Controls

* View and ViewModels

* Styles and Themes

* OOBE

* Strings

* Small App moves

* [check] Project files - publish profiles and launchSettings.json

* [using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name workaround

* [WIP] Workarounds to make it work

* Fix suppressed warnings - naming

* Add code analysis

* Fix KBMPage and App dispatcher
Fix MessageBox - replace with MessageDialog

* Fix ImageResizerPage & mark ColorPickerButton with TODO

* Add icon to windows
Cleanup MainWindow.xaml.cs and OobeWindow.xaml.cs
MainWindows and OobeWindow management

* App Icon
No framework and runtime subdirs

* Remove PowerToys.Settings and Settings.UI from solution
Update output paths

* Installer work & publish.cmd

* Fix dispatcher crashes

* Fix crashes

* Add all dlls to installer
Cleanup installer
Add OpenOOBE and OpenScoobe logic
Fix minor issues
Fix update scenario - REINSTALLMODE

* Rename back namespaces, project name and project dir

* [wip] move to winappsdk 1.1

* Fix propagating isElevated & installer runtimes dlls

* Remove obsolete dir/file

* PowerToys.Interop to netstandard2.0

* Move everything to .Net6

* [Settings] Always launch settings process non-elevated (#17791)

* Move back to WinAppSdk 1.0.1

* Revert merge conflict ARM64 removal

* Fix KBM Browse overlay image button

* Bring back settings publish profile

* Update release.yml

* Change target frameworkd windows version

* [Setup] Add Windows Application Runtime SDK (#17809)

* Update requirements doc

* Update compiling docs

* Fix signing

* Fix Settings exe and dll versions

* Add exception for dlls that have version 1.0.0.0

* Fix powershell condition

Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
2022-04-19 21:00:28 +01:00

63 lines
1.8 KiB
PowerShell

[CmdletBinding()]
# todo: send in arch / conf, could send in actual path
Param(
[Parameter(Mandatory=$True,Position=1)]
[AllowEmptyString()]
[string]$targetDir = $PSScriptRoot + '/../extractedMsi/File'
)
$DirPath = $targetDir; #this file is in pipeline, we need root.
$items = Get-ChildItem -Path $DirPath -File -Include *.exe,*.dll,*.ttf -Recurse -Force -ErrorAction SilentlyContinue
$totalFailure = 0;
Write-Host $DirPath;
if(-not (Test-Path $DirPath))
{
Write-Host "Folder does not exist!"
}
Write-Host "Total items: " $items.Count
if($items.Count -eq 0)
{
# no items means something bad happened. We should fail ASAP
exit 1;
}
$items | ForEach-Object {
if($_.VersionInfo.FileVersion -eq "1.0.0.0" )
{
# These items are exceptions that actually have the 1.0.0.0 version.
if ((-not $_.Name.EndsWith("Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll")) -and
(-not $_.Name.EndsWith("Microsoft.Windows.ApplicationModel.Resources.Projection.dll")) -and
(-not $_.Name.EndsWith("Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll")) -and
(-not $_.Name.EndsWith("Microsoft.Windows.AppLifecycle.Projection.dll")) -and
(-not $_.Name.EndsWith("Microsoft.Windows.System.Power.Projection.dll")) -and
(-not $_.Name.EndsWith("Microsoft.WindowsAppRuntime.Bootstrap.Net.dll")) -and
(-not $_.Name.EndsWith("Microsoft.Xaml.Interactions.dll")) -and
(-not $_.Name.EndsWith("Microsoft.Xaml.Interactivity.dll"))
)
{
Write-Host "Version not set: " + $_.FullName
$totalFailure++;
}
}
}
$items | ForEach-Object {
$auth = Get-AuthenticodeSignature $_.FullName
if($auth.SignerCertificate -eq $null)
{
Write-Host "Not Signed: " + $_.FullName
$totalFailure++;
}
}
if($totalFailure -gt 0)
{
exit 1
}
exit 0