Closed milnak closed 3 months ago
and maybe also return targetArch and hostArch enumerations as well?
Hikari says, "Very good suggestions on both issues, thank you. I'll make these behave properly with the next release."
This has been added. Use CLI flag list
.
Thank you.
Two issues: 1) CLI was removed so running "PortableBuildTools.exe" now starts installing without any prompt. Maybe that's desirable for some? 2) list returns items in a non easily parseable format which is why I suggested (and gave an example of a JSON format.
If "list" is provided, then no output like
Downloading manifest files...
[89kb] Manifest.Release.json
[110kb] Manifest.Preview.json
should occur and the output should be in json, e.g.
{
"versions": {
"msvc": {
"release": [
"14.30.17.0",
"14.29.16.11"
],
"preview": [
"14.29.16.11",
"14.30.17.0"
]
},
"sdk": {
"release": [
"19041",
"18362"
],
"preview": [
"19041",
"18362"
]
}
}
}
with all values preferably in descending order.
CLI now works as it does in the original python script, sets the variables and asks you for the confirmation, which you can skip with a flag, and you can set the variables to different values via flags too. It is less interactive on purpose, but it is still CLI that can be used in scripts. And now it doesn't require supplying cli flag, it auto-detects if you run it in a console or a script.
If no output should occur, you would think you broke something, because you would have a blank screen to stare at for several seconds. As for "easily parsable" format, it depends on what you are parsing it with. Simple strings are way easier to parse than json in any programming language, and there is a separating blank line right before the values are printed, so your parser can just wait for the blank line, and start parsing after that. I will definitely not be making it into a json format. As for descending order - i will do that.
"Simple strings are way easier to parse than json in any programming language"
I beg to differ. String formatting breaks over time with changes. String parsing breaks if the text is localized. If simple strings are the way to go for data, why does the world have Json, xml, yaml, etc?
"If no output should occur, you would think you broke something"
Maybe send those strings to stderr then?
e.g.
PortableBuildTools.exe listversions
would return: