forked from damoebius/Cow4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
95 lines (72 loc) · 2.91 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0" encoding="UTF-8"?>
<project name="cow4" default="deploy-local">
<property environment="env"/>
<property file="build.properties"/>
<target name="clean">
<delete dir="${output}"/>
<mkdir dir="${output.js}"/>
</target>
<target name="compile-mapeditor">
<exec executable="node" dir="${basedir}" failonerror="true">
<arg line="node_modules/haxe/bin/haxe-cli.js"/>
<arg line="-cp src -js ${output.js}/MapEditor.js -main com.tamina.cow4.MapEditor"/>
<arg line="-use nodejs"/>
<arg line="-use createjs"/>
<arg line="-lib msignal"/>
<arg line="-lib mconsole-npm"/>
<arg line="-lib taminahx"/>
</exec>
</target>
<target name="compile-server">
<exec executable="node" dir="${basedir}" failonerror="true">
<arg line="node_modules/haxe/bin/haxe-cli.js"/>
<arg line="-cp src -js ${output.js}/Server.js -main com.tamina.cow4.Server"/>
<arg line="-use nodejs"/>
<arg line="-lib msignal"/>
<arg line="-lib mconsole-npm"/>
<arg line="-lib taminahx"/>
</exec>
</target>
<target name="compile-frontend">
<exec executable="node" dir="${basedir}" failonerror="true">
<arg line="node_modules/haxe/bin/haxe-cli.js"/>
<arg line="-cp src -js ${output.js}/Frontend.js -main com.tamina.cow4.Frontend"/>
<arg line="-use createjs"/>
<arg line="-lib msignal"/>
<arg line="-lib mconsole-npm"/>
<arg line="-lib taminahx"/>
</exec>
</target>
<target name="compile-ia-demo">
<exec executable="node" dir="${basedir}" failonerror="true">
<arg line="node_modules/haxe/bin/haxe-cli.js"/>
<arg line="-cp src -js ${output.js}/IADemoApp.js -main com.tamina.cow4.IADemoApp"/>
<arg line="-use nodejs"/>
<arg line="-lib msignal"/>
<arg line="-lib mconsole-npm"/>
<arg line="-lib taminahx"/>
</exec>
</target>
<target name="compile-all" depends="compile-server, compile-frontend, compile-ia-demo"/>
<target name="copy-static-resources">
<copy todir="${output}">
<fileset dir="${basedir}/html">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${output}/server/js">
<fileset dir="${output.js}">
<include name="Frontend.js"/>
</fileset>
</copy>
</target>
<target name="deploy-local" depends="compile-all, copy-static-resources">
</target>
<target name="deploy-prod" depends="compile-all, copy-static-resources">
<scp todir="xxxxxxx@vps.tamina-online.com:/home/cow4" sftp="true" verbose="true" password="xxxxxxx" trust="true">
<fileset dir="${output}">
<include name="**/*"/>
</fileset>
</scp>
</target>
</project>