]> git.sur5r.net Git - bacula/bacula/commitdiff
Mac OS X compatibility.
authorNicolas Boichat <nicolas@boichat.ch>
Thu, 6 May 2004 17:04:20 +0000 (17:04 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Thu, 6 May 2004 17:04:20 +0000 (17:04 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1342 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/wx-console/Makefile.in
bacula/src/wx-console/TODO
bacula/src/wx-console/console_thread.cpp

index 9fc9fed5fa6fbb4cc0e184339aef5c0e06751c11..9873b3637427d9e1752616677891ab8076533926 100644 (file)
@@ -68,7 +68,8 @@ wx-console.app: wx-console
        -mkdir wx-console.app/Contents/Resources/English.lproj
        echo -n 'APPL????' > wx-console.app/Contents/PkgInfo
        mv wx-console wx-console.app/Contents/MacOS/wx-console
-       cp wx-console.conf wx-console.app/Contents/MacOS/wx-console.conf
+       -mkdir /Library/Preferences/org.bacula.wxconsole
+       cp wx-console.conf /Library/Preferences/org.bacula.wxconsole/wx-console.conf
 
 wx-console: $(CONSOBJS) @WIN32@ ../lib/libbac.a
        $(CXX) $(CONSOBJS) $(WIN32RES) -o $@ $(LIBS) -L../lib $(CONS_LDFLAGS) -lbac
index 0481fe59779df0f27bbf1e883c2bac5500acc70c..db42539f904e721d4e7474062a8e451019b28b5b 100644 (file)
@@ -6,7 +6,8 @@ wxbRestorePanel : When cancelling, check for commands results
 general : Show nice messages boxes when errors occurs.
 
 Mac OS X : Integrate Mac OS X into the automake process
-  (note : add -DNO_GCC_PRAGMA to CPPFLAGS)
+  (note : add -DNO_GCC_PRAGMA to CPPFLAGS, build app,
+  define HAVE_MACOSX)
 
 Mac OS X : "You must first get a unique identifier for your application, 
   a so called creator, a four letter constant. All you need to know about
index c7ecc338fe71e6823626a205ba43959747647eda..ebf36055fdfcf63d0b18e30a54ef18313577860b 100644 (file)
@@ -42,6 +42,12 @@ char OK_msg[]   = "2000 OK\n";
 char TERM_msg[] = "2999 Terminate\n";
 #endif
 
+#ifdef HAVE_MACOSX
+#define CONFIGFILE "/Library/Preferences/org.bacula.wxconsole/wx-console.conf"
+#else
+#define CONFIGFILE "./wx-console.conf"
+#endif
+
 /* Imported functions */
 int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons);
 
@@ -84,7 +90,7 @@ void* console_thread::Entry() {
    init_msg(NULL, NULL);
 
    /* TODO (#4#): Allow the user to choose his config file. */
-   parse_config("./wx-console.conf");
+   parse_config(CONFIGFILE);
 
    LockRes();
    DIRRES *dir = (DIRRES *)GetNextRes(R_DIRECTOR, NULL);