public
Description: A 2d game written in Java with real time lighting as a central gameplay mechanic.
Homepage: http://github.com/aschearer/shade/wikis
Clone URL: git://github.com/aschearer/shade.git
shade / build.xml
7078afe7 » aschearer 2008-09-18 adding build file to automa... 1 <?xml version="1.0" ?>
2
9db3e18c » aschearer 2008-09-19 updated project to include ... 3 <!--
4
5 Shade build file.
6
a0aea49b » aschearer 2008-09-22 updated player movement to ... 7 ant setup Initialize Shade environment.
d9638b81 » aschearer 2008-11-17 further improved build file. 8 ant compile Run to compile the code.
9 ant run Run to launch Shade
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 10 ant webstart Deploy shade as a webstart.
a0aea49b » aschearer 2008-09-22 updated player movement to ... 11 ant clean Removes products of the build process, etc.
9db3e18c » aschearer 2008-09-19 updated project to include ... 12
13 Alex Schearer
7078afe7 » aschearer 2008-09-18 adding build file to automa... 14 -->
d8baea26 » aschearer 2008-11-16 updating build file with de... 15 <project name="Shade" default="compile">
9db3e18c » aschearer 2008-09-19 updated project to include ... 16
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 17 <property name="src.dir" value="src" />
18 <property name="res.dir" value="res" />
9db3e18c » aschearer 2008-09-19 updated project to include ... 19 <property name="lib.dir" value="lib" />
20 <property name="obj.dir" value="bin" />
21 <property name="target.dir" value="." />
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 22 <property name="script.dir" value="script" />
23 <property name="webstart.dir" value="${target.dir}/webstart" />
24
25 <!-- Set up the Shade environment including preparing the natives. -->
ed321a66 » aschearer 2008-09-20 updated build to streamline... 26 <target name="setup" depends="check-setup" unless="setup.exists">
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 27 <delete dir="${lib.dir}/natives" />
28 <mkdir dir="${lib.dir}/natives" />
29 <unzip src="${lib.dir}/natives-win32.jar" dest="${lib.dir}/natives" />
30 <unzip src="${lib.dir}/natives-mac.jar" dest="${lib.dir}/natives" />
31 <unzip src="${lib.dir}/natives-linux.jar" dest="${lib.dir}/natives" />
32 </target>
9db3e18c » aschearer 2008-09-19 updated project to include ... 33
34 <!-- Compile and archive Shade. -->
d9638b81 » aschearer 2008-11-17 further improved build file. 35 <target name="jar">
9db3e18c » aschearer 2008-09-19 updated project to include ... 36 <antcall target="compile" />
37 <antcall target="archive" />
38 </target>
39
40 <!-- Run Shade. -->
d9638b81 » aschearer 2008-11-17 further improved build file. 41 <target name="run" depends="setup,compile">
42 <java fork="true" classname="com.shade.Shade">
43 <classpath>
44 <pathelement path="${obj.dir}" />
45 <fileset dir="${lib.dir}">
46 <include name="**/*.jar" />
47 </fileset>
48 </classpath>
9db3e18c » aschearer 2008-09-19 updated project to include ... 49 <jvmarg value="-Djava.library.path=lib/natives" />
50 </java>
51 </target>
52
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 53 <!-- Clean up the environment. -->
54 <target name="clean">
9a1b6481 » aschearer 2008-11-16 updated ant build, added fo... 55 <delete includeEmptyDirs="true">
56 <fileset dir="${obj.dir}" includes="**/*" defaultExcludes="no" />
57 </delete>
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 58 <delete file="${target.dir}/shade.jar" />
9a1b6481 » aschearer 2008-11-16 updated ant build, added fo... 59 <delete>
60 <fileset dir="${src.dir}" includes="**/*.orig" />
61 </delete>
ced0f03f » aschearer 2008-11-19 updated build to clean ds s... 62 <delete>
63 <fileset dir="." defaultExcludes="no">
64 <include name="**/*.DS_Store"/>
65 </fileset>
66 </delete>
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 67 <delete dir="${webstart.dir}" />
68 </target>
69
9a1b6481 » aschearer 2008-11-16 updated ant build, added fo... 70 <target name="format">
71 <exec executable="${script.dir}/astyle">
72 <arg value="-p" />
73 <arg value="-r" />
778699b5 » aschearer 2008-11-16 adding tab convertor just i... 74 <arg value="-c" />
9a1b6481 » aschearer 2008-11-16 updated ant build, added fo... 75 <arg value="--style=java" />
76 <arg value="${src.dir}/*" />
77 </exec>
78 </target>
79
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 80 <!-- Create a webstart directory in order to deploy Shade. -->
d9638b81 » aschearer 2008-11-17 further improved build file. 81 <target name="webstart" depends="jar">
ed321a66 » aschearer 2008-09-20 updated build to streamline... 82 <input message="Web server url:" addproperty="codebase" />
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 83 <delete dir="${webstart.dir}" />
84 <mkdir dir="${webstart.dir}" />
85 <copy file="${script.dir}/htaccess" tofile="${webstart.dir}/.htaccess" />
86 <copy file="${target.dir}/shade.jar" tofile="${webstart.dir}/shade.jar" />
48fbec32 » aschearer 2008-12-18 fixed manifest, webstart ta... 87 <copy file="${target.dir}/lib/crash.jar" tofile="${webstart.dir}/crash.jar" />
88 <copy file="${target.dir}/lib/slickfx.jar" tofile="${webstart.dir}/slickfx.jar" />
89 <copy file="${target.dir}/lib/BareBonesBrowserLaunch.jar" tofile="${webstart.dir}/BareBonesBrowserLaunch.jar" />
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 90 <copy file="${script.dir}/template.jnlp" tofile="${webstart.dir}/shade.jnlp">
91 <filterchain>
92 <replacetokens>
93 <token key="codebase" value="${codebase}" />
94 </replacetokens>
95 </filterchain>
96 </copy>
97 <antcall target="signjar" />
98 </target>
99
ed321a66 » aschearer 2008-09-20 updated build to streamline... 100 <!-- Determines whether setup has been run. -->
101 <target name="check-setup">
102 <condition property="setup.exists">
103 <available file="${lib.dir}/natives" type="dir" />
104 </condition>
105 </target>
106
107
108 <!-- Determines whether a keystore exists. -->
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 109 <target name="check-keystore">
110 <input message="Username:" addproperty="keystore.alias" />
111 <input message="Password:" addproperty="keystore.pass" />
112 <condition property="keystore.exists">
113 <available file="${target.dir}/${keystore.alias}.ks" type="file" />
114 </condition>
115 </target>
116
117 <!-- Create a key store. -->
118 <target name="keystore" depends="check-keystore" unless="keystore.exists">
119 <input message="Full Name:" addproperty="keystore.name" />
120 <input message="Company:" addproperty="keystore.company" />
121
122 <genkey keystore="${target.dir}/${keystore.alias}.ks"
123 alias="${keystore.alias}"
124 storepass="${keystore.pass}">
125 <dname>
126 <param name="CN" value="${keystore.name}" />
127 <param name="OU" value="${keystore.company}" />
128 <param name="O" value="" />
129 <param name="C" value=""/>
130 </dname>
131 </genkey>
132 </target>
133
134 <!-- Sign's webstart/shade.jar for deployment. -->
bf443d83 » aschearer 2008-09-29 fixed small issue with buil... 135 <target name="signjar" depends="keystore">
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 136 <signjar jar="${webstart.dir}/shade.jar"
137 keystore="${target.dir}/${keystore.alias}.ks"
138 storepass="${keystore.pass}"
139 alias="${keystore.alias}" />
48fbec32 » aschearer 2008-12-18 fixed manifest, webstart ta... 140 <signjar jar="${webstart.dir}/crash.jar"
141 keystore="${target.dir}/${keystore.alias}.ks"
142 storepass="${keystore.pass}"
143 alias="${keystore.alias}" />
144 <signjar jar="${webstart.dir}/slickfx.jar"
145 keystore="${target.dir}/${keystore.alias}.ks"
146 storepass="${keystore.pass}"
147 alias="${keystore.alias}" />
148 <signjar jar="${webstart.dir}/BareBonesBrowserLaunch.jar"
149 keystore="${target.dir}/${keystore.alias}.ks"
150 storepass="${keystore.pass}"
151 alias="${keystore.alias}" />
b400dd2a » aschearer 2008-09-20 updated ant file to assist ... 152 </target>
153
9db3e18c » aschearer 2008-09-19 updated project to include ... 154 <!-- Compile the code put results into obj.dir. -->
155 <target name="compile">
156 <mkdir dir="${obj.dir}" />
157 <javac destdir="${obj.dir}" debug="on">
158 <src path="${src.dir}" />
159 <classpath>
160 <pathelement path="${lib.dir}/slick.jar" />
ba11b29d » aschearer 2008-11-13 updating the build file. 161 <pathelement path="${lib.dir}/lwjgl.jar" />
162 <pathelement path="${lib.dir}/crash.jar" />
b8d24f36 » aschearer 2008-12-16 updating build file 163 <pathelement path="${lib.dir}/slickfx.jar" />
80591ac4 » aschearer 2008-12-17 missed this one... 164 <pathelement path="${lib.dir}/ibxm.jar" />
25a2b663 » aschearer 2008-12-16 updating build file 165 <pathelement path="${lib.dir}/BareBonesBrowserLaunch.jar" />
9db3e18c » aschearer 2008-09-19 updated project to include ... 166 </classpath>
167 </javac>
29272934 » aschearer 2008-09-23 updated the build file so i... 168 <copy todir="${obj.dir}">
169 <fileset dir="${res.dir}" />
170 </copy>
9db3e18c » aschearer 2008-09-19 updated project to include ... 171 </target>
172
173 <!-- Jar compiled code and place result into target.dir. -->
174 <target name="archive">
199548bf » aschearer 2008-09-23 moved manifest.txt to scrip... 175 <jar destfile="${target.dir}/shade.jar" manifest="${script.dir}/manifest.txt">
9db3e18c » aschearer 2008-09-19 updated project to include ... 176 <fileset dir="${obj.dir}" />
177 </jar>
7078afe7 » aschearer 2008-09-18 adding build file to automa... 178 </target>
179
180 </project>