我将从MetaEditor切换到VSCode来为MetaTrader4进行开发。
我正在通过Wine在Linux中使用MetaTrader4和MetaEditor。( MetaEditor在Wine中运行得相当糟糕)
我想创建一个任务来编译代码,并希望将相同的错误日志返回给VSCode,以便进一步调试代码,就像我使用MetaEditor一样。
我使用这篇文章来弄清楚哪个命令行界面命令是用来编译MQL4的:Compiling MQL4 via command line through wine metaeditor.exe
/usr/bin/wine /path/to/MT4/metaeditor.exe /compile:"Z:\path\to\MT4\MQL4\Experts\Foo\Bar_EA.mq4" /include:"Z:\path\to\MT4\MQL4" /log
我的问题是,我不理解也找不到任何资源来解释tasks.json文件中的“命令”或可用变量列表的作用。如"/include:“或"presentation":,${file}等。
因此,我进行了一些猜测,并将其拼凑成到目前为止的样子:
{
"version": "2.0.0",
"tasks": [
{
"label": "MQL4 Compile",
"type": "shell",
"command": "/usr/bin/wine /.wine/drive_c/Program Files (x86)/FXChoice MetaTrader 4/metaeditor.exe",
"args": [
"/compile:${file}"
]
}
]
}
这可能不是很正确。感谢你的帮助,谢谢
发布于 2020-11-10 05:39:40
{
"version": "2.0.0",
"tasks":
[
{
"label": "MQL4-Compile",
"group":
{
"kind" : "build",
"isDefault" : true
},
"presentation":
{
"echo" : true,
"reveal": "always",
"focus" : true,
"panel" : "shared"
},
"promptOnClose" : true,
"type" : "process",
"osx" :
{
"command" : "wine",
"args" :
[
"/Users/SVG/.wine/drive_c/Program Files/MetaTrader/metaeditor.exe",
"/compile:${fileBasename}",
"/log:${fileBasenameNoExtension}.log",
]
},
"windows" :
{
"command" : "C:\\Program Files (x86)\\MetaTrader\\metaeditor.exe",
"args" :
[
"/compile:${fileBasename}",
"/log:${fileBasenameNoExtension}.log",
]
},
}
]
}
https://stackoverflow.com/questions/64131060
复制相似问题