Skip to content

Commit

Permalink
add Ant build
Browse files Browse the repository at this point in the history
  • Loading branch information
phamngocvinh committed Feb 15, 2022
1 parent 777b52d commit 623068c
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.ex5
*.ex5
/distribute/
6 changes: 6 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
set id=D0E8209F77C8CF37AD8BF550E51FF075
set arg=%1
set include_path=%APPDATA%\MetaQuotes\Terminal\%id%\MQL5
"C:\Program Files\MetaTrader 5\metaeditor64.exe" /compile:"%arg%" /include:"%include_path%"
exit 0
50 changes: 50 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<project name="Galaxy Trader Distribution" default="distribute" basedir=".">
<description>
Build all Galaxy Trader Tools
</description>

<property name="dist.dir" location="distribute" />
<property name="build.dir" location="${dist.dir}/build" />

<target name="init">
<echo message="Galaxy Trader Distribution" />
<delete dir="${dist.dir}" />
<mkdir dir="${dist.dir}" />
</target>

<target name="get-source">
<copy todir="${build.dir}">
<fileset dir="${basedir}" includes="**/*.mq5" />
</copy>
</target>

<target name="remove-archived">
<delete dir="${build.dir}/archive" />
</target>

<target name="compile">
<exec dir="${basedir}" executable="build.bat">
<arg value="${build.dir}" />
</exec>
<echo message="Built successfully" />
</target>

<target name="remove-common">
<delete dir="${build.dir}/common" />
</target>

<target name="delete-source">
<delete>
<fileset dir="${build.dir}" includes="**/*.mq5" />
</delete>
</target>

<target name="zip">
<zip destfile="${dist.dir}/galaxy-trader-v1.0.zip" basedir="${build.dir}" />
<delete dir="${build.dir}" />
</target>

<!-- Default, Run to build App -->
<target name="distribute" depends="init, get-source, remove-archived, compile, remove-common, delete-source, zip" />

</project>

0 comments on commit 623068c

Please sign in to comment.