Repository navigation
Expand file tree
/
Copy pathstart_thinker.bat
More file actions
134 lines (118 loc) · 3.1 KB
/
Copy pathstart_thinker.bat
File metadata and controls
134 lines (118 loc) · 3.1 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
128
129
130
131
132
133
134
@echo off
echo.
echo =======================================
echo 🧠 Python Thinker App Launcher
echo =======================================
echo.
echo Choose your option:
echo 1. 🚀 Run Python Thinker (requires Python)
echo 2. 🔨 Build Standalone Executable (one-time setup)
echo 3. 📖 Help
echo 4. 🚪 Exit
echo.
set /p choice="Enter your choice (1-4): "
if "%choice%"=="1" goto run_app
if "%choice%"=="2" goto build_standalone
if "%choice%"=="3" goto show_help
if "%choice%"=="4" goto exit
echo Invalid choice. Please try again.
pause
goto start
:run_app
echo.
echo 🚀 Starting Python Thinker...
echo.
REM Check if Python is available
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ❌ Python is not installed or not in your PATH
echo.
echo 💡 Options:
echo 1. Install Python 3.7+ and try again
echo 2. Use option 2 to build a standalone version (no Python needed)
echo.
pause
exit /b 1
)
REM Change to the script directory
cd /d "%~dp0"
REM Launch the Python launcher
python launcher.py
REM Pause to see any error messages
if %errorlevel% neq 0 (
echo.
echo ❌ An error occurred while running the application
pause
)
goto end
:build_standalone
echo.
echo 🔨 Building standalone executable...
echo This will create a version that doesn't require Python!
echo.
pause
REM Check if Python is available for building
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ❌ Python is required to BUILD the standalone version
echo Please install Python 3.7+ first, then try again
pause
exit /b 1
)
REM Run the build script
call build_standalone.bat
pause
goto end
:show_help
echo.
echo 🧠 Python Thinker Help
echo =====================
echo.
echo OPTION 1 - Run Python Thinker:
echo • Requires Python 3.7+ to be installed
echo • Starts the application immediately
echo • Choose between CLI and GUI interfaces
echo.
echo OPTION 2 - Build Standalone Executable:
echo • Creates PythonThinker.exe (no Python needed to run!)
echo • One-time setup process (takes 2-5 minutes)
echo • Results in a portable version you can copy anywhere
echo • Perfect for sharing with users who don't have Python
echo.
echo After building standalone version:
echo • Go to PythonThinker_Portable folder
echo • Double-click Start_PythonThinker.bat
echo • Copy this folder to any Windows computer!
echo.
echo For detailed instructions, see:
echo • README.md - Complete documentation
echo • STANDALONE_SETUP.md - Standalone build guide
echo.
pause
goto start
:exit
echo.
echo 👋 Goodbye!
goto end
:start
cls
echo.
echo =======================================
echo 🧠 Python Thinker App Launcher
echo =======================================
echo.
echo Choose your option:
echo 1. 🚀 Run Python Thinker (requires Python)
echo 2. 🔨 Build Standalone Executable (one-time setup)
echo 3. 📖 Help
echo 4. 🚪 Exit
echo.
set /p choice="Enter your choice (1-4): "
if "%choice%"=="1" goto run_app
if "%choice%"=="2" goto build_standalone
if "%choice%"=="3" goto show_help
if "%choice%"=="4" goto exit
echo Invalid choice. Please try again.
pause
goto start
:end