Introduction to Hypr Libraries
The Hypr libraries provide needed utilities for the entire Hypr
ecosystem. While two of the packages installed in this page are not
strictly required (hyprland-qt-support and hyprland-qtutils), they
are needed for some dialog boxes and this book assumes that you
have built them.
Viktig
Det er kjent at oppdatering av denne pakken ødelegger ABI.
Notat
Dette kan ta litt tid å bygge. Gjør gjerne noe annet mens dette
bygges.
Hypr Libraries Dependencies
Required
Cairo,
CMake,
GBM (libgbm
eller Mesa),
libdisplay-info, libdrm,
libinput, libjxl,
libpng,
librsvg,
libwebp,
libzip-1.11.4, OpenGL + EGL + GLESv2 (libglvnd
eller Mesa;
Mesa's GL is not supported), Pixman,
pugixml-1.15, Qt-6,
seatd-0.9.1, toml++-3.4.0, Wayland,
and
Wayland-Protocols
Recommended
Bash
Shell Startup Files and hwdata
Downloading Hypr Libraries
First create a list of files to be downloaded:
cat > hypr-list << "EOF"
hyprland-protocols/archive/v0.6.4/hyprland-protocols-v0.6.4.tar.gz
hyprutils/archive/v0.8.4/hyprutils-v0.8.4.tar.gz
hyprlang/archive/v0.6.4/hyprlang-v0.6.4.tar.gz
hyprcursor/archive/v0.1.13/hyprcursor-v0.1.13.tar.gz
hyprwayland-scanner/archive/v0.4.5/hyprwayland-scanner-v0.4.5.tar.gz
aquamarine/archive/v0.9.4/aquamarine-v0.9.4.tar.gz
hyprgraphics/archive/v0.1.5/hyprgraphics-v0.1.5.tar.gz
hyprland-qt-support/archive/v0.1.0/hyprland-qt-support-v0.1.0.tar.gz
hyprland-qtutils/archive/v0.1.4/hyprland-qtutils-v0.1.4.tar.gz
EOF
To download the needed files using Wget,
use the following commands:
mkdir hyprlib &&
cd hyprlib &&
grep -v '^#' ../hypr-list | wget -i- -c \
-B https://github.com/hyprwm/
Installation of Hypr Libraries
Create /etc/profile.d/hypr.sh
to
ensure QML files can be loaded and imported as the root
user:
cat > /etc/profile.d/hypr.sh << "EOF"
# Begin /etc/profile.d/hypr.sh
pathappend /usr/lib/plugins QT_PLUGIN_PATH
pathappend $QT6DIR/lib/plugins QT_PLUGIN_PATH
pathappend /usr/lib/qt6/qml QML2_IMPORT_PATH
pathappend $QT6DIR/lib/qml QML2_IMPORT_PATH
# End /etc/profile.d/hypr.sh
EOF
Nå henter du hovedprofilen:
source /etc/profile
Notat
Når du installerer flere pakker i et skript, må installasjonen
gjøres som root bruker. Det finnes tre generelle alternativer som
kan brukes til å gjøre dette:
-
Kjør hele skriptet som root bruker (ikke anbefalt).
-
Bruk sudo
kommandoen fra sudo pakken.
-
Use su -c "command
arguments" (anførselstegn kreves) som vil
be om root passordet for hver iterasjon av løkken.
En måte å håndtere denne situasjonen på er å lage en kort
bash funksjon som
automatisk velger riktig metode. Når kommandoen er satt i
miljøet, trenger den ikke å settes på nytt.
as_root()
{
if [ $EUID = 0 ]; then $*
elif [ -x /usr/bin/sudo ]; then sudo $*
else su -c \\"$*\\"
fi
}
export -f as_root
Next, start a subshell that will exit on error:
bash -e
Install all the packages by running the following commands:
for package in $(grep -v '^#' ../hypr-list)
do
package=$(basename "$package")
packagedir=${package%.tar.?z*}
packagedir=$(echo -n "$packagedir" | sed 's/-v\([0-9]\)/-\1/')
echo "Building $packagedir"
tar -xf $package
pushd $packagedir
case $packagedir in
hyprland-protocols-[0-9]* )
mkdir build
cd build
meson setup --prefix=/usr ..
;;
hyprland-qt-support-[0-9]* )
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SKIP_INSTALL_RPATH=ON \
-D INSTALL_QML_PREFIX=/lib/qt6/qml \
..
make
as_root make install
popd # $packagedir
rm -rf $packagedir
as_root /sbin/ldconfig
continue # for loop
;;
* )
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SKIP_INSTALL_RPATH=ON \
-G Ninja ..
;;
esac
ninja
as_root ninja install
popd
rm -rf $packagedir
as_root /sbin/ldconfig
done
Finally, exit the shell that was started earlier:
exit
Command Explanations
-D
CMAKE_SKIP_INSTALL_RPATH=ON
: Denne bryteren gjør at
cmake fjerner
hardkodede biblioteksøk stier (rpath) når du installerer en binær
kjørbar fil eller et delt bibliotek. Denne pakken trenger ikke
rpath når den er installert på standard plassering, og rpath kan
noen ganger forårsake uønskede effekter eller til og med
sikkerhetsproblemer.
Contents
Installed Programs:
hyprcursor-util, hyprland-dialog,
hyprland-donate-screen, hyprland-update-screen, and
hyprwayland-scanner
Installed Libraries:
libaquamarine, libhyprcursor,
libhyprgraphics, libhyprland-quick-style-implplugin,
libhyprland-quick-style-impl, libhyprland-quick-styleplugin,
libhyprland-quick-style, libhyprlang, and libhyprutils
Installed Directories:
/usr/include/{aquamarine,hyprcursor,hyprgraphics,hyprutils},
/usr/lib/cmake/hyprwayland-scanner,
/usr/lib/qt6/qml/org/hyprland/style, and
/usr/share/hyprland-protocols
Short Descriptions
hyprcursor-util
|
compiles, packs, and unpacks hyprcursor and xcursor
themes
|
hyprland-dialog
|
shows certain dialog using Qt-6
|
hyprland-donate-screen
|
shows a pop up box telling users to donate using Qt-6
|
hyprland-update-screen
|
shows a pop up box telling users to update using Qt-6
|
hyprwayland-scanner
|
generates C++ code from Wayland protocol XML files
|
libaquamarine
|
provides rendering backend API functions
|
libhyprcursor
|
provides API functions for the hyprcursor format
|
libhyprgraphics
|
provides graphics utility functions for the Hypr
ecosystem
|
libhyprland-quick-style-implplugin
|
is the Hyprland Quick Style IMPL plugin
|
libhyprland-quick-style-impl
|
is the Hyprland Quick Style IMPL library
|
libhyprland-quick-styleplugin
|
is the Hyprland Quick Style plugin
|
libhyprland-quick-style
|
is the Hyprland Quick Style library
|
libhyprlang
|
provides functions to parse and use the Hypr
configurartion language
|
libhyprutils
|
provides utility functions for the Hypr ecoysystem
|