forked from ultimatepp/ultimatepp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequirements-windows.bat
More file actions
62 lines (51 loc) · 1.7 KB
/
Copy pathrequirements-windows.bat
File metadata and controls
62 lines (51 loc) · 1.7 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
@echo off
setlocal EnableDelayedExpansion
REM This script installs the required dependencies for Windows using vcpkg.
REM It expects vcpkg to be located at %USERPROFILE%\vcpkg or available in the system PATH.
set "VCPKG_EXE="
REM 1. Check for vcpkg in the user's home directory (preferred location)
if exist "%USERPROFILE%\vcpkg\vcpkg.exe" (
set "VCPKG_EXE=%USERPROFILE%\vcpkg\vcpkg.exe"
echo Found vcpkg at: !VCPKG_EXE!
) else (
REM 2. If not found, check if vcpkg is in the PATH
echo vcpkg not found in %USERPROFILE%\vcpkg, checking PATH...
for /f "delims=" %%i in ('where vcpkg.exe 2^>nul') do (
if not defined VCPKG_EXE set "VCPKG_EXE=%%i"
)
if defined VCPKG_EXE (
echo Found vcpkg in PATH at: !VCPKG_EXE!
)
)
REM 3. If vcpkg is not found, display an error and exit
if not defined VCPKG_EXE (
echo.
echo ERROR: vcpkg.exe not found.
echo Please install vcpkg from https://vcpkg.io/
echo and ensure it is either in your PATH or at %%USERPROFILE%%\vcpkg.
exit /b 1
)
REM 4. List of packages to install for x64-windows
set "PACKAGES=sdl2 sdl2-image sdl2-ttf sdl2-mixer ffmpeg portaudio glew"
set "TRIPLET=x64-windows"
set "VCPKG_ARGS="
for %%p in (%PACKAGES%) do (
set "VCPKG_ARGS=!VCPKG_ARGS! %%p:%TRIPLET%"
)
set "VCPKG_ARGS=!VCPKG_ARGS! llvm[clang,clang-tools-extra,bolt,mlir,target-webassembly,utils,lldb,lld]:%TRIPLET%"
echo.
echo Installing packages for %TRIPLET%...
echo !VCPKG_ARGS!
echo.
REM 5. Run the install command
"!VCPKG_EXE!" install !VCPKG_ARGS!
if !errorlevel! neq 0 (
echo.
echo ERROR: vcpkg package installation failed.
exit /b 1
)
echo.
echo All required Windows dependencies installed successfully.
echo.
endlocal
exit /b 0