Skip to content

Commit

Permalink
Install ATL, add it to the include/lib path
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo committed Sep 29, 2024
1 parent 5f825a1 commit e1afb19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions vsdownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ def setPackageSelectionMSVC16(args, packages, userversion, sdk, toolversion, def
sdkpkg = "Win11SDK_" + sdk
else:
sdkpkg = "Win10SDK_" + sdk
args.package.extend([sdkpkg, "Microsoft.VisualStudio.Component.VC." + toolversion + ".x86.x64", "Microsoft.VisualStudio.Component.VC." + toolversion + ".ARM", "Microsoft.VisualStudio.Component.VC." + toolversion + ".ARM64"])
extraarchs = ["ARM", "ARM64"]
args.package.extend([sdkpkg, "Microsoft.VisualStudio.Component.VC." + toolversion + ".x86.x64", "Microsoft.VisualStudio.Component.VC." + toolversion + ".ATL"])
for arch in extraarchs:
args.package.extend(["Microsoft.VisualStudio.Component.VC." + toolversion + "." + arch, "Microsoft.VisualStudio.Component.VC." + toolversion + ".ATL." + arch])
else:
# Options for toolchains for specific versions. The latest version in
# each manifest isn't available as a pinned version though, so if that
Expand All @@ -84,7 +87,10 @@ def setPackageSelectionMSVC15(args, packages, userversion, sdk, toolversion, def
def setPackageSelection(args, packages):
# If no packages are selected, install these versionless packages, which
# gives the latest/recommended version for the current manifest.
defaultPackages = ["Microsoft.VisualStudio.Workload.VCTools", "Microsoft.VisualStudio.Component.VC.Tools.ARM", "Microsoft.VisualStudio.Component.VC.Tools.ARM64"]
extraarchs = ["ARM", "ARM64"]
defaultPackages = ["Microsoft.VisualStudio.Workload.VCTools", "Microsoft.VisualStudio.Component.VC.ATL"]
for arch in extraarchs:
defaultPackages.extend(["Microsoft.VisualStudio.Component.VC.Tools." + arch, "Microsoft.VisualStudio.Component.VC.ATL." + arch])

# Note, that in the manifest for MSVC version X.Y, only version X.Y-1
# exists with a package name like "Microsoft.VisualStudio.Component.VC."
Expand Down
4 changes: 2 additions & 2 deletions wrappers/msvcenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ SDKLIB="$SDKBASE\\lib\\$SDKVER"
BINDIR=$BASE_UNIX/vc/tools/msvc/$MSVCVER/bin/Hostx64/$ARCH
SDKBINDIR=$BASE_UNIX/$SDK_UNIX/bin/$SDKVER/x64
MSBUILDBINDIR=$BASE_UNIX/MSBuild/Current/Bin/amd64
export INCLUDE="$MSVCDIR\\include;$SDKINCLUDE\\shared;$SDKINCLUDE\\ucrt;$SDKINCLUDE\\um;$SDKINCLUDE\\winrt;$SDKINCLUDE\\km"
export LIB="$MSVCDIR\\lib\\$ARCH;$SDKLIB\\ucrt\\$ARCH;$SDKLIB\\um\\$ARCH;$SDKLIB\\km\\$ARCH"
export INCLUDE="$MSVCDIR\\atlmfc\\include;$MSVCDIR\\include;$SDKINCLUDE\\shared;$SDKINCLUDE\\ucrt;$SDKINCLUDE\\um;$SDKINCLUDE\\winrt;$SDKINCLUDE\\km"
export LIB="$MSVCDIR\\atlmfc\\lib\\$ARCH;$MSVCDIR\\lib\\$ARCH;$SDKLIB\\ucrt\\$ARCH;$SDKLIB\\um\\$ARCH;$SDKLIB\\km\\$ARCH"
export LIBPATH="$LIB"
# "$MSVCDIR\\bin\\Hostx64\\x64" is included in PATH for DLLs.
export WINEPATH="${BINDIR//\//\\};${SDKBINDIR//\//\\};$MSVCDIR\\bin\\Hostx64\\x64"
Expand Down

0 comments on commit e1afb19

Please sign in to comment.