summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/assets/windows-install.bat
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-17 20:11:30 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-11-28 00:01:44 -0500
commit7c5c63d6846d93f772dfda37f394b5f501f49f25 (patch)
tree186cc8ad0cf19a0b3b7653b1caf70f89e38a9472 /src/SMAPI.Installer/assets/windows-install.bat
parentf6479ea2b61ebcc4eda434d7d5cb664534a99801 (diff)
downloadSMAPI-7c5c63d6846d93f772dfda37f394b5f501f49f25.tar.gz
SMAPI-7c5c63d6846d93f772dfda37f394b5f501f49f25.tar.bz2
SMAPI-7c5c63d6846d93f772dfda37f394b5f501f49f25.zip
fix SMAPI not working on macOS, improve installer validation
Diffstat (limited to 'src/SMAPI.Installer/assets/windows-install.bat')
-rw-r--r--src/SMAPI.Installer/assets/windows-install.bat29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat
index 3ca13528..8623f321 100644
--- a/src/SMAPI.Installer/assets/windows-install.bat
+++ b/src/SMAPI.Installer/assets/windows-install.bat
@@ -1,8 +1,27 @@
@echo off
+
+REM make sure we're not running within a zip folder
echo "%~dp0" | findstr /C:"%TEMP%" 1>nul
-if not errorlevel 1 (
- echo Oops! It looks like you're running the installer from inside a zip file. Make sure you unzip the download first.
- pause
-) else (
- start /WAIT /B internal\windows\install.exe
+if %ERRORLEVEL% EQU 0 (
+ echo "Oops! It looks like you're running the installer from inside a zip file. Make sure you unzip the download first."
+ pause
+ exit
)
+
+REM make sure .NET 5 is installed
+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"
+ pause
+ exit
+)
+
+REM make sure an antivirus hasn't deleted the installer DLL
+if not exist internal\windows\SMAPI.Installer.dll (
+ echo "Oops! SMAPI can't find its 'internal\windows\SMAPI.Installer.dll' file. Your antivirus might have deleted the file."
+ pause
+ exit
+)
+
+REM start installer
+dotnet internal\windows\SMAPI.Installer.dll