You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix generating vsproj with SCons 4.6.0+
(cherry picked from commit 72110134d6)
This commit is contained in:
committed by
Rémi Verschelde
parent
9d69e7aba3
commit
346c9a6671
19
methods.py
19
methods.py
@@ -776,25 +776,28 @@ def detect_visual_c_compiler_version(tools_env):
|
|||||||
|
|
||||||
|
|
||||||
def find_visual_c_batch_file(env):
|
def find_visual_c_batch_file(env):
|
||||||
from SCons.Tool.MSCommon.vc import (
|
from SCons.Tool.MSCommon.vc import get_default_version, get_host_target, find_batch_file, find_vc_pdir
|
||||||
get_default_version,
|
|
||||||
get_host_target,
|
|
||||||
find_batch_file,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Syntax changed in SCons 4.4.0.
|
# Syntax changed in SCons 4.4.0.
|
||||||
from SCons import __version__ as scons_raw_version
|
from SCons import __version__ as scons_raw_version
|
||||||
|
|
||||||
scons_ver = env._get_major_minor_revision(scons_raw_version)
|
scons_ver = env._get_major_minor_revision(scons_raw_version)
|
||||||
|
|
||||||
version = get_default_version(env)
|
msvc_version = get_default_version(env)
|
||||||
|
|
||||||
if scons_ver >= (4, 4, 0):
|
if scons_ver >= (4, 4, 0):
|
||||||
(host_platform, target_platform, _) = get_host_target(env, version)
|
(host_platform, target_platform, _) = get_host_target(env, msvc_version)
|
||||||
else:
|
else:
|
||||||
(host_platform, target_platform, _) = get_host_target(env)
|
(host_platform, target_platform, _) = get_host_target(env)
|
||||||
|
|
||||||
return find_batch_file(env, version, host_platform, target_platform)[0]
|
if scons_ver < (4, 6, 0):
|
||||||
|
return find_batch_file(env, msvc_version, host_platform, target_platform)[0]
|
||||||
|
|
||||||
|
# Scons 4.6.0+ removed passing env, so we need to get the product_dir ourselves first,
|
||||||
|
# then pass that as the last param instead of env as the first param as before.
|
||||||
|
# We should investigate if we can avoid relying on SCons internals here.
|
||||||
|
product_dir = find_vc_pdir(env, msvc_version)
|
||||||
|
return find_batch_file(msvc_version, host_platform, target_platform, product_dir)[0]
|
||||||
|
|
||||||
|
|
||||||
def generate_cpp_hint_file(filename):
|
def generate_cpp_hint_file(filename):
|
||||||
|
|||||||
Reference in New Issue
Block a user