-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
vsdownload: Handle machineArch dependency constraint #140
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks reasonable, but I'd like to understand the roles of these fields a little better (it's been ages since I looked closer at the package trees).
Does this change mean that we'll only end up downloading one of the |
Hi @huangqinjin , We need to add/handle constraints to few more places, because it was passing diff --git a/vsdownload.py b/vsdownload.py
index 0e8e021..0f2852d 100755
--- a/vsdownload.py
+++ b/vsdownload.py
@@ -63,7 +63,7 @@ def getArgsParser():
return parser
def setPackageSelectionMSVC16(args, packages, userversion, sdk, toolversion, defaultPackages):
- if findPackage(packages, "Microsoft.VisualStudio.Component.VC." + toolversion + ".x86.x64", None, warn=False):
+ if findPackage(packages, "Microsoft.VisualStudio.Component.VC." + toolversion + ".x86.x64", {}, warn=False):
if sdk.startswith("10.0.") and int(sdk[5:]) >= 22000:
sdkpkg = "Win11SDK_" + sdk
else:
@@ -82,8 +82,9 @@ def setPackageSelectionMSVC16(args, packages, userversion, sdk, toolversion, def
print("Didn't find exact version packages for " + userversion + ", assuming this is provided by the default/latest version")
args.package.extend(defaultPackages)
+
def setPackageSelectionMSVC15(args, packages, userversion, sdk, toolversion, defaultPackages):
- if findPackage(packages, "Microsoft.VisualStudio.Component.VC.Tools." + toolversion, None, warn=False):
+ if findPackage(packages, "Microsoft.VisualStudio.Component.VC.Tools." + toolversion, {}, warn=False):
args.package.extend(["Win10SDK_" + sdk, "Microsoft.VisualStudio.Component.VC.Tools." + toolversion])
else:
# Options for toolchains for specific versions. The latest version in
@@ -699,7 +700,7 @@ if __name__ == "__main__":
sys.exit(0)
if not args.accept_license:
- response = input("Do you accept the license at " + findPackage(packages, "Microsoft.VisualStudio.Product.BuildTools", None)["localizedResources"][0]["license"] + " (yes/no)? ")
+ response = input("Do you accept the license at " + findPackage(packages, "Microsoft.VisualStudio.Product.BuildTools", {})["localizedResources"][0]["license"] + " (yes/no)? ")
while response != "yes" and response != "no":
response = input("Do you accept the license? Answer \"yes\" or \"no\": ")
if response == "no": |
No, this change just gives |
7492781
to
e5f2565
Compare
Thanks. Amended. |
e5f2565
to
06f2053
Compare
* Added colors to output messages to highlight important information. * Switched from multiprocessing to ThreadPoolExecutor for downloads. * Added tree like structure to --print-deps, --print-reverse-deps and --print-selection. * Merged mstorsjo#140 * Merged mstorsjo#144
Thanks, let's merge this now! |
Closes #135
Closes #138