From 5d54b6de4ba9837b19a0b56e11c10d1d894516b4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 14 Oct 2021 23:55:12 -0600 Subject: [PATCH] Use correct bit-depth tools when building the kit If you use the 32-bit version of ConEmu and/or? Python on a 64-bit OS then psutil will throw access denied errors when trying to wait for processes. --- setup/windows/build.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/setup/windows/build.ps1 b/setup/windows/build.ps1 index 11a06069..5ef7685d 100644 --- a/setup/windows/build.ps1 +++ b/setup/windows/build.ps1 @@ -192,6 +192,13 @@ if ($MyInvocation.InvocationName -ne ".") { ## Done ## Pop-Location - $ArgumentList = @("-run", "$Bin\Python\x32\python.exe", "$Bin\Scripts\build_kit_windows.py", "-new_console:n") - Start-Process -FilePath "$Bin\ConEmu\ConEmu.exe" -ArgumentList $ArgumentList -verb RunAs + if ([System.Environment]::Is64BitOperatingSystem) { + $ConEmu = "$Bin\ConEmu\ConEmu64.exe" + $Python = "$Bin\Python\x64\python.exe" + } else { + $ConEmu = "$Bin\ConEmu\ConEmu.exe" + $Python = "$Bin\Python\x32\python.exe" + } + $ArgumentList = @("-run", "$Python", "$Bin\Scripts\build_kit_windows.py", "-new_console:n") + Start-Process -FilePath "$ConEmu" -ArgumentList $ArgumentList -verb RunAs }