Making a Mac PKG for wxWidgets
Anders F Björklund
afb at algonet.se
Wed Oct 11 04:20:25 PDT 2006
Hi,
I am using wxWidgets in a couple of different projects
and got pretty tired of bundling the dynamic library,
or even linking everything statically, so I did a wx
framework for Mac OS X - and an Installer PKG for it...
Since the code uses "#include <wx/wx.h>", it will also
search in /Library/Frameworks/wx.framework/Headers dir
and then to link with it you just use: "-framework wx"
(plus all the required lib and framework dependencies)
The "setup.h" is included in the Headers, and a tweaked
"wx-config" program is included in the Commands sub-dir.
So the commands returned from wx-config just look something like:
$ /Library/Frameworks/wx.framework/Commands/wx-config --cxxflags
-D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
$ /Library/Frameworks/wx.framework/Commands/wx-config --cxxflags
-framework QuickTime -framework IOKit -framework Carbon -framework
Cocoa -framework System -framework wx
The framework can be installed in either /Library/Frameworks
or ~/Library/Frameworks, and also be bundled with the .app ?
Configure options were:
--with-mac --with-opengl
--enable-monolithic --enable-unicode
--with-png=builtin --with-jpeg=builtin
--with-tiff=builtin --with-expat=builtin
Is this pre-compiled binary something wxWidgets would host ?
I would be happy to provide two DMG, for Panther and Tiger...
(the panther package would use GCC 3.3 and be for PowerPC,
while the tiger package would use GCC 4.0 and be Universal)
Screenshots from the Installer: (10.4 / Universal)
http://www.algonet.se/~afb/wx/wxMacPkg-Welcome.png
http://www.algonet.se/~afb/wx/wxMacPkg-License.png
The wxMac package does require admin authentication.
I'm not sure to handle add-ons like GL or STC, but
they could probably go in the Libraries dir perhaps ?
(or maybe even be merged into the main dynamic library,
since OpenGL is always available on a Mac OS X platform)
Thoughts?
--anders
More information about the wx-dev
mailing list