1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix tabs and formatting

This commit is contained in:
Marco van Munster
2016-05-02 22:32:33 +02:00
committed by Ted John
parent 08b3e803bf
commit 8bd9a772e6
2 changed files with 34 additions and 28 deletions

View File

@@ -28,24 +28,26 @@ $openrct2Path = Join-Path $binPath "openrct2.exe"
function Build-Data()
{
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
}
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

@@ -19,7 +19,7 @@ $libsVersion = 7
# Get paths
$rootPath = Get-RootPath
$libsPath = Join-Path $rootPath "lib"
$binPath = Join-Path $rootPath "bin"
$binPath = Join-Path $rootPath "bin"
$zipPath = Join-Path $libsPath "openrct2-libs-vs2015.zip"
$libsVersionPath = Join-Path $libsPath "libversion"
@@ -36,19 +36,23 @@ if ($currentLibsVersion -ge $libsVersion)
}
#symlink data to bin\data
try {
try
{
Write-Host "Symlink data to bin..." -ForegroundColor Cyan
New-Item -force -ItemType SymbolicLink -Name bin\data -Target data
}
catch [System.Management.Automation.ParameterBindingException] {
Write-Host "Your powershell can not create symlinks" -ForegroundColor Red
Write-Host "Copying data to bin..." -ForegroundColor Cyan
New-Item -Force -ItemType Directory $binPath > $null
Copy-Item -Force -Recurse "$rootPath\data" $binPath
}
catch {
catch [System.Management.Automation.ParameterBindingException]
{
Write-Host "Your powershell can not create symlinks" -ForegroundColor Red
Write-Host "Copying data to bin..." -ForegroundColor Cyan
New-Item -Force -ItemType Directory $binPath > $null
Copy-Item -Force -Recurse "$rootPath\data" $binPath
}
catch
{
Write-Host "Symlink not possible" -ForegroundColor Red
if($force) {
if($force)
{
Write-Host "Copying data to bin..." -ForegroundColor Cyan
New-Item -Force -ItemType Directory $binPath > $null
Copy-Item -Force -Recurse "$rootPath\data" $binPath