Support compile under Linux by disabling wxJSON and GIT stuff

This commit is contained in:
Rob 2023-02-14 02:22:20 +01:00
parent 83e372aae5
commit 2354cdaa01
13 changed files with 51 additions and 15 deletions

View file

@ -21,8 +21,8 @@ cmake --build . --config Release --target all -j 3 --
Его можно взять в исходниках Postgresql 15 и положить в include/parser/
Могут быть проблемы с компиляцией JSON парсера.
Его можно исключить (как и эксперементальную часть с Git) заменой по всем исходникам wxUSE_WEBREQUEST
на что бессмысленное например wxUSE_WEBREQUEST5 .
Его можно исключить (как и эксперементальную часть с Git) заменой по всем исходникам NO_WXJSON_GIT
на что бессмысленное например NO_WXJSON_GIT.
ОС для сборки использовал «Альт Рабочая станция» 10

36
INSTALL_EN.txt Normal file
View file

@ -0,0 +1,36 @@
Dependencies
-------------
cmake 3.2
gcc10-c++
wxWidgets 3.2, build from source (https://www.wxwidgets.org/downloads/):
tar -xf wxWidgets-3.2.2.1.tar.bz2
cd wxWidgets-3.2.2.1
./configure --with-gtk --enable-unicode
make
sudo make install
PostgreSQL 15.1
libxml2
libxslt
Compile under Linux
-------
mkdir build
cd build
CXXFLAGS="-DNO_WXJSON_GIT" cmake ..
cmake --build . --config Release --target all -j 3 --
The resulting pgAdmin3 executable should be placed in the directory of the original pgadmin3
There may be problems with the missing kwlist.h file
It can be taken from the Postgresql 15 sources and put in include/parser/
There may be problems compiling the JSON parser.
It can be eliminated (as well as the experimental part with Git) by defining NO_WXJSON_GIT as done above through CXXFLAGS.
OS for assembly used "Alt Workstation" 10
https://www.basealt.ru/alt-workstation/download#c1211
Edited and compiled on Visual Studio code

View file

@ -28,7 +28,7 @@ enum
{
MARGIN_LINE_NUMBERS
};
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
class SourceViewDialog : public wxFrame

View file

@ -171,7 +171,7 @@ frmMain::frmMain(const wxString &title)
statistics = new ctlListView(listViews, CTL_STATVIEW, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER);
dependencies = new ctlListView(listViews, CTL_DEPVIEW, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER);
dependents = new ctlListView(listViews, CTL_REFVIEW, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER);
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
git = NULL;
wxJSONValue cfg=ctlGitPanel::GetConfig();
@ -188,7 +188,7 @@ frmMain::frmMain(const wxString &title)
listViews->AddPage(statistics, _("Statistics")); // NBP_STATISTICS
listViews->AddPage(dependencies, _("Dependencies")); // NBP_DEPENDENCIES
listViews->AddPage(dependents, _("Dependents")); // NBP_DEPENDENTS
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
if (git) {
listViews->AddPage(git, _("Git")); //
@ -827,7 +827,7 @@ void frmMain::ShowObjStatistics(pgObject *data, wxWindow *ctrl)
data->ShowDependents(this, dependents);
dependents->Thaw();
}
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
if ((!ctrl && git && git->IsShownOnScreen()) || ctrl == git)
{

View file

@ -1,5 +1,5 @@
#pragma once
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
#ifndef _WX_ctlGitPanel_H_
#define _WX_ctlGitPanel_H_

View file

@ -207,7 +207,7 @@ private:
ctlListView *properties;
ctlListView *statistics;
ctlListView *dependents, *dependencies;
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
ctlGitPanel* git;
#endif
ctlAuiNotebook *listViews;

View file

@ -7,7 +7,7 @@
// Copyright: (c) 2007 Luciano Cattani
// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
#ifndef _WX_JSON_DEFS_H_
#define _WX_JSON_DEFS_H_

View file

@ -7,7 +7,7 @@
// Copyright: (c) 2007 Luciano Cattani
// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
#include "pgAdmin3.h"

View file

@ -7,7 +7,7 @@
// Copyright: (c) 2007 Luciano Cattani
// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
#if !defined( _WX_JSONVAL_H )
#define _WX_JSONVAL_H

View file

@ -7,7 +7,7 @@
// Copyright: (c) 2007 Luciano Cattani
// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
#include "pgAdmin3.h"

View file

@ -13,7 +13,7 @@
#endif
#include "pgAdmin3.h"
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
#include <wx/mstream.h>
#include <wx/sstream.h>

View file

@ -12,7 +12,7 @@
#endif
#include "pgAdmin3.h"
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
// For compilers that support precompilation, includes "wx.h".

View file

@ -13,7 +13,7 @@
#include "pgAdmin3.h"
#if wxUSE_WEBREQUEST
#if !defined(NO_WXJSON_GIT)
#include <wx/sstream.h>
#include <wx/mstream.h>