SVN Commit by dpage: r4427 - trunk/pgadmin3/src/base

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by dpage: r4427 - trunk/pgadmin3/src/base
Date: 2005-09-02 09:35:12
Message-ID: 200509020935.j829ZCP5010560@developer.pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Author: dpage
Date: 2005-09-02 10:35:11 +0100 (Fri, 02 Sep 2005)
New Revision: 4427

Modified:
trunk/pgadmin3/src/base/appbase.cpp
Log:
pgInstaller 8.1 will install pgAdmin's exe's into the main bin dir to avoid having libpq's in all sorts of places (especially %SYSTEM32%). Fixup the path setup appropriately.

Modified: trunk/pgadmin3/src/base/appbase.cpp
===================================================================
--- trunk/pgadmin3/src/base/appbase.cpp 2005-08-29 19:04:25 UTC (rev 4426)
+++ trunk/pgadmin3/src/base/appbase.cpp 2005-09-02 09:35:11 UTC (rev 4427)
@@ -48,21 +48,34 @@

#if defined(__WXMSW__)

+ // Search for the right paths. We check the following locations:
+ //
+ // 1) ./xxx - Running as a standalone install
+ // 2) ../pgAdmin/xxx - Running in a pgInstaller 8.1 installation
+ // (with the .exe and dlls in the main bin dir)
+ // 3) ../../xxx or ../xxx - Running in a development environment
+
if (wxDir::Exists(loadPath + I18N_DIR))
i18nPath = loadPath + I18N_DIR;
- else if (wxDir::Exists(loadPath + wxT("/../..") + I18N_DIR))
+ else if (wxDir::Exists(loadPath + wxT("/../pgAdmin III") + I18N_DIR))
+ i18nPath = loadPath + wxT("/../pgAdmin III") + I18N_DIR;
+ else
i18nPath = loadPath + wxT("/../..") + I18N_DIR;

+ if (wxDir::Exists(loadPath + DOC_DIR))
+ docPath = loadPath + DOC_DIR;
+ else if (wxDir::Exists(loadPath + wxT("/../pgAdmin III") DOC_DIR))
+ docPath = loadPath + wxT("/../pgAdmin III") DOC_DIR;
+ else
+ docPath = loadPath + wxT("/../..") DOC_DIR;
+
if (wxDir::Exists(loadPath + UI_DIR))
uiPath = loadPath + UI_DIR;
+ if (wxDir::Exists(loadPath + wxT("/../pgAdmin III") + UI_DIR))
+ uiPath = loadPath + wxT("/../pgAdmin III") + UI_DIR;
else
uiPath = loadPath + wxT("/..") UI_DIR;

- if (wxDir::Exists(loadPath + DOC_DIR))
- 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

Browse pgadmin-hackers by date

  From Date Subject
Next Message Andreas Pflug 2005-09-02 11:47:16 Re: what creates or where is 'ver.h' ??
Previous Message Belbin, Peter 2005-09-01 21:37:01 what creates or where is 'ver.h' ??