From 8fef98f0425fd3ab3f6f556f2dfa5bd1f947f4db Mon Sep 17 00:00:00 2001 From: dan Date: Sun, 12 Jun 2022 22:58:17 +0100 Subject: [PATCH] only run vcvars64.bat when not in github actions --- scripts/build_msvc.bat | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/scripts/build_msvc.bat b/scripts/build_msvc.bat index 2bb8fd5..b55029c 100644 --- a/scripts/build_msvc.bat +++ b/scripts/build_msvc.bat @@ -109,30 +109,11 @@ if not exist %build_dir% ( mkdir %build_dir% ) -REM find vcvars64.bat location -REM prefer the newest versions so put them at the top of the chain -set vcvars_script="" -if /I [%vcvars_script%]==[""] ( - if exist "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" ( - echo Found VS 2022 build tools - set vcvars_script="C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" - ) -) - -if /I [%vcvars_script%]==[""] ( - if exist "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" ( - echo Found VS 2019 build tools - set vcvars_script="C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" - ) +REM github actions doesnt need to run this +if /I ["%CI%"] == [""] ( + call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" ) -if /I [%vcvars_script%]==[""] ( - echo ERROR: no vcvars64.bat script could be found. Make sure you have this installed. - goto :ShowUsage -) - -call %vcvars_script% - echo CALLING: cl /Fe:%build_dir%\\!output_filename! /Fd:%build_dir%\\!output_filename!.pdb /Fo:%build_dir%\\!output_filename!.obj !symbols! !optimisation! !defines! %warninglevels% !ignorewarnings! !source_files! cl /Fe:%build_dir%\\!output_filename! /Fd:%build_dir%\\!output_filename!.pdb /Fo:%build_dir%\\!output_filename!.obj !symbols! !optimisation! !defines! %warninglevels% !ignorewarnings! !source_files!