[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Way to automatically build for update site? [Solution!]

Thanks for this too! I am doing the exact same thing - I am also building an update site and a complete branded platform. I am basically done and have an update site and a large zipfile as my two outputs - however I use a hand-built runtime zipfile (with my config.ini placed in it) in a known location to start with. I still need to automate this step.

Mark.

nobody@xxxxxxxxxxx wrote:
Glad to hear you came up with a solution and thanks for
posting it. While you were working on that I too came
up with a solution.

In short it is
o in postFetch call the generated fetch script to get my site
  project.

o in assemble, instead of having the 'normal' call to ${assembleScriptName}
call the build.xml that was generated for my top level feature. The default target happens to be build.update.jar so all that is needed is params to indicate destination of the jars.


Below is my script.  Btw my goal is to product two things :
a.) an update site, and
b.) a branded product in a zip.

I mention this because the stuff labeled 'platform specific'
pertains to (b) and shouldn't be confused with the goals
we started with at the beginning of this discussion.
( Oh yeah, and the stuff for (b) isn't done yet either :) )

<project name='x' default='noDefault' basedir='.' >
<property name='cvs-root' value=':local:C:/home/test/anthill/test_repos/repos' />


<property name='feature-to-build' value='mycorp.myprod.eclipse.feature' />
<property name='updateDir' location='${buildDirectory}/update' />
<property name='updatePrj' value='mycorp.myprod.eclipse.update' />
<property name='updatePrjDir' location='${updateDir}/${updatePrj}' />
<target name='allElements'> <ant antfile='${genericTargets}' target='${target}' >
<property name='type' value='feature' />
<property name='id' value='${feature-to-build}' />
</ant>
</target>
<target name='getMapFiles' >
<property name='mapCvsRoot' value='${cvs-root}' />
<property name='mapVersionTag' value='HEAD' />
<cvs cvsRoot='${mapCvsRoot}'
package='studio/bld'
dest='${buildDirectory}/maps' />
</target>
<target name='preSetup' /> <target name='checkLocal' /> <target name='postSetup' /> <target name='preFetch' />


<target name='postFetch' > <mkdir dir='${updateDir}' />
<ant antfile='${buildDirectory}/fetch_${feature-to-build}.xml' dir='${updateDir}' target='getFromCVS'>
<property name='tag' value='HEAD'/>
<property name='destination' value='${updatePrj}'/>
<property name='quiet' value='${quiet}'/>
<property name='cvsRoot' value=':local:C:/home2/test/anthill/test_repos/repos'/>
<property name='package' value='studio/src/update/${updatePrj}'/>
<property name='fileToCheck' value='${updatePrjDir}/site.xml' />
</ant>
</target>


<target name='preGenerate' /> <target name='postGenerate' /> <target name='preProcess' /> <target name='postProcess' /> <target name='preAssemble' />

<target name='assemble.mycorp.myprod.eclipse.feature' >
<property name='plugin.destination' location='${updatePrjDir}/plugins' />
<property name='feature.destination' location='${updatePrjDir}/features' />
<mkdir dir='${plugin.destination}' />
<mkdir dir='${feature.destination}' />
<ant antFile='${buildDirectory}/features/${feature-to-build}/build.xml' dir='${buildDirectory}/features/${feature-to-build}' />


<!-- rest of this stuff should be moved into platform specific target -->
<property name='feature.base' location='${buildDirectory}/tmp' />
<property name='arch' value='*' />
<property name='ws' value='*' />
<property name='nl' value='*' />
<property name='os' value='*' />
<property name='include.children' value='true' />
<ant antFile='${buildDirectory}/features/${feature-to-build}/build.xml' target='gather.bin.parts' dir='${buildDirectory}/features/${feature-to-build}' />


<copy todir='${feature.base}' includeEmptyDirs='false' >
<fileset dir='${baseLocation}' >
<patternset includes='*' />
</fileset>
</copy>
<copy todir='${feature.base}/plugins' >
<fileset dir='${baseLocation}/plugins' />
</copy>
<copy todir='${feature.base}/features' >
<fileset dir='${baseLocation}/features' />
</copy>
<copy todir='${feature.base}/readme' >
<fileset dir='${baseLocation}/readme' />
</copy>


<property name='archive-dir' location='${buildDirectory}/${buildLabel}' />
<mkdir dir='${archive-dir}' />
<zip destfile='${archive-dir}/myprod-${buildId}.zip' basedir='${feature.base}' />
</target>


<target name='postAssemble' /> <target name='postBuild' /> </project>

-- d