mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-03-13 15:29:46 +00:00
launcher upgrades
+added powershell version checker +added verification if user really want to exit launcher
This commit is contained in:
@@ -3969,12 +3969,16 @@ del "%log_dir%\port_8000_status.txt"
|
||||
REM Get the current Git branch
|
||||
for /f %%i in ('git branch --show-current') do set current_branch=%%i
|
||||
|
||||
REM Get the current PowerShell version
|
||||
for /f "tokens=*" %%i in ('powershell -command "[string]::Join('.', $PSVersionTable.PSVersion.Major, $PSVersionTable.PSVersion.Minor, $PSVersionTable.PSVersion.Build, $PSVersionTable.PSVersion.Revision)"') do set ps_version=%%i
|
||||
|
||||
echo %yellow_fg_strong% ______________________________________________________________%reset%
|
||||
echo %yellow_fg_strong%^| Version ^& Compatibility Status: ^|%reset%
|
||||
echo SillyTavern - Branch: %cyan_fg_strong%!current_branch! %reset%^| Status: %cyan_fg_strong%!update_status_st!%reset%
|
||||
echo STL Version: %cyan_fg_strong%!stl_version!%reset%
|
||||
echo SillyTavern Branch: %cyan_fg_strong%!current_branch! %reset%^| Status: %cyan_fg_strong%!update_status_st!%reset%
|
||||
echo STL: %cyan_fg_strong%!stl_version!%reset%
|
||||
echo !gpuInfo!
|
||||
echo Node.js: %cyan_fg_strong%!node_version!%reset%
|
||||
echo PowerShell: %cyan_fg_strong%!ps_version!%reset%
|
||||
echo !vpnStatus!
|
||||
echo !portStatus!
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
@echo off
|
||||
|
||||
:exit
|
||||
echo %red_bg%[%time%]%reset% %red_fg_strong%Terminating all started processes...%reset%
|
||||
for /f %%a in ('type "%log_dir%\pids.txt"') do (
|
||||
taskkill /F /PID %%a
|
||||
)
|
||||
del "%log_dir%\pids.txt"
|
||||
exit
|
||||
|
||||
set /p "exit_choice=Are you sure you wanna exit SillyTavern-Launcher? [Y/N]: "
|
||||
if /i "%exit_choice%"=="" set exit_choice=Y
|
||||
if /i "%exit_choice%"=="Y" (
|
||||
echo %red_bg%[%time%]%reset% %red_fg_strong%Terminating all PID processes...%reset%
|
||||
for /f %%a in ('type "%log_dir%\pids.txt"') do (
|
||||
taskkill /F /PID %%a
|
||||
)
|
||||
del "%log_dir%\pids.txt"
|
||||
exit
|
||||
) else (
|
||||
goto :home
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
const { getVersion } = require('./util.js');
|
||||
|
||||
getVersion().then(version => {
|
||||
console.log(JSON.stringify(version));
|
||||
}).catch(err => {
|
||||
console.error('Error getting version:', err);
|
||||
});
|
||||
Reference in New Issue
Block a user