From 3efb90610327b12f67bc30b9e3bb741d7e2e3384 Mon Sep 17 00:00:00 2001 From: Blueprint Coding Date: Sat, 28 Dec 2024 12:12:24 -0700 Subject: [PATCH] Added Hardstop Warning for Installing in Cloud Storage Folders Added a hardstop to prevent the install of the launcher into OneDrive, Dropbox or Google Drive. Installing in these locations can cause dependencies errors not to mention its bad for speed and privacy because of cloud syncing. --- installer.bat | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/installer.bat b/installer.bat index babc4d1..e02702f 100644 --- a/installer.bat +++ b/installer.bat @@ -12,6 +12,7 @@ REM REM GitHub: https://github.com/SillyTavern/SillyTavern-Launcher REM Issues: https://github.com/SillyTavern/SillyTavern-Launcher/issues title STL Installer [STARTUP CHECK] + setlocal REM ANSI Escape Code for Colors @@ -61,6 +62,39 @@ set "st_shortcutName=SillyTavern.lnk" set "st_startIn=%~dp0" set "st_comment=SillyTavern" +REM Check if the script is being run from a cloud storage folder (OneDrive, Google Drive, or Dropbox) +echo "%CD%" | findstr /I "OneDrive" > nul +if %errorlevel% equ 0 ( + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Installation in OneDrive folders is not supported!%reset% + echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO] Installing the SillyTavern Launcher and SillyTavern in OneDrive can cause issues with dependency installs. + echo Not to mention it's bad for privacy and speed because of cloud syncing.%reset% + echo Please move the installer to a different directory and try again. + pause + exit /b 1 +) + +echo "%CD%" | findstr /I "Google Drive" > nul +if %errorlevel% equ 0 ( + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Installation in Google Drive folders is not supported!%reset% + echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO] Installing the SillyTavern Launcher and SillyTavern in Google Drive can cause issues with dependency installs. + echo Not to mention it's bad for privacy and speed because of cloud syncing.%reset% + echo Please move the installer to a different directory and try again. + pause + exit /b 1 +) + +echo "%CD%" | findstr /I "Dropbox" > nul +if %errorlevel% equ 0 ( + echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Installation in Dropbox folders is not supported!%reset% + echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO] Installing the SillyTavern Launcher and SillyTavern in Dropbox can cause issues with dependency installs. + echo Not to mention it's bad for privacy and speed because of cloud syncing..%reset% + echo Please move the installer to a different directory and try again. + pause + exit /b 1 +) + + + REM Create the logs folder if it doesn't exist if not exist "%log_dir%" ( mkdir "%log_dir%"