Skip to content

Commit

Permalink
Prompt user for AVX version in install.bat (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
MauroDruwel authored Mar 30, 2024
1 parent 10495eb commit 1b10c47
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ if exist "%APPDATA%\nitro" (
rmdir /S /Q "%APPDATA%\nitro"
)


:: Parse arguments
set "VERSION=latest"
set "GPU=false"
set "AVX=-avx2"

echo Please specify the desired AVX version (avx, avx2, avx512), or leave it blank to use the default version (avx2):
set /p USER_AVX=

if not "%USER_AVX%"=="" (
set "AVX=-%USER_AVX%"
)

:arg_loop
if "%~1"=="" goto arg_loop_end
if "%~1"=="--gpu" (
Expand All @@ -37,7 +45,7 @@ if "%VERSION%"=="latest" (
)

:: Construct the download URL
set "URL=https://github.com/janhq/nitro/releases/download/v%VERSION%/nitro-%VERSION%-win-amd64"
set "URL=https://github.com/janhq/nitro/releases/download/v%VERSION%/nitro-%VERSION%-win-amd64%AVX%"
if "%GPU%"=="true" (
:: If --gpu option is provided, append -cuda to the URL
set "URL=%URL%-cuda"
Expand Down

0 comments on commit 1b10c47

Please sign in to comment.