Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 92420

Summary: It should be possible to export cross platform
Product: [Eclipse Project] PDE Reporter: Jeff McAffer <jeffmcaffer>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: alexander.smirnoff, ed.burnette, h1055071, n.a.edgar, pascal
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch to do cross platform exports
none
A newer version of the patch to fix up some root file/branding issues
none
An even BETTER patch none

Description Jeff McAffer CLA 2005-04-22 14:00:33 EDT
When exporting features or products it should be possible to specify another 
target environment for the export without having to change the current target 
platform environment.

To aid in this I will attach a patch for PDE UI that updates FeatureExportJob 
and friends for this function.
Comment 1 Jeff McAffer CLA 2005-04-22 14:20:16 EDT
Created attachment 20253 [details]
patch to do cross platform exports
Comment 2 Jeff McAffer CLA 2005-04-23 17:02:01 EDT
Created attachment 20269 [details]
A newer version of the patch to fix up some root file/branding issues
Comment 3 Jeff McAffer CLA 2005-04-26 19:06:58 EDT
Created attachment 20389 [details]
An even BETTER patch

This one requires some changes to PDE build.  see bug 92855
Comment 4 Wassim Melhem CLA 2005-04-29 14:25:23 EDT
*** Bug 88507 has been marked as a duplicate of this bug. ***
Comment 5 Wassim Melhem CLA 2005-04-29 14:26:38 EDT
*** Bug 86799 has been marked as a duplicate of this bug. ***
Comment 6 Wassim Melhem CLA 2005-04-29 14:27:49 EDT
*** Bug 82795 has been marked as a duplicate of this bug. ***
Comment 7 Wassim Melhem CLA 2005-04-29 14:41:47 EDT
For the UI portion of it, I would like to show a checkbox table with a number 
of valid os-ws-arch combinations and select/deselect All buttons.

The page would show up only if the RCP delta pack is installed.

The list will contain the following combinations:
win32-win32-x86
linux-motif-x86
linux-gtk-x86
linux-gtk-x86_64
solaris-motif-sparc
solaris-gtk-sparc
aix-motif-ppc
mac-carbon-ppc

This should be more than enough.  No plans/time to allow the user to enter 
arbitrary combinations - for 3.1.
Comment 8 Nick Edgar CLA 2005-04-29 15:02:10 EDT
That sounds fine to me.
Comment 9 Ed Burnette CLA 2005-04-29 16:12:12 EDT
The interface in comment #7 sounds great. As long as it doesn't appear
mysteriously empty if the delta pack is not there. There should be an error or
something to head off the 'why doesn't this work / did you install the delta
pack' type questions from users.
Comment 10 Wassim Melhem CLA 2005-04-29 17:37:58 EDT
the wizard will have a single page (as it looks today) if the delta pack is 
not installed.
Comment 11 Jeff McAffer CLA 2005-04-29 21:06:33 EDT
I'm a little bummed by the inability to enter my own values.  One of the first 
things i wanted to do when starting RCP apps in earnest was to export for my 
PocketPC. (win32, wm2003, arm).  With the rapid addition of new platforms to 
the Eclipse line up and people adding ports themselves, it seems like this will 
be a barrier.  

Is that you don't have enough time or that you don't see the usecase?
Comment 12 Wassim Melhem CLA 2005-04-29 21:23:58 EDT
Note that I am not closing the door on adding new pre-sets.
I could add pre-set target environments easily, including the one you are 
suggesting.

Coming up with an esthetically pleasing UI that, in addition to pre-sets, 
allows the user to enter arbitrary values will involve a production involving 
new dialogs, editable combo boxes, etc.

The usecase, as valid as it may be, is not common enough to warrant spending 
valuable M7 time on such a UI.
Comment 13 Jeff McAffer CLA 2005-04-29 21:30:16 EDT
Fair enough.

A thought.  If the set of presets was in a file somewhere that "in the know" 
users could edit...
Comment 14 Wassim Melhem CLA 2005-04-29 21:32:27 EDT
sure.  

Ironically, with JARd plugins, editing such a file might not be as easy as it 
once was :-)
Comment 15 Nick Edgar CLA 2005-05-02 10:44:10 EDT
> If the set of presets was in a file somewhere

Sounds like a job for an extension point.

Comment 16 Jeff McAffer CLA 2005-05-02 21:12:04 EDT
Sure that makes sense time permitting.  
Comment 17 Wassim Melhem CLA 2005-05-09 13:37:50 EDT
Done.  This is a wonderful feature.

Thanks to Jeff for a great patch.  (It's going on my list of 10 best patches 
of the year :-)

Here is how it will work:

1. There is no hardcoded list of platform combinations.
In the presence of a delta pack, I navigate the directory structure of the bin 
folder of the delta pack feature and construct a list of os-ws-arch 
combinations.
So Jeff, you could manually add folders to that feature if the current list of 
10 os-ws-arch combinations is not enough.
The wizard will have a second page (visible only with delta pack) that 
contains a flat check list of all combinations I find.

In the absence of a delta pack, business as usual, ie. we only export to the 
Target Environment as specified in the preferences.

2. The .product file must list all fragments required for the cross-platform 
export.  I contemplated doing some magic during the export operation to 
implicitly append fragments not in the .product file.  But that may result in 
me picking up unwanted fragments.  Plus, it is important for the product file 
to be complete so that it would get interpreted the same by all interested 
parties.

3. For any os-ws-arch combination export, only fragments/plugins that match 
the environment filter will make it into the zip and into the config.ini.

So for a win32-win32-x84 export, all linux/solaris/mac fragments that may be 
listed in the product file are ignored.

4. The 'Add Required Plugins' button in the product editor will include all 
fragments from the delta pack if it exists.

5. If you choose to export to D:/Temp, the end result would look like:
D:/Temp/win32.win32.x86/myproduct
       /linux.gtk.x86/myproduct
       /solaris.motif.spar/myproduct
Comment 18 Wassim Melhem CLA 2005-05-09 13:47:55 EDT
I also added descriptive text on the Overview page of the product editor to 
tell people what they need to do if they want to do a cross-platform export.
Comment 19 CLA 2005-05-10 06:42:25 EDT
But there's still a problem with the automatic copying of startup.jar.

I downloaded eclipse-SDK-I20050510-0010-win32 and delta pack.  When I do a 
product export of only win32, the copied startup.jar is the correct one 
(30.2kb).  But when I export for 3 platforms in one go (win32, carbon and 
linux) the copied across startup.jar is bogus (only 2.97kb).

PB
Comment 20 Wassim Melhem CLA 2005-05-10 08:37:53 EDT
I noticed that too.  Pascal, has Bugzilla corrupted startup.jar that is in the 
delta pack feature?
Comment 21 CLA 2005-05-10 08:49:23 EDT
I replaced the one in the Delta pack and it works OK.

Next problem is that the Mac launcher file is not being seen as an 
executable...
Comment 22 Wassim Melhem CLA 2005-05-10 09:16:53 EDT
I opened bug 94295 for the startup.jar problem.

Philippe, if you have other issues, please open separate bug reports.  thanks.