You will need to compile cbird to get the most format support and perhaps better platform integration (like theme) compared to the AppImage.
- qt6 (6.5 preferred)
- opencv2, 2.4.13.7
- FFmpeg
- quazip
The easiest way is to use a distro that has Qt 6. However, the qt.io distribution or building from source can have additional image formats.
This recipe is for Ubuntu 22.04 which includes a working FFmpeg and Qt6 version.
apt-get install git cmake g++ qt6-base-dev qt6-base-private-dev libqt6core5compat6-dev libgl-dev libpng-dev libjpeg-turbo8-dev libtiff5-dev libopenexr-dev libexiv2-dev libncurses-dev
wget https://github.com/opencv/opencv/archive/2.4.13.7.zip
unzip 2.4.13.7.zip
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D WITH_FFMPEG=OFF -D WITH_OPENEXR=OFF -D WITH_JASPER=OFF -D WITH_GSTREAMER=OFF -D ENABLE_FAST_MATH=1 -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF CMAKE_INSTALL_PREFIX=/usr/local ../opencv-2.4.13.7/
make -j8
sudo make install
# if you compiled qt6 then
export Qt6_DIR=<path-to-qt6>
git clone https://github.com/stachenov/quazip
cd quazip
cmake -DQUAZIP_QT_MAJOR_VERSION=6 .
make -j8
sudo make install
Note: not possible at the moment on 22.04, FFmpeg version is too old.
apt-get install libavformat-dev libswscale-dev
The latest ffmpeg may not work due to deprecations, use the revision tag for a known good version. For GPU video decoding (Nvidia) we also need nv-codecs-headers and --enable-cuvid.
With some additional flags (not shown here) you can get more codec support.
sudo apt-get install nasm libfribidi-dev libsdl2-dev libharfbuzz-dev libfreetype-dev
git clone https://github.com/FFmpeg/nv-codec-headers.git
cd nv-codec-headers
make && sudo make install
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
git checkout 1bcb8a7338 # optional, last working version
./configure --enable-gpl --enable-ffplay --enable-cuvid --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --disable-static --enable-shared
make -j8
sudo make install
git clone https://github.com/scrubbbbs/cbird
cd cbird
git checkout v0.7.0 # optional, last release version
qmake6
make -j8
sudo make install
cbird -install
The Windows version is compiled using MXE cross-compiler from a Linux host. MXE has an apt repository for dependencies to make this easier, but it might not be available for your distro.
Once mxe is installed it works like the Linux build. You must set MXE_DIR to the path to mxe. The windows/mxe.env
script sets the shell environment to redirect build tools like qmake and cmake.
apt-get install lzip intltool wine64
cd /path/to/stuff
apt-get install libpcre3-dev
git clone https://github.com/mxe/mxe.git
cd mxe
make MXE_TARGETS='x86_64-w64-mingw32.shared' cc qt6-qtbase qt6-qt5compat exiv2 sdl2
export MXE_DIR=/path/to/stuff/mxe
sudo apt-key adv \
--keyserver keyserver.ubuntu.com \
--recv-keys 86B72ED9 && \
sudo add-apt-repository \
"deb [arch=amd64] https://pkg.mxe.cc/repos/apt `lsb_release -sc` main" && \
sudo apt-get update
apt install mxe-x86-64-w64-mingw32.shared-cc mxe-x86-64-w64-mingw32.shared-qt6-qtbase mxe-x86-64-w64-mingw32.shared-quazip mxe-x86-64-w64-mingw32.shared-exiv2
export MXE_DIR=/usr/lib/mxe
Additional flags added for CPU compatibility in the release package (optional).
cd cbird
source windows/mxe.env
mkdir -p _libs-win32/build-opencv
cd _libs-win32
unzip <opencv-2.4.13.7.zip>
cd build-opencv
cmake -D CMAKE_BUILD_TYPE=Release -D WITH_FFMPEG=OFF -D WITH_OPENEXR=OFF -D WITH_GSTREAMER=OFF -D ENABLE_FAST_MATH=1 -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF -D CMAKE_CXX_FLAGS_RELEASE="-march=westmere -Ofast" -D CMAKE_C_FLAGS_RELEASE="-march=westmere -Ofast" -D ENABLE_SSSE3=ON -D ENABLE_SSE41=ON -D ENABLE_SSE42=ON ../opencv-2.4.13.7/
make -j8
make install
Optional, if mxe ffmpeg version is incompatible.
source windows/mxe.env
cd _libs-win32
git clone https://github.com/ffmpeg/FFmpeg.git
cd FFmpeg
./configure --cross-prefix=x86_64-w64-mingw32.shared- --enable-cross-compile --arch=x86_64 --target-os=mingw32 --enable-shared --disable-static --yasmexe=x86_64-w64-mingw32.shared-yasm --disable-debug --disable-pthreads --enable-w32threads --disable-doc --enable-gpl --extra-libs='-mconsole' --extra-ldflags="-fstack-protector" --prefix=../build-mxe
Optional, if mxe quazip version incompatible.
source windows/mxe.env
cd _libs-win32
git clone https://github.com/stachenov/quazip
cd quazip
cmake -DQUAZIP_QT_MAJOR_VERSION=6 -DCMAKE_INSTALL_PREFIX=../build-mxe .
make -j8
make install
cd cbird
source windows/mxe.env
qmake
make -j8
make install # build/update portable dir in _win32/cbird/
brew install qt6 quazip ffmpeg exiv2 grealpath trash
See Compiling opencv, in addition you may need this trivial patch to fix the build.
Apply patch to fix the build ./cbird/mac/opencv.diff
cd opencv-2.xx.x
patch -p1 < (..)/cbird/mac/opencv.diff
Add -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
to suppress link warnings.
See Compiling cbird
Additionally, make portable
will build the release binaries in _mac/cbird/
The AppImage is built using linuxdeployqt on ubuntu 18.04 LTS.
QEMU is used, with cpu target "Westmere" to ensure binary compatibility with older systems (no AVX).
sudo apt-get install bison build-essential gperf flex ruby python git mercurial nasm protobuf-compiler libpulse-dev libasound2-dev libbz2-dev libcap-dev libgcrypt20-dev libnss3-dev libpci-dev libudev-dev libxtst-dev gyp ninja-build libcups2-dev libssl-dev libsrtp2-dev libwebp-dev libjsoncpp-dev libopus-dev libminizip-dev libvpx-dev libsnappy-dev libre2-dev libprotobuf-dev libexiv2-dev libsdl2-dev libmng-dev libncurses5-dev libfribidi-dev libharfbuzz-dev
sudo apt-get install libxcb*-dev libx11*-dev libxext-dev libxfixes-dev libxi-dev libxcd*-dev libxkb*-dev libxrender-dev libfontconfig1-dev libfreetype6-dev libdrm-dev libegl1-mesa-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libxss-dev libevent-dev
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install g++-10
# make sure we can't use g++7/8...incompatible with qt6
sudo apt-get autoremove g++-7 g++-8
# force build tools to use gcc 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
# check gcc version is correct
gcc -v; g++-v
# (after qt-base compilation)
export Qt6_DIR=/usr/local/Qt-6.5.1
wget https://github.com/Kitware/CMake/archive/refs/tags/v3.25.0.tar.gz
tar -xvf v3.25.0.tar.gz
cd CMake-3.25.0
./bootstrap
make -j8
sudo make install
cmake --version
for x in qtbase qtimageformats qtwayland qt5compat qtsvg; do
wget "https://download.qt.io/official_releases/qt/6.5/6.5.1/submodules/$x-everywhere-src-6.5.1.tar.xz"
done
for x in *.xz; do tar -xvf "$x"; done
cd qtbase-everywhere-src-6.5.1
./configure -qt-libjpeg -no-avx -nomake tests -nomake examples -silent
cmake --build . --parallel
sudo cmake --install .
git clone https://github.com/jasper-software/jasper
cd jasper
mkdir _build && cd _build && cmake ..
make -j8
sudo make install
cd <module>-everywhere-src-6.5.1
/usr/local/Qt-6.5.1/bin/qt-configure-module .
cmake --build . --parallel
sudo cmake --install .
See Compiling FFmpeg
See Compiling opencv, with additional flags for compatibility.
cmake -D CMAKE_BUILD_TYPE=Release -D WITH_FFMPEG=OFF -D WITH_OPENEXR=OFF -D WITH_JASPER=OFF -D WITH_GSTREAMER=OFF -D ENABLE_FAST_MATH=1 -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF -D CMAKE_CXX_FLAGS_RELEASE="-march=westmere -Ofast" -D CMAKE_C_FLAGS_RELEASE="-march=westmere -Ofast" -D ENABLE_SSSE3=ON -D ENABLE_SSE41=ON -D ENABLE_SSE42=ON ../opencv-2.4.13.7/
See Compiling quazip
"make appimage" should work if linuxdeployqt is in ~/Downloads/
cd cbird
$Qt6_DIR/bin/qmake -r
make -j8
make appimage