This repository was archived by the owner on Jan 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ REM RepoName = Name of the repository
9292:downloadLibs
9393SET REPONAME = %~1
9494REM Get latest release
95+ ECHO %REPONAME% : Getting latest release...
9596SET UPSTREAMAPIURL = %UPSTREAMURL:github.com =api.github.com/repos %
9697powershell -nologo -noprofile -command " try { Invoke-RestMethod -Uri %UPSTREAMAPIURL% /%REPONAME% /releases/latest > latest.json } catch {exit 1}"
9798IF NOT %ERRORLEVEL% == 0 ( ECHO Failed getting latest %REPONAME% release & GOTO exitOnError )
@@ -106,15 +107,18 @@ FOR /F "tokens=1 delims=_" %%F in ("%LIBNAME:~1%") DO SET LIBNAME=%%F
106107IF " %LIBNAME% " == " " ( ECHO Failed getting latest %REPONAME% release name information & GOTO exitOnError )
107108DEL /F /Q latest.json
108109REM Get the download location for the required tag
109- SET DLURL = %UPSTREAMURL% /%REPONAME% /releases/download/%TAG% /%LIBNAME% _%TAG% _msvc%MSVC_VER% .zip
110+ SET TAG2 = %TAG:+ =. %
111+ SET DLURL = %UPSTREAMURL% /%REPONAME% /releases/download/%TAG% /%LIBNAME% _%TAG2% _msvc%MSVC_VER% .zip
110112REM Download a pre-built archive and extract
113+ ECHO %REPONAME% : Downloading %LIBNAME% _%TAG% _msvc%MSVC_VER% .zip...
111114SET PREBUILTDIR = prebuilt
112115MKDIR %PREBUILTDIR% > NUL 2 >& 1
113116powershell -nologo -noprofile -command " try { (New-Object Net.WebClient).DownloadFile('%DLURL% ', '%PREBUILTDIR% \temp.zip') } catch {exit 1}"
114117IF NOT %ERRORLEVEL% == 0 ( ECHO Failed downloading %DLURL% & GOTO exitOnError )
115118powershell -nologo -noprofile -command " try { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%PREBUILTDIR% \temp.zip', '%PREBUILTDIR% '); } catch [System.IO.IOException] {exit 0} catch {exit 1}"
116119IF NOT %ERRORLEVEL% == 0 ( ECHO Failed extracting downloaded archive & GOTO exitOnError )
117120DEL /F /Q %PREBUILTDIR% \\temp.zip
121+ ECHO .
118122EXIT /B %ERRORLEVEL%
119123
120124:exitOnError
You can’t perform that action at this time.
0 commit comments