Bug 478210 - Restructure Eclipse RCP Bundle on Mac
Restructure Eclipse RCP Bundle on Mac
Status: NEW
Product: penrose
Classification: Retired
Component: Configuration (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Endi Sukma Dewata
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2008-12-27 03:09 EST by Chandrasekar Kannan
Modified: 2018-02-07 15:49 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chandrasekar Kannan 2008-12-27 03:09:03 EST
Additional Comments From jimyang dated Sat Jun 30 23:41:26 CDT 2007 
Packaging Step 1: Rearranging files

The first step in creating a properly formatted Mac OS X bundle is to rearrange the files. This can be accomplished by using the following ant script:

<property name="build.dir" location="my build directory" />
<property name="app.dir" location="${build.dir}/myapp.app" />
<property name="java.dir" location="${app.dir}/Resources/Java" />
<target name="restructure-app-bundle">
     <mkdir dir="${java.dir}"/>
     <move todir="${java.dir}">
          <fileset dir="${build.dir}">
               <exclude name="myapp.app/**"/>

Packaging Step 2: Replacing the Info.plist file

A Mac OS X application bundle's configuration is described by an Information Property List File. The RCP build process creates this Info.plist file for you, but the settings will not work with the new structure. I've experimented with doing string replacement on the generated file, but in the end have found it easier to just replace the file entirely. Here is the file that I use:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
     <string>My Application Name, Copyright My Company 2006. All rights reserved.</string>
     <string>My Application Name</string>

Note: LSBackgroundOnly is not necessary if you're deploying Eclipse versions beginning with 3.3 M4. Thanks to Alex Blewitt for the tip.

Now that you've rearranged the files and replaced the Info.plist file, you should be able to double-click your bundle and run your RCP application. You should also be able to drag your application to the Dock and run it from there.

Packaging Step 3: Moving the workspace out of the bundle

One final packaging issue remains, and that is that by default Eclipse will create the workspace directory inside your application bundle. This has a number of negative effects, the main one being that your users will be unable to navigate to their workspace files using the Finder. In addition, users won't be able to throw away the application without deleting their own data. Not pretty.

To resolve this issue, you can simply redirect Eclipse to create these directories in another location. The natural home for a workspace is in the users ~/Documents directory, so in your config.ini file you would add the following line:

osgi.instance.area.default=@user.home/Documents/[Workspace Name]

For instance, in the Market Contours RCP application, the workspace is set to ~/Documents/Market Contours.

After making this change, your users will see their files where they expect them to be and your application bundle will not contain embedded user data.

Additional Comments From endisd dated Mon Jul 02 11:50:06 CDT 2007 
This should be implemented in Penrose Studio 2.0 because the new behavior is different from 1.2.x.

Additional Comments From endisd dated Mon Jul 02 14:56:18 CDT 2007 
This issue can be generalized to cover all platforms, not just Mac OS. Basically we need to move the "work" directory from Penrose Studio installation directory to somewhere inside the user's home directory. Currently Penrose Studio already creates ~/.penrose directory to store some files, so the "work" directory can be moved there too.

Additional Comments From jimyang dated Mon Jul 02 15:36:58 CDT 2007 
This should be a relatively small changes. I suggest that this goes to 1.2.3 instead of 2.0.

Additional Comments From jimyang dated Tue Jul 31 09:21:14 CDT 2007 

Additional Comments From jimyang dated Tue Jul 31 09:31:33 CDT 2007 

Issue dump from jira
$VAR1 = {
          'priority' => '3',
          'customFieldValues' => [],
          'project' => 'PENROSE',
          'status' => '1',
          'components' => [
                              'name' => 'Configuration',
                              'id' => '10014'
                              'name' => 'Studio',
                              'id' => '10010'
          'attachmentNames' => 'ContentsMacOS.png',
          'reporter' => 'jimyang',
          'key' => 'PENROSE-239',
          'assignee' => 'jimyang',
          'summary' => 'Restructure Eclipse RCP Bundle on Mac',
          'id' => '10749',
          'updated' => '2008-03-21 10:17:44.0',
          'votes' => '0',
          'fixVersions' => [
                             'releaseDate' => '2008-09-18 00:00:00.0',
                             'sequence' => '31',
                             'name' => 'Penrose-2.1',
                             'released' => 'false',
                             'id' => '10130',
                             'archived' => 'false'
          'affectsVersions' => [],
          'description' => 'http://www.rcpquickstart.com/packaging_an_rcp_application_for_mac_os_x',
          'created' => '2007-06-30 23:40:34.0',
          'type' => '4'

Comment 1 Jim Yang 2009-01-26 10:47:59 EST
Not supporting mac.

Note You need to log in before you can comment on or make changes to this bug.