Skip to content
Snippets Groups Projects
Commit 139b307f authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Amin Bandali
Browse files

build.py: Streamline and update dependencies, build script.

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
parent 8544a2eb
No related branches found
No related tags found
No related merge requests found
...@@ -93,16 +93,7 @@ ZYPPER_DEPENDENCIES = [ ...@@ -93,16 +93,7 @@ ZYPPER_DEPENDENCIES = [
'libopenssl-devel', 'libavutil-devel', 'libopenssl-devel', 'libavutil-devel',
] ]
ZYPPER_CLIENT_GNOME_DEPENDENCIES = [ ZYPPER_CLIENT_DEPENDENCIES = [
# lrc
'qt6-core-devel', 'qt6-dbus-devel', 'qt6-linguist-devel',
# client-gnome
'gtk3-devel', 'clutter-gtk-devel', 'gettext-tools', 'libnotify-devel', 'libappindicator3-devel',
'webkit2gtk3-devel', 'libcanberra-gtk3-devel',
'qrencode-devel', 'NetworkManager-devel'
]
ZYPPER_CLIENT_QT_DEPENDENCIES = [
# lrc # lrc
'qt6-core-devel', 'qt6-dbus-devel', 'qt6-linguist-devel', 'qt6-core-devel', 'qt6-dbus-devel', 'qt6-linguist-devel',
# client-qt # client-qt
...@@ -131,19 +122,9 @@ DNF_DEPENDENCIES = [ ...@@ -131,19 +122,9 @@ DNF_DEPENDENCIES = [
'bzip2' 'bzip2'
] ]
DNF_CLIENT_GNOME_DEPENDENCIES = [ DNF_CLIENT_DEPENDENCIES = [
# lrc 'libnotify-devel',
'qt6-qtbase-devel',
# client-gnome
'gtk3-devel', 'clutter-devel', 'clutter-gtk-devel', 'libnotify-devel','libappindicator-gtk3-devel',
'webkitgtk4-devel', 'libcanberra-devel',
'qrencode-devel', 'NetworkManager-libnm-devel'
]
DNF_CLIENT_QT_DEPENDENCIES = [
# lrc
'qt6-qtbase-devel', 'qt6-qtbase-devel',
# client-qt
'qt6-qtsvg-devel', 'qt6-qtmultimedia-devel', 'qt6-qtdeclarative-devel', 'qt6-qtsvg-devel', 'qt6-qtmultimedia-devel', 'qt6-qtdeclarative-devel',
'qrencode-devel', 'NetworkManager-libnm-devel' 'qrencode-devel', 'NetworkManager-libnm-devel'
] ]
...@@ -152,11 +133,11 @@ DNF_QT_WEBENGINE = [ 'qt6-qtwebengine-devel' ] ...@@ -152,11 +133,11 @@ DNF_QT_WEBENGINE = [ 'qt6-qtwebengine-devel' ]
APT_DEPENDENCIES = [ APT_DEPENDENCIES = [
'autoconf', 'autoconf-archive', 'autopoint', 'automake', 'cmake', 'make', 'dbus', 'doxygen', 'graphviz', 'autoconf', 'autoconf-archive', 'autopoint', 'automake', 'cmake', 'make', 'dbus', 'doxygen', 'graphviz',
'g++', 'gettext', 'gnome-icon-theme-symbolic', 'libasound2-dev', 'libavcodec-dev', 'g++', 'gettext', 'libasound2-dev', 'libavcodec-dev',
'libavdevice-dev', 'libavformat-dev', 'libboost-dev', 'libavdevice-dev', 'libavformat-dev', 'libboost-dev',
'libcppunit-dev', 'libdbus-1-dev', 'libcppunit-dev', 'libdbus-1-dev',
'libdbus-c++-dev', 'libebook1.2-dev', 'libexpat1-dev', 'libgnutls28-dev', 'libdbus-c++-dev', 'libebook1.2-dev', 'libexpat1-dev', 'libgnutls28-dev',
'libgtk-3-dev', 'libjack-dev', 'libnotify-dev', 'libgtk-3-dev', 'libjack-dev',
'libopus-dev', 'libpcre3-dev', 'libpulse-dev', 'libssl-dev', 'libopus-dev', 'libpcre3-dev', 'libpulse-dev', 'libssl-dev',
'libspeex-dev', 'libspeexdsp-dev', 'libswscale-dev', 'libtool', 'libspeex-dev', 'libspeexdsp-dev', 'libswscale-dev', 'libtool',
'libudev-dev', 'libyaml-cpp-dev', 'sip-tester', 'swig', 'libudev-dev', 'libyaml-cpp-dev', 'sip-tester', 'swig',
...@@ -164,20 +145,9 @@ APT_DEPENDENCIES = [ ...@@ -164,20 +145,9 @@ APT_DEPENDENCIES = [
'pandoc', 'nasm', 'dpkg-dev' 'pandoc', 'nasm', 'dpkg-dev'
] ]
APT_CLIENT_GNOME_DEPENDENCIES = [ APT_CLIENT_DEPENDENCIES = [
# lrc
'qt6-base-dev', 'qt6-tools-dev', 'qt6-tools-dev-tools',
'qt6-l10n-tools', 'libqt6sql6-sqlite',
# client-gnome
'libwebkit2gtk-4.0-dev', 'libayatana-appindicator3-dev', 'libcanberra-gtk3-dev',
'libclutter-gtk-1.0-dev', 'libqrencode-dev', 'libnm-dev'
]
APT_CLIENT_QT_DEPENDENCIES = [
# lrc
'qt6-base-dev', 'qt6-tools-dev', 'qt6-tools-dev-tools', 'qt6-base-dev', 'qt6-tools-dev', 'qt6-tools-dev-tools',
'qt6-l10n-tools', 'libqt6sql6-sqlite', 'qt6-l10n-tools', 'libnotify-dev', 'libqt6sql6-sqlite',
# client-qt
'libqt6core5compat6-dev', 'libqt6networkauth6-dev', 'libqt6core5compat6-dev', 'libqt6networkauth6-dev',
'qt6-multimedia-dev', 'libqt6svg6-dev', 'qt6-declarative-dev', 'qt6-multimedia-dev', 'libqt6svg6-dev', 'qt6-declarative-dev',
'qml6-module-qt-labs-qmlmodels', 'qml6-module-qt-labs-qmlmodels',
...@@ -204,16 +174,7 @@ PACMAN_DEPENDENCIES = [ ...@@ -204,16 +174,7 @@ PACMAN_DEPENDENCIES = [
'automake', 'libva', 'libvdpau', 'openssl', 'pandoc', 'nasm' 'automake', 'libva', 'libvdpau', 'openssl', 'pandoc', 'nasm'
] ]
PACMAN_CLIENT_GNOME_DEPENDENCIES = [ PACMAN_CLIENT_DEPENDENCIES = [
# lrc
'qt6-base',
# client-gnome
'clutter-gtk','gnome-icon-theme-symbolic', 'gtk3', 'libappindicator-gtk3',
'libcanberra', 'libnotify', 'webkit2gtk',
'qrencode', 'libnm'
]
PACMAN_CLIENT_QT_DEPENDENCIES = [
# lrc # lrc
'qt6-base', 'qt6-base',
# client-qt # client-qt
...@@ -275,16 +236,11 @@ def run_dependencies(args): ...@@ -275,16 +236,11 @@ def run_dependencies(args):
execute_script( execute_script(
APT_INSTALL_SCRIPT, APT_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, APT_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, APT_DEPENDENCIES))})
if not args.gnome:
if not args.no_webengine: if not args.no_webengine:
APT_CLIENT_QT_DEPENDENCIES.extend(APT_QT_WEBENGINE) APT_CLIENT_DEPENDENCIES.extend(APT_QT_WEBENGINE)
execute_script(
APT_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, APT_CLIENT_QT_DEPENDENCIES))})
else:
execute_script( execute_script(
APT_INSTALL_SCRIPT, APT_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, APT_CLIENT_GNOME_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, APT_CLIENT_DEPENDENCIES))})
elif args.distribution in DNF_BASED_DISTROS: elif args.distribution in DNF_BASED_DISTROS:
if args.assume_yes: if args.assume_yes:
...@@ -293,16 +249,11 @@ def run_dependencies(args): ...@@ -293,16 +249,11 @@ def run_dependencies(args):
execute_script( execute_script(
RPM_INSTALL_SCRIPT, RPM_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, DNF_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, DNF_DEPENDENCIES))})
if not args.gnome:
if not args.no_webengine: if not args.no_webengine:
DNF_CLIENT_QT_DEPENDENCIES.extend(DNF_QT_WEBENGINE) DNF_CLIENT_DEPENDENCIES.extend(DNF_QT_WEBENGINE)
execute_script( execute_script(
RPM_INSTALL_SCRIPT, RPM_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, DNF_CLIENT_QT_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, DNF_CLIENT_DEPENDENCIES))})
else:
execute_script(
RPM_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, DNF_CLIENT_GNOME_DEPENDENCIES))})
elif args.distribution in PACMAN_BASED_DISTROS: elif args.distribution in PACMAN_BASED_DISTROS:
if args.assume_yes: if args.assume_yes:
...@@ -311,16 +262,11 @@ def run_dependencies(args): ...@@ -311,16 +262,11 @@ def run_dependencies(args):
execute_script( execute_script(
PACMAN_INSTALL_SCRIPT, PACMAN_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, PACMAN_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, PACMAN_DEPENDENCIES))})
if not args.gnome:
if not args.no_webengine: if not args.no_webengine:
PACMAN_CLIENT_QT_DEPENDENCIES.extend(PACMAN_QT_WEBENGINE) PACMAN_CLIENT_DEPENDENCIES.extend(PACMAN_QT_WEBENGINE)
execute_script( execute_script(
PACMAN_INSTALL_SCRIPT, PACMAN_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, PACMAN_CLIENT_QT_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, PACMAN_CLIENT_DEPENDENCIES))})
else:
execute_script(
PACMAN_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, PACMAN_CLIENT_GNOME_DEPENDENCIES))})
elif args.distribution in ZYPPER_BASED_DISTROS: elif args.distribution in ZYPPER_BASED_DISTROS:
if args.assume_yes: if args.assume_yes:
...@@ -329,16 +275,11 @@ def run_dependencies(args): ...@@ -329,16 +275,11 @@ def run_dependencies(args):
execute_script( execute_script(
ZYPPER_INSTALL_SCRIPT, ZYPPER_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, ZYPPER_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, ZYPPER_DEPENDENCIES))})
if not args.gnome:
if not args.no_webengine: if not args.no_webengine:
ZYPPER_CLIENT_QT_DEPENDENCIES.extend(ZYPPER_QT_WEBENGINE) ZYPPER_CLIENT_DEPENDENCIES.extend(ZYPPER_QT_WEBENGINE)
execute_script( execute_script(
ZYPPER_INSTALL_SCRIPT, ZYPPER_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, ZYPPER_CLIENT_QT_DEPENDENCIES))}) {"packages": ' '.join(map(shlex.quote, ZYPPER_CLIENT_DEPENDENCIES))})
else:
execute_script(
ZYPPER_INSTALL_SCRIPT,
{"packages": ' '.join(map(shlex.quote, ZYPPER_CLIENT_GNOME_DEPENDENCIES))})
elif args.distribution == OSX_DISTRIBUTION_NAME: elif args.distribution == OSX_DISTRIBUTION_NAME:
execute_script( execute_script(
...@@ -464,23 +405,17 @@ def run_install(args): ...@@ -464,23 +405,17 @@ def run_install(args):
environ['CMAKE_PREFIX_PATH'] = proc.stdout.rstrip("\n") environ['CMAKE_PREFIX_PATH'] = proc.stdout.rstrip("\n")
environ['CONFIGURE_FLAGS'] = '--without-dbus' environ['CONFIGURE_FLAGS'] = '--without-dbus'
if args.qt is not None: if not args.qt:
install_args += ("-c", "client-qt") raise Exception('provide the Qt path using --qt=/qt/install/prefix')
install_args += ("-Q", args.qt) install_args += ("-Q", args.qt)
else:
install_args += ("-c", "client-macosx")
else: else:
if args.distribution in ZYPPER_BASED_DISTROS: if args.distribution in ZYPPER_BASED_DISTROS:
# fix jsoncpp pkg-config bug, remove when jsoncpp package bumped # fix jsoncpp pkg-config bug, remove when jsoncpp package bumped
environ['JSONCPP_LIBS'] = "-ljsoncpp" environ['JSONCPP_LIBS'] = "-ljsoncpp"
if not args.gnome: if args.qt:
install_args += ("-c", "client-qt")
if args.qt is not None:
install_args += ("-Q", args.qt) install_args += ("-Q", args.qt)
else:
install_args += ("-c", "client-gnome")
command = ['bash', 'scripts/install.sh'] + install_args command = ['scripts/install.sh'] + install_args
if args.distribution == 'guix': if args.distribution == 'guix':
if args.global_install: if args.global_install:
...@@ -513,14 +448,13 @@ def run_uninstall(args): ...@@ -513,14 +448,13 @@ def run_uninstall(args):
else: else:
execute_script(UNINSTALL_DAEMON_SCRIPT) execute_script(UNINSTALL_DAEMON_SCRIPT)
CLIENT_SUFFIX = 'qt' if (not args.gnome) else 'gnome'
INSTALL_DIR = '/build-global' if args.global_install else '/build-local' INSTALL_DIR = '/build-global' if args.global_install else '/build-local'
# Client needs to be uninstalled first # Client needs to be uninstalled first
if (os.path.exists('./client-' + CLIENT_SUFFIX + INSTALL_DIR)): if (os.path.exists('./client-qt' + INSTALL_DIR)):
UNINSTALL_CLIENT = [ UNINSTALL_CLIENT = [
'make -C client-' + CLIENT_SUFFIX + INSTALL_DIR + ' uninstall', 'make -C client-qt' + INSTALL_DIR + ' uninstall',
'rm -rf ./client-' + CLIENT_SUFFIX + INSTALL_DIR 'rm -rf ./client-qt' + INSTALL_DIR
] ]
execute_script(UNINSTALL_CLIENT) execute_script(UNINSTALL_CLIENT)
...@@ -538,17 +472,7 @@ def run_clean(): ...@@ -538,17 +472,7 @@ def run_clean():
def run_run(args): def run_run(args):
if args.distribution == OSX_DISTRIBUTION_NAME and args.qt is None:
subprocess.Popen(
["install/client-macosx/Ring.app/Contents/MacOS/Ring"])
return True
run_env = os.environ run_env = os.environ
if args.gnome or (args.distribution == OSX_DISTRIBUTION_NAME \
and args.qt is None):
run_env['LD_LIBRARY_PATH'] = run_env.get(
'LD_LIBRARY_PATH', '') + ":install/lrc/lib"
try: try:
jamid_log = open("daemon.log", 'a') jamid_log = open("daemon.log", 'a')
jamid_log.write('=== Starting daemon (%s) ===' % jamid_log.write('=== Starting daemon (%s) ===' %
...@@ -562,23 +486,15 @@ def run_run(args): ...@@ -562,23 +486,15 @@ def run_run(args):
with open('daemon.pid', 'w') as f: with open('daemon.pid', 'w') as f:
f.write(str(jamid_process.pid)+'\n') f.write(str(jamid_process.pid)+'\n')
client_suffix = "" client_log = open('jami-qt.log', 'a')
if not args.gnome:
client_suffix += "qt"
else:
client_suffix += "gnome"
client_log = open("jami-" + client_suffix + ".log", 'a')
client_log.write('=== Starting client (%s) ===' % client_log.write('=== Starting client (%s) ===' %
time.strftime("%d/%m/%Y %H:%M:%S")) time.strftime("%d/%m/%Y %H:%M:%S"))
client_process = subprocess.Popen( client_process = subprocess.Popen(["./install/client-qt/bin/jami-qt", "-d"],
["./install/client-" + client_suffix +
"/bin/jami-" + client_suffix, "-d"],
stdout=client_log, stdout=client_log,
stderr=client_log, stderr=client_log,
env=run_env env=run_env)
)
with open("jami-" + client_suffix + ".pid", 'w') as f: with open('jami-qt.pid', 'w') as f:
f.write(str(client_process.pid)+'\n') f.write(str(client_process.pid)+'\n')
if args.debug: if args.debug:
...@@ -612,21 +528,18 @@ def run_run(args): ...@@ -612,21 +528,18 @@ def run_run(args):
def run_stop(args): def run_stop(args):
client_suffix = "qt" if (not args.gnome) else "gnome" STOP_SCRIPT = ['xargs kill < jami-qt.pid',
STOP_SCRIPT = [ 'xargs kill < daemon.pid']
'xargs kill < jami-' + client_suffix + '.pid',
'xargs kill < daemon.pid'
]
execute_script(STOP_SCRIPT) execute_script(STOP_SCRIPT)
def execute_script(script, settings=None, fail=True): def execute_script(script, settings=None, fail=True):
if settings == None: if settings is None:
settings = {} settings = {}
for line in script: for line in script:
line = line % settings line = line % settings
rv = os.system(line) rv = os.system(line)
if rv != 0 and fail == True: if rv and fail:
print('Error executing script! Exit code: %s' % print('Error executing script! Exit code: %s' %
rv, file=sys.stderr) rv, file=sys.stderr)
sys.exit(1) sys.exit(1)
...@@ -710,9 +623,8 @@ def parse_args(): ...@@ -710,9 +623,8 @@ def parse_args():
ap.add_argument('--background', default=False, action='store_true') ap.add_argument('--background', default=False, action='store_true')
ap.add_argument('--no-priv-install', dest='priv_install', ap.add_argument('--no-priv-install', dest='priv_install',
default=True, action='store_false') default=True, action='store_false')
ap.add_argument('--gnome', default=False, action='store_true') ap.add_argument('--qt', type=str,
ap.add_argument('--qt', nargs='?', const='', type=str, help='Use the Qt path supplied')
help='Build the Qt client with the Qt path supplied')
ap.add_argument('--no-libwrap', dest='no_libwrap', ap.add_argument('--no-libwrap', dest='no_libwrap',
default=False, action='store_true', default=False, action='store_true',
help='Disable libwrap. Also set --disable-shared option to daemon configure') help='Disable libwrap. Also set --disable-shared option to daemon configure')
...@@ -786,9 +698,6 @@ def main(): ...@@ -786,9 +698,6 @@ def main():
elif parsed_args.run: elif parsed_args.run:
if (parsed_args.distribution == 'guix' if (parsed_args.distribution == 'guix'
and 'GUIX_ENVIRONMENT' not in os.environ): and 'GUIX_ENVIRONMENT' not in os.environ):
if not parsed_args.gnome:
print('FIXME: Qt fails loading QML modules due to '
'https://issues.guix.gnu.org/47655')
# Relaunch this script, this time in a pure Guix environment. # Relaunch this script, this time in a pure Guix environment.
guix_args = ['shell', '--pure', guix_args = ['shell', '--pure',
# to allow pulseaudio to connect to an existing server # to allow pulseaudio to connect to an existing server
......
;;; Tested with this revision of GNU Guix.
(list (channel
(inherit %default-guix-channel)
(commit
"f5cc7d03a778f20e2ad487e2c17cc8853bc871f0"))) ;2022-08-01
...@@ -4,18 +4,17 @@ ...@@ -4,18 +4,17 @@
;;; Commentary: ;;; Commentary:
;;; ;;;
;;; A full-blown development environment that can be used to build the ;;; A full-blown development environment that can be used to build the
;;; whole project. It includes both the GNOME as well as the Qt ;;; whole project. The sensitive (i.e., patched) dependencies are
;;; libraries, so that both clients can be built. The sensitive ;;; consciously omitted from this list so that the bundled libraries
;;; (i.e., patched) dependencies are consciously omitted from this ;;; are the ones used, which is usually what is desired for
;;; list so that the bundled libraries are the ones used, which is ;;; development purposes.
;;; usually what is desired for development purposes.
;;; The make-jami.py script makes use of it to build Jami in a Linux ;;; The build.py script makes use of it to build Jami in a Linux
;;; container with the dependencies below when Guix is detected (and ;;; container with the dependencies below when Guix is detected (and
;;; no /etc/os-release file exists) or when explicitly specified, ;;; no /etc/os-release file exists) or when explicitly specified,
;;; e.g.: ;;; e.g.:
;;; ;;;
;;; $ ./make-jami.py --distribution=guix --install ;;; $ ./build.py --distribution=guix --install
;;; ;;;
;;; It can also be invoked directly to spawn a development environment, like so: ;;; It can also be invoked directly to spawn a development environment, like so:
;;; ;;;
...@@ -93,52 +92,25 @@ ...@@ -93,52 +92,25 @@
"yaml-cpp" "yaml-cpp"
"yasm" "yasm"
;; For libringclient (LRC) and the Qt client.
"qtbase@5"
"qtbase@5:debug"
;; Shared by the GNOME and Qt clients.
"qrencode"
;; Shared by the LRC, GNOME and Qt clients.
"network-manager" ;libnm
;; For the GNOME client (client-gnome)
"adwaita-icon-theme"
"hicolor-icon-theme"
"clutter"
"clutter-gtk"
"glib:bin" ;for glib-compile-resources
"gtk+"
"gtk+:debug"
"libcanberra"
"libindicator"
"libnotify"
"sqlite"
"webkitgtk"
;; For the Qt client. ;; For the Qt client.
"libxkbcommon"
"network-manager" ;libnm
"qrencode"
"qtbase"
"qt5compat"
"qtdeclarative"
"qtmultimedia"
"qtnetworkauth"
"qtpositioning"
"qtsvg" "qtsvg"
"qtsvg:debug"
"qttools" "qttools"
"qtwebengine"
"qtwebengine:debug"
"qtwebchannel" "qtwebchannel"
"qtwebchannel:debug" "qtwebengine"
"qtmultimedia" "vulkan-headers"
"qtmultimedia:debug"
"qtdeclarative"
"qtdeclarative:debug"
"qtgraphicaleffects"
"qtgraphicaleffects:debug"
"qtquickcontrols"
"qtquickcontrols:debug"
"qtquickcontrols2"
"qtquickcontrols2:debug"
;; For tests and debugging. ;; For tests and debugging.
"cppunit"
"file" "file"
"gdb" "gdb"
"googletest"
"ltrace" "ltrace"
"strace")) "strace"))
...@@ -7,7 +7,6 @@ export OSTYPE ...@@ -7,7 +7,6 @@ export OSTYPE
# -g: install globally instead for all users # -g: install globally instead for all users
# -s: link everything statically, no D-Bus communication. More likely to work! # -s: link everything statically, no D-Bus communication. More likely to work!
# -c: client to build
# -p: number of processors to use # -p: number of processors to use
# -u: disable use of privileges (sudo) during install # -u: disable use of privileges (sudo) during install
# -W: disable libwrap and shared library # -W: disable libwrap and shared library
...@@ -21,7 +20,6 @@ QT_MIN_VER="6.2" ...@@ -21,7 +20,6 @@ QT_MIN_VER="6.2"
debug= debug=
global=false global=false
static='' static=''
client=''
qtpath='' qtpath=''
proc='1' proc='1'
priv_install=true priv_install=true
...@@ -36,9 +34,6 @@ while getopts gsc:dQ:P:p:uWw OPT; do ...@@ -36,9 +34,6 @@ while getopts gsc:dQ:P:p:uWw OPT; do
s) s)
static='-DENABLE_STATIC=true' static='-DENABLE_STATIC=true'
;; ;;
c)
client="${OPTARG}"
;;
d) d)
debug=true debug=true
;; ;;
...@@ -124,8 +119,8 @@ fi ...@@ -124,8 +119,8 @@ fi
make -j"${proc}" V=1 make -j"${proc}" V=1
make_install "${global}" "${priv_install}" make_install "${global}" "${priv_install}"
# For the client-qt, verify system's version if no path provided # Verify system's version if no path provided.
if [ "${client}" = "client-qt" ] && [ -z "$qtpath" ]; then if [ -z "$qtpath" ]; then
sys_qtver="" sys_qtver=""
if command -v qmake6 &> /dev/null; then if command -v qmake6 &> /dev/null; then
sys_qtver=$(qmake6 -v) sys_qtver=$(qmake6 -v)
...@@ -151,58 +146,24 @@ if [ "${client}" = "client-qt" ] && [ -z "$qtpath" ]; then ...@@ -151,58 +146,24 @@ if [ "${client}" = "client-qt" ] && [ -z "$qtpath" ]; then
fi fi
fi fi
# libringclient (only if not client-qt)
if [ "${client}" != "client-qt" ]; then
cd "${TOP}/lrc"
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
# Compute LRC CMake flags
lrc_cmake_flags=(-DCMAKE_PREFIX_PATH="${qtpath}"
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
-DENABLE_LIBWRAP="${enable_libwrap}"
$static)
if [ "${global}" = "true" ]; then
lrc_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"})
else
lrc_cmake_flags+=(-DCMAKE_INSTALL_PREFIX="${INSTALL}/lrc"
-DRING_BUILD_DIR="${DAEMON}/src")
fi
echo "info: Configuring LRC with flags: ${lrc_cmake_flags[*]}"
cmake .. "${lrc_cmake_flags[@]}"
make -j"${proc}" V=1
make_install "${global}" "${priv_install}"
fi
# client # client
cd "${TOP}/${client}" cd "${TOP}/client-qt"
mkdir -p "${BUILDDIR}" mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}" cd "${BUILDDIR}"
client_cmake_flags=(-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" client_cmake_flags=(-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
-DCMAKE_PREFIX_PATH="${qtpath}") -DCMAKE_PREFIX_PATH="${qtpath}"
-DENABLE_LIBWRAP="${enable_libwrap}"
if [ "${client}" = "client-qt" ]; then
client_cmake_flags+=(-DENABLE_LIBWRAP="${enable_libwrap}"
-DWITH_WEBENGINE="${enable_webengine}") -DWITH_WEBENGINE="${enable_webengine}")
if [ "${global}" = "true" ]; then if [ "${global}" = "true" ]; then
client_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"} client_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"}
$static) $static)
else else
client_cmake_flags+=(-DCMAKE_INSTALL_PREFIX="${INSTALL}/${client}" client_cmake_flags+=(-DCMAKE_INSTALL_PREFIX="${INSTALL}/client-qt"
-DLIBJAMI_BUILD_DIR="${DAEMON}/src") -DLIBJAMI_BUILD_DIR="${DAEMON}/src")
fi fi
else
# Compute GNOME client CMake flags.
client_cmake_flags+=($static)
if [ "${global}" = "true" ]; then
client_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"})
else
client_cmake_flags+=(
-DCMAKE_INSTALL_PREFIX="${INSTALL}/${client}"
-DRINGTONE_DIR="${INSTALL}/daemon/share/jami/ringtones"
-DLibRingClient_DIR="${INSTALL}/lrc/lib/cmake/LibRingClient")
fi
fi
echo "info: Configuring $client client with flags: ${client_cmake_flags[*]}" echo "info: Configuring $client client with flags: ${client_cmake_flags[*]}"
cmake .. "${client_cmake_flags[@]}" cmake .. "${client_cmake_flags[@]}"
make -j"${proc}" V=1 make -j"${proc}" V=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment