-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.bat
More file actions
127 lines (112 loc) · 3.66 KB
/
setup.bat
File metadata and controls
127 lines (112 loc) · 3.66 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
@echo off
setlocal enabledelayedexpansion
REM Orbsmith Globe Generator Setup Script for Windows
REM Colors (limited in batch, but we'll use emojis)
set "SUCCESS=✅"
set "ERROR=❌"
set "WARNING=⚠️ "
set "INFO=🌍"
echo %INFO% Orbsmith Globe Generator Setup
echo ========================================
REM Check Python installation
echo %INFO% Checking Python installation...
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo %ERROR% Python is not installed or not in PATH
echo %WARNING% Please install Python 3.7+ from: https://www.python.org/downloads/
echo %WARNING% Make sure to check "Add Python to PATH" during installation
pause
exit /b 1
)
REM Get Python version
for /f "tokens=2" %%i in ('python --version 2^>^&1') do set PYTHON_VERSION=%%i
echo %SUCCESS% Found Python %PYTHON_VERSION%
REM Check if it's Python 3.7+
python -c "import sys; exit(0 if sys.version_info >= (3, 7) else 1)" >nul 2>&1
if %errorlevel% neq 0 (
echo %ERROR% Python 3.7+ is required, found %PYTHON_VERSION%
echo %WARNING% Please upgrade Python from: https://www.python.org/downloads/
pause
exit /b 1
)
echo %SUCCESS% Python version check passed
REM Check pip installation
echo %INFO% Checking pip installation...
pip --version >nul 2>&1
if %errorlevel% neq 0 (
echo %ERROR% pip is not installed
echo %WARNING% Please reinstall Python with pip included
pause
exit /b 1
)
echo %SUCCESS% Found pip
REM Create virtual environment (optional)
echo %INFO% Setting up virtual environment...
if not exist "venv" (
python -m venv venv >nul 2>&1
if %errorlevel% equ 0 (
echo %SUCCESS% Created virtual environment
) else (
echo %WARNING% Could not create virtual environment, continuing with system Python
)
)
REM Activate virtual environment if it exists
if exist "venv\Scripts\activate.bat" (
call venv\Scripts\activate.bat
echo %SUCCESS% Activated virtual environment
)
REM Install dependencies
echo %INFO% Installing Python dependencies...
pip install -r requirements.txt >nul 2>&1
if %errorlevel% neq 0 (
echo %ERROR% Failed to install dependencies
echo %WARNING% Check your internet connection and try again
pause
exit /b 1
)
echo %SUCCESS% Dependencies installed successfully
REM Create directories
echo %INFO% Setting up directories...
if not exist "input" mkdir input
if not exist "output" mkdir output
echo %SUCCESS% Created input and output directories
REM Check for sample images
echo %INFO% Checking for input images...
set IMAGE_COUNT=0
for %%f in (input\*.png input\*.jpg input\*.jpeg input\*.tiff input\*.tif) do (
if exist "%%f" set /a IMAGE_COUNT+=1
)
if %IMAGE_COUNT% equ 0 (
echo %WARNING% Input folder is empty
echo 📁 Add your map images ^(PNG, JPG, TIFF^) to the 'input' folder
echo 🌍 Recommended resolution: 5187×2598 pixels ^(2:1 aspect ratio^)
) else (
echo %SUCCESS% Found %IMAGE_COUNT% image^(s^) in input folder
)
REM Test the installation
echo %INFO% Testing installation...
python main.py --help >nul 2>&1
if %errorlevel% neq 0 (
echo %ERROR% Installation test failed
pause
exit /b 1
)
echo %SUCCESS% Installation test passed
REM Final success message
echo.
echo %SUCCESS% 🎉 Orbsmith Globe Generator is ready!
echo.
echo 📋 Quick Start:
echo 🎮 Interactive mode: python main.py
echo ⚡ Quick command: python main.py your_image.jpg --size 25
echo 📋 List images: python main.py --list
echo ❓ Help: python main.py --help
echo.
echo 📁 Next steps:
echo 1. Add map images to the 'input' folder
echo 2. Run: python main.py
echo 3. Follow the interactive prompts
echo.
echo %INFO% Happy globe making! 🌍
echo.
pause