Skip to content

Latest commit

 

History

History
187 lines (150 loc) · 7.78 KB

File metadata and controls

187 lines (150 loc) · 7.78 KB

Compile on Windows

Author: Kang Lin (kl222@126.com)

Environment

Operating system

Windows 10

QtCreator

Version: v4.15.0. It is recommended to use the version later than v4.15.0. The previous version does not have enough support for cmake.

Tools

Compile

Dependent libraries

RabbitCommon

This library is placed in the same level directory as the project by default. If it is not in the same level directory, you must specify the CMake parameters: -DRabbitCommon_DIR=[RabbitCommon installation path]

git clone https://github.com/KangLin/RabbitCommon.git

FreeRDP

  • Use vcpkg

    • Source code location: https://github.com/microsoft/vcpkg/

    • Specify CMake parameters: -DCMAKE_TOOLCHAIN_FILE=[vcpkg installation path]/scripts/buildsystems/vcpkg.cmake

      git clone https://github.com/microsoft/vcpkg.git
      cd vcpkg
      bootstrap-vcpkg.bat
      vcpkg install freerdp
      
  • Compile from sorce code

    • Source code location: https://github.com/FreeRDP/FreeRDP
    • Compile see: https://github.com/FreeRDP/FreeRDP/wiki/Compilation
    • Specify CMake parameters:
      • -DBUILD_FREERDP=ON

      • -DFreeRDP-Client_DIR=[freerdp installation path]/lib/cmake/FreeRDP-Client2

      • -DFreeRDP_DIR=[freerdp installation path]/lib/cmake/FreeRDP2

      • -DWinPR_DIR=[freerdp installation path]/lib/cmake/WinPR2

        git clone https://github.com/FreeRDP/FreeRDP.git
        cd FreeRDP
        mkdir build
        cmake .. -DCMAKE_INSTALL_PREIX=%CD%/install
        cmake --build . --target install
        

libvncserver

  • Compile from sorce code
    • Source code location: https://github.com/LibVNC/libvncserver
      It is recommended to use patches: https://github.com/KangLin/libvncserver

    • Specify CMake parameters: -Dvncclient_DIR=[libvncserver installation path]/lib/cmake/LibVncServer

      cd vcpkg
      vcpkg install zlib openssl libjpeg-turbo
      git clone https://github.com/KangLin/libvncserver.git
      cd libvncserver
      mkdir build
      cmake .. -DCMAKE_INSTALL_PREIX=`pwd`/install -DCMAKE_TOOLCHAIN_FILE=[vcpkg installation path]/scripts/buildsystems/vcpkg.cmake
      cmake --build . --target install
      

TigerVnc

The official is just an application and does not support libraries.
See: TigerVNC/tigervnc#1123
So I made changes on the official basis.
Source code location: https://github.com/KangLin/tigervnc
Specify CMake parameters: -Dtigervnc_DIR=[TigerVNC installation path]/lib/cmake

cd vcpkg
vcpkg install zlib openssl pixman libjpeg-turbo
git clone https://github.com/KangLin/tigervnc.git
cd tigervnc
mkdir build
cmake .. -DCMAKE_INSTALL_PREIX=`pwd`/install -DCMAKE_TOOLCHAIN_FILE=[vcpkg installation path]/scripts/buildsystems/vcpkg.cmake
cmake --build . --target install

libdatachannel

qtermwidget(Not currently supported on Windows)

  • Compile from sorce code

libssh

  • Use vcpkg

    vcpkg install libssh
    
  • Compile from sorce code

    • Source code location: https://www.libssh.org
    • Specify CMake parameters: -Dlibssh_DIR=[libssh installation path]/lib/cmake/libssh

Compile this project

  • Project location: https://github.com/KangLin/RabbitRemoteControl

  • Download source code:

    git clone https://github.com/KangLin/RabbitRemoteControl.git
    
  • Specify CMake parameters:

    • RabbitCommon_DIR: RabbitCommon source code location
    • BUILD_FREERDP:If compile FreeRDP
    • FreeRDP-Client_DIR: [freerdp installation path]/lib/cmake/FreeRDP-Client2
    • FreeRDP_DIR: [freerdp installation path]/lib/cmake/FreeRDP2
    • WinPR_DIR: [freerdp installation path]/lib/cmake/WinPR2
    • tigervnc_DIR: [TigerVNC installation path]/lib/cmake
    • vncclient_DIR: [libvncserver installation path]/lib/cmake/LibVncServer
    • LibDataChannel_DIR: [libdatachannel installation path]/share/cmake/libdatachannel
    • qtermwidget5_DIR: [qtermwidget installation path]/lib/cmake/qtermwidget5
    • libssh_DIR: [libssh installation path]/lib/cmake/libssh
  • Compile

    • Install target

      • install-runtime: Only install runtime libraries and program
      • install: Install runtime and development libraries and program
    • Compile in command line

        cd RabbitRemoteControl
        mkdir build
        cmake .. -DCMAKE_INSTALL_PREIX=`pwd`/install -DCMAKE_TOOLCHAIN_FILE=[vcpkg installation path]/scripts/buildsystems/vcpkg.cmake
        cmake --build . --target install-runtime
        makensis Install.nsi  ;Package
      
    • Used by IDE(QtCreator)

      • Open project: Menu->File->Open File or project, Select CMakeLists.txt of the project
      • Configure:Click Project->Build&Run on the toolbar on the left to configure CMake parameters
      • Compile and run: Click "Start Debugging of startup project" on the left toolbar or press the shortcut key F5