您好,欢迎来到宝玛科技网。
搜索
您的当前位置:首页Ubuntu 22.4 LTS 源码编译Tigervnc

Ubuntu 22.4 LTS 源码编译Tigervnc

来源:宝玛科技网

1、安装前的依赖软件准备

-- make version > 3.10
apt install cmake      

-- tigervnc依赖         
apt install zlib1g-dev libpixman-1-dev  libjpeg-turbo8-dev libfltk1.3-dev

apt install libsystemd-dev libavutil-dev

apt-get install gettext  libffmpeg-ocaml-dev libgmp-dev libnettle-dev  libgnutls28-dev libxi-dev

-- Xorg xserver使用
apt install xutils-dev 

以上依赖在cmake中都有检查,不存在会提示。

2、Xorg Xserver

tigervnc 1.14的官方指导安装文档是基于  server-1.20-branch的,在这个版本以上的高版本都不存在configure.ac

3、安装tigervnc的官方指导构建

Building the TigerVNC Server (Xvnc) is a bit trickier. Xvnc is typically built
to use the X11 shared libraries provided with the system.  The procedure for
this is system-specific, since it requires specifying such things as font
directories, but the general outline is as follows (this procedure assumes
that the viewer has already been built, per above.)

  > cd {build_directory}

    If performing an out-of-tree build:
  > cp -R {source_directory}/unix/xserver unix/

  > cp -R {xorg_source}/* unix/xserver/
    (NOTE: {xorg_source} is the directory containing the Xorg source for the
    machine on which you are building TigerVNC.  The most recent versions of
    Red Hat/CentOS/Fedora, for instance, provide an RPM called
    "xorg-x11-server-source", which installs the Xorg source under
    /usr/share/xorg-x11-server-source.)

  > cd unix/xserver/
  > patch -p1 < {source_directory}/unix/xserver{version}.patch
    (where {version} matches the X server version you are building, such as
    "120" for version 1.20.x.)
  > autoreconf -fiv

  > ./configure --with-pic --without-dtrace --disable-static --disable-dri \
      --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
      --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
      --disable-config-hal --disable-config-udev --disable-dri2 --disable-glx \
      --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
      --with-xkb-path=/usr/share/X11/xkb \
      --with-xkb-output=/var/lib/xkb \
      --with-xkb-bin-directory=/usr/bin \
      --with-serverconfig-path=/usr/lib/xorg \
      {additional configure options}
    (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS
    9 and recent Fedora releases.  You should customize it for your particular
    system.  In particular, it will be necessary to customize the XKB
    directory.)

  xserver的自动生成文件,此步骤不可少,不然xvnc会构建会因为缺少文件而失败
  > ./autogen.sh
 
    For a regular, in-tree build:
  > make TIGERVNC_SRCDIR={source_directory}
    If performing an out-of-tree build:
  > make TIGERVNC_SRCDIR={source_directory} TIGERVNC_BUILDDIR={build_directory}
    (NOTE: Use absolute paths for source_directory and build_directory)

值得一提的是,前几步是在构建xserver,直到make TIGERVNC_SRCDIR={source_directory}才是构建tigervnc。

4、将构建后的二进制打包

5、不包含xserver的构建

在构建时,如果直接在tigervnc中执行构建,只能构建x0vncserver,xvnc不能得到构建,因为其依赖xserver,xvnc是tigervnc的核心。正如其介绍:

Xvnc - the TigerVNC Server for Unix. Xvnc is both a VNC server and an X

      server with a "virtual" framebuffer. You should normally use the vncserver service to start Xvnc.

x0vncserver - an inefficient VNC server which continuously polls any X

      display, allowing it to be controlled via VNC. It is intended mainly as a demonstration of a simple VNC server.

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- baomayou.com 版权所有 赣ICP备2024042794号-6

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务