Salome HOME
initial commit : transfert of salome configuration files from internal git base
[tools/sat_salome.git] / products / compil_scripts / boost.bat
1 @echo off
2
3 echo ##########################################################################
4 echo BOOST %VERSION%
5 echo ##########################################################################
6
7 if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL%
8 REM clean BUILD directory
9 if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
10 mkdir %BUILD_DIR%
11
12 cd %SOURCE_DIR%
13
14 echo.
15 echo --------------------------------------------------------------------------
16 echo *** Extracting distribution
17 echo --------------------------------------------------------------------------
18
19 call :NORMALIZEPATH "boost*exe"
20 set installer=%RETVAL%
21 if not exist "%installer%" (
22     echo "ERROR no installer found."
23     exit 1
24 )
25
26 echo Installer : %installer%
27
28 call %installer% /SILENT /SP- /NOICONS /NOCANCEL /NORESTART /DIR="%BUILD_DIR%" /LOG="%BUILD_DIR%\boost_install.log"
29 if NOT %ERRORLEVEL% == 0 (
30     echo "ERROR on extraction."
31     exit 2
32 )
33
34 echo.
35 echo --------------------------------------------------------------------------
36 echo *** Installation
37 echo --------------------------------------------------------------------------
38
39 cd "%BUILD_DIR%"
40
41 echo *** Includes...
42
43 set target_inc=%PRODUCT_INSTALL%\include\boost-1_58\boost
44 mkdir %target_inc%
45 if NOT %ERRORLEVEL% == 0 (
46     echo ERROR when creating include directory : %target_inc%
47     exit 30
48 )
49
50 robocopy %BUILD_DIR%\boost %target_inc% /E /NP /NFL /NDL /NS /NC
51 if NOT %ERRORLEVEL% == 1 (
52     echo ERROR when copying include
53     exit 31
54 )
55
56 echo *** Libs...
57
58 set target_lib=%PRODUCT_INSTALL%\lib
59 mkdir %target_lib%
60 if NOT %ERRORLEVEL% == 0 (
61     echo ERROR when creating lib directory : %target_lib%
62     exit 32
63 )
64
65 rem Visual studio 2010 specific
66 robocopy %BUILD_DIR%\lib64-msvc-10.0  %target_lib% /E /NP /NFL /NDL /NS /NC
67 if NOT %ERRORLEVEL% == 1 (
68     echo ERROR when copying lib
69     exit 33
70 )
71
72 echo.
73 echo ########## END
74
75 :: ========== FUNCTIONS ==========
76 EXIT /B
77
78 :NORMALIZEPATH
79   SET RETVAL=%~dpfn1
80   EXIT /B