From f7cf82bcc158cd430cdf336c21f575149c4b5638 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Thu, 6 May 2004 17:04:20 +0000 Subject: [PATCH] Mac OS X compatibility. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1342 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/wx-console/Makefile.in | 3 ++- bacula/src/wx-console/TODO | 3 ++- bacula/src/wx-console/console_thread.cpp | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bacula/src/wx-console/Makefile.in b/bacula/src/wx-console/Makefile.in index 9fc9fed5fa..9873b36374 100644 --- a/bacula/src/wx-console/Makefile.in +++ b/bacula/src/wx-console/Makefile.in @@ -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 diff --git a/bacula/src/wx-console/TODO b/bacula/src/wx-console/TODO index 0481fe5977..db42539f90 100644 --- a/bacula/src/wx-console/TODO +++ b/bacula/src/wx-console/TODO @@ -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 diff --git a/bacula/src/wx-console/console_thread.cpp b/bacula/src/wx-console/console_thread.cpp index c7ecc338fe..ebf36055fd 100644 --- a/bacula/src/wx-console/console_thread.cpp +++ b/bacula/src/wx-console/console_thread.cpp @@ -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); -- 2.39.2