diff --git a/INSTALL.txt b/INSTALL.txt index 0247416..f68e6b4 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -3,8 +3,8 @@ -------------- cmake 3.2 gcc10-c++ -wxWidgets 3.1.6 (Был собран из исходников https://www.wxwidgets.org/downloads/) -Postgresql 14 +wxWidgets 3.2 (Был собран из исходников https://www.wxwidgets.org/downloads/) +Postgresql 15.1 libxml2 libxslt @@ -17,6 +17,13 @@ cmake --build . --config Release --target all -j 3 -- Полученный исполняемый файл pgAdmin3 нужно поместить в каталог оригального pgadmin3 +Могут быть проблемы с отсутствующем файлом файлом kwlist.h +Его можно взять в исходниках Postgresql 15 и положить в include/parser/ + +Могут быть проблемы с компиляцией JSON парсера. +Его можно исключить (как и эксперементальную часть с Git) заменой по всем исходникам wxUSE_WEBREQUEST +на что бессмысленное например wxUSE_WEBREQUEST5 . + ОС для сборки использовал «Альт Рабочая станция» 10 https://www.basealt.ru/alt-workstation/download#c1211 diff --git a/ctl/ctlGitPanel.cpp b/ctl/ctlGitPanel.cpp index 67f8b30..99f4c6b 100644 --- a/ctl/ctlGitPanel.cpp +++ b/ctl/ctlGitPanel.cpp @@ -28,6 +28,7 @@ enum { MARGIN_LINE_NUMBERS }; +#if wxUSE_WEBREQUEST class SourceViewDialog : public wxFrame @@ -113,8 +114,8 @@ public: std::wstring t; std::wstring tableline; int rline = 1, lline = 1; - std::list::const_iterator it; // - it = diffs.begin(); // + std::list::const_iterator it; // ��������� �������� + it = diffs.begin(); // ����������� ��� ������ ������ Diff aDiff; bool modify = false; nstart = 0; @@ -129,7 +130,7 @@ public: ctlR->IndicatorSetStyle(s_indicHighlight, wxSTC_INDIC_ROUNDBOX); ctlR->SetIndicatorCurrent(s_indicHighlight); - while (it != diffs.end()) // + while (it != diffs.end()) // ���� �������� �� ��������� ����� { aDiff = *it; tex = aDiff.text; @@ -139,7 +140,7 @@ public: if (pos == -1) { t.assign(tex, nstart, tex.length()); nstart = tex.length(); } else { t.assign(tex, nstart, pos - nstart); nstart = pos; } if (t.length() > 0) { - // + // ��� �� ��� ���� ������ if (aDiff.operation == Operation::INSERT) { cur_r += L"" + t + L""; addIndicText(ctlR, t, s_indicHighlight); } @@ -153,11 +154,11 @@ public: addIndicText(ctlR, t, 0); } else modify = true; - // + // ���� �� �������� ������� ������ ������� ��� ��� �� ���� ������ } else { - // \n + // ����� �� �������� \n nstart = pos + 1; ncur_l = std::to_wstring(lline); ncur_l = L""; ncur_r = L""; @@ -215,7 +216,7 @@ public: // modify = false; } - } // Diff + } // ���� �� ������� ������ ������ Diff ++it; } @@ -1247,8 +1248,8 @@ void ctlGitPanel::GetExpandedChildNodes(wxTreeItemId node, wxArrayString& expand } else { - if (obj->GetMetaType() == PGM_VIEW) obj->ShowTreeDetail(browser); // - if (obj->GetMetaType() == PGM_EVENTTRIGGER) // + if (obj->GetMetaType() == PGM_VIEW) obj->ShowTreeDetail(browser); // ������ ��� ���� ����� �������� ���� � ��������� + if (obj->GetMetaType() == PGM_EVENTTRIGGER) // �������� ���� � ��������� �� �������� obj->ShowTreeDetail(browser); } @@ -1264,7 +1265,7 @@ void ctlGitPanel::GetExpandedChildNodes(wxTreeItemId node, wxArrayString& expand wxTreeItemId Item2 = browser->GetItemParent(obj->GetId()); obj = browser->GetObject(Item2); // Schemes if (obj && obj->GetMetaType() == PGM_SCHEMA && !obj->IsCollection()) { - rec = false; // . , + rec = false; // �� �������� ���� �� ���. �������� � �������, � �� ������ �� ������� obj = browser->GetObject(child); obj->ShowTreeDetail(browser); } @@ -1282,7 +1283,7 @@ void ctlGitPanel::GetExpandedChildNodes(wxTreeItemId node, wxArrayString& expand s = obj->GetSql(browser); if ((typenam != "Schema" && typenam != "Database")&& !obj->IsCollection()) { - // SQL , Git + //����� SQL ��� ����� �� ���������, ��� ��� ��� ��������� ������� � �� ���� � Git wxString p = pat + '/' + browser->GetItemText(child).Trim(); m_link->SetLabel(p); m_count_db++; @@ -1422,4 +1423,4 @@ void ctlGitPanel::OnNotebookPageChanged(wxBookCtrlEvent& event) //dlg->Show(); } - +#endif diff --git a/frm/frmMain.cpp b/frm/frmMain.cpp index 0eee4df..fed407c 100644 --- a/frm/frmMain.cpp +++ b/frm/frmMain.cpp @@ -171,10 +171,12 @@ 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 + git = NULL; wxJSONValue cfg=ctlGitPanel::GetConfig(); if (!cfg.IsNull()) git = new ctlGitPanel(listViews, this,cfg); - +#endif // Switch back to the native list control. @@ -186,10 +188,12 @@ 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 (git) { listViews->AddPage(git, _("Git")); // } - +#endif properties->SetImageList(imageList, wxIMAGE_LIST_SMALL); statistics->SetImageList(imageList, wxIMAGE_LIST_SMALL); dependencies->SetImageList(imageList, wxIMAGE_LIST_SMALL); @@ -823,12 +827,15 @@ void frmMain::ShowObjStatistics(pgObject *data, wxWindow *ctrl) data->ShowDependents(this, dependents); dependents->Thaw(); } +#if wxUSE_WEBREQUEST + if ((!ctrl && git && git->IsShownOnScreen()) || ctrl == git) { //data->ShowDependents(this, dependents); if (git && data) git->ShowPage(data); } +#endif } diff --git a/include/ctl/ctlGitPanel.h b/include/ctl/ctlGitPanel.h index 634919c..567b5cb 100644 --- a/include/ctl/ctlGitPanel.h +++ b/include/ctl/ctlGitPanel.h @@ -1,4 +1,5 @@ #pragma once +#if wxUSE_WEBREQUEST #ifndef _WX_ctlGitPanel_H_ #define _WX_ctlGitPanel_H_ @@ -87,7 +88,7 @@ private: wxButton* m_cancelButton; wxStaticBitmap* m_imageStaticBitmap; wxWebRequest m_currentRequest; - + wxCheckBox* m_postCheckBox; wxTextCtrl* m_postContentTypeTextCtrl; wxTextCtrl* m_postRequestTextCtrl; @@ -109,3 +110,4 @@ private: }; #endif +#endif \ No newline at end of file diff --git a/include/frm/frmMain.h b/include/frm/frmMain.h index f5ac15f..7fdb35c 100644 --- a/include/frm/frmMain.h +++ b/include/frm/frmMain.h @@ -207,7 +207,9 @@ private: ctlListView *properties; ctlListView *statistics; ctlListView *dependents, *dependencies; +#if wxUSE_WEBREQUEST ctlGitPanel* git; +#endif ctlAuiNotebook *listViews; ctlSQLBox *sqlPane; wxMenu *newMenu, *debuggingMenu, *reportMenu, *toolsMenu, *pluginsMenu, *viewMenu, diff --git a/include/utils/json/json_defs.h b/include/utils/json/json_defs.h index 55a7d28..3031f33 100644 --- a/include/utils/json/json_defs.h +++ b/include/utils/json/json_defs.h @@ -7,7 +7,7 @@ // Copyright: (c) 2007 Luciano Cattani // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// - +#if wxUSE_WEBREQUEST #ifndef _WX_JSON_DEFS_H_ #define _WX_JSON_DEFS_H_ @@ -207,3 +207,4 @@ #endif // _WX_JSON_DEFS_H_ +#endif \ No newline at end of file diff --git a/include/utils/json/jsonreader.h b/include/utils/json/jsonreader.h index dff55e2..4954d9b 100644 --- a/include/utils/json/jsonreader.h +++ b/include/utils/json/jsonreader.h @@ -7,6 +7,7 @@ // Copyright: (c) 2007 Luciano Cattani // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// +#if wxUSE_WEBREQUEST #include "pgAdmin3.h" @@ -144,5 +145,5 @@ protected: #endif // not defined _WX_JSONREADER_H - +#endif diff --git a/include/utils/json/jsonval.h b/include/utils/json/jsonval.h index 08a5845..7b59ba4 100644 --- a/include/utils/json/jsonval.h +++ b/include/utils/json/jsonval.h @@ -7,6 +7,7 @@ // Copyright: (c) 2007 Luciano Cattani // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// +#if wxUSE_WEBREQUEST #if !defined( _WX_JSONVAL_H ) #define _WX_JSONVAL_H @@ -436,5 +437,5 @@ public: #endif // not defined _WX_JSONVAL_H - +#endif diff --git a/include/utils/json/jsonwriter.h b/include/utils/json/jsonwriter.h index 755f15f..9db57c3 100644 --- a/include/utils/json/jsonwriter.h +++ b/include/utils/json/jsonwriter.h @@ -7,6 +7,7 @@ // Copyright: (c) 2007 Luciano Cattani // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// +#if wxUSE_WEBREQUEST #include "pgAdmin3.h" @@ -116,6 +117,7 @@ private: #endif // not defined _WX_JSONWRITER_H +#endif diff --git a/utils/diff_match_patch.cc b/utils/diff_match_patch.cc index d9b7f09..b64e7a6 100644 --- a/utils/diff_match_patch.cc +++ b/utils/diff_match_patch.cc @@ -21,7 +21,7 @@ */ // this line need comment for Linux -#include "pgadmin3.h" +#include "pgAdmin3.h" #ifndef __WXMSW__ #include "utils/diff_match_patch.h" #endif diff --git a/utils/json/jsonreader.cpp b/utils/json/jsonreader.cpp index 62adcaa..21c4b62 100644 --- a/utils/json/jsonreader.cpp +++ b/utils/json/jsonreader.cpp @@ -8,12 +8,12 @@ // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// - #ifdef __GNUG__ #pragma implementation "jsonreader.cpp" #endif -#include "pgadmin3.h" +#include "pgAdmin3.h" +#ifdef wxUSE_WEBREQUEST #include #include @@ -2129,3 +2129,4 @@ wxJSONReader::DoStrto_ll(const wxString& str, wxUint64* ui64, wxChar* sign) +#endif diff --git a/utils/json/jsonval.cpp b/utils/json/jsonval.cpp index 9fd870a..3ac320b 100644 --- a/utils/json/jsonval.cpp +++ b/utils/json/jsonval.cpp @@ -11,7 +11,8 @@ #pragma implementation "jsonval.cpp" #endif -#include "pgadmin3.h" +#include "pgAdmin3.h" +#if wxUSE_WEBREQUEST // For compilers that support precompilation, includes "wx.h". @@ -3553,3 +3554,4 @@ wxJSONValue::operator = (wxUint64 ui) } */ +#endif diff --git a/utils/json/jsonwriter.cpp b/utils/json/jsonwriter.cpp index 776276a..32d8b8f 100644 --- a/utils/json/jsonwriter.cpp +++ b/utils/json/jsonwriter.cpp @@ -7,13 +7,13 @@ // Copyright: (c) 2007 Luciano Cattani // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// - #ifdef __GNUG__ #pragma implementation "jsonwriter.cpp" #endif -#include "pgadmin3.h" +#include "pgAdmin3.h" +#if wxUSE_WEBREQUEST #include #include @@ -1274,3 +1274,4 @@ wxJSONWriter::IsPunctuation(wxChar ch) +#endif