Building upon https://www.pgmodeler.io/support/installation
- Download 64bit MSYS2 from https://www.msys2.org/ This example uses msys2-x86_64-20190524.exe
- Install to default directory C:\msys64
- Complete the installation, by running MSYS2 64bit now from the last step of the installation wizard.
-
Update MSYS2
pacman -Suy
-
On first update you will get the following warning. Close the window.
warning: terminate MSYS2 without returning to shell and check for updates again warning: for example close your terminal window instead of calling exit
-
Restart MSYS2 from the Windows 10 Start menu 'MSYS2 MSYS' and continue with updates
pacman -Suy
-
Installation of libraries
pacman -S base-devel mingw-w64-x86_64-make mingw-w64-x86_64-gcc mingw-w64-x86_64-postgresql mingw-w64-x86_64-qt5 pacman -S mingw-w64-x86_64-libxml2 pacman -S mingw-w64-x86_64-double-conversion pacman -S mingw-w64-x86_64-zstd
-
Install git
pacman -S git
-
Make directory for output
mkdir ~/pg_compiled
-
Clone pgModeler from github
git clone https://github.com/pgmodeler/pgmodeler.git cd pgmodeler git checkout master
-
Add binaries to path
export PATH="/mingw64/bin:$PATH"
-
Set environment variable for output of compile
export INSTALLATION_ROOT="$HOME/pg_compiled"
-
Edit C:\msys64\mingw64\share\qt5\mkspecs\common\windows-vulkan.conf
Change:
load(windows_vulkan_sdk)
To:
load(win32/windows_vulkan_sdk)
-
Edit "C:\msys64\home<user>\pgmodeler\pgmodeler.pri"
Change:
windows { !defined(PGSQL_LIB, var): PGSQL_LIB = C:/msys_64/mingw64/bin/libpq.dll !defined(PGSQL_INC, var): PGSQL_INC = C:/msys_64/mingw64/include !defined(XML_INC, var): XML_INC = C:/msys_64/mingw64/include/libxml2 !defined(XML_LIB, var): XML_LIB = C:/msys_64/mingw64/bin/libxml2-2.dll
To:
windows { !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
-
Compile it!
cd ~/pgmodeler /mingw64/bin/qmake.exe -r CONFIG+=release PREFIX=$INSTALLATION_ROOT pgmodeler.pro make make install cd $INSTALLATION_ROOT windeployqt pgmodeler.exe pgmodeler_ui.dll
-
Copy dependancies
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 $INSTALLATION_ROOT cp libdouble-conversion.dll $INSTALLATION_ROOT cp libzstd.dll $INSTALLATION_ROOT cp libmd4c.dll $INSTALLATION_ROOT cp libbrotlidec.dll $INSTALLATION_ROOT cp libbrotlicommon.dll $INSTALLATION_ROOT
- From Windows Explorer double click
C:\msys64\home\<user>\pg_compiled\pgmodeler.exe