URL:
<http://gna.org/task/?5472>
Summary: Easier MAcOSX packaging
Project: Wormux
Submitted by: yekcim
Submitted on: vendredi 21.09.2007 à 14:25
Should Start On: vendredi 21.09.2007 à 00:00
Should be Finished on: vendredi 21.09.2007 à 00:00
Category: packaging
Priority: 8
Status: None
Percent Complete: 90%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
in main.cpp (includes) :
#ifdef OSX_BUNDLE
#include <CoreFoundation/CoreFoundation.h>
#endif
in main.cpp before configurations :
#ifdef OSX_BUNDLE
// the following code will enable wormux to find its data when placed in
an app bundle on mac OS X.
// configure with './configure ... CPPFLAGS=-DOSX_BUNDLE' to enable
char path[1024];
CFBundleRef mainBundle = CFBundleGetMainBundle(); assert(mainBundle);
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
assert(mainBundleURL);
CFStringRef cfStringRef = CFURLCopyFileSystemPath( mainBundleURL,
kCFURLPOSIXPathStyle); assert(cfStringRef);
CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII);
CFRelease(mainBundleURL);
CFRelease(cfStringRef);
string contents = string(path) + string("/Contents");
setenv("WORMUX_DATADIR", (contents + string("/Resources/data")).c_str() ,
1);
setenv("WORMUX_LOCALEDIR", (contents +
string("/Resources/po")).c_str() , 1);
setenv("WORMUX_FONT_PATH", (contents +
string("/Resources/data/font/DejaVuSans.ttf")).c_str() , 1);
#endif
Proposed by Auria here :
http://www.wormux.org/forum/viewtopic.php?pid=1912#p1912
_______________________________________________________
Reply to this item at:
<http://gna.org/task/?5472>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wormux-gna mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-gna