[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] How to launch a Carbon app without any wrappers?
|
Hi,
I'm looking for some hints/tips for how to launch a Carbon
application (actually a JNI/Carbon app) that just has a main() and is
not wrapped in any kind of MacOS X specific "bundle" but still has a
UI, can be activated with the mouse and has an icon in the dock.
Or in other words I'm looking for the Carbon equivalent of the
following Java/AWT program:
import java.awt.Frame;
public class Test {
public static void main(String[] args) {
new Frame().show();
}
}
which I can launch just with:
java Test
and it get a menubar, a UI that I can activate, and an entry in the
Dock by some kind of magic.
Background: why do I need this?
As part of my endeavor to bring Eclipse to MacOS X I've ported SWT to
MacOS X by using Carbon and JNI. Most of this works without any
problems and I'm almost self-hosting with Eclipse (that is I can
develop SWT for MacOS X from within Eclipse on MacOS X).
However to start a SWT based application like Eclipse I cannot just say:
java Eclipse
Instead I have to setup a fake folder hierarchy called Eclipse.app
and move all the bits and pieces into place. This is not a problem
for Eclipse itself because it is only done once, but it is a problem
if I want to write a small SWT based program like the Test from
above, but I don't want to package it into a Test.app first.
How should I initialize my Carbon application so that it behaves like
a regular UI application?
Thanks for any tips, hints, or pointers
--andre