summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/assets
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Installer/assets')
-rw-r--r--src/SMAPI.Installer/assets/windows-install.bat31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat
index f21679ae..e34b9554 100644
--- a/src/SMAPI.Installer/assets/windows-install.bat
+++ b/src/SMAPI.Installer/assets/windows-install.bat
@@ -1,4 +1,5 @@
@echo off
+setlocal enabledelayedexpansion
SET installerDir="%~dp0"
@@ -12,16 +13,30 @@ if %ERRORLEVEL% EQU 0 (
)
REM make sure .NET 5 is installed
+SET hasNet5=1
WHERE dotnet /q
-if %ERRORLEVEL% NEQ 0 (
- echo Oops! You must have .NET 5 ^(desktop x64^) installed to use SMAPI: https://dotnet.microsoft.com/download/dotnet/5.0/runtime
- echo.
- pause
- exit
+if !ERRORLEVEL! NEQ 0 (
+ SET hasNet5=0
+) else (
+ dotnet --info | findstr /C:"Microsoft.WindowsDesktop.App 5." 1>nul
+ if !ERRORLEVEL! NEQ 0 (
+ SET hasNet5=0
+ )
)
-dotnet --info | findstr /C:"Microsoft.WindowsDesktop.App 5." 1>nul
-if %ERRORLEVEL% NEQ 0 (
- echo Oops! You must have .NET 5 ^(desktop x64^) installed to use SMAPI: https://dotnet.microsoft.com/download/dotnet/5.0/runtime
+if "%hasNet5%" == "0" (
+ echo Oops! You don't have the required .NET version installed.
+ echo.
+ echo To install it:
+ echo 1. Go to https://dotnet.microsoft.com/download/dotnet/5.0/runtime
+
+ if "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
+ echo 2. Under "Run desktop apps", click "Download Arm64".
+ ) else (
+ echo 2. Under "Run desktop apps", click "Download x64".
+ )
+
+ echo 3. Run the downloaded installer.
+ echo 4. Restart your computer.
echo.
pause
exit