Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv26516/src/classes
Modified Files:
MApplication.cpp
Log Message:
fixes for bundle creation under Mac OS X
Index: MApplication.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MApplication.cpp,v
retrieving revision 1.286
retrieving revision 1.287
diff -b -u -2 -r1.286 -r1.287
--- MApplication.cpp 12 Jan 2004 17:48:29 -0000 1.286
+++ MApplication.cpp 12 Jan 2004 23:44:07 -0000 1.287
@@ -131,5 +131,7 @@
// ----------------------------------------------------------------------------
-static const wxChar *MAHOGANY_DATADIR = _T("share/mahogany");
+#if defined(OS_UNIX) && !defined(OS_MAC)
+ static const wxChar *MAHOGANY_DATADIR = _T("share/mahogany");
+#endif
// ----------------------------------------------------------------------------
@@ -994,5 +996,6 @@
{
// hmm, do we need to use CFStringGetCString() here instead?
- m_globalDir = CFStringGetCStringPtr(path, CFStringGetSystemEncoding);
+ m_globalDir = CFStringGetCStringPtr(path,
+ CFStringGetSystemEncoding());
CFRelease(path);
@@ -1381,10 +1384,21 @@
String dir = GetGlobalDir();
-#ifdef OS_UNIX
- // if we used local directory as fall back for the global one because we
- // couldn't find the latter, there is no sense to append "share/..." to it
+ // do we have a real global dir or was it just set to local dir as
+ // fallback?
if ( dir != GetLocalDir() )
+ {
+#if defined(OS_MAC)
+ // global dir is the bundle directory, our files are under it
+ dir << _T("/Contents/Resources");
+#elif defined(OS_UNIX)
+ // if we used local directory as fall back for the global one because we
+ // couldn't find the latter, there is no sense to append share/mahogany
+ // to it
dir << _T('/') << MAHOGANY_DATADIR;
-#endif // OS_UNIX
+#elif !defined(OS_WIN)
+ // under Windows the data directory is the same as the program one
+ #error "Don't know how to find data directory on this platform!"
+#endif // OS_XXX
+ }
return dir;
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates