Skip to content

Commit 3bb2ae8

Browse files
committed
Added powershell scripts to build UnityPackages
1 parent 9e07d3e commit 3bb2ae8

File tree

6 files changed

+79
-0
lines changed

6 files changed

+79
-0
lines changed

BuildUnityPackages.ps1

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
$editorFiles = @("MLAPIProfiler.cs", "NetworkedAnimatorEditor.cs", "NetworkedBehaviourEditor.cs", "NetworkedObjectEditor.cs", "NetworkingManagerEditor.cs", "TrackedObjectEditor.cs")
2+
$installerFiles = @("MLAPIEditor.cs")
3+
4+
$myPath = (Get-Item -Path ".\").FullName;
5+
$basePath = -join ($myPath, "/MLAPI-Editor/")
6+
$builderPath = -join ($myPath, "/Libraries/Internal/UnityPackager/UnityPackager.exe")
7+
8+
$editorOutPath = -join ($myPath, "/MLAPI-Editor.unitypackage")
9+
$installerOutPath = -join ($myPath, "/MLAPI-Installer.unitypackage")
10+
11+
$editorBuildArgs = ""
12+
if (!$IsWindows) {
13+
$editorBuildArgs += -join ($builderPath, " ")
14+
}
15+
$editorBuildArgs += -join ($basePath, " ", $editorOutPath, " ")
16+
17+
For ($i=0; $i -lt $editorFiles.Count; $i++)
18+
{
19+
$editorBuildArgs += -join ($basePath, $editorFiles.Get($i), " ")
20+
$editorBuildArgs += -join ("Assets/", $editorFiles.Get($i), " ")
21+
}
22+
23+
$installerBuildArgs = ""
24+
if (!$IsWindows) {
25+
$installerBuildArgs += -join ($builderPath, " ")
26+
}
27+
$installerBuildArgs += -join ($basePath, " ", $installerOutPath, " ")
28+
29+
For ($i=0; $i -lt $installerFiles.Count; $i++)
30+
{
31+
$installerBuildArgs += -join ($basePath, $installerFiles.Get($i), " ")
32+
$installerBuildArgs += -join ("Assets/", $installerFiles.Get($i), " ")
33+
}
34+
35+
$myBuilderPath = "";
36+
if (!$IsWindows) {
37+
$myBuilderPath = "mono"
38+
} else {
39+
$myBuilderPath = $builderPath
40+
}
41+
42+
Start-Process -FilePath $myBuilderPath -ArgumentList $editorBuildArgs
43+
Start-Process -FilePath $myBuilderPath -ArgumentList $installerBuildArgs
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Copyright © 2000-2018 SharpZipLib Contributors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
4+
software and associated documentation files (the "Software"), to deal in the Software
5+
without restriction, including without limitation the rights to use, copy, modify, merge,
6+
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
7+
to whom the Software is furnished to do so, subject to the following conditions:
8+
9+
The above copyright notice and this permission notice shall be included in all copies or
10+
substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
13+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
15+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
17+
DEALINGS IN THE SOFTWARE.
Binary file not shown.
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and contributors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.
Binary file not shown.

0 commit comments

Comments
 (0)