forked from msgpack/msgpack-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackUnity.ps1
More file actions
26 lines (20 loc) · 797 Bytes
/
PackUnity.ps1
File metadata and controls
26 lines (20 loc) · 797 Bytes
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
# Build Unity package
[string]$unity = "${env:ProgramFiles}\Unity\Editor\Unity.exe"
if ( !( Test-Path $unity ) )
{
$unity = "${env:ProgramFiles(X86)}\Unity\Editor\Unity.exe"
}
if ( !( Test-Path $unity ) )
{
Write-Error "Unity.exe is not found."
return;
}
[string]$mpu = ".\tools\mpu\bin\mpu.exe"
if ( !( Test-Path $mpu ) )
{
& "${env:WinDir}\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" .\src\mpu\mpu.csproj /p:Configuration=Release
}
del .\src\MsgPack.Unity\Assets\MsgPack\* -Recurse -Force
del .\MsgPack.unitypackage
& $mpu -l -p .\src\MsgPack.Xamarin.iOS\MsgPack.Xamarin.iOS.csproj -o .\src\MsgPack.Unity\Assets\MsgPack\ -w
& $unity -quit -projectPath ([IO.Path]::GetFullPath(".\src\MsgPack.Unity")) -exportPackage Assets\MsgPack ([IO.Path]::GetFullPath(".\MsgPack.unitypackage"))