Discussion:
bakefile question regarding mac app bundles
(too old to reply)
Ulrich Telle
2011-01-11 22:10:58 UTC
Permalink
I've developed components for wxWidgets hosted at wxCode
(http://sourceforge.net/projects/wxcode/). As the build system I use
bakefile since wxWidgets uses it, too.

Currently I try to add support for wxMac to my component wxPdfDocument -
without having a Mac environment for testing, which complicates matters
as I always have to ask someone to test. The code of the component
itself has been verified to work already, but I face problems to
formulate my bakefile in such a way that for my sample applications
working Mac app bundles are created.

For the samples coming with wxWidgets there exists a bakefile named
mac_bundles.bkl. I copies this file and some other files from the
wxWidgets source tree to a folder of my component and adjusted
mac_bundles.bkl to reflect the path changes. I added the Mac specific
code found in another wxWidgets bakefile (common_samples_intree.bkl) and
added the tag <wx-mac-app-bundle/> to the templates for all executables
defined in my bakefile. Bundles are created, but three problems remain:

1) if my component is built as a shared object, the bundle doesn't find
it. Is there a way via instructions in the bakefile to add a search path
for shared objects to the bundle pointing to the lib folder of my component?

2) my sample executables need to access files located in the folder
where the source files of the respective executable reside. Currently I
use relative paths to access those files but I learned it would be best
to copy all needed files to the Resources folder of the bundle. In
mac_bundles.bkl there is a variable BUNDLE_RESOURCES serving this
purpose, but if I assign a file list to this variable these files are
copied to *all* executables' Resources folder. Is there a way in
bakefile to parameterize a tag defined by a <define-tag> instruction
like <wx-mac-app-bundle/> so that the parameter can be used to copy
different files for each executable?

3) the executables need to access the folder lib/fonts of my component
to make use of prepared font definitions. The component supports the use
of an environment variable WXPDF_FONTPATH, but the user would have to
specify this before running the executables. Is there a way to let the
bundles know via bakefile where to search for these files without
forcing the user to define WXPDF_FONTPATH?

Any help to sort out these problems would be very much appreciated.

Regards,

Ulrich

Loading...