-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_environment.bat
More file actions
90 lines (82 loc) · 2.35 KB
/
check_environment.bat
File metadata and controls
90 lines (82 loc) · 2.35 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
@echo off
chcp 65001 >nul
echo OpenGL Development Environment Check
echo ====================================
echo.
echo Checking required tools...
echo.
REM Check CMake
echo [1/4] Checking CMake...
cmake --version >nul 2>&1
if %ERRORLEVEL% equ 0 (
echo ✓ CMake is installed
cmake --version
) else (
echo ✗ CMake is NOT installed
echo Run install_cmake.bat to install CMake
)
echo.
REM Check Visual Studio
echo [2/4] Checking Visual Studio...
where cl >nul 2>&1
if %ERRORLEVEL% equ 0 (
echo ✓ Visual Studio C++ compiler found
cl 2>&1 | findstr "Microsoft"
) else (
echo ✗ Visual Studio C++ compiler NOT found
echo Please install Visual Studio 2022 Community (free)
echo Download: https://visualstudio.microsoft.com/downloads/
echo Make sure to include "C++ development tools"
)
echo.
REM Check vcpkg
echo [3/4] Checking vcpkg...
if exist "C:\vcpkg\vcpkg.exe" (
echo ✓ vcpkg found at C:\vcpkg
) else (
echo ✗ vcpkg NOT found at C:\vcpkg
echo To install vcpkg:
echo 1. git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
echo 2. cd C:\vcpkg
echo 3. .\bootstrap-vcpkg.bat
)
echo.
REM Check GLAD
echo [4/4] Checking GLAD...
if exist "libs\glad\src\glad.c" (
echo ✓ GLAD source file found
) else (
echo ✗ GLAD source file NOT found
echo Run setup_glad.bat to set up GLAD
)
if exist "libs\glad\include\glad\glad.h" (
echo ✓ GLAD header file found
) else (
echo ✗ GLAD header file NOT found
echo Run setup_glad.bat to set up GLAD
)
echo.
echo ====================================
echo Environment Check Summary:
echo.
REM Count missing components
set /a missing=0
cmake --version >nul 2>&1 || set /a missing+=1
where cl >nul 2>&1 || set /a missing+=1
if not exist "C:\vcpkg\vcpkg.exe" set /a missing+=1
if not exist "libs\glad\src\glad.c" set /a missing+=1
if %missing% equ 0 (
echo ✓ All components are ready!
echo You can now run build.bat to compile the project.
) else (
echo ✗ %missing% component(s) missing
echo Please install missing components and run this check again.
echo.
echo Quick setup guide:
echo 1. Run install_cmake.bat (if CMake missing)
echo 2. Install Visual Studio 2022 Community (if compiler missing)
echo 3. Install vcpkg (if vcpkg missing)
echo 4. Run setup_glad.bat (if GLAD missing)
)
echo.
pause