Skip to content

Commit

Permalink
FIX: get-sdk.bat
Browse files Browse the repository at this point in the history
Requires an URL as the first arg.
  • Loading branch information
reksar committed Jan 17, 2024
1 parent 8f67817 commit b11726c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Collects portable MS Visual Studio Tools.
Currently only x64-x64 is available for host-target platforms.

```bat
vsget [destination]
vsget "[destination]"
```

Downloads and unpacks (without installation) to `destination`:
Expand All @@ -23,18 +23,20 @@ Adds related `vcvars*.bat` to init the VS Tools environment.
Windows SDK can be downloaded separately:

```bat
get-sdk [destination]
get-sdk "[url]" "[destination]"
```

Downloads the ISO, extracts the MSI installers (with related CAB files) of the
SDK components and unpacks them into `destination`.

The actual `SDK_URL` can be found in `vsget.bat`.

# Uncache MS Visual Studio Components

Use the MS Visual Studio cache to generate `vsix-groups\*.txt` files:

```bat
vsuncache {CachePath}
vsuncache "{CachePath}"
```

If the optional `CachePath` is ommited, tries to find the VS cache path in the
Expand Down
11 changes: 11 additions & 0 deletions get-sdk.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ call which destination >NUL 2>&1 || set "PATH=%~dp0utils;%PATH%"
call which check-components >NUL 2>&1 || set "PATH=%~dp0sdk;%PATH%"

set url=%~1

if "%url%" == "" (
echo [ERR][%~n0] SDK URL is required!
exit /b 1
)

if not "%url:~0,4%" == "http" (
echo [ERR][%~n0] Invalid SDK URL!
exit /b 1
)

call destination "%~2" || exit /b 1

call check-components "%destination%" && (
Expand Down

0 comments on commit b11726c

Please sign in to comment.