Repository navigation
Expand file tree
/
Copy pathLaunchTaskScribe.bat
More file actions
70 lines (63 loc) · 1.71 KB
/
Copy pathLaunchTaskScribe.bat
File metadata and controls
70 lines (63 loc) · 1.71 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
66
67
68
69
70
@echo off
setlocal enabledelayedexpansion
cd /D "%~dp0"
REM TaskScribe launcher
REM First run: creates a Python 3.12 venv and installs dependencies.
REM Subsequent runs: launches the app via pythonw.exe (no console window).
if exist ".venv\Scripts\pythonw.exe" goto :launch
echo === TaskScribe first-run setup ===
echo This will create a Python virtual environment and install dependencies.
echo Expected time: 2-5 minutes depending on connection speed.
echo.
REM Prefer uv (matches how the project was built), fall back to py launcher.
where uv >nul 2>&1
if %ERRORLEVEL% EQU 0 (
echo Using uv...
uv venv --python 3.12
if errorlevel 1 (
echo.
echo ERROR: uv venv creation failed. Is Python 3.12 installed?
pause
exit /b 1
)
uv pip install -e ".[dev]"
if errorlevel 1 (
echo.
echo ERROR: dependency install failed. See messages above.
pause
exit /b 1
)
goto :launch
)
echo uv not found, trying py launcher...
py -3.12 --version >nul 2>&1
if errorlevel 1 (
echo.
echo ERROR: TaskScribe requires either uv or Python 3.12.
echo.
echo Install uv from: https://docs.astral.sh/uv/
echo Or install Python 3.12: https://www.python.org/downloads/release/python-3120/
echo.
pause
exit /b 1
)
py -3.12 -m venv .venv
if errorlevel 1 (
echo ERROR: venv creation failed.
pause
exit /b 1
)
".venv\Scripts\python.exe" -m pip install -U pip
".venv\Scripts\python.exe" -m pip install -e ".[dev]"
if errorlevel 1 (
echo.
echo ERROR: dependency install failed. See messages above.
pause
exit /b 1
)
echo.
echo === Setup complete ===
echo.
:launch
start "" ".venv\Scripts\pythonw.exe" -m taskscribe
endlocal