[ptx] Hugin 0.6 on OS X Crashing

JD Smith jdsmith at as.arizona.edu
Wed Aug 2 01:13:32 BST 2006


On Tue, 2006-08-01 at 21:42 +0100, Ippei UKAI wrote:
> Hi,
>
> Briefly about .app package then:
>
> First, you need the right package structure (normal directories). You
> can read about it on apple's documentation, but you can just see any
> existing application bundles.
>
> Second, to be a proper application bundle, the files PkgInfo and
> Info.plist should be in place.
>
> Third, HuginOSX finds many resources inside the bundle, so have to
> place resources in the right places. Again, you can see inside
> HuginOSX and reproduce it, but main idea is thatall resources go in
> to the Resources folder, but localised version goes into the
> languages's .lproj folder. Localising part is done by my hand written
> script which is in the CVS. The xrc is (almost) directly copied into
> the Resource folder.
>
> Lastly, all executable (and other platform-dependent) codes goes to
> Contents/MacOS (HuginOSX and optionally enblend). If you use dynamic
> libraries, you should compile the executables to dynamically link
> @executable_path/lib*.dylib (I have no idea how, by the way... I
> simply use static libs). Some projects choose to store dynamic libs
> in Contents/Frameworks (@executable_path/../Frameworks/lib*.dylib).
>
> Basically, on OSX, no application that is not bundled can handle GUI.
> You definitely need application package. I also chose to simplify the
> install process and linked all the libraries statically. You may
> choose otherwise, but most 'nice' applications are distributed as d&d
> installation than installer packages.
>
> Ippei

Thanks, Ippei.  So a Makefile which creates the .app directory  
heirarchy, and copies components in from the mac/ source directory  
should be simple to code, yes?  There is no other patching, etc.  
which your XCode project does (other than gather all the needed  
libraries, and compile things statically).

Could you suggest any thing else the Makefile would have to do?  For  
example, Emacs' configure.in does:

### Use Mac OS X Carbon API to implement GUI.
if test "${HAVE_CARBON}" = "yes"; then
   AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon  
API on Mac OS X.])
   ## Specify the install directory
   carbon_appdir=
   if test "${carbon_appdir_x}" != ""; then
     case ${carbon_appdir_x} in
       y | ye | yes)  carbon_appdir=/Applications ;;
       * ) carbon_appdir=${carbon_appdir_x} ;;
     esac
   fi
   # We also have mouse menus.
   HAVE_MENUS=yes

   tmp_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -framework Carbon"
   AC_CHECK_FUNC(CancelMenuTracking, have_cmt=yes, have_cmt=no)
   if test "$have_cmt" = yes; then
     AC_DEFINE(HAVE_CANCELMENUTRACKING, 1,
               [Define to 1 if CancelMenuTracking is available (Mac  
OSX).])
   fi
   CFLAGS="$tmp_CFLAGS"
fi
They also have "mac/Emacs.app" already checked into CVS with the  
PkgInfo, Info.plist, etc. files already setup.  Then make simply  
copies the created executable to mac/Emacs.app/Contents/MacOS/, if it  
realizes it must make a mac version.  The src/Makefile is auto- 
generated by configure (via m4 pre-processing) with the correct  
things in it, such as:
${emacsapp}Contents/MacOS/Emacs: emacs${EXEEXT}
         mkdir -p ${emacsapp}Contents/MacOS/;
         cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs$ 
{EXEEXT} Emacs${
EXEEXT}
${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r
         /Developer/Tools/Rez -useDF -o ${emacsapp}Contents/Resources/ 
Emacs.rsrc
/System/Library/Frameworks/Carbon.framework/Headers/Carbon.r $<
${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c
         cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool${EXEEXT}

etc.  So I think it's really just a matter of:

1. creating and checking into CVS mac/Hugin.app with all the correct  
structure and handful of pre-existing files from your HuginOSX.app  
bundle.
2. arranging for Pablo's configure/Makefile heirarchy to copy the  
binary into the correct location.
3. (optional) Borrow their make-package script to make a compressed  
installer package .dmg file.

We could even copy enblend and autopano-sift into Contents/MacOS  
(assuming license issues with the later don't interfere), and pre- 
configure Hugin to look for them there.

Pablo, any suggestions on the best way to hook into your current  
built system to copy the executable into the mac/Hugin.app directory?

JD

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.email-lists.org/pipermail/ptx/attachments/20060801/59cbac48/attachment-0001.html


More information about the ptx mailing list