Skip to content

Commit 216488a

Browse files
committed
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>
1 parent cb411fa commit 216488a

File tree

3 files changed

+1
-34
lines changed

3 files changed

+1
-34
lines changed

SConstruct

-4
Original file line numberDiff line numberDiff line change
@@ -1055,10 +1055,6 @@ if scons_cache_path is not None:
10551055
CacheDir(scons_cache_path)
10561056
print("Scons cache enabled... (path: '" + scons_cache_path + "')")
10571057

1058-
if env["vsproj"]:
1059-
env.vs_incs = []
1060-
env.vs_srcs = []
1061-
10621058
if env["compiledb"]:
10631059
if env.scons_version < (4, 0, 0):
10641060
# Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later.

methods.py

+1-20
Original file line numberDiff line numberDiff line change
@@ -593,23 +593,6 @@ def glob_recursive(pattern, node="."):
593593
return results
594594

595595

596-
def add_to_vs_project(env, sources):
597-
for x in sources:
598-
fname = env.File(x).path if isinstance(x, str) else env.File(x)[0].path
599-
pieces = fname.split(".")
600-
if len(pieces) > 0:
601-
basename = pieces[0]
602-
basename = basename.replace("\\\\", "/")
603-
if os.path.isfile(basename + ".h"):
604-
env.vs_incs += [basename + ".h"]
605-
elif os.path.isfile(basename + ".hpp"):
606-
env.vs_incs += [basename + ".hpp"]
607-
if os.path.isfile(basename + ".c"):
608-
env.vs_srcs += [basename + ".c"]
609-
elif os.path.isfile(basename + ".cpp"):
610-
env.vs_srcs += [basename + ".cpp"]
611-
612-
613596
def precious_program(env, program, sources, **args):
614597
program = env.ProgramOriginal(program, sources, **args)
615598
env.Precious(program)
@@ -1112,9 +1095,7 @@ def format_key_value(v):
11121095
import json
11131096

11141097
md5 = hashlib.md5(
1115-
json.dumps(headers + headers_dirs + sources + sources_dirs + others + others_dirs, sort_keys=True).encode(
1116-
"utf-8"
1117-
)
1098+
json.dumps(sorted(headers + headers_dirs + sources + sources_dirs + others + others_dirs)).encode("utf-8")
11181099
).hexdigest()
11191100

11201101
if os.path.exists(f"{project_name}.vcxproj.filters"):

platform/windows/SCsub

-10
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,6 @@ if env["windows_subsystem"] == "gui":
8383
env_wrap.Depends(prog_wrap, prog)
8484
sources += common_win_wrap + res_wrap_obj
8585

86-
# Microsoft Visual Studio Project Generation
87-
if env["vsproj"]:
88-
env.vs_srcs += ["platform/windows/" + res_file]
89-
env.vs_srcs += ["platform/windows/godot.natvis"]
90-
for x in common_win:
91-
env.vs_srcs += ["platform/windows/" + str(x)]
92-
if env["windows_subsystem"] == "gui":
93-
for x in common_win_wrap:
94-
env.vs_srcs += ["platform/windows/" + str(x)]
95-
9686
if env["d3d12"]:
9787
dxc_target_aliases = {
9888
"x86_32": "x86",

0 commit comments

Comments
 (0)