From 42938de9732b81740a7ce5e7f66090d05abec145 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 13 Mar 2018 14:21:09 +0900 Subject: [PATCH] Build with Visual Studio 2017 --- docs/development/build-instructions-windows.md | 4 ++-- script/lib/env_util.py | 4 ++-- script/lib/util.py | 2 +- script/update.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/development/build-instructions-windows.md b/docs/development/build-instructions-windows.md index 8d7d0c7eaf..0e94e2fde5 100644 --- a/docs/development/build-instructions-windows.md +++ b/docs/development/build-instructions-windows.md @@ -5,8 +5,8 @@ Follow the guidelines below for building Electron on Windows. ## Prerequisites * Windows 7 / Server 2008 R2 or higher -* Visual Studio 2015 Update 3 - [download VS 2015 Community Edition for - free](https://www.visualstudio.com/vs/older-downloads/) +* Visual Studio 2017 Update 3 - [download VS 2017 Community Edition for + free](https://www.visualstudio.com/vs/) * [Python 2.7](http://www.python.org/download/releases/2.7/) * [Node.js](https://nodejs.org/download/) * [Git](http://git-scm.com) diff --git a/script/lib/env_util.py b/script/lib/env_util.py index df759241fe..85c9ad2e14 100644 --- a/script/lib/env_util.py +++ b/script/lib/env_util.py @@ -63,9 +63,9 @@ def get_vs_env(vs_version, arch): """ Returns the env object for VS building environment. - The vs_version can be strings like "12.0" (e.g. VS2013), the arch has to + The vs_version can be strings like "2017", 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. """ - vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio {0}\\VC\\vcvarsall.bat".format(vs_version) + vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio\\{0}\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat".format(vs_version) return get_environment_from_batch_command([vsvarsall, arch]) diff --git a/script/lib/util.py b/script/lib/util.py index 492c9a411c..26d24a80a6 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -246,7 +246,7 @@ def import_vs_env(target_arch): vs_arch = 'amd64_x86' else: vs_arch = 'x86_amd64' - env = get_vs_env('14.0', vs_arch) + env = get_vs_env('2017', vs_arch) os.environ.update(env) diff --git a/script/update.py b/script/update.py index 891cc4389d..5b4e201d76 100755 --- a/script/update.py +++ b/script/update.py @@ -61,7 +61,7 @@ def run_gyp(target_arch, component): if PLATFORM == 'linux' and target_arch != get_host_arch(): env['GYP_CROSSCOMPILE'] = '1' elif PLATFORM == 'win32': - env['GYP_MSVS_VERSION'] = '2015' + env['GYP_MSVS_VERSION'] = '2017' python = sys.executable if sys.platform == 'cygwin': # Force using win32 python on cygwin.