aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortgingold <tgingold@users.noreply.github.com>2017-03-05 18:15:46 +0100
committerGitHub <noreply@github.com>2017-03-05 18:15:46 +0100
commit8aa64761c535d29ca612412017ebb921c7106eae (patch)
tree1796f1c498f8d2d7d23b4350e42c8609554e2913
parent454f63c7056a26903936214599374ef3c2456d52 (diff)
parentfb8d534b4cade1bb20fc6433109b46afb5e02bc0 (diff)
downloadghdl-8aa64761c535d29ca612412017ebb921c7106eae.tar.gz
ghdl-8aa64761c535d29ca612412017ebb921c7106eae.tar.bz2
ghdl-8aa64761c535d29ca612412017ebb921c7106eae.zip
Merge pull request #306 from Paebbels/paebbels/SelfExtracting-PowerShell-InstallScript
Fixed file overwrite problem.
-rw-r--r--dist/windows/InstallerTemplate.ps16
-rw-r--r--dist/windows/compile.ps16
2 files changed, 6 insertions, 6 deletions
diff --git a/dist/windows/InstallerTemplate.ps1 b/dist/windows/InstallerTemplate.ps1
index 2b7c5713d..af60009f2 100644
--- a/dist/windows/InstallerTemplate.ps1
+++ b/dist/windows/InstallerTemplate.ps1
@@ -206,7 +206,7 @@ if ($Install)
[System.IO.File]::WriteAllBytes("$TempFilePath", $CompressedFileContentAsBytes)
Write-Host " Extracting ZIP file to: $InstallPath"
- Expand-Archive "$TempFilePath" -OutputPath $InstallPath
+ Expand-Archive "$TempFilePath" -OutputPath $InstallPath -Force -ShowProgress
Remove-Item $TempFilePath
@@ -249,7 +249,7 @@ elseif ($Update)
Write-Host " Install directory: $InstallPath"
if (Test-Path -Path $InstallPath)
{ Write-Host " Cleaning up installation directory '$InstallPath'." -ForegroundColor Yellow
- Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_ -Recurse -ErrorAction SilentlyContinue }
+ Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_.FullName -Recurse -Force }
}
Write-Host " Removing GHDL from PATH variables in Machine, User, Session ..." -ForegroundColor Yellow
@@ -272,7 +272,7 @@ elseif ($Update)
[System.IO.File]::WriteAllBytes("$TempFilePath", $CompressedFileContentAsBytes)
Write-Host " Extracting ZIP file to: $InstallPath"
- Expand-Archive "$TempFilePath" -OutputPath $InstallPath
+ Expand-Archive "$TempFilePath" -OutputPath $InstallPath -ShowProgress
Remove-Item $TempFilePath
diff --git a/dist/windows/compile.ps1 b/dist/windows/compile.ps1
index d829d2f52..f75729192 100644
--- a/dist/windows/compile.ps1
+++ b/dist/windows/compile.ps1
@@ -628,7 +628,7 @@ else
Write-Host " Install directory: $InstallPath"
if (Test-Path -Path $InstallPath)
{ Write-Host " Cleaning up installation directory '$InstallPath'." -ForegroundColor Yellow
- Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_ -Recurse -ErrorAction SilentlyContinue }
+ Get-ChildItem -Path $InstallPath -Depth 0 | foreach { Remove-Item $_.FullName -Recurse -Force }
}
Write-Host " Removing GHDL from PATH variables in Machine, User, Session ..." -ForegroundColor Yellow
@@ -701,7 +701,7 @@ else
Write-Host " Install directory: $InstallPath"
if (Test-Path -Path $InstallPath)
{ Write-Host " Removing installation directory '$InstallPath'." -ForegroundColor Yellow
- Remove-Item $InstallPath -Recurse -ErrorAction SilentlyContinue
+ Remove-Item $InstallPath -Recurse -Force -ErrorAction SilentlyContinue
}
Write-Host " Removing GHDL from PATH variables in Machine, User, Session ..." -ForegroundColor Yellow
@@ -721,7 +721,7 @@ else
Write-Host
Exit-Script
- } # Update
+ } # Uninstall
} # Clean