From 181508084b5bb2bb7b8cd61ec3193a293300ba45 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 3 Dec 2021 00:26:46 -0500 Subject: make installer self-contained This lets players run the installer without manually installing .NET 5, which was causing a lot of support requests. --- src/SMAPI.Installer/assets/install on Windows.bat | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/SMAPI.Installer/assets/install on Windows.bat (limited to 'src/SMAPI.Installer/assets/install on Windows.bat') diff --git a/src/SMAPI.Installer/assets/install on Windows.bat b/src/SMAPI.Installer/assets/install on Windows.bat new file mode 100644 index 00000000..b0d9ae81 --- /dev/null +++ b/src/SMAPI.Installer/assets/install on Windows.bat @@ -0,0 +1,41 @@ +@echo off +setlocal enabledelayedexpansion + +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 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 +) +if not exist %installerDir%"internal\windows\SMAPI.Installer.exe" ( + echo Oops! SMAPI is missing one of its files. Your antivirus might have deleted it. + echo Missing file: %installerDir%internal\windows\SMAPI.Installer.exe + echo. + pause + exit +) + +REM start installer +internal\windows\SMAPI.Installer.exe + +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 +) -- cgit