Delete old unused code for VS project generation

Also ensured that sorting of files for hashing actually happens

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
This commit is contained in:
Yevhen Babiichuk (DustDFG) 2024-11-12 20:27:33 +02:00
parent cb411fa960
commit 216488ad9b
3 changed files with 1 additions and 34 deletions

View File

@ -1055,10 +1055,6 @@ if scons_cache_path is not None:
CacheDir(scons_cache_path) CacheDir(scons_cache_path)
print("Scons cache enabled... (path: '" + scons_cache_path + "')") print("Scons cache enabled... (path: '" + scons_cache_path + "')")
if env["vsproj"]:
env.vs_incs = []
env.vs_srcs = []
if env["compiledb"]: if env["compiledb"]:
if env.scons_version < (4, 0, 0): if env.scons_version < (4, 0, 0):
# Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later. # Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later.

View File

@ -593,23 +593,6 @@ def glob_recursive(pattern, node="."):
return results return results
def add_to_vs_project(env, sources):
for x in sources:
fname = env.File(x).path if isinstance(x, str) else env.File(x)[0].path
pieces = fname.split(".")
if len(pieces) > 0:
basename = pieces[0]
basename = basename.replace("\\\\", "/")
if os.path.isfile(basename + ".h"):
env.vs_incs += [basename + ".h"]
elif os.path.isfile(basename + ".hpp"):
env.vs_incs += [basename + ".hpp"]
if os.path.isfile(basename + ".c"):
env.vs_srcs += [basename + ".c"]
elif os.path.isfile(basename + ".cpp"):
env.vs_srcs += [basename + ".cpp"]
def precious_program(env, program, sources, **args): def precious_program(env, program, sources, **args):
program = env.ProgramOriginal(program, sources, **args) program = env.ProgramOriginal(program, sources, **args)
env.Precious(program) env.Precious(program)
@ -1112,9 +1095,7 @@ def generate_vs_project(env, original_args, project_name="godot"):
import json import json
md5 = hashlib.md5( md5 = hashlib.md5(
json.dumps(headers + headers_dirs + sources + sources_dirs + others + others_dirs, sort_keys=True).encode( json.dumps(sorted(headers + headers_dirs + sources + sources_dirs + others + others_dirs)).encode("utf-8")
"utf-8"
)
).hexdigest() ).hexdigest()
if os.path.exists(f"{project_name}.vcxproj.filters"): if os.path.exists(f"{project_name}.vcxproj.filters"):

View File

@ -83,16 +83,6 @@ if env["windows_subsystem"] == "gui":
env_wrap.Depends(prog_wrap, prog) env_wrap.Depends(prog_wrap, prog)
sources += common_win_wrap + res_wrap_obj sources += common_win_wrap + res_wrap_obj
# Microsoft Visual Studio Project Generation
if env["vsproj"]:
env.vs_srcs += ["platform/windows/" + res_file]
env.vs_srcs += ["platform/windows/godot.natvis"]
for x in common_win:
env.vs_srcs += ["platform/windows/" + str(x)]
if env["windows_subsystem"] == "gui":
for x in common_win_wrap:
env.vs_srcs += ["platform/windows/" + str(x)]
if env["d3d12"]: if env["d3d12"]:
dxc_target_aliases = { dxc_target_aliases = {
"x86_32": "x86", "x86_32": "x86",