Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2021-04-01 09:33:38 +0000
committerNiraj Modi2021-04-01 10:07:24 +0000
commitd7d84ee476ba698a8a64a807c687ddbe03948968 (patch)
treebc524caad1a99ac5dbef6329f234a56c26c9f5a8
parentead104789db56eeb38d94f3916cceb0d17dbbbbd (diff)
downloadeclipse.platform.swt-d7d84ee476ba698a8a64a807c687ddbe03948968.tar.gz
eclipse.platform.swt-d7d84ee476ba698a8a64a807c687ddbe03948968.tar.xz
eclipse.platform.swt-d7d84ee476ba698a8a64a807c687ddbe03948968.zip
Bug 572519 - [Win32] Improve SWT Windows build.bat script
- Added %MSVC_EDITION% for tweaking VS editions like 'Community', 'Enterprise', 'Professional' - Added %MSVC_VERSION% for tweaking VS version at on place like '2017' or newer '2019' Change-Id: Ia4e69761b784ad60966066f609a8644448f8a826 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat20
1 files changed, 13 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat
index c77853a6f8..34d957e928 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat
@@ -1,5 +1,5 @@
@rem ***************************************************************************
-@rem Copyright (c) 2000, 2018 IBM Corporation and others.
+@rem Copyright (c) 2000, 2021 IBM Corporation and others.
@rem
@rem This program and the accompanying materials
@rem are made available under the terms of the Eclipse Public License 2.0
@@ -23,12 +23,18 @@ echo INFO Starting build of binaries. Detailed system setup instructions can be
IF "x.%SWT_BUILDDIR%"=="x." set "SWT_BUILDDIR=W:"
echo SWT build dir: %SWT_BUILDDIR%
-IF "x.%MSVC_HOME%"=="x." set "MSVC_HOME=%SWT_BUILDDIR%\Microsoft\Visual Studio\2017\"
-IF NOT EXIST "%MSVC_HOME%" set "MSVC_HOME=%ProgramFiles(x86)%\Microsoft Visual Studio\2017"
+@rem Specify VisualStudio Edition: 'Community', 'Enterprise', 'Professional' etc.
+IF "x.%MSVC_EDITION%"=="x." set "MSVC_EDITION=Community"
+
+@rem Specify VisualStudio Version: '2017' or newer '2019'
+IF "x.%MSVC_VERSION%"=="x." set "MSVC_VERSION=2017"
+
+IF "x.%MSVC_HOME%"=="x." set "MSVC_HOME=%SWT_BUILDDIR%\Microsoft\Visual Studio\%MSVC_VERSION%\"
+IF NOT EXIST "%MSVC_HOME%" set "MSVC_HOME=%ProgramFiles(x86)%\Microsoft Visual Studio\%MSVC_VERSION%"
IF EXIST "%MSVC_HOME%" (
- echo "Microsoft Visual Studio 2017 dir: %MSVC_HOME%"
+ echo "Microsoft Visual Studio %MSVC_VERSION% dir: %MSVC_HOME%"
) ELSE (
- echo "WARNING: Microsoft Visual Studio 2017 was not found."
+ echo "WARNING: Microsoft Visual Studio %MSVC_VERSION% was not found."
)
IF "x.%1"=="x.x86" GOTO X86
@@ -42,7 +48,7 @@ IF "x.%SWT_JAVA_HOME%"=="x." (
) ELSE (
echo "SWT_JAVA_HOME x86: %SWT_JAVA_HOME%"
)
-call "%MSVC_HOME%\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
+call "%MSVC_HOME%\%MSVC_EDITION%\VC\Auxiliary\Build\vcvarsall.bat" x86
IF x.%1==x.x86 shift
GOTO MAKE
@@ -74,7 +80,7 @@ IF "x.%CHROMIUM_RUST_DIR%"=="x." (
set CHROMIUM_HEADERS=%CHROMIUM_RUST_DIR%\chromium_subp\cef_win32
set CHROMIUM_TARGET=%CHROMIUM_RUST_DIR%\chromium_swt\target\release
)
-call "%MSVC_HOME%\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
+call "%MSVC_HOME%\%MSVC_EDITION%\VC\Auxiliary\Build\vcvarsall.bat" x64
shift
GOTO MAKE

Back to the top