diff options
author | Tobias Markmann <tm@ayena.de> | 2017-01-16 14:32:56 (GMT) |
---|---|---|
committer | Edwin Mons <edwin.mons@isode.com> | 2017-01-17 15:22:11 (GMT) |
commit | e649c54daa666c99d2f934b223acd0262c05e11a (patch) | |
tree | 27262c34b711c2cef0276fe69bfcad326d2e427b | |
parent | a2acaebfb02879ce5907077381210885f5c41e48 (diff) | |
download | swift-e649c54daa666c99d2f934b223acd0262c05e11a.zip swift-e649c54daa666c99d2f934b223acd0262c05e11a.tar.bz2 |
Add Qt bin path to SCons process' PATH environment variable
Test-Information:
Tested scons dist=1 successfully on Windows 10 with Visual Studio 2015
and Qt 5.7.1.
Change-Id: I41271f10367249e2e89fdba85f1d5c5305c548ff
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index 031c556..d603ef4 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -110,60 +110,65 @@ vars.Add(BoolVariable("unbound", "Build bundled ldns and unbound. Use them for D vars.Add(BoolVariable("check_headers", "Independently build compilation units for all Swiften headers for detecting missing dependencies.", "no")) vars.Add("win_target_arch", "Target architecture for Windows builds. x86 for 32-bit (default) or x86_64 for 64-bit.", "x86") vars.Add(BoolVariable("install_git_hooks", "Install git hooks", "true")) # Code Signing Options vars.Add("codesign_identity", "macOS code signing identity to be passed to codesign when building the distribution package. Must match the Commen Name of the Subject of the code signing certificate.", "") vars.Add("signtool_key_pfx", "The keyfile (.pfx) that will be used to sign the Windows installer.", None) vars.Add("signtool_timestamp_url", "The timestamp server that will be queried for a signed time stamp in the signing process.", None) # Automatic Software Update Options vars.Add(PathVariable("sparkle_public_dsa_key", "Optional path to a public DSA key used to verify Sparkle software updates. Without specifiying this option, the app needs to be code signed for Sparkle to work.", None, PathVariable.PathIsFile)) ################################################################################ # Set up default build & configure environment ################################################################################ env_ENV = { 'PATH' : os.environ['PATH'], 'LD_LIBRARY_PATH' : os.environ.get("LD_LIBRARY_PATH", ""), 'TERM' : os.environ.get("TERM", ""), } if "MSVC_VERSION" in ARGUMENTS : env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"], platform = ARGUMENTS.get("PLATFORM", None)) env = Environment(ENV = env_ENV, variables = vars, MSVC_VERSION = ARGUMENTS["MSVC_VERSION"], platform = ARGUMENTS.get("PLATFORM", None), TARGET_ARCH=env["win_target_arch"]) else : env = Environment(ENV = env_ENV, variables = vars, platform = ARGUMENTS.get("PLATFORM", None)) env = Environment(ENV = env_ENV, variables = vars, platform = ARGUMENTS.get("PLATFORM", None), TARGET_ARCH=env["win_target_arch"]) +if env["PLATFORM"] == "win32" and env["qt"] : + # This adds Qt's binary directory at the end of the PATH variable, so that + # windeployqt.exe is automatically detected and used in WindowsBundle.py. + os.environ["PATH"] = env['ENV']['PATH'] + ";" + env['qt'] + "\\bin" + Help(vars.GenerateHelpText(env)) # Workaround for missing Visual Studio 2012 support in SCons # Requires scons to be run from a VS2012 console if env.get("MSVC_VERSION", "").startswith("11.0") : env["ENV"]["LIB"] = os.environ["LIB"] env["ENV"]["INCLUDE"] = os.environ["INCLUDE"] # Default environment variables env["PLATFORM_FLAGS"] = { "LIBPATH": [], "LIBS": [], "FRAMEWORKS": [], } # Default custom tools env.Tool("Test", toolpath = ["#/BuildTools/SCons/Tools"]) env.Tool("WriteVal", toolpath = ["#/BuildTools/SCons/Tools"]) env.Tool("BuildVersion", toolpath = ["#/BuildTools/SCons/Tools"]) env.Tool("Flags", toolpath = ["#/BuildTools/SCons/Tools"]) if env["PLATFORM"] == "darwin" : env.Tool("Nib", toolpath = ["#/BuildTools/SCons/Tools"]) env.Tool("AppBundle", toolpath = ["#/BuildTools/SCons/Tools"]) if env["PLATFORM"] == "win32" : env.Tool("WindowsBundle", toolpath = ["#/BuildTools/SCons/Tools"]) #So we don't need to escalate with UAC if "TMP" in os.environ.keys() : env['ENV']['TMP'] = os.environ['TMP'] env.Tool("SLOCCount", toolpath = ["#/BuildTools/SCons/Tools"]) |