Skip to main content
summaryrefslogtreecommitdiffstats
blob: bcbae13aa7e3d69a077766c981b8f4090651a188 (plain) (blame)
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
<project name="Customize OSEE OTE Master Product" default="run">

	<!-- *************************************************************** -->
	<!-- MAIN RUN -->
	<!-- *************************************************************** -->
	<target name="run">
		<echo>Customize OSEE OTE Master Product</echo>
		<echo>Product-Name: [${product-name}]</echo>
		<echo>Archive-Name: [${zip-product-name}]</echo>
		<echo>Products-Path: [${products-directory}]</echo>
		<echo>Output-Path: [${output-directory}]</echo>
		<echo>Resources-Path: [${resources-directory}]</echo>
		<echo />

		<property name="defaultWorkspaceName" value="workspace" />
		<property name="additionalExecIniArgs" value=" " />

		<updateProduct os="win32" ws="win32" arch="x86" jreVersion="1.6.0_31" />
		<updateProduct os="win32" ws="win32" arch="x86_64" jreVersion="1.6.0_31" />
		<updateProduct os="linux" ws="gtk" arch="x86" jreVersion="1.6.0_33" />
		<updateProduct os="linux" ws="gtk" arch="x86_64" jreVersion="1.6.0_30" />
		<updateProduct os="macosx" ws="cocoa" arch="x86_64" jreVersion="_" />

		<!-- 
		<updateProduct os="solaris" ws="gtk" arch="sparc" jreVersion="1.6.0_24" />
		<updateProduct os="macosx" ws="carbon" arch="x86" jreVersion="_" />
		<updateProduct os="macosx" ws="cocoa" arch="x86" jreVersion="_" /> 
		-->
	</target>

	<!-- *************************************************************** -->
	<!-- MAIN RUN -->
	<!-- *************************************************************** -->
	<macrodef name="updateProduct">
		<attribute name="os" />
		<attribute name="ws" />
		<attribute name="arch" />
		<attribute name="jreVersion" />
		<sequential>
			<var name="productPath" value="${products-directory}/${product-name}/@{os}/@{ws}/@{arch}" />
			<var name="productConfigPath" value="${productPath}/configuration" />
			<var name="productPluginPath" value="${productPath}/plugins" />
			<var name="productEtcPath" value="${productPath}/etc" />
			
			<mkdir dir="${productEtcPath}" />
			<copy todir="${productEtcPath}">
				<fileset dir="${etc-content-directory}" />
			</copy>

			<!-- Add JRE 
			<if>
				<equals arg1="@{os}" arg2="macosx" />
				<then> -->
					<!-- NO JRE for MACOSX -->
			<!--		</then>
				<else>
					<var name="jreResource" value="${resources-directory}/../jres/jre_@{jreVersion}_@{os}_@{arch}.zip" />
					<unzip src="${jreResource}" dest="${productPath}" />
					<chmod perm="ugo+x" dir="${productPath}/jre" includes="**/*" />
				</else>
			</if>
			-->
			
			<!-- Update Configuration Area 
			<delete dir="${productConfigPath}/.settings" failonerror="false" quiet="true" />
			<delete dir="${productConfigPath}/org.eclipse.update" failonerror="false" quiet="true" />
			<mkdir dir="${productConfigPath}/.settings" />
			<copy file="${resources-directory}/org.eclipse.core.net.prefs" tofile="${productConfigPath}/.settings/org.eclipse.core.net.prefs" overwrite="true" />
-->
			<!-- Update Configuration INI 
			<customizeConfigIni configpath="${productConfigPath}" pluginspath="${productPluginPath}" configarch="@{arch}" />
-->
			<!-- Extra Launches 
			<generateExecutable os="@{os}" productDir="${productPath}" execName="oseeDebug" eclipseArgs="-console${line.separator}-consoleLog" extravmargs="-Xmx1G${line.separator}-Xdebug${line.separator}-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009" additionalVmArgs="-Dosee.default.broker.uri=tcp://osee-installs.msc.az.boeing.com:61616${line.separator}${additionalExecIniArgs}" />
			<generateExecutable os="@{os}" productDir="${productPath}" execName="oseeBigMemory" eclipseArgs="-console${line.separator}-consoleLog" extravmargs="-Xmx2G${line.separator}" additionalVmArgs="-Dosee.default.broker.uri=tcp://osee-installs.msc.az.boeing.com:61616${line.separator}${additionalExecIniArgs}" />
-->
			<!-- Copy Icon if Win32 
			<if>
				<equals arg1="@{os}" arg2="win32" />
				<then>
					<copy file="${resources-directory}/../icons/win32/osee.ico" tofile="${productPath}/OSEE.ico" />
				</then>
			</if>
-->
			<!-- Zip Product -->
			<var name="productZipName" value="${products-directory}/${product-name}-@{os}.@{ws}.@{arch}.zip" />
			<var name="productTarName" value="${products-directory}/${product-name}-@{os}.@{ws}.@{arch}.tar" />
			<if>
				<equals arg1="@{os}" arg2="win32" />
				<then>
					<zip destfile="${productZipName}" basedir="${productPath}" update="true" />
				</then>
				<else>
					<tar destfile="${productTarName}" basedir="${productPath}" longfile="gnu" />
					<gzip src="${productTarName}" destfile="${productTarName}.gz" />
					<delete file="${productTarName}" quiet="true" />
				</else>
			</if>
		</sequential>
	</macrodef>


</project>

Back to the top