Scripts: MQL5 Program Packer

Automated-Trading
162302
Automated-Trading  

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

fxsaber
20627
fxsaber  

<DELETED>

This is an English language forum

Post in English

Alain Verleyen
41561
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.

Files:
mql4pack.zip  30 kb
Stanislav Korotky
34992
Stanislav Korotky  
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).

Alain Verleyen
41561
Alain Verleyen  
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.
Stanislav Korotky
34992
Stanislav Korotky  
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.

Xiaowei Yan
2138
Xiaowei Yan  

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:
fxsaber
20627
fxsaber  

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, которая позволяет формировать отчеты по истории торгов.
Stanislav Korotky
34992
Stanislav Korotky  
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. 

fxsaber
20627
fxsaber  
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.

Stanislav Korotky
34992
Stanislav Korotky  
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.