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

MSVC: detection fixes #4534

Merged
merged 48 commits into from
Jul 1, 2024
Merged

MSVC: detection fixes #4534

merged 48 commits into from
Jul 1, 2024

Commits on Sep 8, 2023

  1. MSVC: detection fixes and changes

    Changes:
    * VS/VC roots are classified by their installed features (e.g, devenv.com, vcexpress.com, etc.). This provides for special-case verification of batch file arguments based on the internal classification.
    * Consistent with earlier behavior, express versions are used for the non-express msvc version symbol for 14.1 and 8.0 when the express version is the only version installed.
    * There is a strong possibility that 14.0Exp may not have been detected correctly.  It appears that registry keys for earlier versions of msvc are not populated.  Refined detection of 14.0Exp was added.
    * Special case handling of VS2015 BuildTools was added.  The msvc batch files restrict the arguments available as compared to full versions.  The arguments may be accepted and ignored possibly resulting in build failures that are likely not easy to diagnose.
    * Special case handling og VS2015 Express was added.  The msvc batch files restrict the arguments available as compared to full versions.  For example, store/UWP build are only available for x86 targets.
    * Windows/Platform SDK installations of 7.1, 7.0, and 6.1 populate registry keys and installation folders that were detected by scons (versions 10.0 and 9.0).  Unfortunately, the generated files are intended to be used via SetEnv.cmd and result in errors.  The detection of sdk-only installations was added and the roots are ignored.
    * The relative imports of the MSCommon module were changed to top-level absolute imports in a number of microsoft tools.  Moving any of the tools to the site tools folder failed on import (i.e., the relative paths become invalid when moved).
    * VS2005 to VS2015 vcvarsall.bat dispatches to a dependent batch file when configuring the msvc environment.  In certain installation scenarios, the dependent batch file (e.g., vcvars64.bat) may not exist.  The existence of vcvarsall.bat, the dependent batch file, and the compiler executable are now verified.
    * MSVC configuration data specific to versions VS2005 to VS2008 was added as the dependent batch files have different names than the batch files for VS2010 and later.  VC++ For Python is handled as a special case as the dependent batch files: are not used and are in different locations.
    * When VC++ For Python is installed using the ALLUSERS=1 command-line option, the registry keys written are under HKLM rather than HKCU.  VC++ For Python installed for all users is now correctly detected.
    * The existing detection configuration for vswhere and the registry was refactored to separate the two methods of detection.
    * The detection of the msvc compiler executable has been modified and no longer considers the os environment.  The detection of the msvc compiler executable was modified to provide more detailed warning messages.
    jcbrill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    7d0f804 View commit details
    Browse the repository at this point in the history
  2. Temporarily disable command-line argument and keep original case of v…

    …c path from json output.
    
    Test failures when the vc path from json is normalized.
    Test failure for AddOption help output.
    jcbrill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    caf8b0f View commit details
    Browse the repository at this point in the history
  3. Update verification of vswhere executable and temporary removal of vs…

    …where command-line argument
    jcbrill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    1867d37 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2023

  1. Remove vswhere command-line option and replace retrieval with stub re…

    …turning None. Change processing of user-specified vswhere path.
    
    TODO:
    * revisit MSVC.Util.process_path due to realpath behavior for some windows specifications (drive specifications, etc).
    jcbrill committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    7a9c336 View commit details
    Browse the repository at this point in the history
  2. Update MSCommon/README.rst documentation [ci skip]

    Changes:
    * Added MSVC detection priority.
    * Added VS2015 edition limitations.
    * Updated SDK batch file known issues.
    * Added footnotes for MSVC batch file argument limitations.
    * Added footnote for Windows SDK version numbers (Windows 10 and Windows 11)
    jcbrill committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    8b4fcde View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3fbef22 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0fc09ba View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0d37f06 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. Configuration menu
    Copy the full SHA
    518fd13 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6424fe3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0d1aaa7 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. Merge branch 'master' into jbrill-msvc-fixes

    Manually resolved conflicts in CHANGES.txt and SCons/Tool/MSCommon/vc.py.
    jcbrill committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    fd2ec85 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2024

  1. Update CHANGES.txt and RELEASE.txt: move text items and fix typograph…

    …ical errors to prepare for merge with latest.
    jcbrill committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    ed18bdf View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into HEAD

    Manually resolve conflicts:
    * CHANGES.txt
    * RELEASE.txt
    * SCons/Tool/MSCommon/vc.py
    jcbrill committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    d06ad9e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    caa6539 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bc1ee03 View commit details
    Browse the repository at this point in the history
  5. Add additional vswhere locations and remove vswhere command-line stub.

    Add vswhere roots for:
    * winget
    * scoop
    jcbrill committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    5038ac5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7859a40 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Merge branch 'master' into jbrill-msvc-detect

    Manually resolve conflicts:
    	CHANGES.txt
    	RELEASE.txt
    	SCons/Tool/MSCommon/vc.py
    jcbrill committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    a42bc77 View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2024

  1. Test suite update and bug fixes.

    Changes:
    * Bug fix for not found toolset version in vcTests.py
    * Re-work sdk list tests in vcTests.py when run on machine that may not have sdks installed (no msvc or older msvc).  Potential future problem lurking as the gap between supported sdk versions grows with future releases.
    * Update the tolerance for precompiled header "fast enough" in msvc.py. This test, more than others, has a tendency to fail when run in a virtual machine on Windows.
    * Explicity run "foo.exe" instead of "foo" in vs-14.3-exec.py.  A recent change in VS2022 appears to create a "foo" folder which causes the test to fail.
    jcbrill committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    981d74a View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2024

  1. Clear VisualStudio internal cache and installed visual studios data s…

    …tructures when vswhere finds new msvc roots.
    jcbrill committed Mar 3, 2024
    Configuration menu
    Copy the full SHA
    ea5baf8 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Merge branch 'master' into jbrill-msvc-detect

    Manually resolve conflicts:
    * SCons/Tool/msvc.xml
    jcbrill committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    a20098e View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2024

  1. Detection changes for VS IDE editions and VS2008 (develop and vcforpy…

    …thon).
    
    Changes:
    * An express installation of the IDE binary is used when no other IDE edition is detected.
    * A full development edition (e.g., Professional) of VS2008 is elected before a Visual C++ For Python edition.
    * Update detection order in README.rst and remove hard tabs.
    * Minor fixes lingering from original VSWHERE implementation where all call chains were not updated when the environment argument was added.
    jcbrill committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    1fab595 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2024

  1. Refactor vswhere executable support and detection.

    vswhere changes:
    * Split the current vswhere paths list into two lists:
      * the visual studio installer locations,
      * the package manager locations.
    * Add additional user vswhere priority groups:
      * before the vs installer locations [high priority],
      * after the vs installer locations [default priority], and
      * after the package manager locations [low priority].
    * Adjust tests for vswhere path list changes accordingly.
    * Add vswhere location functions to:
      * register user vswhere executable paths by priority,
      * get the currently configured vswhere executable location,
      * freeze the vswhere executable location used for detection.
    * Assign the environment VSWHERE construction variable in Tool/MSCommon/vc.py.
    * Remove the assignment of the environment VSWHERE construction variable in Tool/msvc.py
    * Update the test suite function signature for finding the msvc product directory with vswhere.
    * Freeze the vswhere executable in the following functions before the cache is evaluated which will raise an exception if the vswhere executable has changed since the initial detection (if necessary):
      * MSCommon.vc.get_installed_visual_studios,
      * MSCommon.vc.find_vc_pdir,
      * MSCommon.vc.msvc_setup_env,
      * MSCommon.vs.get_installed_visual_studios
    jcbrill committed Mar 23, 2024
    Configuration menu
    Copy the full SHA
    3b95dd6 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into jbrill-msvc-detect

    Manually resolved:
    * CHANGES.txt
    * RELEASE.txt
    jcbrill committed Mar 23, 2024
    Configuration menu
    Copy the full SHA
    756c327 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7dd8caa View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2024

  1. Update documentation.

    jcbrill committed Mar 24, 2024
    Configuration menu
    Copy the full SHA
    9714abc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1dacd31 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' into jbrill-msvc-detect

    Manually resolve conflicts:
    * RELEASE.txt
    jcbrill committed Mar 24, 2024
    Configuration menu
    Copy the full SHA
    bafae30 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. Configuration menu
    Copy the full SHA
    4130840 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f747386 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    15206e4 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. Update vswhere function api and update MSCommon/README.rst

    Changes:
    * add vswhere_exe argument to msvc_quert_version_toolset function in MSCommon/README.rst
    * fix: pass normalized path for vswhere_norm in vswhere binary named tuple constructor
    * add freeze argument for vswhere_register_executable
    jcbrill committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    56e1769 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Merge branch 'master' into jbrill-msvc-detect

    Manually resolved conflicts:
    * CHANGES.txt
    * RELEASE.txt
    * test/MSVS/vs-14.3-exec.py
    jcbrill committed May 14, 2024
    Configuration menu
    Copy the full SHA
    c624773 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2024

  1. Configuration menu
    Copy the full SHA
    d0ced8a View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Merge branch 'master' into jbrill-msvc-detect

    Manually resolve conflicts:
    * RELEASE.txt
    jcbrill committed May 20, 2024
    Configuration menu
    Copy the full SHA
    db40145 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Configuration menu
    Copy the full SHA
    e8a541f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b920324 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2024

  1. Configuration menu
    Copy the full SHA
    93f887c View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. Fix issue SCons#4543: Add support for msvc toolset versions 14.4x for…

    … msvc buildtools v143.
    
    Changes:
    * Add msvc build series data structure.
    * Change msvc build tools data structure to contain list of build series.
    * Update script argument validation and tests.
    jcbrill committed May 27, 2024
    Configuration menu
    Copy the full SHA
    40e6f1d View commit details
    Browse the repository at this point in the history
  2. Rework experimental msvc_query_version_toolset function.

    Changes:
    * Add context manager functions to temporary change the policy for msvc not found and msvc script errors within a context block.
    * Change msvc_query_version_toolset function behavior: raise exceptions if not found and for argument validation errors; otherwise return msvc version and toolset version.
    * Additional logging of exception messages .
    * Update tests for 14.3X/14.4X toolsets for VS 2022.
    jcbrill committed May 27, 2024
    Configuration menu
    Copy the full SHA
    da72610 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. Configuration menu
    Copy the full SHA
    4a2f1dc View commit details
    Browse the repository at this point in the history
  2. Fix msvc_query_version_toolset function test in vcTests.py

    Changes:
    * Add function to return msvc version and toolset version pairs for all installed vcs.
    * Construct set of installed toolset vcs for determining if msvc_query_version_toolset should raise an exception.
    jcbrill committed May 28, 2024
    Configuration menu
    Copy the full SHA
    8abc02f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8545d25 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ddaa853 View commit details
    Browse the repository at this point in the history
  5. Fix bug in Config.py initialization and rework support for MsvcQueryV…

    …ersionToolsetTests.
    
    Changes:
    * module-level initialization index was not renamed from vc_version to msvc_version.
    * Add function to return toolset sxs map and versions list in ScriptArguments.py
    * Add additional fields to extended version components
    * Add data structure for installed vcs versions/toolsets for testing
    * Update vcTests.py to new data structure.
    jcbrill committed May 28, 2024
    Configuration menu
    Copy the full SHA
    6a4c52b View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. Configuration menu
    Copy the full SHA
    1cae687 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2024

  1. Merge branch 'master' into jbrill-msvc-detect

    # Manually resolved conflicts:
    #	RELEASE.txt
    jcbrill committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    5000a65 View commit details
    Browse the repository at this point in the history