-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.bat
More file actions
78 lines (69 loc) · 1.42 KB
/
manage.bat
File metadata and controls
78 lines (69 loc) · 1.42 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
@echo off
title Presenta Manager
cls
:menu
cls
echo ==================================================
echo Presenta Management Tool
echo ==================================================
echo.
echo [1] Run Application (FastAPI Server)
echo [2] Install Python Dependencies
echo [3] Build Landing Page (Frontend)
echo [4] Exit
echo.
echo ==================================================
set /p choice="Enter option (1-4): "
if "%choice%"=="1" goto run_app
if "%choice%"=="2" goto install_deps
if "%choice%"=="3" goto build_frontend
if "%choice%"=="4" goto exit
echo.
echo Invalid choice. Please try again.
pause
goto menu
:run_app
cls
echo Starting Presenta Server...
echo Access at: http://127.0.0.1:8000
echo.
python main.py
pause
goto menu
:install_deps
cls
echo Installing Python dependencies from requirements.txt...
pip install -r requirements.txt
echo.
echo Done.
pause
goto menu
:build_frontend
cls
echo Building Presenta Landing Page...
echo.
cd Presenta_Landing_page
call npm install
call npm run build
if %ERRORLEVEL% NEQ 0 (
echo.
echo Build failed!
cd ..
pause
goto menu
)
cd ..
echo.
echo Copying build artifacts...
if exist "static\landing\index.html" (
copy "static\landing\index.html" "templates\index.html" /Y
echo Updated templates/index.html
) else (
echo Error: static\landing\index.html not found.
)
echo.
echo Build and update complete.
pause
goto menu
:exit
exit