Version control and management of compiled files

To add comments, please log in or register
Monica Messori
36
Monica Messori  

Hello
I'm quite new in MQL4 development but I have a strong experience in Java programming.

I started with the development of some Expert Advisor and I'm thinking a fast way to manage my source code and the compiled files between my laptop and my VPS.

I'm currently using an SVN repository for the sources but I want a way to automatically update the version number when my EA is ready for the "production environment" (my VPS).

Any advice?


MetaTrader4 creates ex4 files in the same folder as sources. Is there a way to configure a different folder?

Thanks in advance

Monica

Drazen Penic
2765
Drazen Penic  

There is a "Projects" folder inside the MQL4 folder (it has a blue icon in the Editor).

If you put your project folder in there, when you compile your code Metatrader will create the resulting ex4 file in the Expert\Projects, Indicators\Projects, Scripts\Projects or Libraries\Projects, depending on the type of program you build. 

That way you can separate source and executables. 

Monica Messori
36
Monica Messori  
Thanks Drazen for the information.

What about the version management: are you using some "automatic scripts"?
Drazen Penic
2765
Drazen Penic  
Monica Messori:
Thanks Drazen for the information.

What about the version management: are you using some "automatic scripts"?

 

Updating version number property is a bit more complex. 

The version number property must be in the main mq4 file, so one option is to create a script that will parse a mq4 file, find a line with the version number and replace it with a new one. 

I manually update version number.

Ex Ovo Omnia
3357
Ex Ovo Omnia  
Drazen Penic:

There is a "Projects" folder inside the MQL4 folder (it has a blue icon in the Editor).

If you put your project folder in there, when you compile your code Metatrader will create the resulting ex4 file in the Expert\Projects, Indicators\Projects, Scripts\Projects or Libraries\Projects, depending on the type of program you build. 

That way you can separate source and executables. 

Actually I never knew what the folder was there for. Thank you for the tip.

Btw, is it there a way for keeping the default "include" folder within the Projects? I do not mean using the relative include path, but using the default include path which would load files from the Projects rather than the include folder.

Drazen Penic
2765
Drazen Penic  
Ovo Cz:

Actually I never knew what the folder was there for. Thank you for the tip.

Btw, is it there a way for keeping the default "include" folder within the Projects? I do not mean using the relative include path, but using the default include path which would load files from the Projects rather than the include folder.

 

According to the help page for the #include directive, it can't be done. 

If you use angle brackets, the compiler takes files relative to the standard include folder (MQL4\Include), if you use quotation marks, the compiler uses files relative to the current folder.

Ex Ovo Omnia
3357
Ex Ovo Omnia  
Drazen Penic:

 

According to the help page for the #include directive, it can't be done. 

If you use angle brackets, the compiler takes files relative to the standard include folder (MQL4\Include), if you use quotation marks, the compiler uses files relative to the current folder.

Yes, that's what I thought. The reason is I wanted to have them all under the same root for the Search Files function - to search through all my files, while avoiding the MQ default stuff. I could try linking the folders, if the compiler can live with it.

EDIT: Well the compiler could live with it, however the editor opens the file as two different files and does not even detect that the file was updated.

Monica Messori
36
Monica Messori  
Drazen Penic:

 

Updating version number property is a bit more complex. 

The version number property must be in the main mq4 file, so one option is to create a script that will parse a mq4 file, find a line with the version number and replace it with a new one. 

I manually update version number.

It's sad. For the moment I think I'll manualy update the version number too.

Thanks

Monica

To add comments, please log in or register