Skip to content

Commit

Permalink
Fix dll name in ps1 file
Browse files Browse the repository at this point in the history
  • Loading branch information
dnjulek committed Feb 3, 2024
1 parent cfa3e43 commit 8c4dcbb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions powershell/RunWithBAT.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ $zipUrl = $jsonContent.master.'x86_64-windows'.tarball
$parentFolder = Split-Path -Path $PSScriptRoot -Parent
$zipFilePath = Join-Path $PSScriptRoot "zig-windows-x86_64-$version.zip"
$zigPath = Join-Path $PSScriptRoot "\zig-windows-x86_64-$version\zig.exe"
$dllFilePath = Join-Path $parentFolder "\zig-out\lib\invert_example.dll"
$dllFilePath = Join-Path $parentFolder "\zig-out\lib\ssimulacra2.dll"
$destinationFileFolder = Join-Path $env:APPDATA "\VapourSynth\plugins64"
New-Item -ItemType Directory -Force -Path $destinationFileFolder | Out-Null
$destinationFilePath = Join-Path $destinationFileFolder "\invert_example.dll"
$destinationFilePath = Join-Path $destinationFileFolder "\ssimulacra2.dll"

if (-not (Test-Path $zipFilePath)){
Write-Host "Downloading zig-windows-x86_64-$version.zip..." -ForegroundColor Green
Expand All @@ -21,12 +21,12 @@ if (-not (Test-Path $zigPath)){
Expand-Archive -Path $zipFilePath -DestinationPath $PSScriptRoot -Force
}

Write-Host "Building invert_example.dll..." -ForegroundColor Green
Write-Host "Building ssimulacra2.dll..." -ForegroundColor Green
& $zigPath build -Doptimize=ReleaseFast

if (Test-Path $dllFilePath){
Write-Host "Installing 'invert_example.dll' to '$destinationFilePath'" -ForegroundColor Blue
Write-Host "Installing 'ssimulacra2.dll' to '$destinationFilePath'" -ForegroundColor Blue
Copy-Item -Path $dllFilePath -Destination $destinationFilePath -Force
} else {
Write-Host "No '\zig-out\lib\invert_example.dll' file, build error." -ForegroundColor Red
Write-Host "No '\zig-out\lib\ssimulacra2.dll' file, build error." -ForegroundColor Red
}

0 comments on commit 8c4dcbb

Please sign in to comment.