-
Notifications
You must be signed in to change notification settings - Fork 80
/
install-dependencies.ps1
48 lines (47 loc) · 1.5 KB
/
install-dependencies.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
if ($env:PROCESSOR_ARCHITECTURE.Contains("64"))
{
$regpath = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
}
else
{
$regpath = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
}
$pkgs = Get-ItemProperty $regpath
$found = $false
foreach ($pkg in $pkgs)
{
if ($pkg.BundleTag -eq "vc_mbcsmfc")
{
$found = $true
break
}
}
if (!$found)
{
echo "vc_mbcsmfc not found, downloading and installing..."
$exePath = "$($env:USERPROFILE)\vc_mbcsmfc.exe"
$dlPath = "http://download.microsoft.com/download/0/2/3/02389126-40A7-46FD-9D83-802454852703/vc_mbcsmfc.exe"
(New-Object Net.WebClient).DownloadFile($dlPath, $exePath)
cmd /c start /wait $exePath /quiet
cmd /c del $exePath
}
$boostDir = "C:\Libraries\boost_1_60_0\"
$bootstrap = $boostDir+"bootstrap.bat"
if (!(Test-Path $bootstrap))
{
return
}
echo "Building Boost.Build engine..."
pushd $boostDir
cmd /c $bootstrap
echo "Done."
echo "Building Boost.Regex..."
$bjamExe = $boostDir+"bjam.exe"
$bjamArgsDebug = "--with-regex toolset=msvc-12.0 link=static threading=multi runtime-link=static debug stage"
$bjamArgsRelease = "--with-regex toolset=msvc-12.0 link=static threading=multi runtime-link=static release stage"
start-process -FilePath $bjamExe -WorkingDirectory $boostDir -ArgumentList $bjamArgsDebug -Wait
start-process -FilePath $bjamExe -WorkingDirectory $boostDir -ArgumentList $bjamArgsRelease -Wait
echo "Done."
popd
echo "Available boost libraries:"
Get-ChildItem -Path ($boostDir+"stage\lib\") -File -Name