Compare commits
No commits in common. "498eeaa0efc6e0a22f93a823f4b8e51f29709593" and "6502dde28045a3b8c6be2f3e952d6c7c3edf832c" have entirely different histories.
498eeaa0ef
...
6502dde280
@ -5,18 +5,16 @@
|
||||
|
||||
Clear-Host
|
||||
|
||||
Write-Host "Stopping installer ... " -ForegroundColor cyan -NoNewLine
|
||||
Write-Host "Stopping installer ..."
|
||||
|
||||
$installer = Stop-Process -Name "SPTInstaller" -ErrorAction SilentlyContinue
|
||||
|
||||
if ($installer -ne $null)
|
||||
{
|
||||
Write-Warning "Something went wrong, couldn't stop installer process'"
|
||||
Write-Host "Something went wrong, couldn't stop installer process'"
|
||||
return;
|
||||
}
|
||||
|
||||
Write-Host "OK" -ForegroundColor green
|
||||
|
||||
if (-not(Test-Path $source) -and -not(Test-Path $destination)) {
|
||||
Write-Warning "Can't find a required file"
|
||||
Write-host ""
|
||||
@ -25,7 +23,7 @@ if (-not(Test-Path $source) -and -not(Test-Path $destination)) {
|
||||
exit
|
||||
}
|
||||
|
||||
Write-Host "Copying new installer ... " -ForegroundColor cyan
|
||||
Write-Host "Copying new installer ..."
|
||||
|
||||
$maxAttempts = 10
|
||||
$copied = $false
|
||||
@ -34,7 +32,7 @@ while (-not $copied) {
|
||||
|
||||
$maxAttempts--
|
||||
|
||||
Write-Host " > Please wait ... " -NoNewLine
|
||||
Write-Host "Please wait ..."
|
||||
|
||||
if ($maxAttempts -le 0) {
|
||||
Write-Host "Couldn't copy new installer :( Please re-download the installer"
|
||||
@ -44,15 +42,8 @@ while (-not $copied) {
|
||||
exit
|
||||
}
|
||||
|
||||
try {
|
||||
Remove-Item $destination -ErrorAction SilentlyContinue
|
||||
Copy-Item $source $destination -ErrorAction SilentlyContinue
|
||||
}
|
||||
catch {
|
||||
Write-Host "file locked, retrying ..." -ForegroundColor yellow
|
||||
sleep(2)
|
||||
continue
|
||||
}
|
||||
Remove-Item $destination -ErrorAction SilentlyContinue
|
||||
Copy-Item $source $destination -ErrorAction SilentlyContinue
|
||||
|
||||
if (Test-Path $destination) {
|
||||
$sLength = (Get-Item $source).Length
|
||||
@ -60,11 +51,9 @@ while (-not $copied) {
|
||||
|
||||
if ($sLength -eq $dLength) {
|
||||
$copied = $true
|
||||
Write-Host "OK" -ForegroundColor green
|
||||
break
|
||||
}
|
||||
|
||||
Write-Host "sizes differ, retrying ..." -ForegroundColor yellow
|
||||
sleep(2)
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,8 @@
|
||||
<PackageIcon>icon.ico</PackageIcon>
|
||||
<ApplicationIcon>Assets\spt_installer.ico</ApplicationIcon>
|
||||
<Configurations>Debug;Release;TEST</Configurations>
|
||||
<AssemblyVersion>2.85</AssemblyVersion>
|
||||
<FileVersion>2.85</FileVersion>
|
||||
<AssemblyVersion>2.84</AssemblyVersion>
|
||||
<FileVersion>2.84</FileVersion>
|
||||
<Company>SPT</Company>
|
||||
</PropertyGroup>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user