Attempt to improve dependency messaging
This commit is contained in:
parent
dbb2196819
commit
0a0ac74bc8
|
|
@ -20,6 +20,19 @@ check_command() {
|
|||
|
||||
check_command "curl"
|
||||
|
||||
print_missing_dependencies() {
|
||||
echo ""
|
||||
printf "\n\033[1;31mMissing required components\033[0m\n"
|
||||
echo ""
|
||||
echo "Install the corresponding packages with your package manager, then rerun this setup:"
|
||||
echo " Debian/Ubuntu: sudo apt-get update && sudo apt-get install -y extra-cmake-modules kf6-kconfig-dev kf6-kconfigwidgets-dev kf6-kcoreaddons-dev kf6-kcmutils-dev"
|
||||
echo " Fedora/RHEL: sudo dnf install -y extra-cmake-modules kf6-kconfig kf6-kconfigwidgets kf6-kcoreaddons kf6-kcmutils"
|
||||
echo " Arch: sudo pacman -S --needed extra-cmake-modules kf6"
|
||||
echo ""
|
||||
printf "\n\033[1;33mIf you continue to see this issue\033[0m run with PRINT_FULL_STDERR=1 and attach the full output to a bug report.\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
|
|
@ -59,6 +72,8 @@ then
|
|||
curl -L "$binary_download_url" -o "$FILE_NAME"
|
||||
else
|
||||
check_command "git"
|
||||
check_command "cmake"
|
||||
check_command "make"
|
||||
|
||||
# handle -v / --tag like the rest of the script
|
||||
if [ "$1" = "--tag" ] && [ -n "$2" ]; then
|
||||
|
|
@ -79,21 +94,42 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "Cloning wheaney/breezy-desktop (tag: ${tag})"
|
||||
if git clone --depth 1 --branch "$tag" "https://github.com/wheaney/breezy-desktop.git" breezy-desktop 2>/dev/null; then
|
||||
pushd breezy-desktop > /dev/null
|
||||
if [ -z "${DEV_BUILD+x}" ]; then
|
||||
echo "Cloning wheaney/breezy-desktop (tag: ${tag})"
|
||||
if git clone --depth 1 --branch "$tag" "https://github.com/wheaney/breezy-desktop.git" breezy-desktop 2>/dev/null; then
|
||||
pushd breezy-desktop > /dev/null
|
||||
else
|
||||
git clone "https://github.com/wheaney/breezy-desktop.git" breezy-desktop
|
||||
pushd breezy-desktop > /dev/null
|
||||
git checkout "$tag"
|
||||
fi
|
||||
|
||||
echo "Downloading git submodules"
|
||||
git submodule sync --recursive || true
|
||||
git submodule update --init modules/XRLinuxDriver
|
||||
git submodule update --init ui/modules/PyXRLinuxDriverIPC
|
||||
else
|
||||
git clone "https://github.com/wheaney/breezy-desktop.git" breezy-desktop
|
||||
pushd breezy-desktop > /dev/null
|
||||
git checkout "$tag"
|
||||
pushd $start_dir > /dev/null
|
||||
fi
|
||||
|
||||
echo "Downloading git submodules"
|
||||
git submodule sync --recursive || true
|
||||
git submodule update --init --recursive modules/XRLinuxDriver
|
||||
git submodule update --init --recursive ui/modules/PyXRLinuxDriverIPC
|
||||
|
||||
LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver
|
||||
echo "Building Breezy Desktop from source, this may take a while..."
|
||||
set +e
|
||||
pkgkwin_stderr=$(LOCAL_BUILD_SYSTEM=1 bin/package_kwin --download-driver 2>&1)
|
||||
pkgkwin_rc=$?
|
||||
set -e
|
||||
if echo "$pkgkwin_stderr" | grep -q "Could NOT find"; then
|
||||
if [ -z "${PRINT_FULL_STDERR+x}" ]; then
|
||||
print_missing_dependencies
|
||||
exit 1
|
||||
else
|
||||
echo "$pkgkwin_stderr"
|
||||
fi
|
||||
fi
|
||||
if [ "$pkgkwin_rc" -ne 0 ]; then
|
||||
echo "$pkgkwin_stderr"
|
||||
echo "Error: build failed with exit code $pkgkwin_rc"
|
||||
exit $pkgkwin_rc
|
||||
fi
|
||||
FILE_NAME="breezyKWin-$ARCH.tar.gz"
|
||||
cp "out/$FILE_NAME" "$tmp_dir"
|
||||
popd > /dev/null
|
||||
|
|
|
|||
Loading…
Reference in New Issue