Skip to content

Inconsistent build options in a generated Visual Studio project #79127

Closed
@CncealDVRflectN

Description

Godot version

4.1dev [cdd2313]

System information

Windows 11 22H2 - Visual Studio 2022 (17.6.4) - SCons 4.5.2 - Python 3.10.11

Issue description

Multiple build options are ignored in a Visual Studio project generation step.

Build command line in Visual Studio project built with options vsproj=yes dev_build=yes dev_mode=yes:
Screenshot 2023-07-04 224622

Build command line in Visual Studio project built with options vsproj=yes dev_build=yes verbose=yes warnings=extra tests=yes:
Screenshot 2023-07-04 225646

As you can see in the second screenshot, options 'verbose' and 'warnings' are missing in the Visual Studio project. So is there any specific reason why only some options are transferred, or can I modify the generate_vs_project method to copy all original options (excluding vsproj of course) and create a PR? Also, I'm curious: why is the progress option explicitly set to no for Visual Studio projects?

godot/methods.py

Lines 851 to 874 in cdd2313

common_build_postfix = [
"--directory=\"$(ProjectDir.TrimEnd('\\'))\"",
"platform=windows",
f"target={configuration_getter}",
"progress=no",
"-j%s" % num_jobs,
]
if env["dev_build"]:
common_build_postfix.append("dev_build=yes")
if env["dev_mode"]:
common_build_postfix.append("dev_mode=yes")
elif env["tests"]:
common_build_postfix.append("tests=yes")
if env["custom_modules"]:
common_build_postfix.append("custom_modules=%s" % env["custom_modules"])
if env["precision"] == "double":
common_build_postfix.append("precision=double")
result = " ^& ".join(common_build_prefix + [" ".join([commands] + common_build_postfix)])

Steps to reproduce

  1. Build the engine with options vsproj=yes dev_build=yes dev_mode=yes
  2. Open the generated project in Visual Studio
  3. Open projects's NMake properties (Project->Properties->NMake)
  4. Check Build Command Line and Rebuild All Command Line properties
  5. Close Visual Studio
  6. Rebuild the engine with options vsproj=yes dev_build=yes verbose=yes warnings=extra tests=yes
  7. Open the generated project in Visual Studio
  8. Open projects's NMake properties (Project->Properties->NMake)
  9. Check Build Command Line and Rebuild All Command Line properties

Minimal reproduction project

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions