Select Git revision
-
Remove the GNOME dependencies and have the --qt argument always require a value when used (exclusively to specify a Qt installation prefix). * build.py (ZYPPER_CLIENT_GNOME_DEPENDENCIES): Delete variable. (ZYPPER_CLIENT_QT_DEPENDENCIES): Rename to... (ZYPPER_CLIENT_DEPENDENCIES): ... this. (DNF_CLIENT_GNOME_DEPENDENCIES): Delete variable. (DNF_CLIENT_QT_DEPENDENCIES): Rename to... (DNF_CLIENT_DEPENDENCIES): ... this. (APT_DEPENDENCIES): Delete 'gnome-icon-theme-symbolic'. (APT_CLIENT_GNOME_DEPENDENCIES): Delete variable. (APT_CLIENT_QT_DEPENDENCIES): Rename to... (APT_CLIENT_DEPENDENCIES): ... this. (PACMAN_CLIENT_GNOME_DEPENDENCIES): Delete variable. (PACMAN_CLIENT_QT_DEPENDENCIES): Rename to... (PACMAN_CLIENT_DEPENDENCIES): ... this. (run_dependencies): Remove usage of args.gnome. Streamline use of --qt; now it's only used to specify a custom Qt prefix. (run_uninstall): Get rid of CLIENT_SUFFIX, adjusting users accordingly. (run_install): Delete '-c' option of install script. (run_run): Delete hacks used to build the now-deprecated client-macos on macOS. Get rid of client_suffix. Adjust client path to run. (run_stop): Get rid of suffix. (execute_script): Test falsy values as intended. (parse_args): Delete '--gnome' argument. Adjust doc of '--qt'. (main): Get rid of 'parsed_args.gnome'. * guix/manifest.scm: Streamline and update dependencies. * scripts/install.sh: Remove '-c' option. Remove conditional branches handling GNOME client. * guix/channels.scm: New file. Change-Id: I26898c3331467bfc4ab63d3e9df1d50560c287c2
Remove the GNOME dependencies and have the --qt argument always require a value when used (exclusively to specify a Qt installation prefix). * build.py (ZYPPER_CLIENT_GNOME_DEPENDENCIES): Delete variable. (ZYPPER_CLIENT_QT_DEPENDENCIES): Rename to... (ZYPPER_CLIENT_DEPENDENCIES): ... this. (DNF_CLIENT_GNOME_DEPENDENCIES): Delete variable. (DNF_CLIENT_QT_DEPENDENCIES): Rename to... (DNF_CLIENT_DEPENDENCIES): ... this. (APT_DEPENDENCIES): Delete 'gnome-icon-theme-symbolic'. (APT_CLIENT_GNOME_DEPENDENCIES): Delete variable. (APT_CLIENT_QT_DEPENDENCIES): Rename to... (APT_CLIENT_DEPENDENCIES): ... this. (PACMAN_CLIENT_GNOME_DEPENDENCIES): Delete variable. (PACMAN_CLIENT_QT_DEPENDENCIES): Rename to... (PACMAN_CLIENT_DEPENDENCIES): ... this. (run_dependencies): Remove usage of args.gnome. Streamline use of --qt; now it's only used to specify a custom Qt prefix. (run_uninstall): Get rid of CLIENT_SUFFIX, adjusting users accordingly. (run_install): Delete '-c' option of install script. (run_run): Delete hacks used to build the now-deprecated client-macos on macOS. Get rid of client_suffix. Adjust client path to run. (run_stop): Get rid of suffix. (execute_script): Test falsy values as intended. (parse_args): Delete '--gnome' argument. Adjust doc of '--qt'. (main): Get rid of 'parsed_args.gnome'. * guix/manifest.scm: Streamline and update dependencies. * scripts/install.sh: Remove '-c' option. Remove conditional branches handling GNOME client. * guix/channels.scm: New file. Change-Id: I26898c3331467bfc4ab63d3e9df1d50560c287c2
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
install.sh 3.72 KiB
#!/usr/bin/env bash
# Build and install to a local prefix under this repository.
export OSTYPE
# Flags:
# -g: install globally instead for all users
# -s: link everything statically, no D-Bus communication. More likely to work!
# -p: number of processors to use
# -u: disable use of privileges (sudo) during install
# -W: disable libwrap and shared library
# -w: do not use Qt WebEngine
set -ex
# Qt_MIN_VER required for client-qt
QT_MIN_VER="6.2"
debug=
global=false
static=''
qtpath=''
proc='1'
priv_install=true
enable_libwrap=true
enable_webengine=true
while getopts gsc:dQ:P:p:uWw OPT; do
case "$OPT" in
g)
global='true'
;;
s)
static='-DENABLE_STATIC=true'
;;
d)
debug=true
;;
Q)
qtpath="${OPTARG}"
;;
P)
prefix="${OPTARG}"
;;
p)
proc="${OPTARG}"
;;
u)
priv_install='false'
;;
W)
enable_libwrap='false'
;;
w)
enable_webengine='false'
;;
\?)
exit 1
;;
esac
done
# $1: global-install?
# $2: private-install?
make_install() {
if [ "$1" = "true" ] && [ "$2" != "false" ]; then
sudo make install
# Or else the next non-sudo install will fail, because this generates some
# root owned files like install_manifest.txt under the build directory.
sudo chown -R "$USER" .
else
make install
fi
}
TOP="$(pwd)"
INSTALL="${TOP}/install"
if [ "${global}" = "true" ]; then
BUILDDIR="build-global"
else
BUILDDIR="build-local"
fi
# jamid
DAEMON=${TOP}/daemon
cd "$DAEMON"
# Build the contribs.
mkdir -p contrib/native
(
cd contrib/native
../bootstrap ${prefix:+"--prefix=$prefix"}
make -j"${proc}"
)
if [[ "${enable_libwrap}" != "true" ]]; then
# Disable shared if requested
if [[ "$OSTYPE" != "darwin"* ]]; then
CONFIGURE_FLAGS+=" --disable-shared"
fi
fi
BUILD_TYPE="Release"
if [ "${debug}" = "true" ]; then
BUILD_TYPE="Debug"
CONFIGURE_FLAGS+=" --enable-debug"
fi
# Build the daemon itself.
test -f configure || ./autogen.sh
if [ "${global}" = "true" ]; then
./configure ${CONFIGURE_FLAGS} ${prefix:+"--prefix=$prefix"}
else
./configure ${CONFIGURE_FLAGS} --prefix="${INSTALL}/daemon"
fi
make -j"${proc}" V=1
make_install "${global}" "${priv_install}"
# Verify system's version if no path provided.
if [ -z "$qtpath" ]; then
sys_qtver=""
if command -v qmake6 &> /dev/null; then
sys_qtver=$(qmake6 -v)
elif command -v qmake-qt6 &> /dev/null; then
sys_qtver=$(qmake-qt6 -v) # Fedora
elif command -v qmake &> /dev/null; then
sys_qtver=$(qmake -v)
else
echo "No valid Qt found"; exit 1;
fi
sys_qtver=${sys_qtver#*Qt version}
sys_qtver=${sys_qtver%\ in\ *}
installed_qtver=$(echo "$sys_qtver" | cut -d'.' -f 2)
required_qtver=$(echo $QT_MIN_VER | cut -d'.' -f 2)
if [[ $installed_qtver -ge $required_qtver ]] ; then
# Set qtpath to empty in order to use system's Qt.
qtpath=""
else
echo "No valid Qt found"; exit 1;
fi
fi
# client
cd "${TOP}/client-qt"
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
client_cmake_flags=(-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
-DCMAKE_PREFIX_PATH="${qtpath}"
-DENABLE_LIBWRAP="${enable_libwrap}"
-DWITH_WEBENGINE="${enable_webengine}")
if [ "${global}" = "true" ]; then
client_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"}
$static)
else
client_cmake_flags+=(-DCMAKE_INSTALL_PREFIX="${INSTALL}/client-qt"
-DLIBJAMI_BUILD_DIR="${DAEMON}/src")
fi
echo "info: Configuring $client client with flags: ${client_cmake_flags[*]}"
cmake .. "${client_cmake_flags[@]}"
make -j"${proc}" V=1
make_install "${global}" "${priv_install}"