Skip to content

Compiling_application_from_sources

Paweł Salawa edited this page Mar 17, 2026 · 6 revisions

Modern instructions (version 4.0.0 onwards)

Prerequisities

  • For Windows
    • You need MSYS2. Use the CLANG64 or CLANGARM64 environment - respectively for Windows x64 or Windows ARM. You will need to install (using the pacman) all required files from appropriate MSYS2 shell, including gendef and dlltool. The easiest is to see the workflow file for list of MSYS2 packages) for list of packages installed there.
    • Qt: You can use Qt from MSYS2 (easiest) or install Qt from official Qt installer (just make sure to install clang version of it).
    • Download SQLite binaries for your Windows from https://github.com/pawelsalawa/sqlite3-sqls and unzip them into some directory. Then generate *.def and *.a from the dll (from appropriate MSYS2 shell):
      • gendef sqlite3.dll
      • dlltool -d sqlite3.def -l sqlite3.dll.a
    • Tcl: installed with MSYS2
    • Python: installed with MSYS2
  • For MacOS
    • You need Xcode or at least the llvm toolset (clang compiler, etc).
    • Qt: Install Qt from official Qt installer.
    • Download SQLite binaries for your MacOS from https://github.com/pawelsalawa/sqlite3-sqls and unzip them into some directory.
  • For Linux
    • You need compiler (gcc or clang).
    • Qt: You can use your Linux distribution-provided Qt (as long as it's 6.2 or higher), or install it from official Qt installer.
    • Download SQLite binaries for your MacOS from https://github.com/pawelsalawa/sqlite3-sqls and unzip them into some directory. You can use SQLite from your Linux distribution, but it will probably have limited capabilities, compared to the one from mentioned repository.
    • Tcl: just install one from your Linux distribution
    • Python: just install one from your Linux distribution

Compilation

mkdir /tmp/build
mkdir /tmp/build/app
mkdir /tmp/build/plugins

cd /tmp/build/app
cmake path/to/sourcecode/SQLiteStudio3
cmake --build .
cmake --install .

cd /tmp/build/plugins
cmake path/to/sourcecode/Plugins
cmake --build .
cmake --install .

Available CMake options

These are some notable options (used for official builds) that you can pass to the initial cmake call (the one where you pass path to SQLiteStudio3 or Plugins directory):

  • -DCUSTOM_SQLITE3=/path/to/sqlite/library (both cmake projects) - this is useful if you use downloaded SQLite library as mentioned in the prerequisities
  • -DCMAKE_INSTALL_PREFIX=/your/desired/installation/path (both cmake projects)
  • -DWITH_PORTABLE=1 (both cmake projects)
  • -DWITH_UPDATER=1 (core app only)
  • -DWITH_ALL_PLUGINS=1 (plugins only)
  • -DWITH_DYNAMIC_PYTHON=1 (plugins only)

For full list of options use cmake -LH against respective project (SQLiteStudio3 or Plugins)

For Qt from official installer or with the aqt install

Assuming $QT_DIR points to directory, which has $QT_DIR/cmake subdirectory with all Qt *.cmake files, just add: -DCMAKE_PREFIX_PATH=$QT_DIR to both cmake calls.

Need help?

You can always ask for help at discussions.

You may also refer to how the GitHub Actions are configured to build SQLiteStudio: https://github.com/pawelsalawa/sqlitestudio/tree/master/.github/workflows

Legacy instruction (pre-4.0.0)

Click to expand

Articles per platform:

Clone this wiki locally