Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
xfce:building [2022/12/17 20:18] – Update version requirements kevinbowenxfce:building [2026/02/11 15:49] (current) – Add build instructions for meson andreldm
Line 44: Line 44:
   git clone https://gitlab.xfce.org/$category/$module   git clone https://gitlab.xfce.org/$category/$module
  
-After the repository is cloned, you will need to choose which branch you want to compile. By default, the ''master'' branch is selected, but there are also branches for stable releases like ''xfce-4.16''. The stable branches contain the latest bug fixes without any major new features, the master branch is the development version for the next release of Xfce. Both should not be used in a production environment.+After the repository is cloned, you will need to choose which branch you want to compile. By default, the ''master'' branch is selected, but there are also branches for stable releases like ''xfce-4.20''. The stable branches contain the latest bug fixes without any major new features, the master branch is the development version for the next release of Xfce. Both should not be used in a production environment.
  
-To switch to another branch (''git branch -a'' lists all available branches) run the following command inside the cloned directory to switch to, for example, the ''xfce-4.16'' branch:+To switch to another branch (''git branch -a'' lists all available branches) run the following command inside the cloned directory to switch to, for example, the ''xfce-4.20'' branch:
  
-  git checkout --track origin/xfce-4.16+  git checkout --track origin/xfce-4.20
  
 After this, you can update your local copy of the repository with git pull and switch to another branch with ''git checkout $branchname''. Read the [[http://git-scm.com/documentation|GIT manuals]] for more information about using GIT. After this, you can update your local copy of the repository with git pull and switch to another branch with ''git checkout $branchname''. Read the [[http://git-scm.com/documentation|GIT manuals]] for more information about using GIT.
Line 63: Line 63:
   * [[http://en.wikipedia.org/wiki/GNU_toolchain|A working GNU toolchain]]   * [[http://en.wikipedia.org/wiki/GNU_toolchain|A working GNU toolchain]]
   * Gtk+ and Glib headers, in some distributions called the -devel packages    * Gtk+ and Glib headers, in some distributions called the -devel packages 
-    * Xfce 4.18 requires Gtk+ 3.24 and Glib 2.66+    * Xfce 4.20 requires Gtk+ 3.24 and Glib-2.0 >= 2.72 (See also: [[https://wiki.xfce.org/releng/4.20/roadmap#changes_in_dependencies|4.20 dependencies]]) 
 +      * Same version for gmodule-2.0, gobject-2.0, gthread-2.0, gio-2.0 and gdbus 
 +    * gdk-pixbuf-2.0 >= 2.42.8 
 +    * gobject-introspection >= 1.72 
 +    * wayland 1.20 
 +    * wayland-protocols 1.25 
 +    * gtk-layer-shell 0.7.0
     * pkgconfig     * pkgconfig
 +    * meson (Xfce 4.21+)
     * Coffee or tea     * Coffee or tea
  
  
-For history, here are the versions needed for older xXce releases:+For history, here are the versions needed for older Xfce releases: 
 +    * Xfce 4.18 requires Gtk+ 3.24 and Glib 2.66
     * Xfce 4.16 requires Gtk+ 3.22 and Glib 2.50     * Xfce 4.16 requires Gtk+ 3.22 and Glib 2.50
     * Xfce 4.14 requires Gtk+ 3.22 and Glib 2.42     * Xfce 4.14 requires Gtk+ 3.22 and Glib 2.42
Line 81: Line 89:
 The Xfce packages need to be built in a specific order. If you don't follow this, compile options might not be available or the configure stage will abort because of missing dependencies. The Xfce packages need to be built in a specific order. If you don't follow this, compile options might not be available or the configure stage will abort because of missing dependencies.
  
-  * xfce4-dev-tools (only required if you build from GIT)+  * xfce4-dev-tools (only required if you build with autotools and from GIT)
   * libxfce4util   * libxfce4util
   * xfconf   * xfconf
Line 114: Line 122:
 ---- ----
  
-===== Building the packages =====+ 
 +===== Building the packages (meson) ===== 
 + 
 +<note important>This section is working in progress, it applies for building from git master and Xfce 4.21</note> 
 + 
 +Now it is finally time to start compiling the Xfce desktop. Last remaining thing is to choose an installation location. Possible examples are ''/usr'', ''/usr/local'' and ''/opt/xfce4'' for a system-wide installation or ''$HOME/local'' if you want to install in your home directory (whatever you choose, never put spaces in the name). We will refer to this location as ${PREFIX} in the code examples below! 
 + 
 +==== Compiling and installing ==== 
 + 
 +Next step is compiling the various packages following the dependency chain above. If you have downloaded the tarballs, you will need to unpack them before going on. Inside each package directory you should run the following command: 
 + 
 +  meson setup --prefix=${PREFIX} build && meson compile -C build && meson install -C build 
 + 
 +Specific setup options for each package can be shown with ''%%meson configure%%''. Note that most packages will see a performance benefit if passed the setup option ''%%-Ddebug=false%%''
 + 
 +However, if you want to provide backtraces or test new code, no binary stripping, no optimizations and leaving debug enabled are recommended. 
 + 
 +If you install the package in a public prefix, for example ''/usr'' or ''/usr/local'', ''meson install'' will attempt to use sudo. This way, you will be asked for the system administrator password and will have write permissions to install in those locations. 
 + 
 +[[|Back To Top]] 
 +---- 
 + 
 +===== Building the packages (autotools) ===== 
 + 
 +<note important>This section is deprecated, autotools support was removed after Xfce 4.20</note> 
 ==== Installation location and variables ==== ==== Installation location and variables ====
  
Line 174: Line 207:
 [[|Back To Top]] [[|Back To Top]]
 ---- ----
-[[:start|Back to main Xfce documentation page]]+[[:start|Back to Xfce Main Documentation Page]]