Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems launching an FLTK carbon application



Greetings,

I'm working on an FLTK app that so far, has been ported and works quite nicely on OS X. I'm not actually developing it, but I'm working on finding solutions for a few issues we're having with this OS X version for the developer while he's polishing up the Windows and Linux versions. My developer experience on OS X is quite limited, please forgive any newbie gaffes (my other hat is design/marketing).

The beta download page for the application is here:

http://www.metropipe.net/BetaDownload.shtml

The application is a encrypted anonymizer that creates a SSH tunnel between the client machine and our proxy servers in Europe, anonymizing the network connection and protecting it from local eavesdroppers. It uses FLTK for the GUI, which controls the OpenSSH tunnels.

The app bundle executes a shell script (Tunneler.sh) that does does some maintenance (I admit that I don't know exactly what it's doing - but it looks like it's doing more than just setting environment variables) and then launches the FLTK application (a FLTK Carbon app called metropipe_tunneler).

This all works just fine if the application is launched from the Finder, but there are a couple problems that arise when interaction with the Dock is considered:

1) If the application is added to the Dock by dragging from the Finder, when the Tunneler is launched from the Dock, it launches the metropipe_tunneler FLTK application, which appears in the Dock - leaving what appears to most users as two running Tunnelers in the dock.

(In this situation, the _CFURLString in com.apple.dock.plist = /Applications/Tunneler.app)

2) If the user launches the Tunneler from the Finder, then adds the application from the Dock (by relocating it on the Dock, or selecting 'Keep in Dock'), the next time it is launched from the Doc, it will crash. This is because the actual FLTK application is launched instead of the launch script, which presumably must run or else it can't find its configuration files.

(In this situation, the _CFURLString = /Applications/Tunneler.app/Contents/MacOS/data/metropipe_tunneler)

I've been messing around with the Info.plist file, but I think the problem will require more tweaking than that.

The questions that I have at this moment, that if answered might lead to a solution are:

1) Is using a shell script to launch a Carbon app an acceptable method of launching a bundled application?

2) If not, I assume that the metropipe_tunneler FLTK carbon application itself needs to be the value of the CFBundleExecutable plist item, not the Tunneler.sh shell script. Is this the case?

3) Given that the preparation in the Tunneler.sh script must be performed, what is the best way to do it if the script cannot be called as the CFBundleExecutable?

I would greatly appreciate any help that can be offered. If the work required to get this done extends beyond what is appropriate to expect from a free email list, then I would be interested in paying for a solution as well, pehaps via Google Answers.

Regards,

Josh Ellison
MetroPipe Network Services
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.