diff --git a/MakeZipWindows.ps1 b/MakeZipWindows.ps1 old mode 100644 new mode 100755 index 1373d6882..87710ea31 --- a/MakeZipWindows.ps1 +++ b/MakeZipWindows.ps1 @@ -1,5 +1,7 @@ -#!powershell -# +#!/usr/bin/env pwsh + +Set-StrictMode -Version 5.0 + $include_files = @( 'addon.py', 'addon.xml', 'LICENSE', 'README.md', 'service.py' ) $include_paths = @( 'resources/' ) $exclude_files = @( '*.new', '*.orig', '*.pyc' ) @@ -17,9 +19,9 @@ if (Test-Path -LiteralPath $zip_name) { } # Create ZIP file -Add-Type -AssemblyName System.IO.Compression +Add-Type -AssemblyName System.IO.Compression.FileSystem -Write-Host '= Building new package' +Write-Host -fore blue '= Building new package' $zip_file = [System.IO.Compression.ZipFile]::Open($zip_name, 'Create') ForEach ($relative_file in $include_files) { $archive_file = Join-Path -Path $name -ChildPath $relative_file @@ -33,4 +35,5 @@ ForEach ($path in $include_paths) { } } $zip_file.Dispose() -Write-Host "= Successfully wrote package as: $zip_name" +Write-Host "= Successfully wrote package as: " -ForegroundColor:Blue -NoNewLine +Write-Host "$zip_name" -ForegroundColor:Cyan