stijnherfst / QMYSQL_driver_prebuilt

Pre-built QMYSQL driver for Qt using MariaDB. Available for Windows, Linux and MacOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QMYSQL driver pre-built

Since the Qt Company doesn't ship the MYSQL/MARIADB SQL driver with the Qt binaries "Due to the practicalities of dealing with external dependencies, only the SQLite plugin is shipped with binary builds of Qt", it has to be built manually. This repository provides scripts to build the driver and precompiled binaries for Windows, Linux, and macOS.

Automatic compilation

  • Fork the GitHub repository.
  • Checkout on the desired branch (qt5 or qt6).
  • Change the Qt version in .github/workflows/build.yml.
  • Get the binaries in the GitHub Actions artifacts.

Manual compilation

  • Install the necessary dependencies for MariaDB.
  • Call the script with the Qt version as a parameter
    ./build.sh 5.15.2
    
    or
    ./build_win.sh 5.15.2
    

Deployment

  • Put the libqsqlmysql.so, libqsqlmysql.dylib or qsqlmysql.dll in folder plugins/sqldriver inside the Qt installation or alongside the executable (application deployment).
  • Put libmariadb.so, libmariadb.dylib or libmariadb.dll alongside the application executable (necessitates OpenSSL libraries).

About

Pre-built QMYSQL driver for Qt using MariaDB. Available for Windows, Linux and MacOS.


Languages

Language:Shell 78.5%Language:Batchfile 21.5%