1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 15:23:01 +01:00

Symlink data to bin\data

This commit is contained in:
Marco van Munster
2016-04-27 14:18:51 +02:00
committed by Ted John
parent 60579932ef
commit dcbbf2ec78
2 changed files with 22 additions and 3 deletions

View File

@@ -28,9 +28,24 @@ $openrct2Path = Join-Path $binPath "openrct2.exe"
function Build-Data()
{
Write-Host "Copying data to bin..." -ForegroundColor Cyan
New-Item -Force -ItemType Directory $binPath > $null
Copy-Item -Force -Recurse "$rootPath\data" $binPath
if(Test-Path "$binPath\data")
{
$object = Get-Item "$binPath\data"
if(-not ([bool]($object.Attributes -band [IO.FileAttributes]::ReparsePoint)))
{
Write-Host "Copying data to bin..." -ForegroundColor Cyan
New-Item -Force -ItemType Directory $binPath > $null
Copy-Item -Force -Recurse "$rootPath\data" $binPath
}
else{
Write-Host "Symlink already in place" -ForegroundColor Cyan
}
}
else {
Write-Host "Symlink data to bin..." -ForegroundColor Cyan
New-Item -force -ItemType SymbolicLink -Name bin\data -Target data
}
return 0
}

View File

@@ -34,6 +34,10 @@ if ($currentLibsVersion -ge $libsVersion)
$updateLibs = $false
}
#symlink data to bin\data
Write-Host "Symlink data to bin..." -ForegroundColor Cyan
New-Item -force -ItemType SymbolicLink -Name bin\data -Target data
# Check if user needs to download dependencies
$libsPathExists = Test-Path $libsPath
if ($libsPathExists -and -not $updateLibs -and -not $Force)