Files
DSC-Configuration-Compiler/Compiler.ps1
Torsten Brendgen 846dccf468 clean dev commit
2026-06-27 23:18:34 +02:00

20 lines
692 B
PowerShell

$formsType = 'System.Windows.Forms.Form' -as [type]
if ($null -eq $formsType) {
Add-Type -AssemblyName System.Windows.Forms
}
$drawingType = 'System.Drawing.Color' -as [type]
if ($null -eq $drawingType) {
Add-Type -AssemblyName System.Drawing
}
if ([System.Threading.Thread]::CurrentThread.GetApartmentState() -ne [System.Threading.ApartmentState]::STA) {
$powershell = (Get-Command powershell.exe -ErrorAction SilentlyContinue).Source
if ($powershell) {
& $powershell -NoProfile -ExecutionPolicy Bypass -STA -File $PSCommandPath @args
exit $LASTEXITCODE
}
}
$coreScript = Join-Path -Path $PSScriptRoot -ChildPath 'Compiler.Core.ps1'
& $coreScript @args