56 lines
1.4 KiB
Batchfile
56 lines
1.4 KiB
Batchfile
@echo off
|
|
REM Deployment script for Windows (local development)
|
|
REM This script sets up and runs the chat server on Windows
|
|
|
|
echo =========================================
|
|
echo Chat Server Setup Script for Windows
|
|
echo =========================================
|
|
echo.
|
|
|
|
REM Check if Python is installed
|
|
python --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo ERROR: Python is not installed or not in PATH
|
|
echo Please install Python 3.8 or higher from python.org
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo Python found!
|
|
echo.
|
|
|
|
REM Upgrade pip
|
|
echo Upgrading pip...
|
|
python -m pip install --upgrade pip
|
|
|
|
REM Install dependencies
|
|
echo Installing dependencies...
|
|
pip install -r requirements.txt
|
|
|
|
REM Create .env file if it doesn't exist
|
|
if not exist ".env" (
|
|
echo .env file not found. Creating from template...
|
|
copy .env.example .env
|
|
echo Please edit .env file with your configuration!
|
|
)
|
|
|
|
REM Create necessary directories
|
|
echo Creating necessary directories...
|
|
if not exist "backups" mkdir backups
|
|
if not exist "logs" mkdir logs
|
|
if not exist "data" mkdir data
|
|
|
|
echo.
|
|
echo =========================================
|
|
echo Setup complete!
|
|
echo =========================================
|
|
echo.
|
|
echo To start the server:
|
|
echo 1. Run: python server.py
|
|
echo.
|
|
echo To start the client:
|
|
echo 1. Open a new terminal
|
|
echo 2. Run: python client.py
|
|
echo.
|
|
pause
|