Repository navigation
Expand file tree
/
Copy pathBuildingGenerator.command
More file actions
executable file
·56 lines (49 loc) · 1.82 KB
/
Copy pathBuildingGenerator.command
File metadata and controls
executable file
·56 lines (49 loc) · 1.82 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
#!/bin/bash
# Building Generator - Mac Launcher
# Double-click this file to launch the tool
# Change to script directory
cd "$(dirname "$0")"
# Clear terminal and show header
clear
echo "╔══════════════════════════════════════════════════════════╗"
echo "║ BUILDING GENERATOR TOOL ║"
echo "╚══════════════════════════════════════════════════════════╝"
echo ""
# Check Python 3
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 is required but not installed"
echo "Please install Python 3 from: https://www.python.org/downloads/"
echo ""
echo "Press any key to exit..."
read -n 1
exit 1
fi
# Check/Install Flask
echo "Checking dependencies..."
python3 -c "import flask" 2>/dev/null
if [ $? -ne 0 ]; then
echo "Installing Flask (one-time setup)..."
pip3 install --user flask flask-cors
if [ $? -ne 0 ]; then
echo "Failed to install Flask"
echo "Try running: pip3 install flask flask-cors"
echo ""
echo "Press any key to exit..."
read -n 1
exit 1
fi
fi
echo ""
echo "Starting Building Generator..."
echo "------------------------------------------------------------"
echo "The tool will open in your browser automatically."
echo "If Blender is not detected, use Settings to configure it."
echo "To stop: Close this terminal window or press Ctrl+C"
echo "------------------------------------------------------------"
echo ""
# Run the server
python3 building_generator_server.py
# Keep terminal open if script exits
echo ""
echo "Server stopped. Press any key to close..."
read -n 1