Skip to content

Commit

Permalink
Try a fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-iholkin committed Aug 13, 2024
1 parent ab329fc commit 25847eb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Installer/_scripts/_helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,16 @@ function BuildInstaller {
Write-Output "devenv.exe started: platform $Platform, mod $Mod."
# $toLogOrNot = "/Out " + $installerDir + "\SwitchApps_Installer\Debug\log.txt"
$toLogOrNot = ""
Start-Process -FilePath $devenvFile -ArgumentList ("$solutionFile /Rebuild Debug") -Wait -NoNewWindow
$proc = Start-Process -FilePath $devenvFile -ArgumentList ("$solutionFile /Rebuild Debug") -NoNewWindow
$timeoutReached = $null
$proc | Wait-Process -Timeout 30 -ErrorAction SilentlyContinue -ErrorVariable timeoutReached
if ($timeoutReached) {
# Terminate the process:
$proc | Stop-Process
# Retry the build:
Write-Output "Retrying the build..."
Start-Process -FilePath $devenvFile -ArgumentList ("$solutionFile /Rebuild Debug") -NoNewWindow -Wait
}
Write-Output "devenv.exe finished: platform $Platform, mod $Mod."
# Revert the project file's modification after an x86 platform run:
switch ($Platform) {
Expand Down

0 comments on commit 25847eb

Please sign in to comment.