-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathshiki-start.cmd
More file actions
65 lines (57 loc) · 1.6 KB
/
Copy pathshiki-start.cmd
File metadata and controls
65 lines (57 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
REM Set UTF-8
chcp 65001 >nul 2>&1
set PYTHONIOENCODING=utf-8
set PYTHONUTF8=1
echo.
echo ========================================
echo Shiki AI Girlfriend — Startup
echo ========================================
echo.
REM Find python (prefer py launcher, avoid Windows Store stub)
set PEXE=
for /f "delims=" %%i in ('where py 2^>nul') do (
echo %%i | findstr /i "WindowsApps" >nul
if errorlevel 1 (
set "PEXE=py"
goto :found
)
)
for /f "delims=" %%i in ('where python 2^>nul') do (
echo %%i | findstr /i "WindowsApps" >nul
if errorlevel 1 (
set "PEXE=python"
goto :found
)
)
:found
if "%PEXE%"=="" (
echo ERROR: Python not found in PATH
echo Install Python from https://python.org
pause
exit /b 1
)
echo Python: %PEXE%
REM Check pystray (needed for tray icon)
%PEXE% -c "import pystray" >nul 2>&1
if errorlevel 1 (
echo Installing pystray + pillow...
%PEXE% -m pip install pystray pillow -q
)
echo.
echo Starting Shiki Daemon (tray icon + auto-start services)...
echo Services: llama-server, Embedding, Live2D, Artemis Bridge, Gateway, Task Board, WebChat
echo.
echo --- Close this window or right-click tray ^> Quit to stop ---
echo.
REM Launch daemon (runs with tray icon, auto-starts all services)
REM Pass all arguments through (e.g. --no-auto-start, --no-llama)
%PEXE% "%~dp0shiki_daemon.py" %*
set DAEMON_EXIT=%errorlevel%
echo.
echo Shutting down services...
%PEXE% "%~dp0shutdown_all.py" --quiet
echo All services stopped. Goodbye~
exit /b %DAEMON_EXIT%