Skip to content

Commit 9714abc

Browse files
committed
Update documentation.
1 parent 7dd8caa commit 9714abc

File tree

3 files changed

+45
-25
lines changed

3 files changed

+45
-25
lines changed

CHANGES.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
5858
and then later an environment is constructed with a user specified vswhere
5959
executable that detects new msvc installations.
6060
- The vswhere detection of VS2017 (14.1), and later, is now cached at runtime and is
61-
only evaluated once using a single vswhere invocation for all installations.
61+
only evaluated once using a single vswhere invocation for all msvc versions.
6262
Previously, the vswhere executable was invoked for each supported msvc version.
63+
- The vswhere executable locations for the WinGet and Scoop package managers were
64+
added to the default vswhere executable search list after the Chocolatey
65+
installation location.
6366

6467
From Mats Wichmann:
6568

RELEASE.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
3535
(14.0). This behavior was extended to Visual Studio 2017 (14.1) and Visual
3636
Studio 2008 (8.0). An express installation of the IDE binary is used when no
3737
other IDE edition is detected.
38+
- The vswhere executable locations for the WinGet and Scoop package managers were
39+
added to the default vswhere executable search list after the Chocolatey
40+
installation location.
41+
3842

3943
FIXES
4044
-----
@@ -79,6 +83,10 @@ IMPROVEMENTS
7983
- MSVC: Visual Studio 2015 BuildTools (14.0) does not support the sdk version
8084
argument and does not support the store argument. Script argument validation now
8185
takes into account these restrictions.
86+
- MSVC: The registry detection of VS2015 (14.0), and earlier, is now cached at runtime
87+
and is only evaluated once for each msvc version.
88+
- MSVC: The vswhere detection of VS2017 (14.1), and later, is now cached at runtime and
89+
is only evaluated once using a single vswhere invocation for all msvc versions.
8290

8391
PACKAGING
8492
---------

SCons/Tool/msvc.xml

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -400,24 +400,25 @@ latest version of &MSVC; installed on your system.
400400
<para>
401401
The valid values for &cv-MSVC_VERSION; represent major versions
402402
of the compiler, except that versions ending in <literal>Exp</literal>
403-
refer to "Express" or "Express for Desktop" Visual Studio editions,
404-
which require distinct entries because they use a different
405-
filesystem layout and have feature limitations compared to
406-
the full version.
403+
refer to "Express" or "Express for Desktop" Visual Studio editions.
407404
Values that do not look like a valid compiler version
408405
<emphasis>string</emphasis> are not supported.
409406
</para>
410407

411408
<para>
412-
To have the desired effect, &cv-MSVC_VERSION; must be set by the
413-
time compiler discovery takes place.
414-
If the default tools list
415-
or an explicit tools list including &t-link-msvc; is used,
416-
discovery takes place as the &consenv; is created,
417-
so passing it as an argument in the the &f-link-Environment; call
409+
To have the desired effect, &cv-MSVC_VERSION; must be set before an msvc &f-link-Tool;
410+
(e.g., &t-link-msvc;) or an msvc-dependent &f-link-Tool; (e.g., &t-link-midl;) is loaded
411+
into the &consenv;.
412+
</para>
413+
414+
<para>
415+
If the default tools list or an explicit tools list is used that includes an
416+
msvc &f-link-Tool; (e.g., &t-link-msvc;) or an msvc-dependent &f-link-Tool; (e.g., &t-link-midl;);
417+
the &cv-MSVC_VERSION; is resolved when the &consenv; is created.
418+
In this case, passing &cv-MSVC_VERSION; as an argument in the &f-link-Environment; call
418419
is the effective solution.
419-
Otherwise, &cv-MSVC_VERSION; must be set before the first msvc tool is
420-
loaded into the environment.
420+
Otherwise, &cv-MSVC_VERSION; must be set before the first msvc &f-link-Tool; or
421+
msvc-dependent &f-link-Tool; is loaded into the environment.
421422
See the manpage section "Construction Environments" for an example.
422423
</para>
423424

