OSDN Git Service

c72731291e2062b8b96ed71c33038c9e70161ba1
[nucleus-jp/nucleus-jp-ancient.git] / euc / build / build.xml
1 <?xml version="1.0" ?>\r
2 \r
3 <!-- Build file for nucleus -->\r
4 \r
5 <project name="nucleus" default="all">\r
6 \r
7 <target name="all" depends="release, upgrade, convert, api, upgradescripts, devdocs" />\r
8 \r
9 <target name="init">\r
10 \r
11     <property name="version" value="3.1" />\r
12     \r
13     <property name="src.home" value=".." />\r
14     <property name="build.home" value="." />    \r
15 \r
16         <property name="tempdir" value="${build.home}/temp" />\r
17         \r
18     <property name="release.home" value="${tempdir}/nucleus${version}" />\r
19     <property name="upgrade.home" value="${tempdir}" />\r
20     <property name="upgradescripts.home" value="${tempdir}/upgrades" />    \r
21     <property name="convert.home" value="${tempdir}/convert" />\r
22     <property name="apidocs.home" value="${build.home}/api" />\r
23     <property name="devdocs.home" value="${tempdir}/devdocs" />    \r
24     \r
25     <property name="convert.zip" value="${build.home}/import${version}.zip" />\r
26     <property name="upgradescripts.zip" value="${build.home}/upgrade${version}-scripts.zip" />\r
27     <property name="upgrade.zip" value="${build.home}/upgrade${version}-files.zip" />\r
28     <property name="release.zip" value="${build.home}/nucleus${version}.zip" />    \r
29     <property name="devdocs.zip" value="${build.home}/devdocs${version}.zip" />        \r
30     \r
31     <tstamp/>\r
32     <property name="devbuild.zip" value="${build.home}/pre${version}-${DSTAMP}.zip" />\r
33    \r
34 </target>\r
35 \r
36 <target name="release" depends="cleanrelease">\r
37         <mkdir dir="${tempdir}" />      \r
38 \r
39         <!-- Copy all Nucleus files and libs -->\r
40     <copy todir="${release.home}" preservelastmodified="yes">\r
41         <fileset dir="${src.home}">\r
42                         <exclude name="**/CVS/**"/>     \r
43         </fileset>\r
44     </copy>\r
45     \r
46     <!-- remove convert and upgrade thingies -->\r
47     <delete dir="${release.home}/nucleus/convert" />\r
48     <delete dir="${release.home}/nucleus/upgrades" />\r
49     <delete dir="${release.home}/nucleus/fileperms" />    \r
50     <!--\r
51         The devdocs are so small and usefull. Lets include them.\r
52     \r
53         <delete dir="${release.home}/nucleus/documentation/devdocs" />    \r
54     -->\r
55     \r
56     <!-- remove all language files except english -->\r
57     <delete>\r
58         <fileset dir="${release.home}/nucleus/language">\r
59                 <include name="*.*" />\r
60                 <exclude name="english.php" />\r
61                 <exclude name="index.html" />\r
62         </fileset>\r
63     </delete>\r
64     \r
65     <!-- don't need build dir either -->\r
66     <delete dir="${release.home}/build" />\r
67     \r
68     <!-- Copy the correct config.php file -->\r
69     <delete file="${release.home}/config.php" />\r
70     <copy file="${src.home}/build/config.php" todir="${release.home}"  preservelastmodified="yes" />\r
71 \r
72     <zip zipfile="${release.zip}"\r
73         basedir="${tempdir}"\r
74     />\r
75     \r
76         <delete dir="${tempdir}" />         \r
77 </target>\r
78 \r
79 <target name="upgrade" depends="cleanupgrade">\r
80         <mkdir dir="${tempdir}" />      \r
81 \r
82         <!-- Copy all Nucleus files and libs -->\r
83     <copy todir="${upgrade.home}/nucleus" preservelastmodified="yes">\r
84         <fileset dir="${src.home}/nucleus">\r
85                         <exclude name="**/CVS/**"/>     \r
86         </fileset>\r
87     </copy>\r
88 \r
89         <!-- copy xml-rss2/rsd skins as well -->\r
90     <copy todir="${upgrade.home}/skins" preservelastmodified="yes">\r
91         <fileset dir="${src.home}/skins">\r
92                         <exclude name="**/CVS/**"/>     \r
93                         <exclude name="**/base/**"/>                                    \r
94         </fileset>\r
95     </copy>\r
96     \r
97         <!-- copy extra stuff as well -->\r
98     <copy todir="${upgrade.home}/extra" preservelastmodified="yes">\r
99         <fileset dir="${src.home}/extra">\r
100                         <exclude name="**/CVS/**"/>     \r
101         </fileset>\r
102     </copy>\r
103     \r
104     <!-- remove convert and upgrade thingies -->\r
105     <delete dir="${upgrade.home}/nucleus/convert" />\r
106     <delete dir="${upgrade.home}/nucleus/upgrades" />\r
107     <delete dir="${upgrade.home}/nucleus/fileperms" />  \r
108     \r
109     <!--\r
110         The devdocs are so small and usefull. Lets include them.\r
111            \r
112         <delete dir="${upgrade.home}/nucleus/documentation/devdocs" />    \r
113     -->\r
114     \r
115     <!-- remove all language files except english -->\r
116     <delete>\r
117         <fileset dir="${upgrade.home}/nucleus/language">\r
118                 <include name="*.*" />\r
119                 <exclude name="english.php" />\r
120                 <exclude name="index.html" />\r
121         </fileset>\r
122     </delete>    \r
123     \r
124     <!-- don't need build dir either -->\r
125     <delete dir="${upgrade.home}/build" />\r
126     \r
127     <!-- Copy necessary files in root -->\r
128     <copy file="${src.home}/action.php" todir="${upgrade.home}" preservelastmodified="yes" />\r
129 \r
130         <zip zipfile="${upgrade.zip}"\r
131                 basedir="${tempdir}"\r
132         />\r
133 \r
134         <delete dir="${tempdir}" />     \r
135 </target>\r
136 \r
137 <target name="upgradescripts" depends="cleanupgradescripts">\r
138         <mkdir dir="${tempdir}" />      \r
139 \r
140         <!-- Copy all necessary files in there -->\r
141     <copy todir="${upgradescripts.home}" preservelastmodified="yes">\r
142         <fileset dir="${src.home}/nucleus/upgrades">\r
143                         <exclude name="**/CVS/**"/>     \r
144         </fileset>\r
145     </copy>\r
146     \r
147     <zip zipfile="${upgradescripts.zip}"\r
148         basedir="${tempdir}"\r
149     />\r
150     \r
151         <delete dir="${tempdir}" />         \r
152 </target>\r
153 \r
154 <target name="convert" depends="cleanconvert">\r
155         <mkdir dir="${tempdir}" />      \r
156 \r
157         <!-- Copy all necessary files in there -->\r
158     <copy todir="${convert.home}" preservelastmodified="yes">\r
159         <fileset dir="${src.home}/nucleus/convert">\r
160                         <exclude name="**/CVS/**"/>\r
161         </fileset>\r
162     </copy>\r
163     \r
164     <zip zipfile="${convert.zip}"\r
165         basedir="${tempdir}"\r
166     />\r
167     \r
168         <delete dir="${tempdir}" />         \r
169 </target>\r
170 \r
171 <target name="devdocs" depends="cleandevdocs">\r
172         <mkdir dir="${tempdir}" />      \r
173 \r
174         <!-- Copy all necessary files in there -->\r
175     <copy todir="${devdocs.home}" preservelastmodified="yes">\r
176         <fileset dir="${src.home}/nucleus/documentation/devdocs/">\r
177                         <exclude name="**/CVS/**"/>     \r
178         </fileset>\r
179     </copy>\r
180     \r
181     <zip zipfile="${devdocs.zip}"\r
182         basedir="${tempdir}"\r
183     />\r
184     \r
185         <delete dir="${tempdir}" />         \r
186 </target>\r
187 \r
188 <target name="api" depends="cleanapi">\r
189 </target>\r
190 \r
191 <target name="cleanrelease" depends="init">\r
192     <delete file="${release.zip}" />    \r
193 </target>\r
194 \r
195 <target name="cleanupgrade" depends="init">\r
196     <delete file="${upgrade.zip}" />    \r
197 </target>\r
198 \r
199 <target name="cleanupgradescripts" depends="init">\r
200     <delete file="${upgradescripts.zip}" />    \r
201 </target>\r
202 \r
203 <target name="cleanconvert" depends="init">\r
204     <delete file="${convert.zip}" />\r
205 </target>\r
206 \r
207 <target name="cleandevdocs" depends="init">\r
208     <delete file="${devdocs.zip}" />\r
209 </target>\r
210 \r
211 <target name="cleanapi" depends="init">\r
212     <delete dir="${apidocs.home}"/>\r
213 </target>\r
214 \r
215 \r
216 \r
217 \r
218 </project>