OpenSuse 编译 deepin-screen-recorder

安装依赖库

 sudo zypper install -y libqt5-qtbase-devel libqt5-linguist-devel xcb-util-devel libdframeworkdbus-devel dtkgui-devel dtkwidget-devel libqt5-qtx11extras-devel libqt5-qtmultimedia-devel procps-devel libXcomposite-devel libXtst-devel libXcursor-devel 
sudo ln -s /usr/bin/lupdate-qt5 /usr/bin/lupdate
sudo ln -s /usr/bin/lrelease-qt5 /usr/bin/lrelease
sudo ln -s /usr/bin/qmake-qt5 /usr/bin/qmake

拉取deepin-screen-recorder

$ git clone https://github.com/linuxdeepin/deepin-screen-recorder
$ cd deepin-screen-recorder
$ git checkout master

拉取回来的默认分支为uos,需要切换到master分支

  • 修改istream.tcc在#include后添加 #undef min
vim /usr/include/c++/10/bits/istream.tcc 
#undef min
  • 修改以下文件,引用QPainterPath
  1. src/utils.cpp
  2. src/widgets/shapeswidget.cpp
  3. src/widgets/tooltips.cpp
#include <QPainterPath>

编译

$ mkdir build
$ cd build
$ qmake ..
$ make -j$(nproc)
$ sudo make install