This commit is contained in:
2026-04-26 01:44:36 +02:00
parent cbc2462ea4
commit 72cb5b8d1d
166 changed files with 2712 additions and 135 deletions

View File

@@ -283,11 +283,28 @@ if (Test-Path $zipPath) {
Remove-Item $zipPath -Force
}
# Pakuj zawartosc temp dir (bez folderu temp/)
$originalLocation = Get-Location
Set-Location $tempDir
Compress-Archive -Path '*' -DestinationPath "../../$zipPath" -Force
Set-Location $originalLocation
# Pakuj z forward-slashami (Compress-Archive uzywa backslashy na Windowsie)
Add-Type -AssemblyName System.IO.Compression
Add-Type -AssemblyName System.IO.Compression.FileSystem
$absZipPath = (Resolve-Path $updatesDir).Path + "\ver_$versionNumber.zip"
$absTempDir = (Resolve-Path $tempDir).Path
$zipStream = [System.IO.File]::Create($absZipPath)
$zip = New-Object System.IO.Compression.ZipArchive($zipStream, [System.IO.Compression.ZipArchiveMode]::Create)
Get-ChildItem $absTempDir -Recurse -File | ForEach-Object {
$entryName = $_.FullName.Substring($absTempDir.Length + 1) -replace '\\', '/'
$entry = $zip.CreateEntry($entryName)
$entryStream = $entry.Open()
$fileStream = [System.IO.File]::OpenRead($_.FullName)
$fileStream.CopyTo($entryStream)
$fileStream.Close()
$entryStream.Close()
}
$zip.Dispose()
$zipStream.Close()
Write-Ok "Utworzono ZIP: $zipPath"