Scripts: MQL5 Program Packer

 

MQL5 Program Packer:

This is MQL5 project packer: assemble all source and resource files from dependencies into a single ZIP.

MQL5 Program Packer

Author: Stanislav Korotky

 

<DELETED>

This is an English language forum

Post in English

 

Very useful. Code easily understandable and customizable.

Thanks for sharing.

As I was just in need of such tool, I make it working for mql4.

Files:
mql4pack.zip  30 kb
 
Alain Verleyen:

Very useful. Code easily understandable and customizable.

Thanks for sharing.

As I was just in need of such tool, I make it working for mql4.

It looks like you packed a bit tweaked ZIP-files (at least not the ones coming with the MQL5 packer).

For example, your version does not support empty files. Also I don't see the point of having common folder parameter as required when it's the last parameter in specific methods (which requires you to add trailing ", 0)" in the calls even if FILE_COMMON is not used).

 
Stanislav Korotky:

It looks like you packed a bit tweaked ZIP-files (at least not the ones coming with the MQL5 packer).

For example, your version does not support empty files. Also I don't see the point of having common folder parameter as required when it's the last parameter in specific methods (which requires you to add trailing ", 0)" in the calls even if FILE_COMMON is not used).

Sorry I used the files I had already and not the ones you provided. It compiles and provides me the results I want so I didn't look further.
 
In the updated version 1.1 multiple targets are supported. You can specify them in the MainSourceFile input parameter separated by ';', for example "Scripts/mql5pack.mq5;Experts/Examples/MACD/MACD Sample.mq5". In will create a zip with a filename like that Multi_Target_Archive_20200226133734.zip with current time stamp in the name to prevent possible loss of existing copy of previous archive version.

 

Smart boy.

I implements a similar tool by python. only include source file, available both in mt4&5. Instead of packing, I gather all the source file in one file. This cause the file very large, but easy use for my customer.

to use, edit the py file to change the mql_path and the source file.

Files:
 

Scanning...
Processing MQL5/Include/Report.mqh
Files processed: 1
Source length: 97067
Packing...
 + MQL5/Include/Report.mqh
Packed file saved: MQL5/Include/Report.mqh.zip


Where?

  #ifndef __VIRTUAL__
    #include <MT4Orders.mqh> // https://www.mql5.com/ru/code/16006
  #endif // __VIRTUAL__

  #ifdef REPORT_REJECTS
    #include <fxsaber\TradesID\TradesID.mqh> // https://www.mql5.com/ru/code/34173
  #endif // #ifdef REPORT_REJECTS
Report
Report
  • www.mql5.com
Библиотека для MetaTrader 4/5, которая позволяет формировать отчеты по истории торгов.
 
fxsaber:


Where?

I will try to figure out what happens. Currently the debugger does not allow me to trace the code line by line, as it skips many instructions and function calls. 

 
Stanislav Korotky:

I will try to figure out what happens. Currently the debugger does not allow me to trace the code line by line, as it skips many instructions and function calls. 

MT4-debugger.

 
fxsaber:


Where?

Ok, I got it. Your source file is formatted with MAC rule - only CR symbol is used for new lines. You should use CRLF (Windows style) or LF (Linux style) instead. Please check your editing software documentation.