Setting up SlickEdit to work with and compile MQL4/5 documents. - page 8

 

The functionality is great, I tweaked it to my liking at work under visual studio, there are even a lot of tricks and tips and everything works!!!! There is no limit to my happiness.

Just can't configure the compilation yet...

 
sigma7i:

The functionality is great, I tweaked it to my liking at work under visual studio, there are even a lot of tricks and tips and everything works!!!! There is no limit to my happiness.

Only thing is, I can't set up the compilation yet...

You must have something like

D:\Soft\Invests\mql64.exe "%f"

Where the path to the MQL5 compiler is specified.

Download the 86 or 64 compiler.

Very important to keep in mind - the compiler will not be updated automatically after the time the developers took it out of MT. Now you have to update the file manually as new builds of MT are released.

And you should also keep in mind that this (mql5) compiler does the same for ex4 and you don't need to do anything for that - it is enough that the file extension was *.mq4

 
Andrey Dik:

You should have something like

where the path to MQL5 compiler is specified

Download compiler 86 or 64.

Be very aware that the compiler will not be updated automatically after the time the developers took it out of MT. Now you have to update the file manually as new builds of MT are released.

And you should also keep in mind that this (mql5) compiler does the same for ex4 and you don't need to do anything for that - it is enough that the file extension was *.mq4

Thanks, I didn't even know there was a compiler in a separate file.
 
"There are many things in the world, friend Horatio, which our wise men have never dreamed of" (c) William who Shakespeare.
 

How do I run a console command to compile with MetaEditor?

I've tried everything - ME just opens the file and that's it.

 

I, for example, made a bat directory in the installation folder:

..\metaeditor.exe /compile:"c:\program files\metatrader 5\mql5\experts\111.mq5" /inc:"c:\program files\metatrader 5\mql5" /log:"c:\program files\metatrader 5\bat\111.log" 
pause
 

I managed to set up the compilation like this:

D:\Soft\\Invests\Develop\MT5\metaeditor64.exe /compile:"%f" /i d:\Soft\Invests\Develop\MT5\MQL5\ /log:filename.log type filename.log

There is one problem though... The compiled file is created in project folder MQL5\Projects, and not in MQL5\Experts\Projects\ if it's Expert Advisor. ME transfers the file automatically, but if I call it with a console command as shown above, the file is not transferred.

 
Joo Zepper:

I managed to set up the compilation like this:

D:\Soft\\Invests\Develop\MT5\metaeditor64.exe /compile:"%f" /i d:\Soft\Invests\Develop\MT5\MQL5\ /log:filename.log type filename.log

There is one problem though... The compiled file is created in project folder MQL5\Projects, and not in MQL5\Experts\Projects\ if it's Expert Advisor. ME will transfer the file automatically, but if you call it with a console command, as shown above, the transfer will not take place.

Add after "metaeditor64.exe /compile: blah blah blah blah" a line

copy /Y "полный путь откуда" "полный путь куда"
each path must be in inverted commas
 
Gocha123:
copy /Y "full path of where" "full path of where"

is this done directly in the compile command or a separate command?
Please give a full example of the command.
 
Joo Zepper:
should this be done directly in the compile command or a separate command?
Please give a full example of the command.
This is a separate command, it has to be written in a separate line in the batch file.
For example, the contents of my *.bat: (lines that start with REM are comments for you, they should be removed)
REM это компилирует
metaeditor.exe /compile:Expert.mq4 /log:log.log

REM это распечатывает содержимое log.log в окошке редактора (у меня visual studio)
type log.log

REM это копирует Expert.mq4 из папки проекта в папку терминала
copy /Y "d:\Projects\Expert.mq4" "d:\Programs\MetaQuotes\Terminal\F7AC2FAB8B05738F2F84DD1672A1F0CA\MQL4\Experts\Expert.mq4"

Reason: