summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/assets
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-11-30 21:53:09 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-11-30 21:53:09 -0500
commit05b06e7a9faccfa0998bc3f7f9953817cd473bfb (patch)
tree19cda8787a8b666652f742ee03d5e1ee2d7f9afe /src/SMAPI.Installer/assets
parentf5a0dd15781f652a04a0d6620433e594128dfd01 (diff)
downloadSMAPI-05b06e7a9faccfa0998bc3f7f9953817cd473bfb.tar.gz
SMAPI-05b06e7a9faccfa0998bc3f7f9953817cd473bfb.tar.bz2
SMAPI-05b06e7a9faccfa0998bc3f7f9953817cd473bfb.zip
improve installer's .NET 5 validation to explain how to fix it
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