[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Mac Bundles

I decided to chose this layout for the Mac because 
- It is compatible with the eclipse layout on other platforms. Basically the Eclipse.app folder becomes the equivalent of  eclipse folder on linux and mac, which means that calls to the director just works out of the box (w/o having to special case the Mac layout in the app in the director (and potentially other apps)), and plugins referring to files in the base would not be confused. Basically nobody would have had to change any of their plugin to make things working, which is always an important point for the platform.
- Other Mac applications do not follow the contents/ conventions
- Some other changes would have been necessary. But I don't recall for sure. I vaguely remember something about having to reorg the eclipse executable so it is jsut the exe without the paths but I'm not sure.
- Minimize the changes - the fwk admin is the typical example of technical debt with crap accumulated over the years, and nobody is willing to fund a rewrite (hint, hint)
- Financial limitation

If you decide to ship with everything in Contents/ then you will need to be careful to the following scenarios:
- Update that changes the launcher jars or the framework
- Update that changes executables
- Application being moved after having been run

Now I have a question for you, what are the problems you are running into by not having the plugins be stored under Contents?  



On 2013-04-12, at 10:27 AM, Doug Schaefer wrote:

Hey gang,

To give you a quick update, I'm working on the next release of Momentics for BlackBerry BB10 development and I'm trying to make our install look a lot more like Xcode on the Mac. In case you haven't looked, they have everything under Xcode.app/Contents. I'd like to set up our Eclipse install the same way.

Looking through Pascal's blog entry on the subject and in parts of the code, I see that we put stuff up at the same level as Contents. And it seems to be pretty hardcoded there. But that isn't the standard way I see other apps do things. Everything's under Contents.

Now being the hack that I am, I tried just moving files around and editing the ini file and things seem to work, including upgrading build to build. But I have a feeling I'm missing something. First here's the maven-antrun code I used to set things up (BTW, I'm not using the magic .app in the top folder name trick).

<move todir="${macdir}/${appname}.app">
<fileset dir="${macdir}/${exename}.app">
<include name="**"/>
<delete dir="${macdir}/${exename}.app"/>
<move todir="${macdir}/${appname}.app/Contents">
<fileset dir="${macdir}">
<include name="**"/>
<exclude name="${appname}.app/**"/>
<replace file="${macdir}/${appname}.app/Contents/MacOS/${exename}.ini" token="../../.." value=".."/>

In my case appname is Momentics and exename is qde (for historical reasons I suppose)
The thing I'm most worried about is the ini file. What are the chances it get's overridden by a future configure step to point back at ../../..? The configure instructions for startup and launcher.library don't seem to hardcode that path, using just @artifact instead, so I'm crossing my figures.

BTW, looking through the code, it's looks like it was a lot of work to get the layout the way it was. And looks like the same amount of work to get things to properly go under Contents.

Any help appreciated. Thanks!
p2-dev mailing list