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

Bug 331721

Summary: [mac] Product Publisher does not cope with different launcher names
Product: [Eclipse Project] Equinox Reporter: Brian de Alwis <bsd>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: jeffmcaffer
Version: 3.6.1   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch to BrandingIron and ExecutablesDescription none

Description Brian de Alwis CLA 2010-12-02 16:20:02 EST
Builds: Eclipse R3.6.1, but the problem is still present in HEAD.  

I've been trying and failing to publish a product for cocoa-macosx-x86_64 using the ProductPublisher app.  In my case, my product has an explicit launcher name.  Although the publishing appears to work, the executables aren't properly branded, and the the app icon isn't present.

In tracing through the code, I discovered that the ExecutablesDescriptor's files list isn't properly updated for different launcher names.  #updateExecutableName() makes some incorrect file name inferences based on the executable name that don't hold for the executable features:
   1. the target .ini file looked for is "launcher.ini", when it's actually "eclipse.ini" 
   2. the app looked for is "launcher.app", when it's actually "Eclipse.app"
   3. the icon file wasn't being recorded

I discovered that this is the same problem reported in bug 325301 against Buckminster, which seems to have copied the BrandingIron from p2's publisher.

I've attached a patch that ports bug 325301's fix to org.eclipse.equinox.p2.publisher's BrandingIron (and with a minor adjustment to EquinoxExecutableAction).  I haven't been able to run any tests at the moment -- though it works in my testing.

I haven't looked at what other changes they've made.  From the history of the BrandingIron they've clearly made other changes, and they likely should be folded back in.
Comment 1 Brian de Alwis CLA 2010-12-02 16:47:05 EST
Created attachment 184413 [details]
Patch to BrandingIron and ExecutablesDescription

Port of the patch for bug 325301 to p2.publisher
Comment 2 Jeff McAffer CLA 2010-12-02 19:48:55 EST
I believe this is a dupe of bug 313997.  We should look at the patch here and patch there, the one in Buckminster and what they have done in Tycho to see if unification is possible.

*** This bug has been marked as a duplicate of bug 313997 ***