Computer paradigms

Compile pgModeler on Windows


pgModeler is an Open Source software allowing to model a database, that is to say to schematize everything related to the construction of a base (tables, fields, relations, constraints ...) and oriented towards the PostgreSQL DBMS.

The executables are however not free, unless you build them by your own means. Here is how to proceed to generate a version. I will rely here on version 0.9.3 of December 2020, and managing up to PostgreSQL v.13.

  • Make sure you have enough disk space: you need at least 3.5 GB available.
  • Download MSys2. It is a suite of tools for compiling sources to generate Windows Executable.
  • Download the sources of pgModeler : you can download the file pgmodeler-0.9.3.tar.gz
  • Install MSys2
  • Before running it, create the environment variable MSYS_PATH_TYPE with the value of the binary files of Mingw (by default c:\msys64\mingw64\bin). It helps to launch compilation commands.
  • Run MSys2 (you must start 64-bit MGWin version).
  • Copy the downloaded file pgmodeler-0.9.3.tar.gz (without unzipping it) into the folder msys2/home/{PROFIL}. This last parameter {PROFIL} is in fact the name of your Windows profile, which was taken over by MSys2
  • On MSys2, start the decompression of the file with gzip and tar with the following commands:
    gunzip pgmodeler-0.9.3.tar.gz
    tar -xf pgmodeler-0.9.3.tar
    rm pgmodeler-0.9.3.tar
  • A directory pgmodeler-0.9.3 was then created, containing the sources of pgModeler.
  • If you have installed MSys2 in another folder than c:\MSys64 :
    • Open the "pgmodeler.pri" file with a text editor (created in msys2/home/{PROFIL}/pgmodeler-0.9.3) and search lines starting with "windows {" and containing " !defined(PGSQL_LIB, var)". Then modify the following 4 lines according to the path where you installed MSys2:
      !defined(PGSQL_LIB, var): PGSQL_LIB = c:/MSys64/mingw64/bin/libpq.dll
      !defined(PGSQL_INC, var): PGSQL_INC = c:/msys64/mingw64/include
      !defined(XML_INC, var): XML_INC = c:/msys64/mingw64/include/libxml2
      !defined(XML_LIB, var): XML_LIB = c:/msys64/mingw64/bin/libxml2-2.dll
  • Save the text file and enter the following command on MSys2 (if you have a firewall, give an access to MSys2) :
    pacman -Suy
  • A request to close MSys2 is displayed at the end. Validate it then restart the software.
  • Run the following command again to dowload the other packages :
    pacman -Suy
  • Download other packages that will also be used for compilation
    pacman -S base-devel mingw-w64-x86_64-make mingw-w64-x86_64-gcc mingw-w64-x86_64-postgresql mingw-w64-x86_64-qt5
  • Create the executable destination directory
    mkdir pgmodeler_final
  • Create the makefile file :
    cd pgmodeler-0.9.3
    export INSTALLATION_ROOT=~/pgmodeler_final
    qmake -r CONFIG+=release PREFIX=$INSTALLATION_ROOT pgmodeler.pro
    Don't be affraid if you get the following warning : "WARNING: Failure to find: obj/windows_ico.qrc"
  • Start the compilation. This operation is quite long, depending on the performance of your system :
  • Then:
    mingw32-make install
  • Then go to the installation directory and apply:
    windeployqt pgmodeler.exe pgmodeler_ui.dll
  • Finally, copy the latest DLL files to the target directory
    cd $MSYS2_ROOT/mingw64/bin/
    cp libicuin*.dll libicuuc*.dll libicudt*.dll libpcre2-16-0.dll libharfbuzz-0.dll libpng16-16.dll libfreetype-6.dll libgraphite2.dll libglib-2.0-0.dll libpcre-1.dll libbz2-1.dll libssl-1_1-x64.dll libcrypto-1_1-x64.dll libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll zlib1.dll libpq.dll libxml2-2.dll liblzma-5.dll libiconv-2.dll libintl-8.dll libbrotlidec.dll libbrotlicommon.dll libdouble-conversion.dll libzstd.dll $INSTALLATION_ROOT

Once all these commands are done, you can run pgModeler from the installation directory.

Dernière modification le 06/03/2021 - Quillevere.net


No inscription needed if you wish to

Search in this website

fr en rss RSS info Informations