launcher upgrades

+added powershell version checker
+added verification if user really want to exit launcher
This commit is contained in:
deffcolony
2024-08-06 16:11:45 +02:00
parent 6e85d7318b
commit 4656afd84f
3 changed files with 25 additions and 10 deletions

View File

@@ -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
)

View File

@@ -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);
});