Unix Technical Forum

[PATCH] Repair OSX Port after i18n reorganization

This is a discussion on [PATCH] Repair OSX Port after i18n reorganization within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Hi This patch makes the osx build work again, by doing the following .) Change i18n/Makefile.am to install i18n-files ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces Pgadmin Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 04:42 PM
Florian G. Pflug
 
Posts: n/a
Default [PATCH] Repair OSX Port after i18n reorganization

Hi

This patch makes the osx build work again, by doing the following
.) Change i18n/Makefile.am to install i18n-files into
$(datadir)i18n instead of $(datadir)/pgadmin3/i18n when
building an appbundle.
.) Put the files listed in TMP_ui in i18n/Makefile.am
into EXTRA_DIST instead. I guess this was an error,
since TMP_ui is never used in this Makefile...
.) Support DESTDIR in i18n/Makefile.am
.) Moves the path-hint support for windows from
pgAdmin3.cpp to base/appbase.cpp,
because this saves some conditionals and is cleaner
.) Make "path" a global variable, like loadPath, ...

Now all path-related setups are done in InitPaths in AppBase

I didn't test the win32 build... I hope I didn't break anything..

greetings, Florian Pflug

Index: i18n/Makefile.am
================================================== =================
--- i18n/Makefile.am (revision 4179)
+++ i18n/Makefile.am (working copy)
@@ -19,25 +19,27 @@

EXTRA_DIST = \
$(srcdir)/wxstd.pot \
- $(srcdir)/??_??/pgadmin3.po
-
-TMP_ui = \
+ $(srcdir)/??_??/pgadmin3.po \
$(srcdir)/wxstd.mo \
$(srcdir)/pgadmin3.lng \
$(srcdir)/pg_settings.csv \
$(srcdir)/??_??/pgadmin3.mo \
$(srcdir)/??_??/wxstd.mo

+if !APPBUNDLE
+i18ndir = $(pkgdatadir)/i18n
+else
+i18ndir = $(datadir)/i18n
+endif

install-data-local:
- $(mkinstalldirs) $(datadir)/pgadmin3/i18n
+ $(mkinstalldirs) $(PREFIX)$(i18ndir)
@pub_tx='$(PUB_TX)'; \
for DIR in $$pub_tx; do \
- $(mkinstalldirs) $(datadir)/pgadmin3/i18n/$$DIR; \
+ $(mkinstalldirs) $(PREFIX)$(i18ndir)/$$DIR; \
for FILE in `ls $$DIR/*.mo`; do \
- $(install_sh) -c -m 644 $$FILE $(datadir)/pgadmin3/i18n/$$DIR/; \
+ $(install_sh) -c -m 644 $$FILE $(PREFIX)$(i18ndir)/$$DIR/; \
done \
done
- $(install_sh) -c -m 644 pgadmin3.lng $(datadir)/pgadmin3/i18n/$$DIR
- $(install_sh) -c -m 644 wxstd.mo $(datadir)/pgadmin3/i18n/$$DIR
-
+ $(install_sh) -c -m 644 pgadmin3.lng $(PREFIX)$(i18ndir)/$$DIR
+ $(install_sh) -c -m 644 wxstd.mo $(PREFIX)$(i18ndir)/$$DIR
Index: src/pgAdmin3.cpp
================================================== =================
--- src/pgAdmin3.cpp (revision 4179)
+++ src/pgAdmin3.cpp (working copy)
@@ -147,31 +147,6 @@
}
}

-
- wxPathList path;
-
- path.Add(loadPath);
-
-#ifdef __WXMSW__
-
- // Look for a path 'hint' on Windows. This registry setting may
- // be set by the Win32 PostgreSQL installer which will generally
- // install pg_dump et al. in the PostgreSQL bindir rather than
- // the pgAdmin directory.
-
- wxRegKey hintKey(wxT("HKEY_LOCAL_MACHINE\\Software\\") APPNAME_L);
-
- if (hintKey.HasValue(wxT("Helper Path")))
- {
- wxString hintPath;
- hintKey.QueryValue(wxT("Helper Path"), hintPath);
- path.Add(hintPath);
- }
-
-#endif
-
- path.AddEnvList(wxT("PATH"));
-
// evaluate all working paths

#if defined(__WXMSW__)
Index: src/include/base/appbase.h
================================================== =================
--- src/include/base/appbase.h (revision 4179)
+++ src/include/base/appbase.h (working copy)
@@ -9,6 +9,7 @@
//
//////////////////////////////////////////////////////////////////////////

+extern wxPathList path; // The search path
extern wxString loadPath; // Where the program is loaded from
extern wxString docPath; // Where docs are stored
extern wxString uiPath; // Where ui data is stored
Index: src/base/appbase.cpp
================================================== =================
--- src/base/appbase.cpp (revision 4179)
+++ src/base/appbase.cpp (working copy)
@@ -24,6 +24,7 @@
#include "base/pgConnBase.h"
#include "base/sysLogger.h"

+wxPathList path; // The search path
wxString loadPath; // Where the program is loaded from
wxString docPath; // Where docs are stored
wxString uiPath; // Where ui data is stored
@@ -60,6 +61,18 @@
docPath = loadPath + DOC_DIR;
else
docPath = loadPath + wxT("/../..") DOC_DIR;
+
+ // Look for a path 'hint' on Windows. This registry setting may
+ // be set by the Win32 PostgreSQL installer which will generally
+ // install pg_dump et al. in the PostgreSQL bindir rather than
+ // the pgAdmin directory.
+ wxRegKey hintKey(wxT("HKEY_LOCAL_MACHINE\\Software\\") APPNAME_L);
+ if (hintKey.HasValue(wxT("Helper Path")))
+ {
+ wxString hintPath;
+ hintKey.QueryValue(wxT("Helper Path"), hintPath);
+ path.Add(hintPath);
+ }

#else
wxString dataDir;
@@ -123,6 +136,8 @@
docPath = loadPath + wxT("/..") DOC_DIR ;
}
#endif
+
+ path.AddEnvList(wxT("PATH"));
}




---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:46 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com