Skip to content

Compiling Notepadqq on macOS

Daniel Di Sarli edited this page Aug 20, 2019 · 8 revisions

Compile Instructions

Dependencies

Notepadqq requires at least version 5.x of qt, along with QtWebEngine to compile. The easiest way to download and install the required dependencies is through Homebrew:

  1. Install Homebrew following the instructions on their website, if you do not already have it.
  2. Open a terminal and install the dependencies with the brew command:
brew install qt uchardet pkg-config
  1. Add qt's executables to your $PATH:
echo 'export PATH="/usr/local/Cellar/qt/<version>/bin:$PATH"' >> ~/.bash_profile

where you should replace <version> with the version of Qt that you just installed, for example "5.11.1".

  1. Open a new terminal session so that the system variable change takes effect.

Compiling Notepadqq

  1. Grab the newest source code zip from the releases page or clone the git repository for a bleeding edge build.
  2. cd into the directory in your favourite terminal app
  3. Run the configure script:
./configure

The script should find successfully all the required qt libraries and generate a Makefile. If the script says "Not Found" for any of the required libraries, please make sure that you have linked the qt libraries into your $PATH through the above described brew command.

  1. Compile it!
make
  1. Notepadqq should successfully compile, and the compiled .app can be found in notepadqq-x.x.x/out/release/notepadqq.app. You can copy the notepadqq.app file into your Applications directory, and you are all good to go!

Common issues

Compiling from command line works fine, but when trying from QtCreator it can't find the dependency uchardet.

Make sure uchardet is installed from brew, then add path /usr/local/bin at the end of the PATH environment variable in the project build configuration.

(Authored by Meissa)