forked from nonowarn/shimeji4mac
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
139 lines (123 loc) · 4.07 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
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
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Shimeji" basedir="." default="zip">
<property name="version" value="2_2_0" />
<target name="clean">
<delete dir="target" />
<mkdir dir="target"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="target/classes" />
<javac includeantruntime="false" destdir="target/classes" target="1.7" debug="yes" optimize="yes" encoding="UTF-8">
<src path="src"/>
<src path="src_win"/>
<src path="src_mac"/>
<src path="src_generic"/>
<classpath>
<fileset dir="Shimeji.app/Contents/Resources/Java/lib" />
</classpath>
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="target/Shimeji.jar" basedir="target/classes" manifest="MANIFEST.MF" />
</target>
<target name="zip" depends="jar">
<zip destfile="target/src.zip">
<fileset dir=".">
<include name="**/*" />
<exclude name="target/**/*" />
<exclude name="target" />
</fileset>
</zip>
<ant target="zip_package">
<property name="edition" value="Personal" />
</ant>
<ant target="zip_package">
<property name="edition" value="Professional" />
</ant>
<ant target="zip_package">
<property name="edition" value="Ultimate" />
</ant>
</target>
<target name="app" depends="compile,jar">
<copy file="target/Shimeji.jar"
tofile="Shimeji.app/Contents/Resources/Java/Shimeji.jar"
overwrite="true" />
</target>
<!--
Ant の zip とか copy とかつかうと
パーミッション消えるので exec でがんばる
-->
<target name="zip_app" depends="app">
<mkdir dir="Shimeji" />
<exec executable="cp">
<arg value="-a" />
<arg value="Shimeji.app"/>
<arg value="img" />
<arg value="conf" />
<arg value="Shimeji" />
</exec>
<!--
cp を使うと日本語ファイル名のテキストファイルがコピー出来ないので、
ここだけ copy タスクを使う
-->
<copy todir="Shimeji">
<fileset dir=".">
<include name="*.txt" />
</fileset>
</copy>
<exec executable="zip">
<arg value="-r" />
<arg value="Shimeji" />
<arg value="Shimeji" />
</exec>
<delete dir="Shimeji" />
</target>
<target name="zip_package">
<mkdir dir="target/${edition}/conf" />
<copy tofile="target/${edition}/conf/行動.xml"
file="conf/${edition}行動.xml" />
<zip destfile="target/Shimeji_${version}_${edition}.zip" encoding="Windows-31J">
<fileset dir="target">
<include name="Shimeji.jar" />
<include name="src.zip" />
</fileset>
<fileset dir="target/${edition}">
<include name="conf/**/*" />
</fileset>
<fileset dir=".">
<include name="Shimeji.exe"/>
<include name="しめじ ホームページ.url"/>
<include name="ライセンス.txt"/>
<include name="読んでね.txt"/>
<include name="img/**/*" />
<include name="conf/**/*" />
<exclude name="conf/*行動.xml" />
<include name="lib/*" />
</fileset>
</zip>
</target>
<target name="jar_package">
<mkdir dir="target/${edition}/conf" />
<copy tofile="target/${edition}/conf/行動.xml"
file="conf/${edition}行動.xml" />
<jar destfile="target/Shimeji_${version}_${edition}.jar">
<fileset dir="target">
<include name="Shimeji.jar" />
<include name="src.zip" />
</fileset>
<fileset dir="target/${edition}">
<include name="conf/**/*" />
</fileset>
<fileset dir=".">
<include name="Shimeji.exe"/>
<include name="しめじ ホームページ.url"/>
<include name="ライセンス.txt"/>
<include name="読んでね.txt"/>
<include name="img/**/*" />
<include name="conf/**/*" />
<exclude name="conf/*行動.xml" />
<include name="lib/*" />
</fileset>
</jar>
</target>
</project>