diff options
Diffstat (limited to 'methods.py')
-rw-r--r-- | methods.py | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/methods.py b/methods.py index 82c19f09e3..1f49da7ace 100644 --- a/methods.py +++ b/methods.py @@ -412,15 +412,17 @@ def use_windows_spawn_fix(self, platform=None): startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - proc = subprocess.Popen( - cmdline, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - startupinfo=startupinfo, - shell=False, - env=env, - ) + popen_args = { + "stdin": subprocess.PIPE, + "stdout": subprocess.PIPE, + "stderr": subprocess.PIPE, + "startupinfo": startupinfo, + "shell": False, + "env": env, + } + if sys.version_info >= (3, 7, 0): + popen_args["text"] = True + proc = subprocess.Popen(cmdline, **popen_args) _, err = proc.communicate() rv = proc.wait() if rv: @@ -539,7 +541,7 @@ def detect_visual_c_compiler_version(tools_env): # and not scons setup environment (env)... so make sure you call the right environment on it or it will fail to detect # the proper vc version that will be called - # There is no flag to give to visual c compilers to set the architecture, i.e. scons bits argument (32,64,ARM etc) + # There is no flag to give to visual c compilers to set the architecture, i.e. scons arch argument (x86_32, x86_64, arm64, etc.). # There are many different cl.exe files that are run, and each one compiles & links to a different architecture # As far as I know, the only way to figure out what compiler will be run when Scons calls cl.exe via Program() # is to check the PATH variable and figure out which one will be called first. Code below does that and returns: @@ -704,7 +706,7 @@ def generate_vs_project(env, num_jobs): # required for Visual Studio to understand that it needs to generate an NMAKE # project. Do not modify without knowing what you are doing. PLATFORMS = ["Win32", "x64"] - PLATFORM_IDS = ["32", "64"] + PLATFORM_IDS = ["x86_32", "x86_64"] CONFIGURATIONS = ["debug", "release", "release_debug"] CONFIGURATION_IDS = ["tools", "opt", "opt.tools"] @@ -817,18 +819,12 @@ def generate_vs_project(env, num_jobs): module_configs = ModuleConfigs() if env.get("module_mono_enabled"): - import modules.mono.build_scripts.mono_reg_utils as mono_reg - - mono_root = env.get("mono_prefix") or mono_reg.find_mono_root_dir(env["bits"]) - if mono_root: - module_configs.add_mode( - "mono", - includes=os.path.join(mono_root, "include", "mono-2.0"), - cli_args="module_mono_enabled=yes mono_glue=yes", - defines=[("MONO_GLUE_ENABLED",)], - ) - else: - print("Mono installation directory not found. Generated project will not have build variants for Mono.") + mono_defines = [("GD_MONO_HOT_RELOAD",)] if env["tools"] else [] + module_configs.add_mode( + "mono", + cli_args="module_mono_enabled=yes", + defines=mono_defines, + ) env["MSVSBUILDCOM"] = module_configs.build_commandline("scons") env["MSVSREBUILDCOM"] = module_configs.build_commandline("scons vsproj=yes") |