1
1
$editorFiles = @ (" MLAPIProfiler.cs" , " NetworkedAnimatorEditor.cs" , " NetworkedBehaviourEditor.cs" , " NetworkedObjectEditor.cs" , " NetworkingManagerEditor.cs" , " TrackedObjectEditor.cs" , " PostProcessScene.cs" )
2
+ $libraryFiles = @ (" MLAPI.dll" , " MLAPI.xml" , " MLAPI.pdb" )
2
3
$installerFiles = @ (" MLAPIEditor.cs" )
3
4
4
5
$myPath = (Get-Item - Path " .\" ).FullName;
5
6
$myPath = $myPath.Replace (" \" , " /" )
6
- $basePath = -join ($myPath , " /MLAPI-Editor/" )
7
+
8
+ $libraryBasePath = -join ($myPath , " /MLAPI/bin/" )
9
+ $editorBasePath = -join ($myPath , " /MLAPI-Editor/" )
7
10
$builderPath = -join ($myPath , " /Libraries/Internal/UnityPackager/UnityPackager.exe" )
8
11
9
- $editorOutPath = -join ($myPath , " /MLAPI-Editor .unitypackage" )
12
+ $packageOutPath = -join ($myPath , " /MLAPI.unitypackage" )
10
13
$installerOutPath = -join ($myPath , " /MLAPI-Installer.unitypackage" )
11
14
12
- $windows = " true"
13
-
14
- $editorBuildArgs = " "
15
- if ($windows -ne @ (" true" )) {
16
- $editorBuildArgs += -join ($builderPath , " " )
17
- }
18
-
15
+ # Args for library generation
16
+ $libraryBuildArgs = -join (" null" , " " , $packageOutPath , " " )
19
17
20
- $editorBuildArgs += -join ($basePath , " " , $editorOutPath , " " )
18
+ # Args for installer generation
19
+ $installerBuildArgs = -join (" null" , " " , $installerOutPath , " " )
21
20
21
+ # Add editor files to library package
22
22
For ($i = 0 ; $i -lt $editorFiles.Count ; $i ++ )
23
23
{
24
- $editorBuildArgs += -join ($basePath , $editorFiles.Get ($i ), " " )
25
- $editorBuildArgs += -join (" Assets/Editor/MLAPI/" , $editorFiles.Get ($i ), " " )
24
+ $libraryBuildArgs += -join ($editorBasePath , $editorFiles.Get ($i ), " " , " Assets/Editor/MLAPI/" , $editorFiles.Get ($i ), " " )
26
25
}
27
26
28
- $installerBuildArgs = " "
29
- if ($windows -ne " true" ) {
30
- $installerBuildArgs += -join ($builderPath , " " )
27
+ # Add library files to library package
28
+ For ($i = 0 ; $i -lt $libraryFiles.Count ; $i ++ )
29
+ {
30
+ $libraryBuildArgs += -join ($libraryBasePath , $libraryFiles.Get ($i ), " " , " Assets/MLAPI/Lib/" , $libraryFiles.Get ($i ), " " )
31
31
}
32
- $installerBuildArgs += -join ($basePath , " " , $installerOutPath , " " )
33
32
33
+ # Add installer files to installer package
34
34
For ($i = 0 ; $i -lt $installerFiles.Count ; $i ++ )
35
35
{
36
- $installerBuildArgs += -join ($basePath , $installerFiles.Get ($i ), " " )
37
- $installerBuildArgs += -join (" Assets/Editor/MLAPI/" , $installerFiles.Get ($i ), " " )
38
- }
39
-
40
- $myBuilderPath = " " ;
41
- if ($windows -ne " true" ) {
42
- $myBuilderPath = " mono"
43
- } else {
44
- $myBuilderPath = $builderPath
36
+ $installerBuildArgs += -join ($editorBasePath , $installerFiles.Get ($i ), " " , " Assets/Editor/MLAPI/" , $installerFiles.Get ($i ), " " )
45
37
}
46
38
47
- Write-Host $myBuilderPath
39
+ Write-Host $builderPath
40
+ Write-Host $libraryBuildArgs
48
41
49
- Start-Process - FilePath $myBuilderPath - ArgumentList $editorBuildArgs
50
- Start-Process - FilePath $myBuilderPath - ArgumentList $installerBuildArgs
42
+ Start-Process - FilePath $builderPath - ArgumentList $libraryBuildArgs
43
+ Start-Process - FilePath $builderPath - ArgumentList $installerBuildArgs
0 commit comments