Created
September 11, 2017 21:40
-
-
Save aisurfer/49ebdb23dabf2d71c95c21cc593c21e3 to your computer and use it in GitHub Desktop.
mql-zmq install script for Ubuntu Linux, wine32, MT5 x32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
HOME_DIR=`realpath ~` | |
MT_DIR="$HOME_DIR/.wine32/drive_c/Program\ Files/MetaTrader\ 5" | |
f='' | |
cd ~/tmp | |
rm -rf mql-zmq | |
git clone https://github.com/dingmaotu/mql-zmq | |
find mql-zmq -name "*.mq4" | while read f ; do mv $f ${f/.mq4/.mq5}; done | |
eval cp -R mql-zmq/Include/* "$MT_DIR"/MQL5/Include/ | |
eval cp -R mql-zmq/Library/MT4/* "$MT_DIR"/MQL5/Libraries/ | |
eval mkdir -p "$MT_DIR"/MQL5/Scripts/mql-zmq | |
eval cp -R mql-zmq/Scripts/* "$MT_DIR"/MQL5/Scripts/mql-zmq | |
echo patch SocketOptions.mqh | |
eval sed -i 's/key\\[32\\]/key[]/g' "$MT_DIR"/MQL5/Include/Zmq/SocketOptions.mqh | |
#eval sed -i "s/^.*define\ __X64__/\\\\/\\\\//" "$MT_DIR"/MQL5/Include/Zmq/Common.mqh # old release-1.3 | |
eval sed -i "s/#define\ __X64__/\\\\/\\\\//" "$MT_DIR"/MQL5/Include/Mql/Lang/Native.mqh | |
eval sed -i "s/#include\ \<WinUser32.mqh\>/\\\\/\\\\//" "$MT_DIR"/MQL5/Include/Mql/Lang/Native.mqh | |
rm -rf mql-zmq | |
cd - | |
curdir=`pwd` | |
echo Compile test | |
eval cd $MT_DIR/MQL5/Scripts/mql-zmq/Test | |
eval $curdir/mqcc | |
ls | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment