From 1b10c4773aa0ae8fa2e9aa50e03198f0494902dd Mon Sep 17 00:00:00 2001 From: Mauro Druwel <46003176+MauroDruwel@users.noreply.github.com> Date: Sat, 30 Mar 2024 18:51:50 +0100 Subject: [PATCH] Prompt user for AVX version in `install.bat` (#469) --- install.bat | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install.bat b/install.bat index 4c4ffe085..919204b60 100644 --- a/install.bat +++ b/install.bat @@ -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" ( @@ -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"