- QT 5
- PostgreSQL
- Xcode - latest version available
- XML2 library
# Clone pgmodeler
git clone https://github.com/pgmodeler/pgmodeler
# Clone plugins
git clone https://github.com/pgmodeler/plugins.git
PLEASE REPLACE EACH VARIABLE VALUE ACCORDING TO YOUR SYSTEM PATH!
QT_ROOT=/opt/homebrew/Cellar/qt@5/5.15.3
PGMODELER_PLUGINS_ROOT=/Applications/pgModeler.app/Contents/MacOS/plugins
PGMODELER_SOURCE_ROOT=/Users/myuser/dev/pgmodeler/
PGMODELER_LIBRARIES_ROOT=/Library/PostgreSQL/14/lib
cd plugins
git checkout main
$QT_ROOT/bin/qmake plugins.pro PGMODELER_PLUGINS=$PGMODELER_PLUGINS_ROOT
PGMODELER_SRC=$PGMODELER_SOURCE_ROOT
PGMODELER_LIBS=$PGMODELER_LIBRARIES_ROOT
make && make install
cd ..
Open the file pgmodeler.pri, in your favorite editor, and update the variables PGSQL_LIB
, PGSQL_INC
, XML_INC
and XML_LIB
, according to your system:
macx {
PGSQL_LIB = /Library/PostgreSQL/14/lib/libpq.dylib
PGSQL_INC = /Library/PostgreSQL/14/include
XML_INC = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2
XML_LIB = /usr/lib/libxml2.dylib
...
}
cd pgmodeler
git checktout v0.9.4
$QT_ROOT/bin/qmake -r CONFIG+=release pgmodeler.pro
make
make install
In file included from src/schemaparser.cpp:19:
src/schemaparser.h:49:16: error: unknown type name 'QRegExp'
static const QRegExp AttribRegExp;
^
src/schemaparser.cpp:68:7: error: unknown type name 'QRegExp'
const QRegExp SchemaParser::AttribRegExp=QRegExp("^([a-z])([a-z]*|(\\d)*|(\\-)*|(_)*)+", Qt::CaseInsensitive);
^
src/schemaparser.cpp:68:42: error: use of undeclared identifier 'QRegExp'
const QRegExp SchemaParser::AttribRegExp=QRegExp("^([a-z])([a-z]*|(\\d)*|(\\-)*|(_)*)+", Qt::CaseInsensitive);
^
3 errors generated.
make[1]: *** [obj/schemaparser.o] Error 1
make: *** [sub-libs-libparsers-make_first-ordered] Error 2
Solution
brew install qt@5