修改部分Linux快速安装脚本的bug
This commit is contained in:
parent
47295a25a2
commit
828d4eca7e
@ -5,6 +5,10 @@ import sys
|
|||||||
reload(sys)
|
reload(sys)
|
||||||
sys.setdefaultencoding('utf8')
|
sys.setdefaultencoding('utf8')
|
||||||
|
|
||||||
|
# 判断操作系统
|
||||||
|
import platform
|
||||||
|
system = platform.system()
|
||||||
|
|
||||||
# vn.trader模块
|
# vn.trader模块
|
||||||
from vnpy.event import EventEngine
|
from vnpy.event import EventEngine
|
||||||
from vnpy.trader.vtEngine import MainEngine
|
from vnpy.trader.vtEngine import MainEngine
|
||||||
@ -12,9 +16,12 @@ from vnpy.trader.uiQt import qApp
|
|||||||
from vnpy.trader.uiMainWindow import MainWindow
|
from vnpy.trader.uiMainWindow import MainWindow
|
||||||
|
|
||||||
# 加载底层接口
|
# 加载底层接口
|
||||||
from vnpy.trader.gateway import (ctpGateway, femasGateway, xspeedGateway,
|
from vnpy.trader.gateway import (ctpGateway, oandaGateway, ibGateway,
|
||||||
sgitGateway, oandaGateway, ibGateway,
|
huobiGateway, okcoinGateway)
|
||||||
shzdGateway, huobiGateway, okcoinGateway)
|
|
||||||
|
if system == 'Windows':
|
||||||
|
from vnpy.trader.gateway import (femasGateway, xspeedGateway,
|
||||||
|
sgitGateway, shzdGateway)
|
||||||
|
|
||||||
# 加载上层应用
|
# 加载上层应用
|
||||||
from vnpy.trader.app import (riskManager, ctaStrategy, spreadTrading)
|
from vnpy.trader.app import (riskManager, ctaStrategy, spreadTrading)
|
||||||
@ -31,15 +38,17 @@ def main():
|
|||||||
|
|
||||||
# 添加交易接口
|
# 添加交易接口
|
||||||
me.addGateway(ctpGateway)
|
me.addGateway(ctpGateway)
|
||||||
me.addGateway(femasGateway)
|
|
||||||
me.addGateway(xspeedGateway)
|
|
||||||
me.addGateway(sgitGateway)
|
|
||||||
me.addGateway(oandaGateway)
|
me.addGateway(oandaGateway)
|
||||||
me.addGateway(ibGateway)
|
me.addGateway(ibGateway)
|
||||||
me.addGateway(shzdGateway)
|
|
||||||
me.addGateway(huobiGateway)
|
me.addGateway(huobiGateway)
|
||||||
me.addGateway(okcoinGateway)
|
me.addGateway(okcoinGateway)
|
||||||
|
|
||||||
|
if system == 'Windows':
|
||||||
|
me.addGateway(femasGateway)
|
||||||
|
me.addGateway(xspeedGateway)
|
||||||
|
me.addGateway(sgitGateway)
|
||||||
|
me.addGateway(shzdGateway)
|
||||||
|
|
||||||
# 添加上层应用
|
# 添加上层应用
|
||||||
me.addApp(riskManager)
|
me.addApp(riskManager)
|
||||||
me.addApp(ctaStrategy)
|
me.addApp(ctaStrategy)
|
||||||
|
@ -12,6 +12,6 @@ cmake ..
|
|||||||
make VERBOSE=1 -j 1
|
make VERBOSE=1 -j 1
|
||||||
ln -fs `pwd`/lib/vnctpmd.so ../vnctpmd/test/vnctpmd.so
|
ln -fs `pwd`/lib/vnctpmd.so ../vnctpmd/test/vnctpmd.so
|
||||||
ln -fs `pwd`/lib/vnctptd.so ../vnctptd/test/vnctptd.so
|
ln -fs `pwd`/lib/vnctptd.so ../vnctptd/test/vnctptd.so
|
||||||
cp ../vnctpmd/test/vnctpmd.* ./
|
cp ../vnctpmd/test/vnctpmd.* ../
|
||||||
cp ../vnctptd/test/vnctptd.* ./
|
cp ../vnctptd/test/vnctptd.* ../
|
||||||
popd
|
popd
|
||||||
|
@ -15,4 +15,5 @@ popd
|
|||||||
pushd $BUILDDIR
|
pushd $BUILDDIR
|
||||||
cmake ..
|
cmake ..
|
||||||
make VERBOSE=1 -j 1
|
make VERBOSE=1 -j 1
|
||||||
|
cp ./lib/vnib.* ../
|
||||||
popd
|
popd
|
||||||
|
@ -13,7 +13,7 @@ make VERBOSE=1 -j 1
|
|||||||
ln -fs `pwd`/lib/vnltsmd.so ../vnltsmd/test/vnltsmd.so
|
ln -fs `pwd`/lib/vnltsmd.so ../vnltsmd/test/vnltsmd.so
|
||||||
ln -fs `pwd`/lib/vnltstd.so ../vnltstd/test/vnltstd.so
|
ln -fs `pwd`/lib/vnltstd.so ../vnltstd/test/vnltstd.so
|
||||||
ln -fs `pwd`/lib/vnltsqry.so ../vnltsqry/test/vnltsqry.so
|
ln -fs `pwd`/lib/vnltsqry.so ../vnltsqry/test/vnltsqry.so
|
||||||
cp ../vnltsmd/test/vnltsmd.* ./
|
cp ../vnltsmd/test/vnltsmd.* ../
|
||||||
cp ../vnltstd/test/vnltstd.* ./
|
cp ../vnltstd/test/vnltstd.* ../
|
||||||
cp ../vnltsqry/test/vnltsqry.* ./
|
cp ../vnltsqry/test/vnltsqry.* ../
|
||||||
popd
|
popd
|
||||||
|
Loading…
Reference in New Issue
Block a user