|
13 | 13 | hard coded value that corresponds to the version that created the
|
14 | 14 | model installer files, against the version of Repast that is actually
|
15 | 15 | in use in the workspace. -->
|
16 |
| - |
| 16 | + |
17 | 17 | <!-- The Repast creator version variable is hard-coded against the release
|
18 | 18 | version. DO NOT USE A VARIABLE HERE! -->
|
19 |
| - <property name="RepastCreatorVersion" value="2.9.1" /> |
20 |
| - |
| 19 | + <property name="RepastCreatorVersion" value="2.10.0" /> |
| 20 | + |
21 | 21 | <condition property="repast.version">
|
22 |
| - <equals arg1="${RepastCreatorVersion}" arg2="${REPAST_VERSION}"/> |
| 22 | + <equals arg1="${RepastCreatorVersion}" arg2="${REPAST_VERSION}"/> |
23 | 23 | </condition>
|
24 |
| - |
| 24 | + |
25 | 25 | <target name="repast.version.OK" if="repast.version">
|
26 | 26 | <echo message="Using Repast version ${REPAST_VERSION}"/>
|
27 | 27 | </target>
|
28 |
| - |
| 28 | + |
29 | 29 | <target name="repast.version.check" depends="repast.version.OK" unless="repast.version">
|
30 | 30 | <fail message="Inompatible Repast version. The model builder configureation was built with ${RepastCreatorVersion}, but the current version is ${REPAST_VERSION}"/>
|
31 | 31 | </target>
|
32 |
| - |
33 |
| - <target name="BuildUserModelInstaller" if="repast.version" depends="repast.version.OK,repast.version.check"> |
| 32 | + |
| 33 | + <!-- Check for Izpack --> |
| 34 | + <property name="izpack-dist-default" value="${user.home}/IzPack"/> |
| 35 | + |
| 36 | + <!-- If the IZPACK_HOME VM arg is provided, then use it, otherwise use the default.--> |
| 37 | + <condition property="izpack-dist" value="${IZPACK_HOME}" else="${izpack-dist-default}"> |
| 38 | + <isset property="IZPACK_HOME" /> |
| 39 | + </condition> |
| 40 | + |
| 41 | + <echo message="IzPack Directory = ${izpack-dist}" /> |
| 42 | + |
| 43 | + <condition property="found.izpack"> |
| 44 | + <available file="${izpack-dist}" /> |
| 45 | + </condition> |
| 46 | + |
| 47 | + <target name="izpack.OK" if="found.izpack"> |
| 48 | + <echo message="IzPack Directory = ${izpack-dist}" /> |
| 49 | + </target> |
| 50 | + |
| 51 | + <target name="izpack.check" depends="izpack.OK" unless="found.izpack"> |
| 52 | + <fail message="IzPack not found!${line.separator} *** Please download the latest IzPack release from https://izpack.org/downloads/ and install in the User home folder or ${line.separator}provide the program argument -DIZPACK_HOME in the Build Installer launch configuration to any custom IzPack install location you use. ${line.separator} *** Please see https://repast.github.io/docs/RepastReference/RepastReference.html#distribute-model for configuration notes."/> |
| 53 | + </target> |
| 54 | + |
| 55 | + <target name="BuildUserModelInstaller" if="repast.version" depends="repast.version.OK,repast.version.check,izpack.check"> |
34 | 56 |
|
35 | 57 | <!-- Location of the Eclipse /plugins folder -->
|
36 | 58 | <echo message="EclipsePluginsDirectory = ${EclipsePluginsDirectory}" />
|
37 |
| - |
| 59 | + |
38 | 60 | <!-- Search for the groovy-3.x-.jar -->
|
39 | 61 | <fileset dir="${EclipsePluginsDirectory}" id="groovy_jar">
|
40 | 62 | <filename name="**/groovy-3*.jar" />
|
|
43 | 65 | </not>
|
44 | 66 | <not>
|
45 | 67 | <filename name="**/groovy-3*-javadoc.jar" />
|
46 |
| - </not> |
| 68 | + </not> |
47 | 69 | </fileset>
|
48 |
| - |
| 70 | + |
49 | 71 | <!-- Relative path of groovy jar in the Eclipse plugins dir-->
|
50 | 72 | <property name="groovy_plugin_jar_path" refid="groovy_jar" />
|
51 |
| - |
| 73 | + |
52 | 74 | <!-- Absolute path of groovy jar -->
|
53 | 75 | <property name="GroovyJarLocation" value="${EclipsePluginsDirectory}/${groovy_plugin_jar_path}" />
|
54 | 76 | <echo message="GroovyJarLocation = ${GroovyJarLocation}" />
|
55 | 77 |
|
56 | 78 | <!-- Base groovy jar file name -->
|
57 | 79 | <basename property="Groovy_Jar" file="${groovy_plugin_jar_path}"/>
|
58 | 80 | <echo message="Groovy_Jar = ${Groovy_Jar}" />
|
59 |
| - |
| 81 | + |
60 | 82 | <!-- A hidden staging dirctory to store the install files that will be deleted at cleanup -->
|
61 | 83 | <property name="StagingArea" value="./.temp/DEPONS" />
|
62 | 84 | <property name="StagingOptionalArea" value="./.temp" />
|
|
88 | 110 |
|
89 | 111 | <chmod perm="+x" file="${StagingArea}/installer/start_model.command" />
|
90 | 112 |
|
91 |
| - |
92 | 113 | <copy file="installer/installation_components.xml" tofile="${StagingArea}/installation_components_temp.xml" />
|
93 | 114 |
|
94 | 115 | <replace file="${StagingArea}/installation_components_temp.xml">
|
|
103 | 124 |
|
104 | 125 | <!-- Run IzPack -->
|
105 | 126 | <echo message="Creating the installation file..." />
|
106 |
| - |
107 |
| - <property name="izpack-dist" value="${EclipsePluginsDirectory}/repast.simphony.eclipse_${REPAST_VERSION}/setupfiles/IzPack" /> |
108 |
| - <echo message="IzPack Directory = ${izpack-dist}" /> |
109 |
| - |
110 | 127 | <property name="izpack-installer" value="setup.jar"/>
|
111 |
| - |
| 128 | + |
112 | 129 | <path id="lib.path">
|
113 |
| - <fileset dir="${izpack-dist}/lib" includes="*.jar"/> |
| 130 | + <fileset dir="${izpack-dist}/lib" includes="*.jar"/> |
114 | 131 | </path>
|
115 |
| - |
| 132 | + |
116 | 133 | <taskdef name="izpack"
|
117 | 134 | classname="com.izforge.izpack.ant.IzPackTask"
|
118 | 135 | classpathref="lib.path"
|
119 | 136 | />
|
120 |
| - |
| 137 | + |
121 | 138 | <izpack input="${StagingArea}/installation_components_temp.xml"
|
122 | 139 | output="${outputInstallationFile}"
|
123 | 140 | installerType="standard"
|
124 | 141 | basedir="."
|
125 | 142 | izPackDir="${izpack-dist}"/>
|
126 |
| - |
| 143 | + |
127 | 144 | <!-- Clear the temporary staging area -->
|
128 | 145 | <echo message="Clearing the temporary staging area..." />
|
129 | 146 | <delete includeemptydirs="true" quiet="true">
|
|
0 commit comments