- Instructions
- Troubleshooting
- Sources
- Download 64bit MSYS2 from https://www.msys2.org/
- 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 main
- Add binaries to path
export PATH="/mingw64/bin:$PATH"
- Set environment variable for output of compile
export INSTALLATION_ROOT="$HOME/pg_compiled"
- Check
C:\msys64\mingw64\share\qt5\mkspecs\common\windows-vulkan.conf
Make sure that you have the text:
load(win32/windows_vulkan_sdk)
instead of anything like this:
load(windows_vulkan_sdk)
(Before 2021 you may have needed to replace that text, but as of today 09/06/2024 the correct text was already in place)
- Check
C:\msys64\home\%USERNAME%\pgmodeler\pgmodeler.pri
Make sure that the windows paths are pointing to the right installation directory.
Before 2021, there were incorrect underscores in the msys path.
Make sure that you have this (or the right path of your msys installation):
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
instead of something like this:
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
cd ~/pgmodeler
git clone https://github.com/pgmodeler/plugins
cd ~/pgmodeler
qmake-qt6 -r CONFIG+=release PREFIX=$INSTALLATION_ROOT pgmodeler.pro
This took me over 15 minutes:
make && make install
cd $INSTALLATION_ROOT
windeployqt-qt6 pgmodeler.exe gui.dll
The following command is taken from the official instructions. For me it failed to find some of the dependencies. Run it first:
echo -e "[Paths]\nPrefix=.\nPlugins=qtplugins\nLibraries=." > $INSTALLATION_ROOT/qt.conf
cd $MSYS2_ROOT/mingw64/bin/
cp D3Dcompiler_47.dll libb2-1.dll libbrotlicommon.dll libbrotlidec.dll libbz2-1.dll libcrypto-1_1-x64.dll \
libdouble-conversion.dll libfreetype-6.dll libgcc_s_seh-1.dll libglib-2.0-0.dll libgraphite2.dll \
libharfbuzz-0.dll libiconv-2.dll libicudt*.dll libicuin*.dll libicuuc*.dll libintl-8.dll liblzma-5.dll \
libmd4c.dll libpcre-1.dll libpcre2-16-0.dll libpng16-16.dll libpq.dll libssl-1_1-x64.dll libstdc++-6.dll \
libwinpthread-1.dll libxml2-2.dll zlib1.dll $INSTALLATION_ROOT
mkdir $INSTALLATION_ROOT/qtplugins/tls
cp -r $MSYS2_ROOT/mingw64/share/qt6/plugins/platforms/tls/* $INSTALLATION_ROOT/qtplugins/tls
This reported that some dependencies were not found, stating the individual filenames.
Then, I used Everything to quickly look for alternative copies of the missing filenames on my C: drive, one by one.
When one is found, simply copy-paste it into C:\msys64\home\%USERNAME%\pg_compiled\
.
I found valid copies of most of these into the installation directory of mingw64: C:\Program Files\Git\mingw64\bin
.
Some of these I had to take from other directories on my disk.
From Windows Explorer, run C:\msys64\home\%USERNAME%\pg_compiled\pgmodeler.exe
.
The first time, this might fail for some other missing dependencies. Repeat a search as explained in the previous step, and copy-paste them into the destination folder.
For me, these were the dependencies I had to manually copy-paste:
libpcre2-8-0
libssl-1_1-x64.dll
libcrypto-1_1-x64.dll
libpcre-1.dll
libssl-1_1-x64.dll
________________________________________________________________
I found Qt6 here: https://packages.msys2.org/package/mingw-w64-x86_64-qt6-base
However the installation instruction here didn't work (pacman -S mingw-w64-x86_64-qt6-base
).
So I found this SO post that I translated into the following,
by placing mingw-w64-x86_64-qt6-base
in the last line:
git clone https://github.com/holyblackcat/quasi-msys2
cd quasi-msys2
echo MINGW64 >msystem.txt
make get-deps mingw-w64-x86_64-libshout | xargs make cache-download
Running the last line required almost 5 minutes to finish executing.
I then tried running qmake again:
/mingw64/bin/qmake.exe -r CONFIG+=release PREFIX=$INSTALLATION_ROOT pgmodeler.pro
but that didn't work. I then retried by reinstalling qt6 as in the main instructions.
Some instructions say to do:
cd ~/pgmodeler
/mingw64/bin/qmake.exe -r CONFIG+=release PREFIX=$INSTALLATION_ROOT pgmodeler.pro
The last line gave me the error: Project ERROR: Unsupported Qt version detected: 5.15.13! pgModeler must be compiled with at least Qt 6.0.0
.
The issue is that /mingw64/bin/qmake.exe
points to Qt version 5. Qt6 should already be installed, and it can be invoked replacing that with qmake-qt6.exe
.
Otherwise, you can install Qt6 as follows. I found it here and used this command to install it:
Yes | pacman -Sy mingw-w64-x86_64-qt6-base
Then, you will find qt6 in the same directory as the old qt5: /msys2/mingw64/bin
.
You can verify this by running ls /mingw64/bin/ | grep qmake
, and in fact I had 3 files now:
qmake.exe
(version 5); qmake6.exe
(version 6.7.1); qmake-qt6.exe
(version 6.7.1).
Not sure why I had 2 versions of qt6. However, good enough for now. Try again running qmake using version 6 (qmake-qt6
), this should succeed now.
There can be also a problem that "Unknown modules SVG in QT". To solve it, just process
pacman -S mingw-w64-x86_64-qt6-svg