-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathinstallDependenciesWindows-part2.bat
82 lines (72 loc) · 2.5 KB
/
installDependenciesWindows-part2.bat
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
:: Only run after installDependenciesWindows.bat has completed successfully
:: Must run in a new command prompt, to get the updated PATHS
echo off
CALL:echored "IMPORTANT: REMOVE CYGWIN FROM PATH BEFORE INSTALLING."
:: Change to download directory
cd ..
SET ORIGINAL=%CD%
cd %UserProfile%\Downloads\
:: Download GLFW
call:echoblue " =================================== GLFW ====================================="
if exist "%UserProfile%\Downloads\glfw\" (
echo GLFW already cloned.
) else (
echo Downloading GLFW.
git clone https://github.com/glfw/glfw.git
)
:: Copy Required includes and Libraries
cd glfw
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=OFF -G "MinGW Makefiles" ..
make -j4
cd ..
if not exist %ORIGINAL%\include\ mkdir %ORIGINAL%\include\
xcopy include\GLFW\* %ORIGINAL%\include\GLFW\ /s/h/e/k/f/c/y
if not exist %ORIGINAL%\Lib\ mkdir %ORIGINAL%\Lib\
xcopy build\src\libglfw3.a %ORIGINAL%\Lib\ /s/h/e/k/f/c/y
cd ..
:: Download GLM
call:echoblue " =================================== GLM ======================================"
if exist "%UserProfile%\Downloads\GLM\" (
echo GLM already cloned.
) else (
echo Downloading GLM.
git clone https://github.com/g-truc/glm.git
cd glm && git checkout 0.9.7 && cd ..
)
xcopy /E/I/y glm\glm %ORIGINAL%\include\glm
:: Download FreeType
call:echoblue " =============================== FreeType ================================"
if exist "%UserProfile%\Downloads\ft271.zip" (
echo ft271.zip already downloaded.
) else (
echo Downloading FreeType.
%UserProfile%\Downloads\wget.exe --no-check-certificate https://sourceforge.net/projects/freetype/files/freetype2/2.7.1/ft271.zip
call:ECHOGREEN "Please unzip %UserProfile%\Downloads\ft271.zip before pressing enter."
set /p answer=Press enter to continue
)
cd ft271
cd freetype-2.7.1
echo %CD%
autogen.sh
make -j4
make -j4
timeout 5
xcopy /E/I/y %UserProfile%\Downloads\ft271\freetype-2.7.1\objs\freetype.a %ORIGINAL%\Lib\
cd ..
cd ..
xcopy /E/I/y "%UserProfile%\Downloads\ft271\freetype-2.7.1\include\ft2build.h" %ORIGINAL%\include\
xcopy /E/I/y "%UserProfile%\Downloads\ft271\freetype-2.7.1\include\*" %ORIGINAL%\include\
:: Return to original directory
cd %ORIGINAL%
:: Functions
:ECHORED
%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe write-host -backgroundcolor Red %1
goto:eof
:ECHOBLUE
%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe write-host -backgroundcolor blue %1
goto:eof
:ECHOGREEN
%Windir%\System32\WindowsPowerShell\v1.0\Powershell.exe write-host -backgroundcolor green -foreground black %1
goto:eof