forked from fkanehiro/openhrp3
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BuildInstall.bat
97 lines (82 loc) · 2.32 KB
/
BuildInstall.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
94
95
96
97
@echo off
setlocal
rem set INSTALL_DIR=%ProgramFiles%\OpenHRP
set VC_PLATFORM=Visual Studio 9 2008
set VC_COMMAND=C:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe
set ECLIPSE_LAUNCHER=C:\eclipse\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
if "%1"=="" (
call :AllStart
goto :EndBatch
)
if /i "%1"=="cmake" (
call :CMake
goto :EndBatch
)
if /i "%1"=="debug-build-install" (
call :DebugBuild
goto :EndBatch
)
if /i "%1"=="build-install" (
call :Build
goto :EndBatch
)
if /i "%1"=="build-plugin" (
call :Plugin
goto :EndBatch
)
echo "Usage: BuildInstall [Option]"
echo "Option List:"
echo " cmake"
echo " build-install"
echo " debug-build-install"
echo " build-plugin"
goto :EndBatch
:AllStart
call :CMake
if errorlevel 1 goto :EOF
call :Build
if errorlevel 1 goto :EOF
call :Plugin
if errorlevel 1 goto :EOF
goto :EOF
:CMake
if defined INSTALL_DIR (
echo Output solution file. It install in %INSTALL_DIR%
call cmake -G "%VC_PLATFORM%" -DCMAKE_INSTALL_PREFIX:PATH=%INSTALL_DIR%
) else (
echo Output solution file. It install in %ProgramFiles%\OpenHRP
call cmake -G "%VC_PLATFORM%"
)
goto :EOF
:Build
if not exist OpenHRP.sln (
echo Not Found OpenHRP.sln. Please "BuildInstall cmake".
exit /b 1
)
echo Build solution. Log file is make_release.log
call "%VC_COMMAND%" OpenHRP.sln /rebuild Release /out make_release.log
echo Install OpenHRP. Log file is install_release.log
call "%VC_COMMAND%" OpenHRP.sln /build Release /project INSTALL.vcproj /out install_release.log
goto :EOF
:DebugBuild
if not exist OpenHRP.sln (
echo Not Found OpenHRP.sln. Please "BuildInstall cmake".
exit /b 1
)
echo Build debug solution. Log file is make_debug.log
call "%VC_COMMAND%" OpenHRP.sln /rebuild Debug /out make_debug.log
echo Install OpenHRP. Log file is install_debug.log
call "%VC_COMMAND%" OpenHRP.sln /build Debug /project INSTALL.vcproj /out install_debug.log
goto :EOF
:Plugin
if not exist bin\Release\openhrp-controller-bridge.exe (
echo not build OpenHRP. Please "BuildInstall Build".
exit /b 1
)
echo Build eclipse pliugin.
call java -jar %ECLIPSE_LAUNCHER% -application org.eclipse.ant.core.antRunner -data "workspace" -buildfile BuildPlugin.xml
if exist workspace rmdir /s /q workspace
goto :EOF
:EndBatch
endlocal
@echo on