fix download_tool.py
This commit is contained in:
parent
106c158b75
commit
c9f9191fea
3 changed files with 71 additions and 12 deletions
75
.vscode/settings.json
vendored
75
.vscode/settings.json
vendored
|
|
@ -29,16 +29,73 @@
|
||||||
},
|
},
|
||||||
"search.useIgnoreFiles": false,
|
"search.useIgnoreFiles": false,
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
"build/*/config.json": true,
|
"build/*/config.json": true,
|
||||||
"build/**/*.MAP": true,
|
"build/**/*.MAP": true,
|
||||||
"build.ninja": true,
|
"build.ninja": true,
|
||||||
".ninja_*": true,
|
".ninja_*": true,
|
||||||
"objdiff.json": true,
|
"objdiff.json": true,
|
||||||
"progress.json": true,
|
"progress.json": true,
|
||||||
"report.json": true,
|
"report.json": true,
|
||||||
"compile_commands.json": true,
|
"compile_commands.json": true
|
||||||
},
|
},
|
||||||
"cmake.ignoreCMakeListsMissing": true,
|
"cmake.ignoreCMakeListsMissing": true,
|
||||||
"editor.fontFamily": "Fira Code",
|
"editor.fontFamily": "Fira Code",
|
||||||
"editor.fontLigatures": true
|
"editor.fontLigatures": true,
|
||||||
|
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||||
|
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||||
|
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||||
|
"C_Cpp_Runner.cStandard": "",
|
||||||
|
"C_Cpp_Runner.cppStandard": "",
|
||||||
|
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
||||||
|
"C_Cpp_Runner.useMsvc": false,
|
||||||
|
"C_Cpp_Runner.warnings": [
|
||||||
|
"-Wall",
|
||||||
|
"-Wextra",
|
||||||
|
"-Wpedantic",
|
||||||
|
"-Wshadow",
|
||||||
|
"-Wformat=2",
|
||||||
|
"-Wcast-align",
|
||||||
|
"-Wconversion",
|
||||||
|
"-Wsign-conversion",
|
||||||
|
"-Wnull-dereference"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.msvcWarnings": [
|
||||||
|
"/W4",
|
||||||
|
"/permissive-",
|
||||||
|
"/w14242",
|
||||||
|
"/w14287",
|
||||||
|
"/w14296",
|
||||||
|
"/w14311",
|
||||||
|
"/w14826",
|
||||||
|
"/w44062",
|
||||||
|
"/w44242",
|
||||||
|
"/w14905",
|
||||||
|
"/w14906",
|
||||||
|
"/w14263",
|
||||||
|
"/w44265",
|
||||||
|
"/w14928"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.enableWarnings": true,
|
||||||
|
"C_Cpp_Runner.warningsAsError": false,
|
||||||
|
"C_Cpp_Runner.compilerArgs": [],
|
||||||
|
"C_Cpp_Runner.linkerArgs": [],
|
||||||
|
"C_Cpp_Runner.includePaths": [],
|
||||||
|
"C_Cpp_Runner.includeSearch": [
|
||||||
|
"*",
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.excludeSearch": [
|
||||||
|
"**/build",
|
||||||
|
"**/build/**",
|
||||||
|
"**/.*",
|
||||||
|
"**/.*/**",
|
||||||
|
"**/.vscode",
|
||||||
|
"**/.vscode/**"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
}
|
}
|
||||||
|
|
@ -149,7 +149,7 @@ config.binutils_tag = "2.42-1"
|
||||||
config.compilers_tag = "20240706"
|
config.compilers_tag = "20240706"
|
||||||
config.dtk_tag = "v1.1.4"
|
config.dtk_tag = "v1.1.4"
|
||||||
config.objdiff_tag = "v2.3.3"
|
config.objdiff_tag = "v2.3.3"
|
||||||
config.sjiswrap_tag = "v1.1.1"
|
config.sjiswrap_tag = "v1.2.0"
|
||||||
config.wibo_tag = "0.6.11"
|
config.wibo_tag = "0.6.11"
|
||||||
|
|
||||||
# Project
|
# Project
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ import urllib.request
|
||||||
import zipfile
|
import zipfile
|
||||||
from typing import Callable, Dict
|
from typing import Callable, Dict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import certifi
|
||||||
|
import ssl
|
||||||
|
|
||||||
|
|
||||||
def binutils_url(tag):
|
def binutils_url(tag):
|
||||||
|
|
@ -104,7 +106,7 @@ def main() -> None:
|
||||||
|
|
||||||
print(f"Downloading {url} to {output}")
|
print(f"Downloading {url} to {output}")
|
||||||
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
|
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
|
||||||
with urllib.request.urlopen(req) as response:
|
with urllib.request.urlopen(req, context=ssl.create_default_context(cafile=certifi.where())) as response:
|
||||||
if url.endswith(".zip"):
|
if url.endswith(".zip"):
|
||||||
data = io.BytesIO(response.read())
|
data = io.BytesIO(response.read())
|
||||||
with zipfile.ZipFile(data) as f:
|
with zipfile.ZipFile(data) as f:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue