Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] How to launch a Carbon app without any wra ppers?

My background is with NeXTStep and OpenStep, and have not written any
Carbon/JNI apps as I prefer Cocoa, but I suspect the following will work.

Write your application as a tool, not an application.  Have your tool
project link in the appropriate GUI frameworks and invoke methods within
those frameworks to bootstrap your GUI.

Application projects are developed as wrappers to provide GUI resources to
the executable.  Tools, by definition do not require those resources and are
therefore not wrapped.

One side-bar.  Why did you choose Carbon over Cocoa for Eclipse integration?

Thanks,
Randy Leonard
rleonard@xxxxxxxxxxx



-----Original Message-----
From: Andre Weinand [mailto:weinand@xxxxxxx]
Sent: Tuesday, June 04, 2002 2:40 PM
To: java-dev@xxxxxxxxxxxxxxx; platform-swt-dev@xxxxxxxxxxx
Subject: [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

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top