Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Platform-releng-addplatform
How to add a platform to the Eclipse Project build
This information is inaccurate - needed be updated
For example, see bug 256459
Update RCP feature
To add a platform to the build, the SWT and Equinox teams will have to first contribute fragments to the build. The SWT team will commit fragments similar to org.eclipse.swt.macosx.cocoa.x86_64 cvs and Equinox team will commit a launcher fragment such as org.eclipse.equinox.launcher.macosx.cocoa.x86_64 so the operating specific content for the new platform is included in the build. Once they are available in CVS, and have been contributed to the org.eclipse.releng/maps project, the rcp feature can be updated with the new fragments. For example,
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" os="macosx" ws="cocoa" arch="x86_64" download-size="0" install-size="0" version="0.0.0" fragment="true" unpack="false"/> <plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64" os="macosx" ws="cocoa" arch="x86_64" download-size="0" install-size="0" version="0.0.0" fragment="true"/>
The build.properties for the rcp feature also needs to be updated to include the links to the launcher and the eclipse executable.
root.macosx.cocoa.x86_64=../../features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64 root.macosx.cocoa.x86_64.link=Eclipse.app/Contents/MacOS/eclipse,eclipse root.macosx.cocoa.x86_64.permissions.755=Eclipse.app/Contents/MacOS/eclipse,Eclipse.app/Contents/MacOS/java_swt
Update master-root feature
The master root feature's build.properties needs to be updated to include the new platform.
launcher-macosx, cocoa, x86_64& \ \ sdk-macosx, cocoa, x86_64 & \ \ platform-macosx, cocoa, x86_64 & \ \ rcp-macosx, cocoa, x86_64 & \
The build.properties for the master root feature also needs to be updated to point to the locations where the root files are to be copied from. If this is omitted, the config.ini, eclipse.ini are missing and this means provisioning with the director will fail.
root.launcher-macosx.cocoa.x86_64=\ ../../features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64 root.sdk-macosx.cocoa.x86_64=\ ../../features/org.eclipse.sdk/macosx.cocoa root.platform-macosx.cocoa.x86_64=\ ../../features/org.eclipse.platform/macosx.cocoa root.equinox-launcher-macosx.cocoa.x86_64=\ ../../features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64,\ ../../features/org.eclipse.rcp/rootfiles
Update platform feature
The platform feature needs to have it's build properties update to reflect the root file locations
root.macosx.cocoa.x86_64=macosx.cocoa,../../features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64 root.macosx.cocoa.x86_64.link=Eclipse.app/Contents/MacOS/eclipse,eclipse root.macosx.cocoa.x86_64.permissions.755=Eclipse.app/Contents/MacOS/eclipse,Eclipse.app/Contents/MacOS/java_swt
Update SDK feature
As does the sdk feature
root.macosx.cocoa.x86_64=macosx.cocoa
Update org.eclipse.releng.eclipsebuilder
The major remaining changes are in the org.eclipse.releng.eclipsebuilder project. This project contains all the build.properties and associated ant scripts that serve as input to pde build. The most fundamental process in the Eclipse Platform build is to build the master-feature that contains all the plugins, fragments and features that are consumed in the build. Once this master feature is built, we copy it to the eclipse.org foundation servers for signing. To include a new platform in the master feature, we update the rcp feature, with the new SWT and Equinox fragments.
Update platform specific builders and packaging files
The build.properties for the master feature is updated include the new configuration to be built (org.eclipse.releng.eclipsebuilder\eclipse\buildConfigs\master\build.properties)
configs=\... macosx, cocoa, x86_64 & \ ...
This feature is grouped so you don't need to specify the archive format
archivesFormat=group,group,group-zip
For the master-root, you will need to update the build.properties as follows to build the new master root features. The master root features is used to files in the build that aren't included in plugins, fragments or features such as license files. (Note - need to denote the additional parts are provided by p2)
)... launcher-macosx, cocoa, x86_64-zip& \ ... sdk-macosx, cocoa, x86_64-zip& \ ... platform-macosx, cocoa, x86_64-zip&\
You'll also need to update the customtargets.xml (Note: Could update to allElements.xml) to use build the master-root targets. Again, the for new cocoa port example
<target name="assemble.master-root.launcher-macosx.cocoa.x86_64"> <property name="archiveName" value="master-root-launcher-macosx.cocoa.x86_64.${buildId}.zip" /> <antcall target="assemble" /> </target> <target name="assemble.master-root.sdk-macosx.cocoa.x86_64"> <property name="archiveName" value="master-root-sdk-macosx.cocoa.x86_64.${buildId}.zip" /> <antcall target="assemble" /> </target> <target name="assemble.master-root.platform-macosx.cocoa.x86_64"> <property name="archiveName" value="master-root-platform-macosx.cocoa.x86_64.${buildId}.zip" /> <antcall target="assemble" /> </target>
The next step is to update the build.properties and customTargets.xml for the portions of the builder that generate platform specific downloads. For instance, the SDK, the platform, platform.sdk, rcp and rcp.sdk all have platform specific download zips.
If we look at the builder for the platform feature, the packager.properties file needs to be updated to include the new config
config=\ ... macosx, cocoa, x86_64
As well, the archivesFormat needs to specify the format of the resultant zip
archivesFormat =\ ... macosx, cocoa, x86_64-tar & \
The root files need to be updated in packaging.product file
root.macosx.cocoa.x86_64=eclipse,Eclipse.app/ root.macosx.cocoa.x86_64.link=Eclipse.app/Contents/MacOS/eclipse,eclipse,../../../MacOS,Eclipse.app/Contents/Resources/Splash.app/Contents/
The corresponding assemble target needs to be added to the customTargets.xml so that the root file is assembled.
<target name="assemble.macosx.cocoa.x86_64.xml"> <antcall target="assembler"> <param name="archiveName" value="${archiveRoot}-macosx-cocoa.x86_64.tar.gz" /> </antcall> </target>
The packaging.map file needs to be updated with the location of these new platform zips so they can be using in the packaging process. master-root-launcher-macosx.cocoa.x86_64.@buildId@.zip=file:${buildDirectory}/${buildLabel}/ | macosx,cocoa,x86_64| eclipse/ | runtime | root-launcher master-root-sdk-macosx.cocoa.x86_64.@buildId@.zip=file:${buildDirectory}/${buildLabel}/ | macosx,cocoa,x86_64| eclipse/ | runtime | root-sdk master-root-platform-macosx.cocoa.x86_64.@buildId@.zip=file:${buildDirectory}/${buildLabel}/ | macosx,cocoa,x86_64 | eclipse/ | runtime | root-platform
Call p2 director
The final step is to update the script that calls the p2 director to provision the install which is org.eclipse.releng.eclipsebuilder/equinox/equinox.prov/run.xml. This script sets up the directories for provisioning and then calls the director to provision the install as follows
<antcall target="run.director"> <param name="p2.director.installIU" value="org.eclipse.platform.ide" /> <param name="p2.director.version" value="3.5.0.${buildId}" /> <param name="p2.director.profile" value="PlatformProfile" /> <param name="p2.director.install.path" value="${p2.platform.install.macosx.cocoa.x86_64}/eclipse" /> <param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" /> <param name="p2.os" value="macosx" /> <param name="p2.ws" value="cocoa" /> <param name="p2.arch" value="x86_64" /> <param name="p2.repo" value="${updateSite}" /> </antcall>
The director is called to build the platform, platform.sdk and sdks drops. (The build should be updated to assemble all drops using p2 operations - see bug 256912. Finally, the p2 install directory is zipped up to the posting directory and the zips that appear on the build page are updated.
Remaining steps
There are a few other bits of the build to be updated. For instance, we build the standalone swt zip by calling the fragment's custom build.xml script in org.eclipse.releng.eclipsebuilder/eclipse/helper.xml buildStandAloneSWT. There are also calls to be added to the org.eclipse.releng.eclipsebuilder/equinox/equinox-launchers page to build the equinox launchers seperately for the Equinox build page. To allow the new macosx.cocoa.x86_64 drops to be visible on the build page, I update the org.eclipse.releng.eclipsebuilder/equinox/publishingFiles/testManifest.xml. This is an ugly way to create a build page, but it must suffice until I have time to refactor it.