hikyuu2/build.bat

72 lines
2.4 KiB
Batchfile
Raw Normal View History

2015-01-07 01:26:14 +08:00
@echo off
goto Start
:Not_found_compiler
echo Can't found compiler
goto :eof
:Start
if NOT exist boost-build.jam copy boost-build.jam.win boost-build.jam
if NOT exist Jamroot copy Jamroot.win Jamroot
2017-05-15 01:38:18 +08:00
set ADDRESS_MODEL_OUTPUT=
2015-01-07 01:26:14 +08:00
REM GUESS PROCESSOR_ARCHITECTURE
if "_%PROCESSOR_ARCHITECTURE%_" == "_AMD64_" (
set ADDRESS_MODEL=address-model=64
2017-05-15 01:38:18 +08:00
set ADDRESS_MODEL_OUTPUT=address-model-64
2015-01-07 01:26:14 +08:00
goto Guess_compiler)
:Guess_compiler
REM GUESS COMPILER
2016-04-03 00:08:31 +08:00
REM if NOT "_%VS140COMNTOOLS%_" == "__" (
REM set BUILD_OUTPUT_PATH=msvc-14.0\release\address-model-64\threading-multi
2017-05-08 02:01:44 +08:00
REM set TOOLSET=toolset=msvc-14.0
REM goto Start_build)
2016-04-03 00:08:31 +08:00
REM if NOT "_%VS120COMNTOOLS%_" == "__" (
REM set BUILD_OUTPUT_PATH=msvc-12.0\release\address-model-64\threading-multi
REM set TOOLSET=toolset=msvc-12.0
REM goto Start_build)
2015-01-07 01:26:14 +08:00
if NOT "_%VS100COMNTOOLS%_" == "__" (
2017-05-15 01:38:18 +08:00
set BUILD_OUTPUT_PATH=msvc-10.0\release\%ADDRESS_MODEL_OUTPUT%\threading-multi
2015-01-07 01:26:14 +08:00
set TOOLSET=toolset=msvc-10.0
goto Start_build)
if NOT "_%VS90COMNTOOLS%_" == "__" (
2017-05-15 01:38:18 +08:00
set BUILD_OUTPUT_PATH="msvc-9.0\release\%ADDRESS_MODEL_OUTPUT%\threading-multi"
2015-01-07 01:26:14 +08:00
set TOOLSET=toolset=msvc-9.0
goto Start_build)
goto Not_found_compiler
:Start_build
@echo on
2016-04-03 00:08:31 +08:00
b2 -j 4 link=shared threading=multi %ADDRESS_MODEL%
REM %TOOLSET% 需要利用Jamroot消除告警
2015-01-07 01:26:14 +08:00
@if NOT exist .\bin mkdir .\bin
2017-06-07 02:14:22 +08:00
del .\tools\hikyuu\*.dll
2017-06-19 03:17:57 +08:00
del .\tools\hikyuu\*.exe
2017-06-07 02:14:22 +08:00
del .\tools\hikyuu\*.pyd /S
copy .\extern-libs\boost\*.dll .\tools\hikyuu
copy .\extern-libs\hdf5\dll\*.dll .\tools\hikyuu
copy .\extern-libs\log4cplus\dll\*.dll .\tools\hikyuu
copy .\extern-libs\mysql\lib\*.dll .\tools\hikyuu
2017-06-19 03:17:57 +08:00
copy .\extern-libs\msvc\*.dll .\tools\hikyuu
2017-06-07 02:14:22 +08:00
2017-06-19 03:17:57 +08:00
copy .\build\extern-libs\%BUILD_OUTPUT_PATH%\*.dll .\tools\hikyuu
copy .\build\hikyuu\%BUILD_OUTPUT_PATH%\*.dll .\tools\hikyuu
copy .\build\hikyuu_utils\%BUILD_OUTPUT_PATH%\*.dll .\tools\hikyuu
copy .\build\importdata\%BUILD_OUTPUT_PATH%\*.exe .\tools\hikyuu
2015-01-07 01:26:14 +08:00
copy .\build\hikyuu_python\%BUILD_OUTPUT_PATH%\*.pyd .\tools\hikyuu
copy .\build\hikyuu_python\%BUILD_OUTPUT_PATH%\indicator\*.pyd .\tools\hikyuu\indicator
copy .\build\hikyuu_python\%BUILD_OUTPUT_PATH%\trade_manage\*.pyd .\tools\hikyuu\trade_manage
copy .\build\hikyuu_python\%BUILD_OUTPUT_PATH%\trade_sys\*.pyd .\tools\hikyuu\trade_sys
2016-04-03 00:08:31 +08:00
copy .\build\hikyuu_python\%BUILD_OUTPUT_PATH%\trade_instance\*.pyd .\tools\hikyuu\trade_instance
2015-01-07 01:26:14 +08:00
cd ./test
2016-04-03 00:08:31 +08:00
bjam -j 4 link=shared threading=multi %ADDRESS_MODEL%
2015-01-07 01:26:14 +08:00
cd ..
python .\tools\hikyuu\test\test.py