-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_dev.bat
More file actions
59 lines (51 loc) · 1.3 KB
/
setup_dev.bat
File metadata and controls
59 lines (51 loc) · 1.3 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
@echo off
:: TechTACT Website Development Setup Script for Windows
:: This script helps set up the development environment on Windows
echo === TechTACT Website Development Setup ===
echo.
:: Check if Python is installed
python --version >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Python is not installed or not in PATH. Please install Python 3.8+ and try again.
pause
exit /b 1
)
:: Check if pip is installed
pip --version >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo pip is not installed or not in PATH. Please install pip and try again.
pause
exit /b 1
)
:: Create and activate virtual environment
echo Creating virtual environment...
python -m venv venv
call venv\Scripts\activate.bat
:: Upgrade pip
echo.
echo Upgrading pip...
python -m pip install --upgrade pip
:: Install dependencies
echo.
echo Installing dependencies...
pip install -r requirements.txt
:: Set up environment variables
if not exist ".env" (
echo.
echo Creating .env file from example...
copy /Y .env.example .env >nul
echo Please edit the .env file with your configuration.
) else (
echo.
echo .env file already exists.
)
echo.
echo Setup complete!
echo.
echo To activate the virtual environment, run:
echo venv\Scripts\activate.bat
echo.
echo Then start the development server with:
echo flask run
echo.
pause