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

Thanks Pascal for writing this up. I remember you explaining these things to me last year, but I forgot about a bunch of them.

FWIW, I've been building and shipping using Pascal's Mac format for a year now without problems (building and shipping the Yoxos Launcher). We can perform self-updates, include the application in the standard /Applications folder, and associate files (and folders) with the app. It even launches files from spotlight (the Mac search tool). This might not be the 'Standard MacWay' but it certainly works.

I'd also be interested in understanding the limitations of this layout.

Cheers,
Ian


On Wed, Apr 17, 2013 at 12:15 PM, Pascal Rapicault <pascal@xxxxxxxxxxxxx> wrote:
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?  

Thx

Pascal

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="**"/>
</fileset>
</move>
<delete dir="${macdir}/${exename}.app"/>
<move todir="${macdir}/${appname}.app/Contents">
<fileset dir="${macdir}">
<include name="**"/>
<exclude name="${appname}.app/**"/>
</fileset>
</move>
<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!
Doug.
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev




--
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource