Skip to content

Commit 51b1254

Browse files
author
dlsmith
committed
Modified build script to use a simplified version tag (no time stamp) and to produce a exe rather than zip for Windows distribution.
git-svn-id: file:///tmp/test-svn/trunk@4570 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent 9106d11 commit 51b1254

File tree

2 files changed

+10
-30
lines changed

2 files changed

+10
-30
lines changed

drjava/build.xml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -161,25 +161,6 @@
161161
<property name="version-source" value="${src-working-dir}/Version.orig" />
162162
<property name="version-target" value="${src-working-dir}/Version.java" />
163163

164-
<!-- Retrieves the current revision using the svn command. Contrary
165-
to resolve-svn-revision, this removes the line separator at the end. -->
166-
<target name="get-revision">
167-
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes" output="svn-info.txt">
168-
<arg value="info" />
169-
</exec>
170-
<loadfile property="REVSTAMP" srcfile="svn-info.txt">
171-
<filterchain>
172-
<linecontains>
173-
<contains value="Last Changed Rev: " />
174-
</linecontains>
175-
<replacestring from="Last Changed Rev: " to="" />
176-
<striplinebreaks/>
177-
</filterchain>
178-
</loadfile>
179-
<delete file="svn-info.txt" />
180-
<echo message="Revision is ${REVSTAMP}." />
181-
</target>
182-
183164
<target name="generate-source" depends="resolve-development-value, resolve-version-tag"
184165
description="Generate the CodeStatus and Version source files">
185166
<filter token="DEVELOPMENT" value="${development-value}" />
@@ -1084,12 +1065,12 @@
10841065
<delete dir="${version-tag}" />
10851066
</target>
10861067

1087-
<target name="jar-app" depends="assert-jar-exists, resolve-version-tag">
1068+
<target name="jar-app" depends="jar-14, assert-jar-exists, resolve-version-tag">
10881069
<echo message="Creating ${version-tag}.jar" />
10891070
<copy file="${ant.project.name}.jar" tofile="${version-tag}.jar" />
10901071
</target>
10911072

1092-
<target name="mac-app" depends="assert-jar-exists, resolve-version-tag">
1073+
<target name="mac-app" depends="jar-14, assert-jar-exists, resolve-version-tag">
10931074
<echo message="Creating ${version-tag}-osx.tar.gz" />
10941075
<property name="mac-app-dir" value="${version-tag}/osx" />
10951076
<mkdir dir="${mac-app-dir}" />
@@ -1109,9 +1090,9 @@
11091090
</tar>
11101091
</target>
11111092

1112-
<target name="windows-app" depends="assert-jar-exists, assert-launch4j-exists, resolve-version-tag">
1093+
<target name="windows-app" depends="jar-14, assert-jar-exists, assert-launch4j-exists, resolve-version-tag">
11131094
<!-- launch4j task, used to create the Windows executable -->
1114-
<echo message="Creating ${version-tag}-windows.zip" />
1095+
<echo message="Creating ${version-tag}.exe" />
11151096
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask">
11161097
<classpath>
11171098
<pathelement location="${launch4j-home}/launch4j.jar" />
@@ -1126,8 +1107,6 @@
11261107
</copy>
11271108
<copy file="${ant.project.name}.jar" todir="${windows-app-dir}" />
11281109
<launch4j configfile="${windows-app-dir}/launch4j-config.xml" />
1129-
<zip destfile="${version-tag}-windows.zip" basedir="${windows-app-dir}"
1130-
includes="${readable-project-name}.exe" />
11311110
</target>
11321111

11331112
<target name="src-zip" depends="resolve-version-tag" unless="skip-tag">
@@ -1357,18 +1336,18 @@
13571336
value="edu.rice.cs.plt.ant.OneLineJUnitResultFormatter" />
13581337
</target>
13591338

1360-
<target name="resolve-version-tag" depends="get-revision">
1339+
<target name="resolve-version-tag" depends="resolve-svn-revision">
13611340
<!-- Get a timestamp based on GMT, rather than local time -->
13621341
<tstamp>
13631342
<format property="DSTAMP" pattern="yyyyMMdd" timezone="GMT" />
13641343
<format property="TSTAMP" pattern="HHmm" timezone="GMT" />
13651344
<format property="TODAY" pattern="MMMM dd yyyy" timezone="GMT" />
13661345
</tstamp>
13671346
<property name="version-tag"
1368-
value="${ant.project.name}${tag-append}-${DSTAMP}-${TSTAMP}-r${REVSTAMP}" />
1347+
value="${ant.project.name}${tag-append}-${DSTAMP}-r${svn-revision}" />
13691348
</target>
13701349

1371-
<!-- Sets is-modified if "svn status" has non-empty output. Runs svn in svn-working-dir. -->
1350+
<!-- Sets is-modified if "svn status" has non-empty output. -->
13721351
<target name="resolve-is-modified" depends="clean">
13731352
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes" outputproperty="svn-status">
13741353
<arg value="status" />
@@ -1380,7 +1359,7 @@
13801359
</condition>
13811360
</target>
13821361

1383-
<!-- Sets svn-revision to the current "Last Changed Rev" of "svn info". Runs svn in svn-working-dir. -->
1362+
<!-- Sets svn-revision to the current "Last Changed Rev" of "svn info". -->
13841363
<target name="resolve-svn-revision">
13851364
<exec executable="svn" dir="${svn-working-dir}" failonerror="yes" output="svn-info.txt">
13861365
<arg value="info" />
@@ -1391,6 +1370,7 @@
13911370
<contains value="Last Changed Rev: " />
13921371
</linecontains>
13931372
<replacestring from="Last Changed Rev: " to="" />
1373+
<striplinebreaks/>
13941374
</filterchain>
13951375
</loadfile>
13961376
<delete file="svn-info.txt" />

drjava/packaging/windows/launch4j-config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<launch4jConfig>
22
<headerType>gui</headerType>
3-
<outfile>DrJava.exe</outfile>
3+
<outfile>../../@VERSION@.exe</outfile>
44
<jar>drjava.jar</jar>
55
<errTitle>DrJava</errTitle>
66
<icon>drjava.ico</icon>

0 commit comments

Comments
 (0)