Fixes failure with extracting *.tpz

This commit is contained in:
2026-08-29 07:33:17 -07:00
parent dae0123a17
commit 159e12c79a
+3 -1
View File
@@ -162,6 +162,7 @@ if (-not $editorExecutable) {
$manifestPath = Join-Path $cacheDirectory 'SHA512-SUMS.txt'
$editorArchive = Join-Path $cacheDirectory $editorAsset
$templatesArchive = Join-Path $cacheDirectory $templatesAsset
$templatesZipArchive = Join-Path $cacheDirectory ($templatesAsset -replace '\.tpz$', '.zip')
$templatesStagingDirectory = Join-Path $cacheDirectory 'templates-staging'
Invoke-WebRequest -Uri "$script:BaseUrl/SHA512-SUMS.txt" -OutFile $manifestPath
$editorChecksum = Get-Checksum $manifestPath $editorAsset
@@ -169,7 +170,8 @@ if (-not $editorExecutable) {
Download-AndVerify $editorAsset $editorArchive $editorChecksum
Download-AndVerify $templatesAsset $templatesArchive $templatesChecksum
Expand-Archive -LiteralPath $editorArchive -DestinationPath $editorDirectory -Force
Expand-Archive -LiteralPath $templatesArchive -DestinationPath $templatesStagingDirectory -Force
Move-Item -LiteralPath $templatesArchive -Destination $templatesZipArchive
Expand-Archive -LiteralPath $templatesZipArchive -DestinationPath $templatesStagingDirectory -Force
Install-ExportTemplates $templatesStagingDirectory $templateDirectory $templatesAsset $templateVersion
$editorExecutable = Find-Editor $editorDirectory
if (-not $editorExecutable) { Fail 'The Godot editor archive did not contain an executable.' }