Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Database designer is now not compiled by default

You need to use --enable-databasedesigner with ./configure to enable it. By
default, it's disabled.
  • Loading branch information...
commit 926bd69bc18d6243f080c56f67f6ed4cb763926b 1 parent 7ffaa9c
@gleu gleu authored
View
31 acinclude.m4
@@ -324,6 +324,26 @@ AC_DEFUN([LOCATE_SPHINX],
])
AC_SUBST(SPHINX_BUILD)
+########################################
+# Enable Database Designer in pgAdmin3 #
+########################################
+AC_DEFUN([ENABLE_DATABASEDESIGNER],
+[
+ AC_ARG_ENABLE(databasedesigner, [ --enable-databasedesigner build the database designer of pgAdmin3],
+ [
+ if test "$enableval" = yes
+ then
+ HAVE_DATABASEDESIGNER=yes
+ else
+ HAVE_DATABASEDESIGNER=no
+ fi
+ ],
+ [
+ HAVE_DATABASEDESIGNER=no
+ ])
+])
+AC_SUBST(HAVE_DATABASEDESIGNER)
+
###########################
# Debug build of pgAdmin3 #
###########################
@@ -652,6 +672,10 @@ AC_DEFUN([SETUP_POSTGRESQL],
then
CPPFLAGS="$CPPFLAGS -DHAVE_CONNINFO_PARSE"
fi
+ if test "$HAVE_DATABASEDESIGNER" = "yes"
+ then
+ CPPFLAGS="$CPPFLAGS -DDATABASEDESIGNER"
+ fi
# Avoid linking with things we don't need. Really this is a hack
# to prevent png2c linking with libpq with gcc on non-OSX OSs
@@ -858,6 +882,13 @@ AC_DEFUN([SUMMARY],
echo "libxslt xslt-config binary: $XSLT_CONFIG"
echo "libxslt version: libxslt "`$XSLT_CONFIG --version`
echo
+ if test "$HAVE_DATABASEDESIGNER" = yes
+ then
+ echo "Building Database Designer: Yes"
+ else
+ echo "Building Database Designer: No"
+ fi
+ echo
if test "$BUILD_DEBUG" = yes
then
echo "Building a debug version of pgAdmin: Yes"
View
1  configure.ac.in
@@ -36,6 +36,7 @@ AC_CHECK_FUNCS([gethostbyname inet_ntoa memmove memset strchr])
ENABLE_DEBUG
ENABLE_STATIC
ENABLE_APPBUNDLE
+ENABLE_DATABASEDESIGNER
AM_CONDITIONAL([APPBUNDLE], [test x$BUILD_APPBUNDLE = xyes])
AM_CONDITIONAL([BUILD_DEBUG], [test x$BUILD_DEBUG = xyes])
View
4 pgadmin/frm/frmMain.cpp
@@ -63,7 +63,9 @@
#include "frm/frmMaintenance.h"
#include "frm/frmStatus.h"
#include "frm/frmPassword.h"
+#ifdef DATABASEDESIGNER
#include "frm/frmDatabaseDesigner.h"
+#endif
#include "frm/frmQuery.h"
#include "frm/frmEditGrid.h"
#include "frm/frmImport.h"
@@ -385,7 +387,9 @@ void frmMain::CreateMenus()
new queryToolUpdateFactory(menuFactories, scriptingMenu, 0);
new queryToolDeleteFactory(menuFactories, scriptingMenu, 0);
+#ifdef DATABASEDESIGNER
new databaseDesignerFactory(menuFactories, toolsMenu, toolBar);
+#endif
viewdataMenuFactory = new submenuFactory(menuFactories); // placeholder where "View data" submenu will be inserted
toolsMenu->Append(viewdataMenuFactory->GetId(), _("View &Data"), viewDataMenu, _("View data."));
View
20 pgadmin/pgAdmin3.cpp
@@ -56,7 +56,9 @@
#include "frm/frmConfig.h"
#include "frm/frmQuery.h"
#include "frm/frmStatus.h"
+#ifdef DATABASEDESIGNER
#include "frm/frmDatabaseDesigner.h"
+#endif
#include "frm/frmSplash.h"
#include "dlg/dlgSelectConnection.h"
#include "db/pgConn.h"
@@ -229,8 +231,10 @@ bool pgAdmin3::OnInit()
locale->AddCatalog(wxT("pgadmin3"));
}
+#ifdef DATABASEDESIGNER
//Initialize Font
hdFontAttribute::InitFont();
+#endif
long langCount = 0;
const wxLanguageInfo *langInfo;
@@ -275,8 +279,10 @@ bool pgAdmin3::OnInit()
{wxCMD_LINE_OPTION, "Sc", "serverstatusconnect", _("connect server status window to database"), wxCMD_LINE_VAL_STRING},
{wxCMD_LINE_SWITCH, "q", "query", _("open query tool"), wxCMD_LINE_VAL_NONE},
{wxCMD_LINE_OPTION, "qc", "queryconnect", _("connect query tool to database"), wxCMD_LINE_VAL_STRING},
+#ifdef DATABASEDESIGNER
{wxCMD_LINE_SWITCH, "d", "designer", _("open designer window"), wxCMD_LINE_VAL_NONE},
{wxCMD_LINE_OPTION, "dc", "designerconnectconnect", _("connect designer window to database"), wxCMD_LINE_VAL_STRING},
+#endif
{wxCMD_LINE_OPTION, "f", "file", _("file to load into the query tool in -q or -qc mode"), wxCMD_LINE_VAL_STRING},
{wxCMD_LINE_OPTION, "cm", NULL, _("edit main configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
{wxCMD_LINE_OPTION, "ch", NULL, _("edit HBA configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
@@ -290,8 +296,10 @@ bool pgAdmin3::OnInit()
{wxCMD_LINE_OPTION, wxT("Sc"), wxT("serverstatusconnect"), _("connect server status window to database"), wxCMD_LINE_VAL_STRING},
{wxCMD_LINE_SWITCH, wxT("q"), wxT("query"), _("open query tool"), wxCMD_LINE_VAL_NONE},
{wxCMD_LINE_OPTION, wxT("qc"), wxT("queryconnect"), _("connect query tool to database"), wxCMD_LINE_VAL_STRING},
+#ifdef DATABASEDESIGNER
{wxCMD_LINE_SWITCH, wxT("d"), wxT("designer"), _("open designer window"), wxCMD_LINE_VAL_NONE},
{wxCMD_LINE_OPTION, wxT("dc"), wxT("designerconnectconnect"), _("connect designer window to database"), wxCMD_LINE_VAL_STRING},
+#endif
{wxCMD_LINE_OPTION, wxT("f"), wxT("file"), _("file to load into the query tool in -q or -qc mode"), wxCMD_LINE_VAL_STRING},
{wxCMD_LINE_OPTION, wxT("cm"), NULL, _("edit main configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
{wxCMD_LINE_OPTION, wxT("ch"), NULL, _("edit HBA configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
@@ -310,9 +318,13 @@ bool pgAdmin3::OnInit()
if (cmdParser.Parse() != 0)
return false;
- if ((cmdParser.Found(wxT("q")) && cmdParser.Found(wxT("qc"))) ||
- (cmdParser.Found(wxT("S")) && cmdParser.Found(wxT("Sc"))) ||
- (cmdParser.Found(wxT("d")) && cmdParser.Found(wxT("dc"))))
+ if (
+ (cmdParser.Found(wxT("q")) && cmdParser.Found(wxT("qc")))
+ || (cmdParser.Found(wxT("S")) && cmdParser.Found(wxT("Sc")))
+#ifdef DATABASEDESIGNER
+ || (cmdParser.Found(wxT("d")) && cmdParser.Found(wxT("dc")))
+#endif
+ )
{
cmdParser.Usage();
return false;
@@ -557,6 +569,7 @@ bool pgAdmin3::OnInit()
fq->Go();
}
+#ifdef DATABASEDESIGNER
else if ((cmdParser.Found(wxT("d")) || cmdParser.Found(wxT("dc"))) && !cmdParser.Found(wxT("s")))
{
// -d specified, but not -s. Open the designer window but do *not* open the main window
@@ -642,6 +655,7 @@ bool pgAdmin3::OnInit()
frmDatabaseDesigner *fq = new frmDatabaseDesigner(NULL, wxEmptyString, conn);
fq->Go();
}
+#endif
#ifdef __WXMAC__
else if (((cmdParser.Found(wxT("q")) || cmdParser.Found(wxT("qc"))) && !cmdParser.Found(wxT("s"))) || !macFileToOpen.IsEmpty())
Please sign in to comment.
Something went wrong with that request. Please try again.