Repository navigation
Expand file tree
/
Copy pathsetup.bat
More file actions
79 lines (70 loc) · 2.28 KB
/
Copy pathsetup.bat
File metadata and controls
79 lines (70 loc) · 2.28 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
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
echo ====================================================
echo OpenApply setup
echo ====================================================
echo.
where python >nul 2>nul
if errorlevel 1 (
echo [!] Python was not found on PATH.
echo Install Python 3.11+ from https://www.python.org/downloads/
echo and make sure "Add python.exe to PATH" is checked during install.
echo.
pause
exit /b 1
)
for /f "tokens=2" %%v in ('python --version 2^>^&1') do set PYVER=%%v
echo [OK] Found Python %PYVER%
if not exist ".venv\Scripts\python.exe" (
echo.
echo [1/5] Creating virtual environment in .venv ...
python -m venv .venv
if errorlevel 1 (
echo [!] Failed to create virtual environment.
pause
exit /b 1
)
) else (
echo [1/5] .venv already exists - skipping creation.
)
set PYTHON=.venv\Scripts\python.exe
echo.
echo [2/5] Installing Python dependencies ...
"%PYTHON%" -m pip install --upgrade pip >nul
"%PYTHON%" -m pip install -r requirements.txt
if errorlevel 1 (
echo [!] Failed to install dependencies. See the error above.
pause
exit /b 1
)
echo.
echo [3/5] Installing Playwright Chromium (this can take a few minutes) ...
"%PYTHON%" -m playwright install chromium
if errorlevel 1 (
echo [!] Playwright browser install failed - you can retry later with:
echo .venv\Scripts\python.exe -m playwright install chromium
)
echo.
echo [4/5] Creating local data folders (existing data is never touched) ...
if not exist "user_data" mkdir "user_data"
if not exist "user_data\resumes" mkdir "user_data\resumes"
if not exist "user_data\generated" mkdir "user_data\generated"
if not exist "user_data\exports" mkdir "user_data\exports"
if not exist "user_data\uploads" mkdir "user_data\uploads"
if not exist "user_data\logs" mkdir "user_data\logs"
if not exist "user_data\logs\screenshots\errors" mkdir "user_data\logs\screenshots\errors"
echo.
echo [5/5] Done.
echo.
echo ====================================================
echo Setup complete.
echo.
echo Next step:
echo start.bat
echo.
echo This opens http://127.0.0.1:8765 in your browser, where
echo you'll upload your resume and get started.
echo ====================================================
echo.
pause