-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
84 lines (77 loc) · 2.54 KB
/
Copy pathrun.bat
File metadata and controls
84 lines (77 loc) · 2.54 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@echo off
setlocal EnableExtensions
title Dogsled
REM Always run from the repo root (where this batch file lives)
cd /d "%~dp0"
REM --- Python + Code Puppy: PATH for child tools + explicit env for Dogsled PTY spawn ---
if exist "C:\Python313\python.exe" (
set "PATH=C:\Python313;C:\Python313\Scripts;%PATH%"
set "DOGSLED_PYTHON=C:\Python313\python.exe"
)
if exist "%APPDATA%\Python\Python313\Scripts\code-puppy.exe" (
set "PATH=%APPDATA%\Python\Python313\Scripts;%PATH%"
set "DOGSLED_CODE_PUPPY=%APPDATA%\Python\Python313\Scripts\code-puppy.exe"
)
if exist "%APPDATA%\Python\Python312\Scripts\code-puppy.exe" (
set "PATH=%APPDATA%\Python\Python312\Scripts;%PATH%"
if not defined DOGSLED_CODE_PUPPY set "DOGSLED_CODE_PUPPY=%APPDATA%\Python\Python312\Scripts\code-puppy.exe"
)
if exist "%LOCALAPPDATA%\Programs\Python\Python313\python.exe" (
set "PATH=%LOCALAPPDATA%\Programs\Python\Python313;%LOCALAPPDATA%\Programs\Python\Python313\Scripts;%PATH%"
if not defined DOGSLED_PYTHON set "DOGSLED_PYTHON=%LOCALAPPDATA%\Programs\Python\Python313\python.exe"
)
REM --- Tooling checks ---
where node >nul 2>&1 || (
echo [ERROR] Node.js not found on PATH. Install Node 22+ and reopen.
pause
exit /b 1
)
where npm >nul 2>&1 || (
echo [ERROR] npm not found on PATH.
pause
exit /b 1
)
where cargo >nul 2>&1 || (
echo [ERROR] Rust/cargo not found on PATH. Install from https://rustup.rs
pause
exit /b 1
)
if defined DOGSLED_CODE_PUPPY (
echo Code Puppy: %DOGSLED_CODE_PUPPY%
) else if defined DOGSLED_PYTHON (
"%DOGSLED_PYTHON%" -m code_puppy --version >nul 2>&1 || (
echo [ERROR] code-puppy module not found for %DOGSLED_PYTHON%
echo Install with: uv tool install code-puppy==0.0.550 (or run via: uvx code-puppy -i)
pause
exit /b 1
)
echo Code Puppy: %DOGSLED_PYTHON% -m code_puppy
) else (
where code-puppy >nul 2>&1 || python -m code_puppy --version >nul 2>&1 || (
echo [ERROR] code-puppy not found.
echo Install with: uv tool install code-puppy==0.0.550 (or run via: uvx code-puppy -i)
pause
exit /b 1
)
)
if not exist "node_modules\" (
echo Installing npm dependencies...
call npm install
if errorlevel 1 (
echo [ERROR] npm install failed.
pause
exit /b 1
)
)
echo.
echo Starting Dogsled (Tauri dev)...
echo Project: %CD%
echo.
call npm run tauri:dev
set "EXITCODE=%ERRORLEVEL%"
if not "%EXITCODE%"=="0" (
echo.
echo Dogsled exited with code %EXITCODE%.
pause
)
exit /b %EXITCODE%