From 1a30e24652fdd7bf201796a46f9bb9e6605f94de Mon Sep 17 00:00:00 2001 From: Roland Rossgotterer Date: Wed, 13 Feb 2019 12:17:43 +0100 Subject: [PATCH] [Jenkins] vs_version argument not needed in get_vs_env. --- scripts/jenkins.py | 4 ++-- scripts/lib/util.py | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/scripts/jenkins.py b/scripts/jenkins.py index 6fc7a892d..7f6806811 100644 --- a/scripts/jenkins.py +++ b/scripts/jenkins.py @@ -262,9 +262,9 @@ class MSVCBuilder(Builder): os.environ['PATH'] += os.pathsep + self._get_externals_path() #TODO still needed? we copy externals anyway os.environ['PATH'] += os.pathsep + 'C:/Program Files/7-Zip' if self.word_size == '32': - vs_env = get_vs_env('VS2017', 'x86') + vs_env = get_vs_env('x86') else: - vs_env = get_vs_env('VS2017', 'amd64') + vs_env = get_vs_env('amd64') os.environ.update(vs_env) diff --git a/scripts/lib/util.py b/scripts/lib/util.py index a09834260..b79324f0e 100644 --- a/scripts/lib/util.py +++ b/scripts/lib/util.py @@ -60,20 +60,12 @@ def get_environment_from_batch_command(env_cmd, initial=None): return result -def get_vs_env(vs_version, arch): +def get_vs_env(arch): """ Returns the env object for VS building environment. - The vs_version can be one of the following strings: - - VS2015, - - VS2017, - the arch has to be one of "x86", "amd64", "arm", "x86_amd64", "x86_arm", "amd64_x86", - "amd64_arm", e.g. the args passed to vcvarsall.bat. + The arch has to be one of "x86", "amd64", "arm", "x86_amd64", "x86_arm", "amd64_x86", + "amd64_arm", i.e. the args passed to vcvarsall.bat. """ - if vs_version == 'VS2015': - vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" - elif vs_version == 'VS2017': - vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\Auxiliary\\Build\\vcvarsall.bat" - else: - raise RuntimeError('Unsupported Visual Studio version!') + vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\Auxiliary\\Build\\vcvarsall.bat" return get_environment_from_batch_command([vsvarsall, arch])