Reputation: 1482
I'm upgrading an RCP from x32 to x64.
I'm able to export the product from within Eclipse without any issues but when I try to export it via my automatic build it doesn't work and gives me the following error:
Eclipse_3_7_64Bit\plugins\org.eclipse.pde.build_3.7.0.v20111116-2009\scripts\productBuild\productBuild.xml:69: Unable to find plug-in: org.eclipse.equinox.launcher.win32.win32.x86_0.0.0. Please check the error log for more details.
As far as I understand the build is looking for the x32 version of the plugin when it should instead look for the x64 version.
I also read here that I should add this
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
Either I did something wrong or it doesn't work.
This is the command I use to start the build (Works fine for x32 builds):
""%JavaHome%\bin\java" -jar "%ECLIPSE_LOCATION%\plugins\org.eclipse.equinox.launcher_1.2.0.v20110502.jar" -application org.eclipse.ant.core.antRunner -f "%BUILD_SOURCE%\com.company.myproduct.rcp.setup\scripts\build.xml""
Note that I search replaced company and product information!
Build.xml
<project name="com.mytest.myproduct.rcp.build" default="buildFull">
<property file="build.properties" />
<!--
PDE Build for Company Myproduct
init step
Create Build directories and copy all plugins and features
-->
<target name="init">
<property name="resPath" location="${ant.file}/../../resources"/>
<mkdir dir="${buildDirectory}" />
<mkdir dir="${buildDirectory}/plugins" />
<mkdir dir="${buildDirectory}/features" />
<!-- Default Plugins -->
<copy todir="${buildDirectory}/plugins">
<fileset dir="../..">
<include name="**" />
<exclude name="*/bin/" />
<exclude name="*.feature/**" />
<exclude name="*.lck" />
</fileset>
</copy>
<!-- Mobile Plugins -->
<copy todir="${buildDirectory}/plugins">
<fileset dir="../../../Company_myproduct_mobile">
<include name="**" />
<exclude name="*/bin/" />
<exclude name="*.feature/**" />
<exclude name="*.lck" />
</fileset>
</copy>
<!-- Features -->
<copy todir="${buildDirectory}/features">
<fileset dir="../..">
<include name="*.feature/**" />
</fileset>
</copy>
</target>
<!--
Start PDE Build
-->
<target name="pde-build">
<java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${eclipseLocation}/plugins/org.eclipse.pde.build_${pdeBuildPluginVersion}/scripts/productBuild/productBuild.xml" />
<arg value="-Dtimestamp=${timestamp}" />
<classpath>
<pathelement location="${eclipseLocation}/plugins/org.eclipse.equinox.launcher_${equinoxLauncherPluginVersion}.jar" />
</classpath>
</java>
</target>
<!--
Clean Build directory
-->
<target name="clean">
<!-- <delete dir="${buildDirectory}" /> -->
</target>
<target name="build" depends="clean, init, pde-build" />
<!-- =================================
target: buildFull
================================= -->
<target name="buildFull" depends="build" description="Builds until executable version is available">
<available file="${buildDirectory}/${buildLabel}/${buildId}-${baseos}.${basews}.${basearch}.zip" property="buildZipOK"/>
<antcall target="unzipBuildOutputAndCopyExe"/>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: unzipBuildOutput
- - - - - - - - - - - - - - - - - -->
<target name="unzipBuildOutputAndCopyExe" if="buildZipOK">
<!-- unzip file -->
<unzip src="${buildDirectory}/${buildLabel}/${buildId}-${baseos}.${basews}.${basearch}.zip" dest="${buildDirectory}/${buildLabel}/${buildId}-${baseos}.${basews}.${basearch}"/>
<copy file="${resPath}/Company Myproduct.exe_" tofile="${buildDirectory}/${buildLabel}/${buildId}-${baseos}.${basews}.${basearch}/${archivePrefix}/Company Myproduct.exe"></copy>
</target>
</project>
productBuild.xml
<project name="Build a Product" default="main">
<!-- ===================================================================== -->
<!-- Global properties. See the build.properties for information on -->
<!-- the properties which callers can control. -->
<!-- ===================================================================== -->
<property name="allElementsFile" value="${eclipse.pdebuild.scripts}/productBuild/allElements.xml"/>
<import file="${eclipse.pdebuild.scripts}/build.xml"/>
<property name="pluginPath" value=""/>
<property name="pluginList" value=""/>
<property name="featureList" value=""/>
<property name="includeLaunchers" value="true"/>
<property name="generatedBuildProperties" value=""/>
<condition property="nestedInclusions" value="true">
<istrue value="${p2.gathering}" />
</condition>
<!-- ===================================================================== -->
<!-- main entry point to setup, fetch, generate, build etc. Use -->
<!-- the customTargets.xml to modify the build behaviour. -->
<!-- ===================================================================== -->
<target name="main" description="the main build target">
<antcall target="preBuild" />
<antcall target="processRepos"/>
<antcall target="generateFeature"> <!-- Generate the feature to drive the fetch -->
<param name="verify" value="false"/>
</antcall>
<antcall target="fetch" />
<antcall target="generateFeature"> <!-- We are calling generate feature a second time so that we can get the pack / unpack clause fixed -->
<param name="verify" value="true"/>
</antcall>
<antcall target="generate" />
<antcall target="process" />
<antcall target="assemble" />
<antcall target="package" />
<antcall target="postBuild" />
</target>
<!-- ===================================================================== -->
<!-- Generate a container feature based on the product file -->
<!-- The plugin or feature containing the .product file will need to exist -->
<!-- already, use preSetup or postSetup to fetch it if necessary -->
<!-- ===================================================================== -->
<target name="generateFeature">
<eclipse.generateFeature
featureId="org.eclipse.pde.build.container.feature"
buildDirectory="${buildDirectory}"
baseLocation="${baseLocation}"
productFile="${product}"
verify="${verify}"
pluginPath="${transformedRepoLocation}${path.separator}${pluginPath}"
configInfo="${configs}"
pluginList="${pluginList}"
featureList="${featureList}"
includeLaunchers="${includeLaunchers}"
buildPropertiesFile="${generatedBuildProperties}"
nestedInclusions="${nestedInclusions}"
filterP2Base="${filterP2Base}"
/>
</target>
</project>
allElements.xml
<project name="Product Build allElements Delegator">
<property name="defaultAssemblyEnabled" value="true" />
<property name="archiveNamePrefix" value="${buildId}"/>
<!-- ===================================================================== -->
<!-- Run a given ${target} on all elements being built -->
<!-- Add on <ant> task for each top level element being built. -->
<!-- ===================================================================== -->
<target name="allElementsDelegator">
<ant antfile="${genericTargets}" target="${target}">
<property name="type" value="feature" />
<property name="id" value="org.eclipse.pde.build.container.feature" />
</ant>
</target>
<!-- ====================================================================== -->
<!-- The default assemble target, this will be called to assemble each -->
<!-- config if a custom assemble target is not defined. -->
<!-- The following properties will be defined: -->
<!-- config : The configuration being assembled eg "win32.win32.x86" -->
<!-- element: The element being assembled eg "org.eclipse.sdk" -->
<!-- assembleScriptName: The assemble script to be called -->
<!-- ====================================================================== -->
<target name="defaultAssemble">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-${config}.zip"/>
</ant>
</target>
<!-- ===================================================================== -->
<!-- Targets to assemble the built elements for particular configurations -->
<!-- These generally call the generated assemble scripts (named in -->
<!-- ${assembleScriptName}) but may also add pre and post processing -->
<!-- Add one target for each root element and each configuration -->
<!-- ===================================================================== -->
<target name="assemble.org.eclipse.pde.build.container.feature">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.win32.win32.x86" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.win32.win32.x86">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-win32.win32.x86.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.win32.win32.x86_64" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.win32.win32.x86_64">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-win32.win32.x86_64.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.ppc" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.ppc">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-linux.gtk.ppc.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86_64" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.linux.gtk.x86_64">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-linux.gtk.x86_64.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.linux.motif.x86" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.linux.motif.x86">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-linux.motif.x86.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.solaris.motif.sparc" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.solaris.motif.sparc">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-solaris.motif.sparc.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.solaris.gtk.sparc" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.solaris.gtk.sparc">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-solaris.gtk.sparc.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.aix.motif.ppc" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.aix.motif.ppc">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-aix.motif.ppc.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.hpux.motif.PA_RISC" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.hpux.motif.PA_RISC">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-hpux.motif.PA_RISC.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.ppc" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.ppc">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.ppc.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.x86" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.macosx.carbon.x86">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-macosx.carbon.x86.zip"/>
</ant>
</target>
<property name="assemble.org.eclipse.pde.build.container.feature.group.group.group" value="true" />
<target name="assemble.org.eclipse.pde.build.container.feature.group.group.group">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
<property name="archiveName" value="${archiveNamePrefix}-group.zip"/>
</ant>
</target>
</project>
build.properties
# Version of org.ecilpse.pdebuild
pdeBuildPluginVersion=3.7.0.v20111116-2009
# Version of org.eclipse.equinox.launcher
equinoxLauncherPluginVersion=1.2.0.v20110502
# ProductVersion
productVersion=00.00Test0
############# BASE LOCATION #########################
#
# Specify the directory of the base under which your
# your build target is located. This directory should
# contain the RCP Runtime Binary that you want to
# compile against.
#
#####################################################
base=//server/Eclipse/Eclipse_3_7_64Bit
############# ECLIPSE LOCATION ######################
#
# Specify the directory of the Eclipse installation
# that will be used to execute PDE Build.
#
#####################################################
eclipseLocation=//server/Eclipse/Eclipse_3_7_64Bit
############# PRODUCT/PACKAGING CONTROL #############
product=/ com.mytest.myproduct.rcp/myProduct.product
runPackager=false
#Set the name of the archive that will result from the product build.
#archiveNamePrefix=
# The prefix that will be used in the generated archive.
archivePrefix=MyProduct
# The location underwhich all of the build output will be collected.
collectingFolder=${archivePrefix}
# The list of {os, ws, arch} configurations to build. This
# value is a '&' separated list of ',' separate triples. For example,
# configs=win32,win32,x86 & linux,motif,x86
# By default the value is *,*,*
#configs = *, *, *
configs=win32,win32,x86_64
##& \
# linux, gtk, ppc &\
# linux, gtk, x86 & \
# linux, gtk, x86_64 & \
# linux, motif, x86 & \
# solaris, motif, sparc & \
# solaris, gtk, sparc & \
# aix, motif, ppc & \
# hpux, motif, PA_RISC & \
# macosx, carbon, ppc
# By default PDE creates one archive (result) per entry listed in the configs property.
# Setting this value to try will cause PDE to only create one output containing all
# artifacts for all the platforms listed in the configs property.
#groupConfigurations=true
#The format of the archive. By default a zip is created using antZip.
#The list can only contain the configuration for which the desired format is different than zip.
#archivesFormat=win32, win32, x86 - antZip& \
# linux, gtk, ppc - antZip &\
# linux, gtk, x86 - antZip& \
# linux, gtk, x86_64 - antZip& \
# linux, motif, x86 - antZip& \
# solaris, motif, sparc - antZip& \
# solaris, gtk, sparc - antZip& \
# aix, motif, ppc - antZip& \
# hpux, motif, PA_RISC - antZip& \
# macosx, carbon, ppc - antZip
#Set to true if you want the output to be ready for an update jar (no site.xml generated)
#outputUpdateJars = false
#Set to true for Jnlp generation
#codebase should be a URL that will be used as the root of all relative URLs in the output.
#generateJnlp=false
#jnlp.codebase=<codebase url>
#jnlp.j2se=<j2se version>
#jnlp.locale=<a locale>
#jnlp.generateOfflineAllowed=true or false generate <offlineAllowed/> attribute in the generated features
#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built
#Set to true if you want to sign jars
#signJars=false
#sign.alias=<alias>
#sign.keystore=<keystore location>
#sign.storepass=<keystore password>
#Arguments to send to the zip executable
zipargs=
#Arguments to send to the tar executable
tarargs=
#Control the creation of a file containing the version included in each configuration - on by default
generateVersionsLists=false
############## BUILD NAMING CONTROL ################
# The directory into which the build elements are fetched and where
# the build takes place.
buildDirectory=D:/ccviews/.MyProduct2_CR_0065098_Dev/Java/build_00.00Test0
# Type of build. Used in naming the build output. Typically this value is
# one of I, N, M, S, ...
buildType=R
# ID of the build. Used in naming the build output.
buildId=MyProductbuild
# Label for the build. Used in naming the build output
buildLabel=build_output
# Timestamp for the build. Used in naming the build output
timestamp=007
#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
#The value will only be applied to plugin or features indicating build.properties, qualifier = context
#forceContextQualifier=Testi
#Enable / disable the generation of a suffix for the features that use .qualifier.
#The generated suffix is computed according to the content of the feature
#generateFeatureVersionSuffix=true
############# BASE CONTROL #############
# Settings for the base Eclipse components and Java class libraries
# against which you are building.
# Base location for anything the build needs to compile against. For example,
# in most RCP app or a plug-in, the baseLocation should be the location of a previously
# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
baseLocation=${eclipseLocation}
#Os/Ws/Arch/nl of the eclipse specified by baseLocation
baseos=win32
basews=win32
basearch=x86
#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
filteredDependencyCheck=false
#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :)
#a location is one of:
#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
#- a directory that contains a /plugins or /features subdirectory
#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
#pluginPath=
skipBase=true
eclipseURL=<url for eclipse download site>
eclipseBuildId=<Id of Eclipse build to get>
eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip
############# MAP FILE CONTROL ################
# This section defines CVS tags to use when fetching the map files from the repository.
# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
skipMaps=true
mapsRepo=:pserver:[email protected]/path/to/repo
mapsRoot=path/to/maps
mapsCheckoutTag=HEAD
#tagMaps=true
mapsTagTag=v${buildId}
############ REPOSITORY CONTROL ###############
# This section defines properties parameterizing the repositories where plugins, fragments
# bundles and features are being obtained from.
# The tags to use when fetching elements to build.
# By default thebuilder will use whatever is in the maps.
# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the
# overriding value
# For example fetchTag=CVS=HEAD, SVN=v20050101
# fetchTag=HEAD
skipFetch=true
############# JAVA COMPILER OPTIONS ##############
# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
#bootclasspath=${java.home}/lib/rt.jar
# specific JRE locations to compile against. These values are used to compile bundles specifying a
# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
#CDC-1.0/Foundation-1.0= /path/to/rt.jar
#CDC-1.1/Foundation-1.1=
#OSGi/Minimum-1.0=
#OSGi/Minimum-1.1=
#JRE-1.1=
#J2SE-1.2=
#J2SE-1.3=
#J2SE-1.4=
#J2SE-1.5=
#JavaSE-1.6=
#PersonalJava-1.1=
#PersonalJava-1.2=
#CDC-1.0/PersonalBasis-1.0=
#CDC-1.0/PersonalJava-1.0=
#CDC-1.1/PersonalBasis-1.1=
#CDC-1.1/PersonalJava-1.1=
# Specify the output format of the compiler log when eclipse jdt is used
logExtension=.log
# Whether or not to include debug info in the output jars
javacDebugInfo=false
# Whether or not to fail the build if there are compiler errors
javacFailOnError=true
# Enable or disable verbose mode of the compiler
javacVerbose=true
# Extra arguments for the compiler. These are specific to the java compiler being used.
#compilerArg=
# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
javacSource=1.6
# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
javacTarget=1.6
Upvotes: 1
Views: 1284
Reputation: 111142
The line
configs=win32, win32, x86
in your build properties specifies a Windows 32 bit build ('x86' means 32 bit).
Use
configs=win32, win32, x86_64
for 64 bit ('x86_64').
You will also need to specify a 64 bit Eclipse in the configuration.
Upvotes: 2