Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 1.75 KB

build_pgmodeler_from_source_mac.md

File metadata and controls

78 lines (54 loc) · 1.75 KB

Build pgmodeler from the source for MAC

Clone

git clone https://github.com/pgmodeler/pgmodeler.git
cd pgmodeler

Prerequisites

  1. Install PostgreSQL
  2. Install Xcode
  3. Install libxml2, qt & libpq
brew install qt libxml2 libpq

And change the installation path in pgmodeler.pri, something similar to the following configuration

For intel chip based Mac

macx {
  PGSQL_LIB = /Applications/Postgres.app/Contents/Versions/latest/lib/libpq.dylib
  PGSQL_INC = /Applications/Postgres.app/Contents/Versions/latest/include
  XML_INC = /usr/local/Cellar/libxml2/2.11.4_1/include/libxml2
  XML_LIB = /usr/local/Cellar/libxml2/2.11.4_1/lib/libxml2.dylib
  INCLUDEPATH += $$PGSQL_INC $$XML_INC
}

then, run the below command to build

/usr/local/opt/qt/bin/qmake -r pgmodeler.pro

For M1, M2... Chip based Mac

macx {
  !defined(PGSQL_LIB, var): PGSQL_LIB = /Applications/Postgres.app/Contents/Versions/latest/lib/libpq.dylib
  !defined(PGSQL_INC, var): PGSQL_INC = /Applications/Postgres.app/Contents/Versions/latest/include
  !defined(XML_INC, var): XML_INC = /opt/homebrew/opt/libxml2/include/libxml2
  !defined(XML_LIB, var): XML_LIB = /opt/homebrew/opt/libxml2/lib/libxml2.dylib
  INCLUDEPATH += "$$PGSQL_INC" "$$XML_INC"
}

then, run the below command to build

/opt/homebrew/opt/qt6/bin/qmake -r pgmodeler.pro

Install

Run the below command to install pgModeler in /Application

sudo make && make install

Go to application and select pgmodeler

Enjoy !!!

screenshot

screenshot

Known Problem

  • Dark shaded table and relationships

    Go to -> PgModeler -> Preferences -> Appearance -> Select Default