My approach was to have the /Application bundle to launch the command line program. This is fairly automated thanks to Ryan.
Check out the app PortGroup: http://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/app-1.0.tcl Here's how I use it in pspp-devel: http://trac.macports.org/browser/trunk/dports/math/pspp-devel/Portfile#L120 On Jul 16, 2013, at 1:49 PM, Mojca Miklavec wrote: > Hi, > > (This question is related to Gate, but this is not relevant and could > be asked about any port.) > > I would like to create a package providing both the command-line > executable as well as a real Mac application ($prefix/bin/Gate and > /Applications/MacPorts/Gate.app). > > By default the installation creates $prefix/bin/Gate (even though I'm > sure that I can change the configuration options to put it somewhere > else), but I need to replace it with a shell script that sets a bunch > of environmental variables first and then calls the real executable. > > But I would also like to create Gate.app inside > /Applications/MacPorts. My questions are as follows: > > 1.) I guess that there is no need to make the app standalone in terms > of links to libraries? (It's probably ok if the app links to > $prefix/lib/libwhatever.dylib instead of having to use > @rpath/../some/local/path/to/libwhatever.dylib) > > 2.) What should I do with the binary? Where should I put the real > binary? Do I need to copy it inside the app? Can I simply use a shell > script inside the app that launches the binary from > $prefix/libexec/gate/Gate? Or should I simply put the binary to app > only and then make $prefix/bin/Gate a shell script launching the > binary from inside the app? > > 3.) I need a few extra files like icns & those weird xml files. Should > they go to the same folder where patch files are? > > 4.) Let's say that I already have a working binary in > $prefix/libexec/gate/Gate. What is the optimal way of testing creation > of the app (copying files around and creating some files on the fly) > without having to compile gate after every trivial change of the > Portfile? Related question: let's say that "port" fails during > destroot. Is there any way to keep changing the Portfile without the > need to recompile everything (sometimes compilation can take 30 > minutes and I make trivial mistakes in post-destroot)? > > Thank you very much (and sorry for some confusing questions - please > ask if you can't figure out what I was trying to ask), > Mojca > _______________________________________________ > macports-dev mailing list > [email protected] > https://lists.macosforge.org/mailman/listinfo/macports-dev _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