@@ -475,10 +476,10 @@ Visual Studio </literallayout></entry>
475476
</row>
476477
<row>
477478
<entry> <literal>"14.1Exp"</literal> </entry>
478-
<entry> 14.1 </entry>
479-
<entry> 1910 </entry>
479+
<entry> 14.1 or 14.1x </entry>
480+
<entry> 191x </entry>
480481
<entry> Visual Studio 2017 Express </entry>
481-
<entry> 15.0 </entry>
482+
<entry> 15.x </entry>
482483
</row>
483484
<row>
484485
<entry> <literal>"14.0"</literal> </entry>
@@ -864,34 +865,42 @@ Specify the location of <filename>vswhere.exe</filename>.
864865

865866
<para>
866867
The <filename>vswhere.exe</filename> executable is distributed with Microsoft Visual Studio and Build
867-
Tools since the 2017 edition, but is also available standalone.
868+
Tools since the 2017 edition, but is also available as a standalone installation.
868869
It provides full information about installations of 2017 and later editions.
869870
With the <option>-legacy</option> argument, <filename>vswhere.exe</filename> can detect installations of the 2010 through 2015
870871
editions with limited data returned.
871-
If <envar>VSWHERE</envar> is set, &SCons; will use that location.
872872
</para>
873873
<para>
874-
Otherwise &SCons; will look in the following locations and set <envar>VSWHERE</envar> to the path of the first <filename>vswhere.exe</filename>
875-
located.
874+
If &cv-VSWHERE; is set to a <filename>vswhere.exe</filename> location, &SCons; will use that location.
875+
When &cv-VSWHERE; is undefined, &SCons; will look in the following locations and set &cv-VSWHERE; to the path
876+
of the first <filename>vswhere.exe</filename> located:
876877
</para>
877878

878879
<itemizedlist>
879880
<listitem><para><literal>%ProgramFiles(x86)%\Microsoft Visual Studio\Installer</literal></para></listitem>
880881
<listitem><para><literal>%ProgramFiles%\Microsoft Visual Studio\Installer</literal></para></listitem>
881882
<listitem><para><literal>%ChocolateyInstall%\bin</literal></para></listitem>
883+
<listitem><para><literal>%LOCALAPPDATA%\Microsoft\WinGet\Links</literal></para></listitem>
884+
<listitem><para><literal>~\scoop\shims</literal></para></listitem>
885+
<listitem><para><literal>%SCOOP%\shims</literal></para></listitem>
882886
</itemizedlist>
883887

884888
<para>
885-
Note that <envar>VSWHERE</envar> must be set at the same time or prior to any of &t-link-msvc;, &t-link-msvs; , and/or &t-link-mslink; &f-link-Tool; being initialized.
889+
Note that &cv-VSWHERE; must be set prior to the initial &MSVC; compiler discovery.
890+
For example, &cv-VSWHERE; must be set at the same time or before the first msvc &f-link-Tool;
891+
(e.g., &t-link-msvc;) or msvc-dependent &f-link-Tool; (e.g., &t-link-midl;) is initialized.
892+
</para>
886893

887-
Either set it as follows
894+
<para>
895+
Either set it as follows:
888896
<programlisting>
889897
env = Environment(VSWHERE='c:/my/path/to/vswhere')
890898
</programlisting>
891899

892-
or if your &consenv; is created specifying an empty tools list
893-
(or a list of tools which omits all of default, msvs, msvc, and mslink),
894-
and also before &f-link-env-Tool; is called to ininitialize any of those tools:
900+
Or, if your &consenv; is created specifying: (a) an empty tools list, or (b)
901+
a list of tools which omits all of default, msvc (e.g., &t-link-msvc;), and
902+
msvc-dependent tools (e.g., &t-link-midl;); and before &f-link-env-Tool;
903+
is called to initialize any of those tools:
895904

896905
<programlisting>
897906
env = Environment(tools=[])

0 commit comments

Comments
 (0)