summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-11-21 12:54:37 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-11-21 12:59:06 +0200
commitfa61f322d74438b1f593edf70abaf2a01cc07164 (patch)
tree4300d0050d0139a0b44ea856531b5d52f3c6b638
parentd3cb12567f97fa1547ebef5b445b3bb723a471e0 (diff)
genlib: Warn if using dlltool and support newer VS versions than 20101.10.1
If we generate .lib files with dlltool, they won't work very well with Visual Studio and can result in missing symbols. https://sourceware.org/bugzilla/show_bug.cgi?id=12633 https://bugzilla.gnome.org/show_bug.cgi?id=773889
-rw-r--r--cerbero/ide/vs/genlib.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/cerbero/ide/vs/genlib.py b/cerbero/ide/vs/genlib.py
index 5fbb52b6..d25c9625 100644
--- a/cerbero/ide/vs/genlib.py
+++ b/cerbero/ide/vs/genlib.py
@@ -20,6 +20,7 @@ import os
from cerbero.config import Architecture
from cerbero.utils import shell, to_unixpath
+from cerbero.utils import messages as m
class GenLib(object):
@@ -58,13 +59,17 @@ class GenLib(object):
arch = 'x64'
shell.call(self.LIB_TPL % (lib_path, defname, implib, arch), outputdir)
else:
+ m.warning("Using dlltool instead of lib.exe! Resulting .lib files"
+ " will have problems with Visual Studio, see "
+ " http://sourceware.org/bugzilla/show_bug.cgi?id=12633")
shell.call(self.DLLTOOL_TPL % (defname, implib, dllname), outputdir)
return os.path.join(outputdir, implib)
def _get_vc_tools_path(self):
- if 'VS100COMNTOOLS' in os.environ:
- path = os.path.join(os.environ['VS100COMNTOOLS'], '..', '..',
- 'VC', 'bin', 'amd64')
- if os.path.exists (path):
- return path
+ for version in ['100', '110', '120', '130', '140', '150']:
+ variable = 'VS{0}COMNTOOLS'.format(version)
+ if variable in os.environ:
+ path = os.path.join(os.environ[variable], '..', '..', 'VC', 'bin', 'amd64')
+ if os.path.exists (path):
+ return path
return None