Skip to content

Commit bf720ac

Browse files
author
Radjammin@gmail.com
committed
addressing errors in Build for Windows codeQL step
1 parent a0e2ebd commit bf720ac

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎windows/deploy_windows.ps1‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ Function Build-App
405405

406406
Move-Item -Path "$BuildPath\$BuildConfig\$AppName.exe" -Destination "$DeployPath\$BuildArch" -Force
407407

408-
Invoke-Native-Command -Command "nmake" -Arguments (@("clean") + $MkArgs) -SuppressStdErr
408+
# Updated clean args to prevent recompiling the app during the clean phase
409+
$CleanArgs = @("clean", "/NOLOGO")
410+
if (-not $DebugMode) { $CleanArgs += "/S" }
411+
Invoke-Native-Command -Command "nmake" -Arguments $CleanArgs -SuppressStdErr
409412

410413
Set-Location -Path $RootPath
411414
}
@@ -430,6 +433,10 @@ function Build-App-Variants
430433
}
431434
Build-App -BuildConfig "release" -BuildArch $_
432435
$OriginalEnv | % { Set-Item "Env:$($_.Name)" $_.Value }
436+
437+
# Wipe the build directory so the next architecture starts entirely fresh
438+
if (Test-Path -Path $BuildPath) { Remove-Item -Path $BuildPath -Recurse -Force }
439+
New-Item -Path $BuildPath -ItemType Directory | Out-Null
433440
}
434441
}
435442

0 commit comments

Comments
 (0)