diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-11-30 17:12:49 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-11-30 17:12:49 -0500 |
commit | 919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9 (patch) | |
tree | 5c03ee1bd3cd658586755694940ac329491d6493 /src/SMAPI.Installer/assets/windows-install.bat | |
parent | 3ca6fb562417748c87567d6bb6915d56b2c1b57c (diff) | |
parent | d1d09ae1df63826dd453aa0347d668f420754ed7 (diff) | |
download | SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.tar.gz SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.tar.bz2 SMAPI-919bbe94aa027c8a4ff8db4bdb50e8e2a28c48d9.zip |
Merge branch 'beta' into develop
Diffstat (limited to 'src/SMAPI.Installer/assets/windows-install.bat')
-rw-r--r-- | src/SMAPI.Installer/assets/windows-install.bat | 53 |
1 files changed, 47 insertions, 6 deletions
diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat index 2cd98554..2e0be906 100644 --- a/src/SMAPI.Installer/assets/windows-install.bat +++ b/src/SMAPI.Installer/assets/windows-install.bat @@ -1,8 +1,49 @@ @echo off -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 + +SET installerDir=%~dp0 + +REM make sure we're not running within a zip folder +echo %installerDir% | findstr /C:"%TEMP%" 1>nul +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. + echo. + 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 + echo. + pause + exit +) +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 + echo. + pause + exit +) + +REM make sure an antivirus hasn't deleted the installer DLL +if not exist "%installerDir%internal\windows\SMAPI.Installer.dll" ( + echo Oops! SMAPI is missing one of its files. Your antivirus might have deleted it. + echo Missing file: %installerDir%internal\windows\SMAPI.Installer.dll + echo. + pause + exit +) + +REM start installer +dotnet internal\windows\SMAPI.Installer.dll + +REM keep window open if it failed +if %ERRORLEVEL% NEQ 0 ( + echo. + echo Oops! The SMAPI installer seems to have failed. The error details may be shown above. + echo. + pause + exit ) |