From 7d1c499e7b0dc2803f43a2e7081b459cc5f324ff Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 20 Aug 2023 22:39:46 -0400 Subject: [PATCH] Build script improvements Made sure devshell only loads up the msvc env once. --- scripts/build.ci.ps1 | 2 -- scripts/helpers/devshell.ps1 | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build.ci.ps1 b/scripts/build.ci.ps1 index 37ec35f..f91ce98 100644 --- a/scripts/build.ci.ps1 +++ b/scripts/build.ci.ps1 @@ -2,8 +2,6 @@ # It will most likely need a partial rewrite to segment the build process into separate script invocations based on the OS. # That or just rewrite it in an sh script and call it a day. -cls - Import-Module ./helpers/target_arch.psm1 $devshell = Join-Path $PSScriptRoot 'helpers/devshell.ps1' $path_root = git rev-parse --show-toplevel diff --git a/scripts/helpers/devshell.ps1 b/scripts/helpers/devshell.ps1 index 531bdfa..dc68bd3 100644 --- a/scripts/helpers/devshell.ps1 +++ b/scripts/helpers/devshell.ps1 @@ -1,3 +1,7 @@ +if ($env:VCINSTALLDIR) { + return +} + $ErrorActionPreference = "Stop" # Use vswhere to find the latest Visual Studio installation