-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.ps1
68 lines (50 loc) · 1.4 KB
/
bootstrap.ps1
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
$ErrorActionPreference = "Stop"
$VK_SDK="C:\VulkanSDK\1.2.*"
$GLFW_URL="https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.zip"
$FONT_URL="https://github.com/acgaudette/kufont-ascii.git"
$HEAD_URL="https://github.com/acgaudette/acg.git"
$ALG_URL="https://github.com/acgaudette/alg.git"
mkdir -Force assets
cd assets
if (-Not (Test-Path "kufont*")) {
git clone $FONT_URL
}
if (-Not (Test-Path "font.pbm")) {
New-Item -Path font.pbm -ItemType SymbolicLink -Value kufont*/*.pbm
}
cd ..
mkdir -Force ext/src
mkdir -Force ext/lib
mkdir -Force ext/include
cd ext
cd include
if (-Not (Test-Path "acg")) {
git clone $HEAD_URL
}
if (-Not (Test-Path "alg")) {
git clone $ALG_URL
}
cd ..
if (-Not (Test-Path "lib/vulkan.lib")) {
New-Item -Path "lib/vulkan.lib" -ItemType SymbolicLink -Value "$VK_SDK/Lib/vulkan-1.lib"
}
if (-Not (Test-Path "include/vulkan")) {
New-Item -Path "include/vulkan" -ItemType SymbolicLink -Value "$VK_SDK/Include/vulkan"
}
cd src
if (-Not (Test-Path "glfw*.zip")) {
Invoke-WebRequest $GLFW_URL -OutFile glfw.zip
}
if (-Not (Test-Path -PathType Container "glfw-*")) {
Expand-Archive glfw.zip .
}
cd glfw*
cmake `
-DBUILD_SHARED_LIBS=OFF . `
-DGLFW_VULKAN_STATIC=OFF . `
-DGLFW_BUILD_EXAMPLES=OFF . `
-DGLFW_BUILD_DOCS=OFF . `
-DCMAKE_INSTALL_PREFIX="../.."
MSBUILD.exe ALL_BUILD.vcxproj
MSBUILD.exe INSTALL.vcxproj
cd ../../..