mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-01-26 17:09:44 +00:00
small fixes
+fixed if else bug in backup menu +changed variables for vsbuildtools +changed text for backup question +changed variable in ssl
This commit is contained in:
@@ -4347,8 +4347,7 @@ REM Check if 7-Zip is installed
|
||||
7z > nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
goto :7zip_prompt
|
||||
)
|
||||
else (
|
||||
) else (
|
||||
goto :backup_options
|
||||
)
|
||||
|
||||
@@ -4376,6 +4375,7 @@ if "%zip_choice%"=="1" (
|
||||
goto :toolbox
|
||||
)
|
||||
cls
|
||||
|
||||
:backup_options
|
||||
echo %blue_fg_strong%/ Home / Toolbox / Backup%reset%
|
||||
echo -------------------------------------------------------------
|
||||
|
||||
@@ -17,16 +17,15 @@ if "%silentMode%"=="true" (
|
||||
set "outputRedirection="
|
||||
)
|
||||
|
||||
:: Set the SSL certificate directory and files
|
||||
set "SILLYTAVERN_DIR=%~dp0..\..\..\SillyTavern"
|
||||
set "CERT_DIR=%SILLYTAVERN_DIR%\certs"
|
||||
REM Set the SSL certificate directory and files
|
||||
set "CERT_DIR=%st_install_path%\certs"
|
||||
set "CERT_FILE=%CERT_DIR%\cert.pem"
|
||||
set "KEY_FILE=%CERT_DIR%\privkey.pem"
|
||||
set "CERT_INFO_FILE=%CERT_DIR%\SillyTavernSSLInfo.txt"
|
||||
set "ERROR_LOG=%CERT_DIR%\error_log.txt"
|
||||
|
||||
:: Check if the SillyTavern directory exists
|
||||
if not exist "%SILLYTAVERN_DIR%" (
|
||||
if not exist "%st_install_path%" (
|
||||
echo Please install SillyTavern first.
|
||||
if "%pauseRequired%"=="true" pause
|
||||
endlocal
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
|
||||
:install_vsbuildtools
|
||||
REM Check if file exists
|
||||
if not exist "%~dp0bin\vs_buildtools.exe" (
|
||||
if not exist "%bin_dir%\vs_buildtools.exe" (
|
||||
REM Check if the folder exists
|
||||
if not exist "%~dp0bin" (
|
||||
mkdir "%~dp0bin"
|
||||
if not exist "%bin_dir%" (
|
||||
mkdir "%bin_dir%"
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Created folder: "bin"
|
||||
) else (
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO] "bin" folder already exists.%reset%
|
||||
)
|
||||
curl -L -o "%~dp0bin\vs_buildtools.exe" "https://aka.ms/vs/17/release/vs_BuildTools.exe"
|
||||
curl -L -o "%bin_dir%\vs_buildtools.exe" "https://aka.ms/vs/17/release/vs_BuildTools.exe"
|
||||
) else (
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO] "vs_buildtools.exe" file already exists. Downloading latest version...%reset%
|
||||
del "%~dp0bin\vs_buildtools.exe"
|
||||
curl -L -o "%~dp0bin\vs_buildtools.exe" "https://aka.ms/vs/17/release/vs_BuildTools.exe"
|
||||
del "%bin_dir%\vs_buildtools.exe"
|
||||
curl -L -o "%bin_dir%\vs_buildtools.exe" "https://aka.ms/vs/17/release/vs_BuildTools.exe"
|
||||
)
|
||||
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing Visual Studio BuildTools 2022...
|
||||
start "" "%~dp0bin\vs_buildtools.exe" --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools
|
||||
start "" "%bin_dir%\vs_buildtools.exe" --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%When install is finished:%reset%
|
||||
pause
|
||||
|
||||
|
||||
@@ -63,10 +63,10 @@ set "escaped_st_install_path=%st_install_path:\=\\%"
|
||||
REM Prompt user for custom name
|
||||
set "use_custom_name=N"
|
||||
set "custom_name="
|
||||
set /p rename_choice="Do you want to give the backup file a custom name? (default is backup_datetime) (Y/N): "
|
||||
set /p rename_choice="Give backup file a custom name? (Default is st_backup_DATE_TIME.7z) [Y/N]: "
|
||||
if /i "%rename_choice%"=="Y" (
|
||||
set "use_custom_name=Y"
|
||||
set /p custom_name="Enter the custom name for the backup file (without extension): "
|
||||
set /p custom_name="Enter custom name for backup file (without extension): "
|
||||
) else if "%rename_choice%"=="" (
|
||||
set "use_custom_name=N"
|
||||
)
|
||||
@@ -96,7 +96,7 @@ if "%use_custom_name%"=="Y" (
|
||||
REM Create a backup using 7zip
|
||||
7z a "%st_backup_path%\%backup_filename%" "%st_install_path%\data\%selected_user_folder%\*"
|
||||
|
||||
echo %green_fg_strong%Backup created at %st_backup_path%\%backup_filename%%reset%
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Backup created at %st_backup_path%\%backup_filename%%reset%
|
||||
|
||||
pause
|
||||
endlocal
|
||||
|
||||
Reference in New Issue
Block a user