平台:ubuntu-22.04-server-amd64.
对象:LXQT.
文件:lxqt.
LXQt是由LXDE-Qt和RazorQt合并的项目,它的目标是创建一个轻量级、模块化、运行快并且简单易用的桌面环境。
本例中会介绍多种发行版下的编译方法,本例中使用Ubuntu 22.04,你也可以使用其它发行版。
1.安装编译环境
CMake版本 ≥ 3.1.0.
Arch Linux
$ pacman --needed -S base-devel cmake git pkgconf
Debian, Derivates
$ apt install build-essential cmake git
Fedora
$ dnf group install c-development $ dnf install cmake git
openSUSE
$ zypper install -t pattern devel_basis $ zypper install cmake git
2.安装Qt环境
Qt版本 ≥5.15.
Arch Linux
$ pacman --needed -S qt5-base qt5-svg qt5-tools qt5-x11extras
Debian, Derivates
$ apt install qtbase5-private-dev libqt5svg5-dev qttools5-dev libqt5x11extras5-dev libpolkit-qt5-1-dev
Fedora
$ dnf install qt5-qtbase-devel qt5-qtsvg-devel qt5-qttools-devel qt5-qtx11extras-devel
openSUSE
$ zypper install libqt5-qtbase-private-headers-devel libqt5-qtsvg-devel libqt5-qttools-devel libqt5-qtx11extras-devel
3.安装KDE组件
Arch Linux
$ pacman --needed -S kguiaddons libkscreen kidletime kwindowsystem solid
Debian, Derivates
$ apt-get install libkf5guiaddons-dev libkf5idletime-dev libkf5screen-dev libkf5windowsystem-dev libkf5solid-dev
Fedora
$ dnf install kf5-kguiaddons-devel libkscreen-qt5-devel kf5-kidletime-devel kf5-kwindowsystem-devel kf5-solid-devel
openSUSE
$ zypper install kguiaddons-devel libkscreen2-devel kidletime-devel kwindowsystem-devel solid-devel
4.其它
Arch Linux
$ pacman --needed -S bash libstatgrab alsa-lib libpulse lm_sensors libconfig muparser upower polkit-qt5 sudo xorg-xmessage libxss libxcursor libxcomposite libxcb libxkbcommon-x11 libdbusmenu-qt5 libfm menu-cache lxmenu-data gtk-update-icon-cache hicolor-icon-theme xdg-utils xdg-user-dirs oxygen-icons openbox libxslt
Debian, Derivates
$ apt install bash libstatgrab-dev libudev-dev libasound2-dev libpulse-dev libsensors4-dev libconfig-dev libmuparser-dev libupower-glib-dev libpolkit-agent-1-dev libpolkit-qt5-1-dev sudo libexif-dev x11-utils libxss-dev libxcursor-dev libxcomposite-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-image0-dev libxcb-screensaver0-dev libxcb-util0-dev libxkbcommon-x11-dev libdbusmenu-qt5-dev libfm-dev libmenu-cache-dev lxmenu-data gtk-update-icon-cache hicolor-icon-theme xdg-utils xdg-user-dirs oxygen-icon-theme openbox-dev libxi-dev xserver-xorg-input-libinput-dev libxcb-randr0-dev libxdamage-dev libjson-glib-dev libx11-xcb-dev libjson-glib-dev libprocps-dev libxtst-dev
Ubuntu
与Debian相同,但将gtk-update-icon-cache替换为libgtk2.0-bin。
Fedora
$ dnf install systemd-devel bash libstatgrab-devel alsa-lib-devel pulseaudio-libs-devel lm_sensors-devel libconfig-devel muParser-devel upower-devel polkit-devel polkit-qt5-1-devel sudo libexif-devel xorg-x11-apps libSM-devel libXScrnSaver-devel libXcursor-devel libXcomposite-devel libxcb-devel xcb-util-devel libxkbcommon-x11-devel dbusmenu-qt5-devel libfm-devel menu-cache-devel lxmenu-data gtk-update-icon-cache hicolor-icon-theme xdg-utils xdg-user-dirs oxygen-icon-theme openbox openbox-devel libxslt-devel
openSUSE
$ zypper install bash libstatgrab-devel alsa-devel libpulse-devel libsensors4-devel libconfig-devel muparser-devel libupower-glib-devel libpolkit-qt5-1-devel sudo libexif-devel xmessage libXss-devel libXcursor-devel libXcomposite-devel libxcb-devel xcb-util-devel libxkbcommon-x11-devel libdbusmenu-qt5-devel libfm-devel menu-cache-devel lxmenu-data gtk3-tools hicolor-icon-theme xdg-utils xdg-user-dirs oxygen5-icon-theme openbox-devel libxslt-devel
5.编译
5.1 完整编译
下载
$ git clone https://github.com/lxqt/lxqt.git $ cd lxqt $ git submodule init $ git submodule update --remote --rebase
当前版本
$ git branch -vv * master 1d3702b [origin/master] Adds qtxdg-tools submodule (#2217)
编译
$ ./build_all.sh
编译的同时会自动安装,默认目录是/usr目录下,也可以增加参数,比如"LXQT_PREFIX=/usr"显示指定目录。
5.2 单包编译
为了满足所有的相互依赖,不同的组件必须按照特定的顺序进行编译,如下所述。
Step 0 (1个包)
Step 1 (1个包)
Step 2 (4个包)
Step 3 (7个包)
Step 4 (14个包)
- lximage-qt
- lxqt-about
- lxqt-admin
- lxqt-archiver
- lxqt-config
- lxqt-globalkeys
- lxqt-notificationd
- lxqt-openssh-askpass
- lxqt-policykit
- lxqt-session
- lxqt-sudo
- pcmanfm-qt
- qterminal
- xdg-desktop-portal-lxqt
Step 5 (3个包)
这些组必须按此顺序处理,但每个组中组件的顺序无关紧要。
所有组件均使用CMake和GNU make进行编译,强烈建议在源代码树之外进行构建。
注意:就‘目前版本来说,安装路径没有设置为/usr时,LXQt似乎不会启动。
5.2.1 单独编译所有组件
$ mkdir build $ cd build $ cmake <path to sources> -DCMAKE_INSTALL_PREFIX=/usr $ make $ sudo make install
6.显示管理器
因为我使用的是Ubuntu 22.04 Server,没有图形界面,所以编译安装之后,还需要安装一个显示管理器用来启动LXQT桌面。
经过测试安装lightdm或gdm都可以正常进入桌面,这里我使用的是lightdm显示管理器.
# 以下两种方式任选其一即可. $ sudo apt install lightdm # 或者: $ sudo apt install gdm3
效果如下:
Enjoy your development.
标签:qt5,icon,dev,devel,编译,源码,install,LXQT,lxqt From: https://www.cnblogs.com/phoebus-ma/p/17365054.html