forked from mercedes-benz/MOSIM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy_unity.bat
93 lines (70 loc) · 3.33 KB
/
deploy_unity.bat
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@echo off
REM SPDX-License-Identifier: MIT
REM The content of this file has been developed in the context of the MOSIM research project.
REM Original author(s): Janis Sprenger, Bhuvaneshwaran Ilanthirayan
REM This is a deploy script to auto-generate the framework, including launcher, mmus, services and adapters.
REM Checking environment variables
ECHO.
ECHO _______________________________________________________
ECHO [33mdeploy_unity.bat[0m at %cd%\deploy_unity.bat Deploying all Unity dependencies.
ECHO _______________________________________________________
ECHO.
if not defined UNITY2018_4_1 (
ECHO [31mUNITY2018_4_1 Environment variable pointing to the Unity.exe for Unity version 2018.4.1f1 is missing.[0m
ECHO e.g. SET "UNITY2018_4_1=C:\Program Files\Unity Environments\2018.4.1f1\Editor\Unity.exe\"
pause
exit /b 1
) else (
if not exist "%UNITY2018_4_1%" (
ECHO Unity does not seem to be installed at "%UNITY2018_4_1%" or path name in deploy_variables.bat is wrong.
exit /b 2
)
)
if not defined UNITY2019_18_1 (
ECHO [31mUNITY2019_18_1 Environment variable pointing to the Unity.exe for Unity version 2019.18.1f1 is missing.[0m
ECHO e.g. SET "UNITY2019_18_1=C:\Program Files\Unity Environments\2018.4.1f1\Editor\Unity.exe\"
pause
exit /b 1
) else (
if not exist "%UNITY2019_18_1%" (
ECHO Unity does not seem to be installed at "%UNITY2019_18_1%" or path name in deploy_variables.bat is wrong.
exit /b 2
)
)
SET WORKDIR=%~dp0
REM Core
cd .\Core
call .\distribute_unity.bat
cd %WORKDIR%
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
REM Build Unity Engine Support:
cd Core\Framework\EngineSupport\Unity
call .\deploy_unity.bat
cd %WORKDIR%
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
REM Todo: extend deploy to compile and pack unity adapter and copy it to the framework
md build\Environment\Adapters\UnityAdapter
cmd /c xcopy /S/Y/Q .\Core\Framework\EngineSupport\Unity\MMIAdapterUnity\UnityProject\build\* build\Environment\Adapters\UnityAdapter
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
REM Copy core artifacts to services:
REM Copy MMIUnity artifacts to UnityPathPlanning
cmd /c xcopy /S/Y/Q .\Core\Framework\EngineSupport\Unity\MMIUnity\build\* .\Services\UnityPathPlanning\UnityPathPlanningService\Assets\Plugins
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
REM Copy MMIUnityTarget engine to UnityDemo
cmd /c xcopy /S/Y/Q .\Core\Framework\EngineSupport\Unity\MMIUnity.TargetEngine\MMIUnity.TargetEngine\build\* .\Demos\Unity\Assets\MMI\Plugins
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
REM Copy core artifacts to Tools
REM Copy MMIUnity to SkeletonTesting
cmd /c xcopy /S/Y/Q .\Core\Framework\EngineSupport\Unity\MMIUnity\build .\Tools\SkeletonTesting\Assets\Plugins
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
REM Build Services
REM Todo: write deployment script for unityPathPlanning
cd .\Services\UnityPathPlanning
call .\deploy_unity.bat
cd %WORKDIR%
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
md .\build\Environment\Services\UnityPathPlanning
cmd /c xcopy /S/Y/Q .\Services\UnityPathPlanning\UnityPathPlanningService\build\* .\build\Environment\Services\UnityPathPlanning
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
ECHO [92mSuccessfully deployed Unity Dependencies of the Framework to the build folder. [0m
REM pause