Debian Codegraph @

project/bundles/appimage/tools/installhostdeps.sh

raw
1 #!/bin/bash
2
3 # Script to install extra host dependency pass as name as first argument (ex: "heif")
4 # This script must be run as sudo
5 #
6 # SPDX-FileCopyrightText: 2015-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
7 #
8 # SPDX-License-Identifier: BSD-3-Clause
9 #
10
11 # Halt and catch errors
12 set -eE
13 trap 'PREVIOUS_COMMAND=$THIS_COMMAND; THIS_COMMAND=$BASH_COMMAND' DEBUG
14 trap 'echo "FAILED COMMAND: $PREVIOUS_COMMAND"' ERR
15
16 if [ -z "$1" ] ; then
17
18 echo "Pass the name of extra dependency to install as first argument (aka 'heif' for ex.)"
19 exit
20 fi
21
22 #################################################################################################
23 # Pre-processing checks
24
25 . ../common.sh
26 . ../config.sh
27 ChecksRunAsRoot
28 StartScript
29 ChecksCPUCores
30 HostAdjustments
31 RegisterRemoteServers
32 ORIG_WD="`pwd`/.."
33
34 #################################################################################################
35
36 cd $BUILDING_DIR
37
38 rm -rf $BUILDING_DIR/* || true
39
40 cmake $ORIG_WD/../3rdparty \
41 -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
42 -DINSTALL_ROOT=$INSTALL_DIR \
43 -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOAD_DIR \
44 -DKA_VERSION=$DK_KA_VERSION \
45 -DKDE_VERSION=$DK_KDE_VERSION \
46 -DENABLE_QTVERSION=$DK_QTVERSION
47
48 cmake --build . --config RelWithDebInfo --target ext_$1 -- -j$CPU_CORES
49
50 #################################################################################################
51
52 TerminateScript