玉兔远程控制 v0.0.26
|
作者:康林 kl222.nosp@m.@126.nosp@m..com
~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy
~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm
版本:v9.0.2。建议使用 v5.0.2 及以后版本,以前版本对 CMake 支持不够。
~$ sudo apt install build-essential
~$ sudo apt install g++ gcc
~$ sudo apt install automake autoconf make fakeroot
~$ sudo apt install git
~$ sudo apt install cmake
~$ sudo apt install debhelper
~$ sudo apt install qttools5-dev qttools5-dev-tools qtbase5-dev qtbase5-dev-tools qtmultimedia5-dev qtlocation5-dev libqt5svg5-dev libqtermwidget5-0-dev
~$ sudo apt install qt6-tools-dev qt6-tools-dev-tools qt6-base-dev qt6-base-dev-tools qt6-qpa-plugins libqt6svg6-dev qt6-l10n-tools qt6-translations-l10n qt6-scxml-dev qt6-multimedia-dev libqt6serialport6-dev qt6-webengine-dev qt6-webengine-dev-tools
~$ sudo apt install qtcreator
~$ sudo apt install doxygen
此库默认放在与本项目同级目录下,如果没有在同级目录下,则必须指定 CMake 参数: -DRabbitCommon_DIR=[RabbitCommon 安装目录]
~$ git clone https://github.com/KangLin/RabbitCommon.git
~$ sudo apt install freerdp2-dev
~$ git clone https://github.com/microsoft/vcpkg.git ~$ cd vcpkg ~/vcpkg$ ./bootstrap-vcpkg.sh ~/vcpkg$ vcpkg install freerdp
~$ git clone https://github.com/FreeRDP/FreeRDP.git ~$ cd FreeRDP ~/FreeRDP$ mkdir build ~/FreeRDP/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install -DWITH_SERVER=ON ~/FreeRDP/build$ cmake --build . --config Release --target install
~$ sudo apt install libvncserver-dev
~$ sudo apt install libpixman-1-dev ~$ git clone https://github.com/KangLin/RabbitVNC.git ~$ cd RabbitVNC ~/RabbitVNC$ mkdir build ~/RabbitVNC$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install ~/RabbitVNC$ cmake --build . --config Release --target install
官方只是个应用程序,不支持库。详见:https://github.com/TigerVNC/tigervnc/issues/1123
所以本人在官方基础上做了修改。源码位置:https://github.com/KangLin/tigervnc
~$ sudo apt install libpixman-1-dev ~$ git clone https://github.com/KangLin/tigervnc.git ~$ cd tigervnc ~/tigervnc$ mkdir build ~/tigervnc$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install ~/tigervnc$ cmake --build . --config Release --target install
~$ git clone https://github.com/microsoft/vcpkg.git ~$ cd vcpkg ~/vcpkg$ vcpkg install libdatachannel
~$ git clone https://github.com/paullouisageneau/libdatachannel.git ~$ cd libdatachannel ~/libdatachannel$ git submodule update --init --recursive ~/libdatachannel$ mkdir build ~/libdatachannel$ cd build ~/libdatachannel/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install ~/libdatachannel/build$ cmake --build . --config Release --target install
~$ git clone https://github.com/qxmpp-project/qxmpp.git ~$ cd qxmpp ~/qxmpp$ mkdir build ~/qxmpp$ cd build ~/qxmpp/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install -DQt5_DIR=[Qt5 安装目录]/lib/cmake/Qt5 ~/qxmpp/build$ cmake --build . --config Release --target install
~$ sudo apt install libqtermwidget5-0-dev
~$ sudo apt install libssh-dev
~$ git clone https://github.com/microsoft/vcpkg.git ~$ cd vcpkg ~/vcpkg$ vcpkg install libssh
~$ git clone https://github.com/KangLin/qt-solutions.git ~$ cd qt-solutions ~/qt-solutions$ mkdir build ~/qt-solutions$ cd build ~/qt-solutions/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install ~/qt-solutions/build$ cmake --build . --config Release --target install
~$ git clone https://github.com/KangLin/RabbitRemoteControl.git
~$ cd RabbitRemoteControl ~/RabbitRemoteControl$ mkdir build ~/RabbitRemoteControl/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install ~/RabbitRemoteControl/build$ cmake --build . --config Release --target install
~$ cd RabbitRemoteControl ~/RabbitRemoteControl$ mkdir build ~/RabbitRemoteControl/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`pwd`/install [可选依赖库] -DCMAKE_TOOLCHAIN_FILE=[vcpkg installation path]/scripts/buildsystems/vcpkg.cmake ~/RabbitRemoteControl/build$ cmake --build . --config Release --target install
export RabbitVNC_DIR=[RabbitVNC 安装目录]/lib/cmake/RabbitVNC export tigervnc_DIR=[TigerVNC 安装目录]/lib/cmake/tigervnc export QtService_DIR=[QtService 安装目录]/lib/cmake/QtService
./build_debpackage.sh [$QT_ROOT] [$RabbitCommon_DIR]
~$ cd RabbitRemoteControl ~/RabbitRemoteControl$ cd build/install/bin ~/RabbitRemoteControl$ ./RabbitRemoteControl.sh注意: 如果插件没有加载。则可能是插件的依赖库没有安装到系统。 你可以把依赖库的目录加入到环境变量 PKG_CONFIG_PATH 中。 你也可以把依赖库的目录加入到 /etc/ld.so.conf 文件中,然后运行 ldconfig 把依赖库加入到系统中。
参见:编译集成