Jelajahi Sumber

remove support for building with older Visual Studio versions

VS2013 Community Edition can be used for development of open-source
projects for free. In addition, the builds for the older versions
are not being tested (e.g. for compilation errors) so it makes sense
to standardize on VS2013.
Ashish Kulkarni 11 tahun lalu
induk
melakukan
5656bb9e06
2 mengubah file dengan 5 tambahan dan 58 penghapusan
  1. 4 9
      INSTALL.md
  2. 1 49
      scripts/build.py

+ 4 - 9
INSTALL.md

@@ -79,8 +79,8 @@ native package (either DEB or RPM, depending on the distribution) in the
 Windows
 -------
 
-* Install Visual Studio 2008 or later ([2013 Express](http://www.microsoft.com/en-US/download/details.aspx?id=40787)
-  is recommended) or follow instructions for [Windows SDK 7.1](http://qt-project.org/wiki/Category:Tools::msvc)
+* Install Visual Studio 2013 Update 4 -- [Community Edition](http://go.microsoft.com/?linkid=9863609)
+  should also work.
 * Do "Windows Update" to ensure that VC/SDK security patches are up-to-date
 * Install the latest [ActivePerl](http://www.activestate.com/activeperl/downloads) release
 * Install the latest [Python 2.7](http://www.python.org/downloads/windows/) release
@@ -90,20 +90,15 @@ Windows
 
 Target          | Building 32-bit binaries               |  Building 64-bit binaries
 ------          | ------------------------               |  ------------------------
-MSVC 2008       | `scripts\build.py msvc2008-win32`      | `scripts/build.py msvc2008-win64`
-MSVC 2010       | `scripts\build.py msvc2010-win32`      | `scripts/build.py msvc2010-win64`
-MSVC 2012       | `scripts\build.py msvc2012-win32`      | `scripts/build.py msvc2012-win64`
 MSVC 2013       | `scripts\build.py msvc2013-win32`      | `scripts/build.py msvc2013-win64`
-Windows SDK 7.1 | `scripts\build.py msvc-winsdk71-win32` | `scripts\build.py msvc-winsdk71-win64`
 
 During the build, a working internet connection is required to download and
 compile the dependent libraries (e.g. OpenSSL). The output installers should
 be generated in the `static-build` folder.
 
 Please note that if you want to target Windows XP/Windows 2003 (i.e. NT 5.x)
-you should use the MinGW-w64 builds cross-compiled from Linux or use MSVC 2008,
-MSVC 2010 or Windows SDK 7.1 -- MSVC 2012 or later target Windows Vista (i.e.
-NT 6.x) by default.
+you should use the MinGW-w64 builds cross-compiled from Linux as the MSVC builds
+target Windows Vista or later (i.e. NT 6.x) by default.
 
 OS X
 ----

+ 1 - 49
scripts/build.py

@@ -21,16 +21,8 @@
 
 BUILDERS = {
     'source-tarball':        'source_tarball',
-    'msvc2008-win32':        'msvc',
-    'msvc2008-win64':        'msvc',
-    'msvc2010-win32':        'msvc',
-    'msvc2010-win64':        'msvc',
-    'msvc2012-win32':        'msvc',
-    'msvc2012-win64':        'msvc',
     'msvc2013-win32':        'msvc',
     'msvc2013-win64':        'msvc',
-    'msvc-winsdk71-win32':   'msvc_winsdk71',
-    'msvc-winsdk71-win64':   'msvc_winsdk71',
     'setup-mingw-w64':       'setup_mingw64',
     'setup-schroot-centos5': 'setup_schroot',
     'setup-schroot-centos6': 'setup_schroot',
@@ -821,12 +813,9 @@ def build_source_tarball(config, basedir):
         tar.add('.', 'wkhtmltox-%s/' % version, filter=_filter_tar)
     shell('git reset --hard HEAD')
 
-# --------------------------------------------------------------- MSVC (2008-2013)
+# --------------------------------------------------------------- MSVC (2013 only)
 
 MSVC_LOCATION = {
-    'msvc2008': 'VS90COMNTOOLS',
-    'msvc2010': 'VS100COMNTOOLS',
-    'msvc2012': 'VS110COMNTOOLS',
     'msvc2013': 'VS120COMNTOOLS'
 }
 
@@ -867,43 +856,6 @@ def build_msvc(config, basedir):
 
     os.environ.update(eval(stdout.strip()))
 
-    build_msvc_common(config, basedir)
-
-# --------------------------------------------------------------- MSVC via Windows SDK 7.1
-
-def check_msvc_winsdk71(config):
-    for pfile in ['ProgramFiles(x86)', 'ProgramFiles']:
-        if pfile in os.environ and exists(os.path.join(os.environ[pfile], 'Microsoft SDKs', 'Windows', 'v7.1', 'Bin', 'SetEnv.cmd')):
-            return
-    error("Unable to detect the location of Windows SDK 7.1")
-
-def build_msvc_winsdk71(config, basedir):
-    arch = config[config.rindex('-'):]
-    setenv = None
-    for pfile in ['ProgramFiles(x86)', 'ProgramFiles']:
-        if not pfile in os.environ:
-            continue
-        setenv = os.path.join(os.environ[pfile], 'Microsoft SDKs', 'Windows', 'v7.1', 'Bin', 'SetEnv.cmd')
-
-    mode = debug and '/Debug' or '/Release'
-    if arch == 'win64':
-        args = '/2008 /x64 %s' % mode
-    else:
-        args = '/2008 /x86 %s' % mode
-
-    python = sys.executable
-    process = subprocess.Popen('("%s" %s>nul)&&"%s" -c "import os, sys; sys.stdout.write(repr(dict(os.environ)))"' % (
-        setenv, args, python), stdout=subprocess.PIPE, shell=True)
-    stdout, _ = process.communicate()
-    exitcode = process.wait()
-    if exitcode != 0:
-        error("unable to initialize the environment for Windows SDK 7.1")
-
-    os.environ.update(eval(stdout.strip()))
-
-    build_msvc_common(config, basedir)
-
-def build_msvc_common(config, basedir):
     version, simple_version = get_version(basedir)
     build_deplibs(config, basedir)