3 REM Copyright (c) 2005-2017 Intel Corporation
5 REM Licensed under the Apache License, Version 2.0 (the "License");
6 REM you may not use this file except in compliance with the License.
7 REM You may obtain a copy of the License at
9 REM http://www.apache.org/licenses/LICENSE-2.0
11 REM Unless required by applicable law or agreed to in writing, software
12 REM distributed under the License is distributed on an "AS IS" BASIS,
13 REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 REM See the License for the specific language governing permissions and
15 REM limitations under the License.
23 if ("%1") == ("") goto error0
25 if ("%2") == ("") goto error0
27 if (%3) == ("") goto error0
29 if ("%2") == ("debug") set postfix=_debug
31 if ("%4") == ("") set dat_file="%output_dir%\..\..\dat\balls.dat"
33 :: Actually we can set install root by ourselves
34 if ("%TBBROOT%") == ("") set TBBROOT=%~dp0..\..\..\..\..\
36 :: ordered from oldest to newest, so we end with newest available version
37 if ("%VS110COMNTOOLS%") NEQ ("") set vc_dir=vc11_ui
38 if ("%VS120COMNTOOLS%") NEQ ("") set vc_dir=vc12_ui
39 echo Using %vc_dir% libraries
41 if exist "%TBBROOT%\bin\%arch%\%vc_dir%\tbb%postfix%.dll" set interim_path=bin\%arch%
42 if exist "%TBBROOT%..\redist\%arch%\tbb\%vc_dir%\tbb%postfix%.dll" set interim_path=..\redist\%arch%\tbb
43 if exist "%TBBROOT%\lib\%arch%\%vc_dir%\tbb%postfix%.lib" set interim_lib_path=lib\%arch%
44 if ("%interim_path%") == ("") goto error1
45 if ("%interim_lib_path%") == ("") goto error1
47 :: We know everything we wanted and there are no errors
50 copy "%TBBROOT%\%interim_path%\%vc_dir%\tbb%postfix%.dll" "%output_dir%"
51 copy "%TBBROOT%\%interim_path%\%vc_dir%\tbb%postfix%.pdb" "%output_dir%"
52 copy "%TBBROOT%\%interim_path%\%vc_dir%\tbbmalloc%postfix%.dll" "%output_dir%"
53 copy "%TBBROOT%\%interim_path%\%vc_dir%\tbbmalloc%postfix%.pdb" "%output_dir%"
54 copy "%TBBROOT%\%interim_lib_path%\%vc_dir%\tbb%postfix%.lib" "%output_dir%"
57 echo Using DAT-file %dat_file%
58 if exist %dat_file% copy %dat_file% "%output_dir%\Assets\balls.dat"
62 echo Custom build script usage: %0 [ia32 or intel64] [release or debug] [output dir] [dat-file]
65 echo Could not determine path to Intel TBB libraries