-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimported.xml
243 lines (207 loc) · 10.1 KB
/
imported.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<project name="asterics.imported" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<property environment="env"></property>
<property name="APE.propertiesFile" value="APE.properties"></property>
<property name="APE.optionalServicesFile" value="" />
<!-- defines the repository root directory -->
<property name="P4AllBuildingBlocks.dir" value="${ant.file.asterics.imported}/.."></property>
<!-- Please override the ARE.baseURI path to your ARE installation, if it is not located at one of the default paths
1) ${env.ProgramFiles(x86)}\AsTeRICS\ARE\ location, if AsTeRICS >= 2.8 is installed
2) or the parallel folder AsTeRICS
-->
<!--
<property name="ARE.baseURI" value="D:\AsTeRICS\AsTeRICS_master\bin\ARE\"> </property>
-->
<!-- set default value of ARE.baseURI, if it was not overridden above, to
1) ${env.ProgramFiles(x86)}\AsTeRICS\ARE\ location, if AsTeRICS >= 2.8 is installed
2) or the parallel folder AsTeRICS -->
<available file="${env.ProgramFiles(x86)}\AsTeRICS\APE\APE.jar" property="asterics.installed"></available>
<condition property="ARE.baseURI" value="${env.ProgramFiles(x86)}\AsTeRICS\ARE\">
<and>
<isset property="asterics.installed" />
<not>
<isset property="ARE.baseURI" />
</not>
</and>
</condition>
<condition property="ARE.baseURI" value="${P4AllBuildingBlocks.dir}/../AsTeRICS/bin/ARE/">
<not>
<isset property="ARE.baseURI" />
</not>
</condition>
<loadproperties srcFile="${APE.propertiesFile}" />
<echo message="Using ARE.baseURI: ${ARE.baseURI}"/>
<!-- set default value of prop -->
<property name="fx.deploy.verbose" value="false"/>
<condition property="APE.buildDir" value="build/">
<not>
<isset property="APE.buildDir" />
</not>
</condition>
<property name="build.merged" location="${APE.buildDir}/merged" />
<property name="build.merged.ARE" location="${build.merged}/bin/ARE" />
<property name="build.deploy" location="${APE.buildDir}/deploy" />
<!--
Define os.name for Bundle-NativeCode statement in MANIFEST of plugins:
As on Windows the alias os.name (win32) is not correctly matched, we have to manually define the property
so that the native bundles start on windows 10.
@see https://github.com/asterics/AsTeRICS/issues/17
Note: Maybe we should also set the alias for Linux and Mac manually, because here we hardcode the
runtime os.name at build time. So the os.names could actually differ, although according to the list of os.names
(https://www.osgi.org/developer/specifications/reference/)
for Linux there is only 1 name and for Mac OSX also.
-->
<condition property="org.osgi.framework.os.name" value="win32" else="${os.name}">
<os family="windows" />
</condition>
<!-- the build platform is actually also the target platform, so we can differ the services files configuration -->
<condition property="APE.isWindows">
<os family="windows" />
</condition>
<condition property="APE.isLinux">
<and>
<os family="unix" />
<not>
<os family="mac"/>
</not>
</and>
</condition>
<condition property="APE.isMacOSX">
<os family="mac" />
</condition>
<condition property="APE.targetOS" value="windows">
<os family="windows" />
</condition>
<condition property="APE.targetOS" value="linux">
<and>
<os family="unix" />
<not>
<os family="mac"/>
</not>
</and>
</condition>
<condition property="APE.targetOS" value="macosx">
<os family="mac" />
</condition>
<!-- create platform dependent property value for services startup when starting the ARE -->
<property name="APE.servicesFiles" value="${APE.optionalServicesFile}" />
<!-- if property is not set, set it to false -->
<condition property="APE.embedJava" value="false">
<not>
<isset property="APE.embedJava" />
</not>
</condition>
<!-- if fx.platform.basedir is not set, java.home will be used as platform -->
<condition property="fx.platform.basedir" value="${java.home}">
<not>
<isset property="fx.platform.basedir" />
</not>
</condition>
<!-- only if APE.embedJava=true the JRE of the configured platform.basedir will be embedded -->
<condition property="APE.embedJava.fx.platform.basedir" value="${fx.platform.basedir}" else="">
<istrue value="${APE.embedJava}"/>
</condition>
<!-- in case of embeddedjava add a postfix to the application name -->
<condition property="APE.fx.deploy.outfile" value="${fx.application.name}-javaembedded" else="${fx.application.name}">
<istrue value="${APE.embedJava}"/>
</condition>
<!-- if ARE.baseURI is not set assume that APE is located in the parent folder of basedir -->
<condition property="APE.baseURI" else="${ARE.baseURI}../APE/" value="${basedir}/../">
<not>
<isset property="ARE.baseURI" />
</not>
</condition>
<!--
<echoproperties>
</echoproperties>
-->
<target name="clean">
<delete includeemptydirs="true" dir="${APE.buildDir}/">
</delete>
<delete includeemptydirs="true" dir="tmp/">
</delete>
</target>
<target name="init-fx-tasks">
<path id="fxant">
<filelist>
<file name="${java.home}\..\lib\ant-javafx.jar" />
<file name="${java.home}\lib\jfxrt.jar" />
<file name="${basedir}" />
</filelist>
</path>
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml" uri="javafx:com.sun.javafx.tools.ant" classpathref="fxant" />
</target>
<target name="cleanup">
<delete dir="${build.deploy}" failonerror="false" />
<delete dir="${build.merged.ARE}" failonerror="false"/>
</target>
<target name="setup-staging-area">
<mkdir dir="${build.deploy}" />
<delete failonerror="false">
<fileset dir="${build.merged.ARE}" includes="**/*.log" />
</delete>
<delete failonerror="false">
<fileset dir="${build.merged.ARE}/profile/org.eclipse.osgi" />
</delete>
</target>
<!-- calls the javafx deployment tasks and creates the requested installers -->
<target name="make-installer-only" depends="init-fx-tasks">
<fx:resources id="appRes">
<fx:fileset dir="${build.merged.ARE}" />
<fx:fileset dir="${build.merged.ARE}" type="license" includes="LICENSE" />
</fx:resources>
<fx:application id="fxApplication" name="${fx.application.name}" mainClass="org.eclipse.core.runtime.adaptor.EclipseStarter" version="${fx.application.version}" toolkit="swing" />
<fx:deploy verbose="${fx.deploy.verbose}" embedJNLP="false" extension="false" includeDT="false" offlineAllowed="true" outdir="${build.deploy}" outfile="${fx.application.name}" nativeBundles="${fx.deploy.nativeBundles}" updatemode="background">
<fx:preferences shortcut="${fx.preferences.shortcut}" install="${fx.preferences.install}" menu="${fx.preferences.menu}" />
<fx:platform basedir="${APE.embedJava.fx.platform.basedir}">
<property name="osgi.configuration.area" value="profile" />
<property name="osgi.clean" value="true" />
<property name="org.osgi.framework.bootdelegation" value="*" />
<property name="org.osgi.framework.system.packages.extra" value="sun.misc" />
<property name="Ansi" value="true" />
<property name="java.util.logging.config.file" value="logging.properties" />
<!--
<property name="eu.asterics.ARE.startModel" value="autostart.acs" />
-->
<property name="eu.asterics.ARE.ServicesFiles" value="${APE.servicesFiles}" />
<property name="org.osgi.framework.os.name" value="${org.osgi.framework.os.name}"/>
</fx:platform>
<fx:application refId="fxApplication" />
<fx:resources refid="appRes" />
<fx:info title="${fx.info.title}" vendor="${fx.info.vendor}" description="${fx.info.description}" license="${fx.info.license}" category="${fx.info.category}" />
</fx:deploy>
<!-- Finally, rename the outfile in the case of APE.embedJava=true.
This is a dirty solution but it is needed because the fx:deploy.outfile attribute does not work as expected
-->
<subant target="make-installer-only-windows" buildpath="." antfile="build.xml"/>
<subant target="make-installer-only-linux" buildpath="." antfile="build.xml"/>
<subant target="make-installer-only-macosx" buildpath="." antfile="build.xml"/>
</target>
<target name="make-installer-only-windows" if="APE.isWindows">
<move verbose="true" failonerror="false" file="${build.deploy}/bundles/${fx.application.name}-${fx.application.version}.exe" tofile="${build.deploy}/bundles/${APE.fx.deploy.outfile}-${fx.application.version}.exe"/>
<move verbose="true" failonerror="false" file="${build.deploy}/bundles/${fx.application.name}-${fx.application.version}.msi" tofile="${build.deploy}/bundles/${APE.fx.deploy.outfile}-${fx.application.version}.msi"/>
</target>
<target name="make-installer-only-linux" if="APE.isLinux">
<move verbose="true" failonerror="false" file="${build.deploy}/bundles/${fx.application.name}-${fx.application.version}.deb" tofile="${build.deploy}/bundles/${APE.fx.deploy.outfile}-${fx.application.version}.deb"/>
<move verbose="true" failonerror="false" file="${build.deploy}/bundles/${fx.application.name}-${fx.application.version}-1.i386.rpm" tofile="${build.deploy}/bundles/${APE.fx.deploy.outfile}-${fx.application.version}-1.i386.rpm"/>
</target>
<target name="make-installer-only-macosx" if="APE.isMacOSX">
<move verbose="true" failonerror="false" file="${build.deploy}/bundles/${fx.application.name}-${fx.application.version}.dmg" tofile="${build.deploy}/bundles/${APE.fx.deploy.outfile}-${fx.application.version}.dmg"/>
<move verbose="true" failonerror="false" file="${build.deploy}/bundles/${fx.application.name}-${fx.application.version}.pkg" tofile="${build.deploy}/bundles/${APE.fx.deploy.outfile}-${fx.application.version}.pkg"/>
</target>
<!-- call APE tool from build script to copy AsTeRICS resources to ${build.merged.ARE} -->
<target name="APE-copy">
<java jar="${APE.baseURI}/APE.jar" fork="true">
<sysproperty key="APE.projectDir" value="${basedir}"/>
</java>
<!-- fix cr and lf and set execution permissions -->
<fixcrlf srcdir="${build.merged.ARE}" includes="*.sh"/>
<chmod dir="${build.merged.ARE}" includes="*.sh" perm="ugo+rx"/>
</target>
<target name="copy-custom-files-for-bundle">
<copy todir="${P4All.mergedCustomDir}" overwrite="yes" verbose="true">
<fileset dir="custom" excludes="bin/ARE/profile/">
<exclude name="bin/ARE/models/*.acs"/>
</fileset>
</copy>
</target>
</project>