|
1 | 1 | ## Installing Arc from the source |
2 | 2 |
|
| 3 | +**Note:** Arc-theme has switched to [Meson](https://mesonbuild.com/) build system. The old GNU Autotools based build system is still present, and the old build documentation is available in [INSTALL.autotools.md](https://github.com/jnsh/arc-theme/blob/master/INSTALL.autotools.md), but it will be removed in future releases. Please open [an issue](https://github.com/jnsh/arc-theme/issues/new), if you have any problems with the new build system. |
| 4 | + |
3 | 5 | #### Getting the source |
4 | 6 |
|
5 | | -To get the source, either clone the git repository with: |
| 7 | +To get the source, either clone the git repository with e.g. |
6 | 8 |
|
7 | 9 | git clone https://github.com/jnsh/arc-theme --depth 1 |
8 | | - cd arc-theme/ |
9 | 10 |
|
10 | | -Or download and extract a [snapshot](https://github.com/jnsh/arc-theme/archive/master.zip) of the master branch: |
| 11 | +Or download and extract a [snapshot](https://github.com/jnsh/arc-theme/archive/master.zip) of the master git branch, or the latest [release tarball](https://github.com/jnsh/arc-theme/releases/latest). |
11 | 12 |
|
12 | | - wget https://github.com/jnsh/arc-theme/archive/master.zip |
13 | | - unzip master.zip |
14 | | - cd arc-theme-master/ |
| 13 | +#### Dependencies |
15 | 14 |
|
16 | | -#### Build and install |
| 15 | +##### Build dependencies |
17 | 16 |
|
18 | | -##### Installing system wide for all users |
| 17 | +To build the theme the following packages are required: |
| 18 | +* `meson` |
19 | 19 |
|
20 | | -Install to `/usr/share/themes` for all users by running the following with root permissions: |
| 20 | +The following packages are only required for building certain themes: |
| 21 | +* `sassc` for GTK 3, Cinnamon, and GNOME Shell |
| 22 | +* `inkscape` for GTK 2, GTK 3, and Xfwm |
21 | 23 |
|
22 | | - ./autogen.sh --prefix=/usr |
23 | | - make install |
| 24 | +You can avoid these dependencies by choosing to not build specific themes using the `themes` build option. |
24 | 25 |
|
25 | | -##### Installing for single user |
| 26 | +##### Runtime dependencies |
26 | 27 |
|
27 | | -Use the following commands to install the theme to `~/.local/share/themes/` for your user only: |
| 28 | +For the GTK 2 theme to function properly, install the following: |
| 29 | +* `gnome-themes-extra`, or `gnome-themes-standard` before GNOME version 3.28 |
| 30 | +* The murrine GTK 2 engine. This has different names depending on the distribution: |
| 31 | + * `gtk-engine-murrine` (Arch Linux) |
| 32 | + * `gtk2-engines-murrine` (Debian, Ubuntu, elementary OS) |
| 33 | + * `gtk-murrine-engine` (Fedora) |
| 34 | + * `gtk2-engine-murrine` (openSUSE) |
| 35 | + * `gtk-engines-murrine` (Gentoo) |
28 | 36 |
|
29 | | - ./autogen.sh --prefix=$HOME/.local |
30 | | - make install |
| 37 | +#### Building and installation |
31 | 38 |
|
32 | | -**Note:** Some themes (at least GTK 2) aren't loaded from `~/.local/share/themes/`. You can work around this e.g. by symlinking the Arc theme directories in `~/.local/share/themes/` to `~/.themes/` with following commands: |
| 39 | +Arc-theme uses [Meson](https://mesonbuild.com/) build system, refer to its documentation for further information about the build process. |
33 | 40 |
|
34 | | - mkdir -p ~/.themes/ |
35 | | - for d in Arc{,-Dark,-Darker,-Lighter}{,-solid}; do |
36 | | - [ -d ~/.local/share/themes/$d ] && ln -s ~/.local/share/themes/$d ~/.themes/; |
37 | | - done |
| 41 | +The following instructions should work for most common cases. |
38 | 42 |
|
39 | | -## Dependencies |
| 43 | +##### Setup and configure a build direcortry |
40 | 44 |
|
41 | | -#### Build dependencies |
| 45 | +First you need to setup and configure a new build directory (e.g. `build/`) from the cloned/extracted source code directory. |
42 | 46 |
|
43 | | -To build the theme the following packages are required: |
44 | | -* `autoconf` |
45 | | -* `automake` |
46 | | -* `make` |
47 | | -* `pkgconf` |
| 47 | +You should at least configure the build prefix with `--prefix=` option, usually `/usr` for system wide installation, or `$HOME/.local` for installing for your user only. Additionally you may set any Arc-theme specific [build options](#build-options) according to your needs and preferences, with `-Doption=value` command line argument. |
48 | 48 |
|
49 | | -The following packages are only required for building certain themes: |
50 | | -* `sassc` for GTK 3, Cinnamon, and GNOME Shell |
51 | | -* `inkscape` for GTK 2, GTK 3, and XFWM |
52 | | -* `glib2` for GTK 3 (needs `glib-compile-resources` binary, the exact package name varies between distributions) |
| 49 | +For example, configure to install in your home directory, and to only build the Arc-Darker variant with: |
53 | 50 |
|
54 | | -You can avoid these dependencies by disabling support for the specific themes with build options detailed below. |
| 51 | + meson setup --prefix=$HOME/.local -Dvariants=darker build/ |
55 | 52 |
|
56 | | -##### Optional build dependencies |
| 53 | +The build options can later be changed with `meson configure` command, e.g. |
57 | 54 |
|
58 | | -The following packages are optional, but used to optimize the built theme if available: |
59 | | -* `optipng` for optimizing PNG assets for GTK 2, GTK 3, and XFWM |
| 55 | + meson configure --prefix=/usr -Dvariants=light,darker build/ |
60 | 56 |
|
61 | | -#### Runtime dependencies |
| 57 | +##### Build and install |
62 | 58 |
|
63 | | -For the GTK 2 theme to function properly, install the following: |
64 | | -* `gnome-themes-extra`, or `gnome-themes-standard` before GNOME version 3.28 |
65 | | -* The murrine GTK 2 engine. This has different names depending on the distribution: |
66 | | - * `gtk-engine-murrine` (Arch Linux) |
67 | | - * `gtk2-engines-murrine` (Debian, Ubuntu, elementary OS) |
68 | | - * `gtk-murrine-engine` (Fedora) |
69 | | - * `gtk2-engine-murrine` (openSUSE) |
70 | | - * `gtk-engines-murrine` (Gentoo) |
| 59 | +Build and install the theme according to your configuration by running the following: |
71 | 60 |
|
72 | | -## Versioned themes |
| 61 | + meson install -C build/ |
73 | 62 |
|
74 | | -The source code comes branched for different versions of GTK 3, GNOME Shell, and Cinnamon. Only one version of those themes will be installed, and using the wrong versions will result in issues of varying severity. |
| 63 | +##### Note about installation in user's home directory |
75 | 64 |
|
76 | | -The theme versions that will be built can be set manually with build options. Otherwise the build system tries to determine correct versions using the following packages on the build environment: |
77 | | -* `gnome-shell` for detecting GNOME Shell version |
78 | | -* `cinnamon` for detecting Cinnamon version |
79 | | -* the GTK 3 package, or its development files for distributions that ship those separately (e.g. `libgtk-3-dev` for Debian based distros or `gtk3-devel` for RPM based distros), for detecting GTK 3 version |
| 65 | +Some themes (at least GTK 2) aren't loaded from `~/.local/share/themes/`. You can work around this e.g. by symlinking the Arc theme directories in `~/.local/share/themes/` to `~/.themes/` with following commands: |
80 | 66 |
|
81 | | -The above packages are not required if the theme versions are defined manually (see build options below). |
| 67 | + mkdir -p ~/.themes/ |
| 68 | + for d in Arc{,-Dark,-Darker,-Lighter}{,-solid}; do |
| 69 | + [ -d ~/.local/share/themes/$d ] && ln -s ~/.local/share/themes/$d ~/.themes/; |
| 70 | + done |
82 | 71 |
|
83 | | -**Note:** The build will fail, if GTK 3, Cinnamon, or GNOME Shell versions can't be determined. You can work around this by either disabling the build of a specific theme, or by specifying the versions manually with build options detailed below. |
| 72 | +#### Versioned themes |
84 | 73 |
|
85 | | -## Build options |
| 74 | +The source code comes branched for different versions of GTK 3, GNOME Shell, and Cinnamon. Only one version of those themes will be built and installed, and using the wrong versions will likely result in visual issues. |
86 | 75 |
|
87 | | -Options to pass to `autogen.sh`: |
| 76 | +The versions that will be built can be set manually with `cinnamon_version`, `gnome_shell_version` and `gtk3_version` build options. |
88 | 77 |
|
89 | | - --disable-transparency disable transparency in the theme |
90 | | - --disable-light disable Arc Light support |
91 | | - --disable-darker disable Arc Darker support |
92 | | - --disable-dark disable Arc Dark support |
93 | | - --disable-lighter disable Arc Lighter support |
| 78 | +Otherwise the build system tries to determine correct versions using the following packages on the build environment: |
| 79 | +* `gnome-shell` for detecting GNOME Shell version |
| 80 | +* `cinnamon` for detecting Cinnamon version |
| 81 | +* `pkgconf` and the GTK 3 package, or its development files for distributions that ship those separately (e.g. `libgtk-3-dev` for Debian based distros or `gtk3-devel` for RPM based distros), for detecting GTK 3 version |
94 | 82 |
|
95 | | - --disable-cinnamon disable Cinnamon support |
96 | | - --disable-gnome-shell disable GNOME Shell support |
97 | | - --disable-gtk2 disable GTK 2 support |
98 | | - --disable-gtk3 disable GTK 3 support |
99 | | - --disable-metacity disable Metacity support |
100 | | - --disable-plank disable Plank support |
101 | | - --disable-unity disable Unity support |
102 | | - --disable-xfwm disable XFWM support |
| 83 | +**Note:** The build setup for GTK 3, Cinnamon and GNOME Shell themes will fail, if their versions can't be determined either from the build options, or from installed packages. |
103 | 84 |
|
104 | | - --with-cinnamon=<version> build the Cinnamon theme for a specific version |
105 | | - --with-gnome-shell=<version> build the GNOME Shell theme for a specific version |
106 | | - --with-gtk3=<version> build the GTK 3 theme for a specific version |
| 85 | +#### Build options |
107 | 86 |
|
108 | | -If the `--disable-transparency` option was used, the theme will be installed with `-solid` suffix. |
| 87 | +Arc-theme specific build options can be set or changed with `meson configure -Doption=value <build_directory>` e.g. |
109 | 88 |
|
110 | | -## Uninstallation |
| 89 | + meson configure -Dthemes=gtk3,plank,xfwm -Dtransparency=false -Dgtk3_version=3.24 build/ |
111 | 90 |
|
112 | | -Run the following from the source code directory: |
| 91 | +Option | Default value | Description |
| 92 | +--- | --- | --- |
| 93 | +`themes` | `cinnamon,gnome-shell,gtk2,gtk3,metacity,plank,unity,xfwm` | List of themes to build |
| 94 | +`variants` | `light,darker,dark,lighter` | List of theme variants to build |
| 95 | +`transparency` | `true` | Enable or disable transparency |
| 96 | +`cinnamon_version` | - | Build Cinnamon theme for specific version |
| 97 | +`gnome_shell_version` | - | Build GNOME Shell theme for specific version |
| 98 | +`gtk3_version` | - | Build GTK 3 theme for specific version |
113 | 99 |
|
114 | | - make uninstall |
| 100 | +#### Uninstallation |
115 | 101 |
|
116 | | -Or simply remove the theme directories from your install location, e.g. |
| 102 | +Manually remove the theme directories from your install location, e.g. |
117 | 103 |
|
118 | 104 | rm -rf ~/.local/share/themes/Arc{,-Dark,-Darker,-Lighter}{,-solid} |
0 commit comments