Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete old unused code for VS project generation #99138

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1055,10 +1055,6 @@ if scons_cache_path is not None:
CacheDir(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.scons_version < (4, 0, 0):
# Generating the compilation DB (`compile_commands.json`) requires SCons 4.0.0 or later.
Expand Down
21 changes: 1 addition & 20 deletions methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,23 +593,6 @@ def glob_recursive(pattern, node="."):
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):
program = env.ProgramOriginal(program, sources, **args)
env.Precious(program)
Expand Down Expand Up @@ -1112,9 +1095,7 @@ def format_key_value(v):
import json

md5 = hashlib.md5(
json.dumps(headers + headers_dirs + sources + sources_dirs + others + others_dirs, sort_keys=True).encode(
"utf-8"
)
json.dumps(sorted(headers + headers_dirs + sources + sources_dirs + others + others_dirs)).encode("utf-8")
).hexdigest()

if os.path.exists(f"{project_name}.vcxproj.filters"):
Expand Down
10 changes: 0 additions & 10 deletions platform/windows/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ if env["windows_subsystem"] == "gui":
env_wrap.Depends(prog_wrap, prog)
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"]:
dxc_target_aliases = {
"x86_32": "x86",
Expand Down