-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.bat
47 lines (39 loc) · 1.43 KB
/
install.bat
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
@echo off
setlocal EnableDelayedExpansion
echo Setting up Image Caption System...
:: Check if git is installed
where git >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Error: Git is not installed. Please install Git first.
pause
exit /b 1
)
:: Initialize and update submodules
echo Initializing TabbyAPI submodule...
git submodule update --init --recursive
:: Create a temporary batch file for TabbyAPI installation
echo @echo off > install_tabby.bat
echo cd backend >> install_tabby.bat
echo python -m venv venv >> install_tabby.bat
echo call venv\Scripts\activate >> install_tabby.bat
echo start "TabbyAPI Server" /wait cmd /c "python start.py ^& timeout /t 30 ^& taskkill /F /PID %%PID%%" >> install_tabby.bat
echo exit >> install_tabby.bat
:: Run TabbyAPI installation first
echo Installing TabbyAPI...
start "TabbyAPI Installation" /wait cmd /c install_tabby.bat
:: Clean up TabbyAPI installation batch
del install_tabby.bat
:: Create and run GUI installation after TabbyAPI is done
echo @echo off > install_gui.bat
echo python -m venv venv >> install_gui.bat
echo call venv\Scripts\activate >> install_gui.bat
echo pip install -r requirements.txt >> install_gui.bat
echo echo GUI installation complete. >> install_gui.bat
echo del install_gui.bat >> install_gui.bat
echo Installing GUI...
start /wait cmd /c install_gui.bat
echo.
echo Installation completed!
echo To start the application:
echo.
pause