-
Notifications
You must be signed in to change notification settings - Fork 12
/
build-plugin.ps1
36 lines (26 loc) · 1.8 KB
/
build-plugin.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
Install-Module VSSetup -Scope CurrentUser
$vsPath = (Get-VSSetupInstance).InstallationPath + "\MSBuild"
$msBuilds = Get-ChildItem $vsPath -recurse -filter "MSBuild.exe"
$msBuild = $msBuilds[0].FullName
$configuration = "RelWithDebInfo"
$buildPath = (Get-Location).path + "\cpp\build"
&$msBuild ("/t:KinectToHololensPlugin", "/p:Configuration=$configuration", "/p:Platform=Win32", "$buildPath\x86\KinectToHololens.sln")
&$msBuild ("/t:KinectToHololensPlugin", "/p:Configuration=$configuration", "/p:Platform=x64", "$buildPath\x64\KinectToHololens.sln")
$assetsPath = (Get-Location).path + "\unity\KinecttoHololens\Assets"
Copy-Item "$buildPath\x86\plugin\$configuration\KinectToHololensPlugin.dll" -Destination "$assetsPath\Plugins\WSA"
Copy-Item "$buildPath\x64\plugin\$configuration\KinectToHololensPlugin.dll" -Destination "$assetsPath\Editor"
$binPath = (Get-Location).path + "\bin"
Copy-Item "$binPath\msvcp140.dll" -Destination "$assetsPath\Plugins\WSA"
Copy-Item "$binPath\msvcp140d.dll" -Destination "$assetsPath\Plugins\WSA"
Copy-Item "$binPath\vcruntime140.dll" -Destination "$assetsPath\Plugins\WSA"
Copy-Item "$binPath\vcruntime140d.dll" -Destination "$assetsPath\Plugins\WSA"
$vcpkgPath = (Get-Location).path + "\vcpkg"
$ffmpegX86Path = "$vcpkgPath\packages\ffmpeg_x86-windows\bin"
$ffmpegX64Path = "$vcpkgPath\packages\ffmpeg_x64-windows\bin"
Copy-Item "$ffmpegX86Path\avcodec-58.dll" -Destination "$assetsPath\Plugins\WSA"
Copy-Item "$ffmpegX86Path\avutil-56.dll" -Destination "$assetsPath\Plugins\WSA"
Copy-Item "$ffmpegX86Path\swresample-3.dll" -Destination "$assetsPath\Plugins\WSA"
Copy-Item "$ffmpegX64Path\avcodec-58.dll" -Destination "$assetsPath\Editor"
Copy-Item "$ffmpegX64Path\avutil-56.dll" -Destination "$assetsPath\Editor"
Copy-Item "$ffmpegX64Path\swresample-3.dll" -Destination "$assetsPath\Editor"
Pause