File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ :: Copy the icon to the temp folder
4+ COPY RES\icon.ico %TEMP% \tic-tac-toe-icon.ico
5+
6+ :: Run 'pythonw --version' and put it into variable PYTHON_VERSION
7+ FOR /F " tokens=* USEBACKQ" %%F IN (`pythonw --version`) DO (
8+ SET PYTHON_VERSION = %%F
9+ )
10+
11+ :: Check if Python 3 is installed
12+ IF " %PYTHON_VERSION:~0 ,8 % " == " Python 2" (
13+ :: If Python 2 is installed, show the message
14+ ECHO Your Python version is %PYTHON_VERSION% . You need to install Python 3 and set its path first.
15+ mshta javascript:alert^ (" Your Python version is %PYTHON_VERSION% . \nYou need to install Python 3 and set its path first." ^ );close^ (^ );
16+ start " " http://www.python.org/downloads/
17+ exit /b
18+ )
19+ IF NOT " %PYTHON_VERSION:~0 ,8 % " == " Python 3" (
20+ :: If Python 3 is not installed, show the message
21+ ECHO You need to install Python 3 first.
22+ mshta javascript:alert^ (" You need to install Python 3 first." ^ );close^ (^ );
23+ start " " http://www.python.org/downloads/
24+ exit /b
25+ )
26+
27+ :: Run the GUI python script
28+ start " " pythonw ttt_client_gui.py
You can’t perform that action at this time.
0 commit comments