-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
82 lines (72 loc) · 3.98 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="bazga.edition">
<available file="${uri.edition}/local.properties" property="properties.local.available" />
<target name="properties.load" depends="properties.local.load">
<loadproperties srcfile="build.properties" />
<echoproperties />
</target>
<target name="properties.local.load" if="${properties.local.available}">
<loadproperties srcfile="${uri.edition}/local.properties" />
</target>
<target name="properties.local.create" description="Stores a copy of build.properties as local.properties" depends="properties.load">
<copy file="build.properties" tofile="${uri.edition}/local.properties" />
</target>
<target name="init.sample-edition" depends="properties.load">
<mkdir dir="${title.short}" />
<copy file="build.properties" tofile="${title.short}/local.properties" />
</target>
<target name="clean" depends="properties.load">
<delete dir="${dir.build}" />
</target>
<target name="build" depends="properties.load, clean">
<mkdir dir="${dir.build}" />
<copy todir="${dir.build}/${title.short}/">
<filterchain id="filterchain">
<replacetokens begintoken="@" endtoken="@">
<!-- expath-pkg.xml -->
<token key="pkg.name" value="${pkg.name}" />
<token key="pkg.abbrev" value="${pkg.abbrev}" />
<token key="pkg.title" value="${pkg.title}" />
<token key="pkg.version" value="${pkg.version}" />
<token key="pkg.home" value="${pkg.home}" />
<!-- expath-pkg.xml -->
<token key="pkg.name" value="${pkg.name}" />
<token key="pkg.abbrev" value="${pkg.abbrev}" />
<token key="pkg.title" value="${pkg.title}" />
<token key="pkg.version" value="${pkg.version}" />
<token key="pkg.home" value="${pkg.home}" />
<?TODO dependencies ?>
<!-- repo.xml -->
<token key="repo.description" value="${repo.description}" />
<token key="repo.author" value="${repo.author}" />
<token key="repo.website" value="${repo.website}" />
<token key="repo.status" value="${repo.status}" />
<token key="repo.license" value="${repo.license}" />
<token key="repo.copyright" value="${repo.copyright}" />
<token key="repo.type" value="${repo.type}" />
<token key="repo.target" value="${repo.target}" />
<token key="repo.prepare" value="${repo.prepare}" />
<token key="repo.finish" value="${repo.finish}" />
<token key="repo.permissions.user" value="${repo.permissions.user}" />
<token key="repo.permissions.group" value="${repo.permissions.group}" />
<token key="repo.permissions.mode" value="${repo.permissions.mode}" />
<token key="edirom.prefs.edition_path" value="${edirom.prefs.edition_path}" />
<?TODO dependencies ?>
</replacetokens>
</filterchain>
<fileset dir="${uri.edition}" defaultexcludes="yes" excludes="local.properties **/*.jpg" includes="**" />
<fileset dir="assets-exist-packaging/" defaultexcludes="yes" includes="**" />
</copy>
<copy todir="${dir.build}/${title.short}/">
<fileset dir="${uri.edition}" defaultexcludes="yes" includes="**/*.jpg" />
</copy>
</target>
<target name="reset" depends="properties.load">
<delete dir="${dir.build}" />
<delete dir="${dir.dist}" />
</target>
<target name="xar" depends="build">
<mkdir dir="${dir.dist}" />
<zip basedir="${dir.build}/${title.short}/" destfile="${dir.dist}/${title.short}.xar" />
</target>
</project>