Skip to content

Commit

Permalink
Fix vlc-cache-gen run
Browse files Browse the repository at this point in the history
  • Loading branch information
electroly committed Nov 8, 2024
1 parent 2c247b8 commit 55df5c1
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions src/Publish-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,6 @@ function Get-Vlc
[System.IO.Directory]::CreateDirectory($dstDir) | Out-Null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFilePath, $dstDir)

# Generate plugins\plugins.dat by running vlc-cache-gen.
Push-Location $dstDir
try
{
& .\vlc-cache-gen.exe .\plugins | Out-Host
}
finally
{
Pop-Location
}

# Get the only subdirectory of $dstDir.
$subdir = Get-ChildItem -Path $dstDir -Directory | Select-Object -First 1

Expand All @@ -164,6 +153,25 @@ function Get-Vlc

# Delete $subdir.
Remove-Item -Path $subdir.FullName -Recurse -Force

# Generate plugins\plugins.dat by running vlc-cache-gen.
if (Test-Path "$dstDir\plugins\plugins.dat") {
throw "plugins.dat already exists."
}

Push-Location $dstDir
try
{
& .\vlc-cache-gen.exe .\plugins | Out-Host
}
finally
{
Pop-Location
}

if (-not (Test-Path "$dstDir\plugins\plugins.dat")) {
throw "Failed to generate plugins.dat."
}
}

function Copy-MiscFiles
Expand Down

0 comments on commit 55df5c1

Please sign in to comment.