forked from fonsagua/fonsagua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.xml
180 lines (137 loc) · 5.45 KB
/
deploy.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<project name="deploy-fonsagua" default="makePortables" basedir="../appgvSIG">
<!-- USER OPTIONS -->
<property name="base-path" value="/var/tmp/portable/" /> <!-- remember to use the trailing slash -->
<property name="custom-portable-path" value="../fonsagua/portable/" /> <!-- remember to use the trailing slash -->
<tstamp />
<property name="name-lin" value="gvSIG-Fonsagua-lin32-${DSTAMP}" />
<property name="name-win" value="gvSIG-Fonsagua-win32-${DSTAMP}" />
<!-- Projects to be builded.
Check the file ../install/gvsig_default_installation_projects.xml,
copy&paste to your project
edit the variable gvSIG_dist to have only the projects that you want to use
Do not include gvsig-bindings (sextante) neither binaries in the list. They are handle separately.
-->
<import file="../fonsagua/portable/projects.xml" />
<!-- DON'T TOUCH BELOW THIS LINE -->
<import file="../install/deploy.xml"/>
<property name="base-lin" value="base-lin" />
<property name="base-win" value="base-win" />
<property name="base-win-path" value="${base-path}${base-win}.zip" />
<property name="base-lin-path" value="${base-path}${base-lin}.tgz" />
<target name="makePortables" depends="buildFromSource, makePortableLinux, makePortableWindows">
</target>
<target name="makeTestEnviroment" depends="buildFromSource">
<!-- Copies the custom files -->
<copy todir="${andami}" overwrite="yes">
<fileset dir="${custom-portable-path}common/bin" />
<fileset dir="${custom-portable-path}lin/bin" />
</copy>
</target>
<macrodef name="failIfAnyExists">
<attribute name="file1" />
<attribute name="file2" />
<sequential>
<fail message="Remove files in tmp before continue">
<condition>
<or>
<available file="@{file1}" />
<available file="@{file2}" />
</or>
</condition>
</fail>
</sequential>
</macrodef>
<target name="makePortableLinux" depends="buildFromSource">
<failIfAnyExists file1="/tmp/${name-lin}" file2="/tmp/${base-lin}" />
<!-- ant tar task does not preserve permissions, so we use native executable -->
<exec executable="tar" output="/dev/null" os="Linux" dir="/tmp">
<arg value="-xz"/>
<arg value="--preserve-permissions"/>
<arg value="--preserve-order"/>
<arg value="--file=${base-lin-path}"/>
</exec>
<!-- Renames the folder to the final name of the portable -->
<move file="/tmp/${base-lin}" tofile="/tmp/${name-lin}" />
<copy todir="/tmp/${name-lin}/cfg">
<fileset dir="${base-path}base-common/cfg/" />
</copy>
<copy todir="/tmp/${name-lin}/bin">
<fileset dir="${base-path}/base-common/bin/">
<include name="*" />
</fileset>
</copy>
<copy todir="/tmp/${name-lin}/bin/theme">
<fileset dir="${andami}/theme/" />
</copy>
<!-- Move to the portable version the extensions and the libs -->
<copy todir="/tmp/${name-lin}/bin/" file="${andami}/andami.jar" flatten="yes"/>
<copy todir="/tmp/${name-lin}/bin/lib">
<fileset dir="${andami}/lib/"/>
</copy>
<copy todir="/tmp/${name-lin}/bin/gvSIG">
<fileset dir="${andami}/gvSIG/"/>
</copy>
<mkdir dir="/tmp/${name-lin}/bin/native"/>
<copy todir="/tmp/${name-lin}/bin/native">
<fileset dir="../binaries/linux">
<type type="file" />
<include name="*" />
<exclude name="build.xml" />
</fileset>
</copy>
<!-- Copies the custom files -->
<copy todir="/tmp/${name-lin}/" overwrite="yes">
<fileset dir="${custom-portable-path}common" />
<fileset dir="${custom-portable-path}lin" />
</copy>
<!--[tar] Nothing to do: /tmp/gvSIG-Fonsagua-lin32-20130917.tgz is up to date. -->
<tar destfile="/tmp/${name-lin}.tgz" compression="gzip" >
<tarfileset dir="/tmp/${name-lin}">
<include name="/tmp/${name-lin}/**" />
<exclude name="**/java, **/*.sh" />
</tarfileset>
<tarfileset dir="/tmp/${name-lin}" filemode="755">
<include name="**/java, **/*.sh" />
</tarfileset>
</tar>
</target>
<target name="makePortableWindows" depends="buildFromSource">
<failIfAnyExists file1="/tmp/${name-win}" file2="/tmp/${base-win}" />
<unzip src="${base-win-path}" dest="/tmp"> </unzip>
<!-- Renames the folder to the final name of the portable -->
<move file="/tmp/${base-win}" tofile="/tmp/${name-win}"/>
<copy todir="/tmp/${name-win}/cfg">
<fileset dir="${base-path}base-common/cfg/" />
</copy>
<copy todir="/tmp/${name-win}/bin">
<fileset dir="${base-path}/base-common/bin/">
<include name="*" />
</fileset>
</copy>
<copy todir="/tmp/${name-win}/bin/theme">
<fileset dir="${andami}/theme/" />
</copy>
<!-- Move to the portable version the extensions and the libs -->
<copy todir="/tmp/${name-win}/bin/" file="${andami}/andami.jar" flatten="yes"/>
<copy todir="/tmp/${name-win}/bin/lib">
<fileset dir="${andami}/lib/"/>
</copy>
<copy todir="/tmp/${name-win}/bin/gvSIG">
<fileset dir="${andami}/gvSIG/"/>
</copy>
<!-- NATIVAS -->
<copy todir="/tmp/${name-win}/bin/">
<fileset dir="../binaries/w32">
<type type="file" />
<include name="*" />
<exclude name="build.xml" />
</fileset>
</copy>
<!-- Copies the custom files -->
<copy todir="/tmp/${name-win}/" overwrite="yes">
<fileset dir="${custom-portable-path}common" />
<fileset dir="${custom-portable-path}win" />
</copy>
<zip destfile="/tmp/${name-win}.zip" basedir="/tmp/${name-win}" />
</target>
</project>