-
Notifications
You must be signed in to change notification settings - Fork 171
Building
If you have corrections, additions, or updates to the instructions given below - or instructions for another distribution not covered yet -, please contact us (preferably on the mailing list or via email).
Building TeXworks on typical GNU/Linux systems is fairly straightforward. You just need standard build tools (gcc, make, cmake, etc.), and the development files (not just runtime libraries) for Qt, poppler, hunspell, and dbus. The exact set of packages needed will depend how your distribution arranges things; some examples are given here.
For Windows users wanting to try a build, see the page about installing and using the MinGW tools. Thanks to Alain Delmotte and Tomek for their help in researching, testing, and documenting the Windows build procedure.
For Mac users, see the pages
- building on macOS using Homebrew, Thanks to Charlie Sharpsteen for researching and documenting this macOS build procedure.
- building on macOS arm64, Thanks to Jérôme Laurens for researching and documenting this macOS build procedure.
If you not only want to build TeXworks, but also package it to share with others, have a look at the file PACKAGING in the source tree.
Note: The procedure below uses git clone to download the source code. This is the recommended procedure if you want to work on the source code or if you want to stay up to date with the latest changes of the code. If you only want to build TeXworks once, you can save bandwidth by downloading and unpacking the sources from GitHub.
sudo yum install install cmake git make hunspell-devel lua-devel poppler-data poppler-qt6-devel qt6-qtbase-devel qt6-qtdeclarative-devel qt6-qt5compat-devel qt6-qttools-devel zlib-devel
git clone https://github.com/TeXworks/texworks.git
cd texworks
cmake -B build -S .
cmake --build build
build/texworks
sudo apt install cmake g++ git libhunspell-dev liblua5.4-dev libpoppler-qt6-dev libpoppler-private-dev make poppler-data qt6-5compat-dev qt6-base-dev qt6-declarative-dev qt6-tools-dev qt6-tools-dev-tools zlib1g-dev
git clone https://github.com/TeXworks/texworks.git
cd texworks
mkdir build
cd build
cmake .. -DQT_DEFAULT_MAJOR_VERSION=6
make
./texworks
Another option is to use the Ubuntu package repository, thus avoiding the need to compile from source.
Adapted from a report by d1nuc0m
sudo dnf config-manager --set-enabled crb
sudo dnf install cmake git make hunspell-devel lua-devel poppler-data poppler-qt5-devel qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtscript-devel qt5-qttools-devel qt5-qttools-static urw-base35-fonts zlib-devel
git clone https://github.com/TeXworks/texworks.git
cd texworks
cmake -B build -S . -DQT_DEFAULT_MAJOR_VERSION=5 -DTeXworks_DIC_DIR=/usr/share/myspell
cmake --build build
sudo cmake --install build
sudo dnf install cmake git make hunspell-devel lua-devel poppler-data poppler-qt6-devel qt6-qtbase-devel qt6-qtdeclarative-devel qt6-qt5compat-devel qt6-qttools-devel qt6-qttools-static urw-base35-fonts zlib-devel
git clone https://github.com/TeXworks/texworks.git
cd texworks
cmake -B build -S .
cmake --build build
sudo cmake --install build
sudo zypper install cmake dbus-1-devel git hunspell-devel libpoppler-qt6-devel qt6-base-devel qt6-declarative-devel qt6-qt5compat-devel qt6-uitools-devel qt6-linguist-devel lua54-devel make poppler-data zlib-devel
git clone https://github.com/TeXworks/texworks.git
cd texworks
cmake -B build -S .
cmake --build build
build/texworks
Adapted from a report by wtx358:
slackpkg install dbus cmake git gcc make hunspell poppler poppler-data qt5 urw-core35-fonts-otf zlib
slackpkg install nghttp2 brotli cyrus-sasl libarchive lz4 libxml2 guile gc libglvnd fontconfig freetype openjpeg lcms2 mozilla-nss harfbuzz libwebp graphite2 kernel-headers icu4c libX11 libXext libxcb libXau libXdmcp flex
git clone https://github.com/TeXworks/texworks.git
cd texworks
cmake -B build -S . -DQT_DEFAULT_MAJOR_VERSION=5
cmake --build build
cmake --install build
(as of May 2026)
slackpkg install dbus cmake git gcc make lua hunspell poppler poppler-data qt6 urw-core35-fonts-otf zlib
slackpkg install nghttp3 ngtcp2 nghttp2 brotli cyrus-sasl libarchive lz4 libxml2 guile gc binutils glibc libglvnd freetype lcms2 fontconfig libX11 harfbuzz openjpeg icu4c libXext libwebp graphite2 libxkbcommon gpgme mozilla-nss libxcb libdeflate libassuan libXau libXdmcp kernel-headers flex libproxy glib2 duktape
git clone https://github.com/TeXworks/texworks.git
cd texworks
cmake -B build -S .
cmake --build build
cmake --install build