Skip to content
Adrien Bertrand edited this page Jan 11, 2023 · 9 revisions

Download the full source: git clone --recursive https://github.com/CE-Programming/CEmu.git or just get the zip and its submodules.

Building libpng-apng

CEmu uses Animated PNGs ("APNG") to record the screen efficiently. This requires an appropriate libpng version on your system, you must first follow the guide on this page in order to properly build the library for your system.

Building CEmu from the source

  1. Get the latest Qt SDK for your OS (Qt 5 and 6 are supported).

  2. Now you have two options to actually build CEmu:

  • In a shell, cd to the project's /gui/qt/ folder and type qmake -r CEmu.pro && make
  • Open the .pro file with Qt Creator, set it up (default project settings should be fine), and hit Build.

(Note that you can also use CMake if you want - check the CI for an example)

Build issues and solutions

  • If you're on macOS or Linux, you may need to force update your PATH to have Qt's bin/ folder prepended (i.e. edit your shell's profile (for example ~/.bashrc), and add the line: export PATH=<path to Qt directory>/bin:$PATH
    You may need to run this command under Linux as well: sudo apt-get install git qt5-default

  • If you're on macOS or Linux and use Qt Creator, you may need to launch it from the terminal to avoid potential pkg-config issues (for instance, not correctly finding libpng).

  • If you're on macOS, CEmu might not launch from Qt Creator, with the default settings. You should then untick some checkboxes in the project's settings.

  • If you're on macOS, some dependencies like libarchive may not be available through pkg-config directly.
    To solve this, do what brew recommends, i.e. append/prepend its path directly to the env var:
    export PKG_CONFIG_PATH="/usr/local/opt/libarchive/lib/pkgconfig:$PKG_CONFIG_PATH" in your .bash_profile / .zshrc.
    When doing such modifications, you'll then have to launch Qt Creator from your terminal (just open path_to_.app).

  • If you encounter a build error with something like lto-wrapper failed, try removing the -flto option in the .pro file and rebuild (qmake etc.).

  • If you have the required packages but still have qmake complain, make sure you have pkg-config installed.

Extra information

If you are using linux, use sudo make install to integrate with your desktop.