mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-10-30 07:53:33 +08:00
Compare commits
131 Commits
beta/20230
...
stable/202
| Author | SHA1 | Date | |
|---|---|---|---|
| d6829fcaee | |||
| ef4e6c1171 | |||
| 3f2afd2cfb | |||
| d2efaf5953 | |||
| 0de8f019b2 | |||
| bd3ee22c83 | |||
| e7e59eba63 | |||
| 92ee3806bd | |||
| b9ce9a4589 | |||
| 0679c0e04c | |||
| 98569e2c70 | |||
| 55977e748d | |||
| 5380a86b5c | |||
| 266aae543d | |||
| 251d8d8123 | |||
| ad1bc98b6e | |||
| 16de04c0e5 | |||
| 4712de7ed0 | |||
| de7c182adc | |||
| 1442d37ae8 | |||
| b41f1d36c7 | |||
| 12b874e4f4 | |||
| e0cc1e301f | |||
| 0bf99a8fee | |||
| 8a15f18d1c | |||
| 8716154b58 | |||
| 9e05e3e186 | |||
| 048bdfba78 | |||
| 06e9e91c4d | |||
| 410a15a09f | |||
| 4650c96848 | |||
| 4e088783a4 | |||
| 9f42301b5c | |||
| b9f2ebd1a5 | |||
| 13ef62ea57 | |||
| 2f3d06859f | |||
| d5064040d7 | |||
| 84d625c1b4 | |||
| 7a844ee1ae | |||
| 6af096c9b4 | |||
| 1205231707 | |||
| 030ed15021 | |||
| edeff74c52 | |||
| eaec313a3c | |||
| 10e4b63414 | |||
| 05c52e89fa | |||
| ba867b0636 | |||
| f88f566e89 | |||
| 506eb7bc78 | |||
| 5f6f86b2a9 | |||
| 4ba641789d | |||
| 50ad6c5073 | |||
| 77f051ce59 | |||
| 146afcd6a9 | |||
| 4612d5318b | |||
| 42a46fe165 | |||
| 05beb246e8 | |||
| e932c37528 | |||
| c722ddb280 | |||
| cf8e4a87e3 | |||
| 2c5dfd85d5 | |||
| 708e53589e | |||
| f808d42687 | |||
| 759e3ea310 | |||
| 9afeea435f | |||
| be1ee4e4f8 | |||
| 58031af31f | |||
| 2baf76e74b | |||
| 7161858daf | |||
| 3a8068f990 | |||
| e2d5da8151 | |||
| 003b6be691 | |||
| 9355c1a2df | |||
| 4461ba6902 | |||
| f6606722d6 | |||
| 2f97d4edd9 | |||
| f6acfd3968 | |||
| 07e7ae5310 | |||
| f95b0e2ed2 | |||
| 3570b23d8a | |||
| 06ab19f213 | |||
| c2d81149be | |||
| ad7d8e136f | |||
| 5df521eb70 | |||
| cbdfe26dd1 | |||
| 313b3bf2bd | |||
| 1a9aa18680 | |||
| 14ae000686 | |||
| 52d3f4d92f | |||
| 8147baef2b | |||
| dfd1f6c78c | |||
| b568484453 | |||
| 13f829d623 | |||
| a0e2c4ac30 | |||
| 010930febe | |||
| 48695d4672 | |||
| 94980cd3fc | |||
| 6498dadd68 | |||
| 049cb4583a | |||
| e763f78866 | |||
| 1d41dd427d | |||
| 2811d486e3 | |||
| 08cb68366f | |||
| 2853d185b8 | |||
| 24b761ae82 | |||
| 8d46acedf1 | |||
| 83bd5a0099 | |||
| f1f6003048 | |||
| fc0ee942df | |||
| b2643f5967 | |||
| 977092171e | |||
| 644550a302 | |||
| bcfc2ccf0e | |||
| 1a4fffffee | |||
| 564581b1f7 | |||
| c8c8208378 | |||
| 5db4d29b73 | |||
| 88d6de8370 | |||
| 9e84681856 | |||
| c0fdeb3f34 | |||
| 6348d3ee0b | |||
| 530c027068 | |||
| 43c2197ef1 | |||
| a791ab5a52 | |||
| 07c0f890da | |||
| ae0895fbfd | |||
| bb9b50ef99 | |||
| 640b353703 | |||
| feb53e6183 | |||
| b34f031251 | |||
| 92ab8951d2 |
9
.gitignore
vendored
9
.gitignore
vendored
@ -25,7 +25,7 @@ install/
|
||||
*.vcxproj.filters
|
||||
*qmlcache.qrc
|
||||
.deploy.stamp
|
||||
|
||||
*.orig
|
||||
*.log
|
||||
*.pid
|
||||
|
||||
@ -36,3 +36,10 @@ src/app/constant/JamiResources.qml
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
# packaging
|
||||
.tarball-version
|
||||
tarballs.manifest
|
||||
jami-*.tar.gz
|
||||
extras/packaging/gnu-linux/packages/
|
||||
.docker-image-*
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -2,6 +2,10 @@
|
||||
path = 3rdparty/qrencode-win32
|
||||
url = https://github.com/BlueDragon747/qrencode-win32.git
|
||||
ignore = dirty
|
||||
[submodule "3rdparty/libqrencode"]
|
||||
url = https://github.com/fukuchi/libqrencode.git
|
||||
ignore = dirty
|
||||
path = 3rdparty/libqrencode
|
||||
[submodule "3rdparty/SortFilterProxyModel"]
|
||||
path = 3rdparty/SortFilterProxyModel
|
||||
url = https://github.com/atraczyk/SortFilterProxyModel.git
|
||||
|
||||
1
3rdparty/libqrencode
vendored
Submodule
1
3rdparty/libqrencode
vendored
Submodule
Submodule 3rdparty/libqrencode added at 715e29fd4c
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Albert Babí <albert.babi@savoirfairelinux.com>
|
||||
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
||||
@ -158,17 +158,6 @@ execute_process(
|
||||
WORKING_DIRECTORY ${APP_SRC_DIR})
|
||||
set(QML_RESOURCES ${APP_SRC_DIR}/resources.qrc)
|
||||
|
||||
if (APPLE)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
libqrencode
|
||||
GIT_REPOSITORY https://github.com/fukuchi/libqrencode.git
|
||||
GIT_TAG v4.1.1)
|
||||
FetchContent_Populate(libqrencode)
|
||||
add_subdirectory(${libqrencode_SOURCE_DIR} ${libqrencode_BINARY_DIR})
|
||||
include_directories(${libqrencode_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
# library compatibility (boost, libnotify, etc.)
|
||||
add_definitions(-DQT_NO_KEYWORDS)
|
||||
|
||||
@ -215,6 +204,7 @@ set(COMMON_SOURCES
|
||||
${APP_SRC_DIR}/wizardviewstepmodel.cpp
|
||||
${APP_SRC_DIR}/avatarregistry.cpp
|
||||
${APP_SRC_DIR}/currentconversation.cpp
|
||||
${APP_SRC_DIR}/currentconversationmembers.cpp
|
||||
${APP_SRC_DIR}/currentaccount.cpp
|
||||
${APP_SRC_DIR}/videodevices.cpp
|
||||
${APP_SRC_DIR}/videoprovider.cpp
|
||||
@ -275,6 +265,7 @@ set(COMMON_HEADERS
|
||||
${APP_SRC_DIR}/wizardviewstepmodel.h
|
||||
${APP_SRC_DIR}/avatarregistry.h
|
||||
${APP_SRC_DIR}/currentconversation.h
|
||||
${APP_SRC_DIR}/currentconversationmembers.h
|
||||
${APP_SRC_DIR}/currentaccount.h
|
||||
${APP_SRC_DIR}/videodevices.h
|
||||
${APP_SRC_DIR}/videoprovider.h
|
||||
@ -297,6 +288,7 @@ set(LIBJAMI_CONTRIB_DIR "${DAEMON_DIR}/contrib")
|
||||
find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h
|
||||
PATHS
|
||||
${LIBJAMI_CONTRIB_DIR}/native/ffmpeg
|
||||
${LIBJAMI_CONTRIB_DIR}/apple-darwin/include/
|
||||
${LIBJAMI_CONTRIB_DIR}/build/ffmpeg/Build/win32/x64/include)
|
||||
include_directories(${AVUTIL_INCLUDE_DIR})
|
||||
|
||||
@ -441,6 +433,8 @@ else() # APPLE
|
||||
${myApp_ICON}
|
||||
PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION Resources)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/3rdparty/libqrencode/include)
|
||||
LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/3rdparty/libqrencode/lib)
|
||||
if(ENABLE_SPARKLE)
|
||||
message("Sparkle auto-update enabled")
|
||||
set(sparkle_dir "${PACKAGING_DIR}/update/sparkle")
|
||||
@ -721,6 +715,19 @@ else()
|
||||
endif(ENABLE_SPARKLE)
|
||||
target_sources(${PROJECT_NAME} PRIVATE ${resources})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${libs})
|
||||
FILE(GLOB CONTRIB ${LIBJAMI_CONTRIB_DIR}/apple-darwin/lib/*.a)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${CONTRIB})
|
||||
find_package(Iconv REQUIRED)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Iconv::Iconv)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||
"-framework AVFoundation"
|
||||
"-framework CoreAudio -framework CoreMedia -framework CoreVideo"
|
||||
"-framework VideoToolbox -framework AudioUnit"
|
||||
"-framework Security"
|
||||
compression
|
||||
resolv
|
||||
)
|
||||
|
||||
# translations
|
||||
if(Qt${QT_VERSION_MAJOR}LinguistTools_FOUND)
|
||||
|
||||
@ -85,10 +85,10 @@ specify its path using the `--qt` flag, e.g.
|
||||
`./build.py --install --qt=/home/<username>/Qt/6.2.1/gcc_64`.
|
||||
|
||||
Now you will have the daemon in `daemon/bin/jamid` and the client in
|
||||
`build/bin/jami`. You can now run Jami using
|
||||
`build/jami`. You can now run Jami using:
|
||||
|
||||
```bash
|
||||
./build.py --run
|
||||
./build/jami
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
@ -38,7 +38,7 @@ cf [INSTALL.md](/INSTALL.md)
|
||||
|
||||
# License
|
||||
|
||||
Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
|
||||
Jami is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
|
||||
36
build.py
36
build.py
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# build.py --- Convenience script for building and running Jami
|
||||
|
||||
# Copyright (C) 2016-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -303,32 +303,17 @@ def run_dependencies(args):
|
||||
|
||||
|
||||
def run_init():
|
||||
# Extract modules path from '.gitmodules' file
|
||||
module_names = []
|
||||
with open('.gitmodules') as fd:
|
||||
for line in fd.readlines():
|
||||
if line.startswith('[submodule "'):
|
||||
module_names.append(line[line.find('"')+1:line.rfind('"')])
|
||||
subprocess.run(["git", "submodule", "update", "--init"],
|
||||
check=True)
|
||||
|
||||
subprocess.run(["git", "submodule", "update", "--init"], check=True)
|
||||
subprocess.run(["git", "submodule", "foreach",
|
||||
"git checkout master && git pull"], check=True)
|
||||
|
||||
for name in module_names:
|
||||
hooks_dir = f'.git/modules/{name}/hooks'
|
||||
hooks_directories = ['.git/hooks/', f'.git/modules/daemon/hooks']
|
||||
for hooks_dir in hooks_directories:
|
||||
if not os.path.exists(hooks_dir):
|
||||
os.makedirs(hooks_dir)
|
||||
copy_file("./extras/scripts/commit-msg", f'{hooks_dir}/commit-msg')
|
||||
|
||||
module_names_to_format = ['daemon']
|
||||
for name in module_names_to_format:
|
||||
hooks_dir = f'.git/modules/{name}/hooks'
|
||||
copy_file("./extras/scripts/commit-msg", hooks_dir + "/commit-msg")
|
||||
execute_script(['./extras/scripts/format.sh --install %(path)s'],
|
||||
{"path": hooks_dir})
|
||||
|
||||
subprocess.run(["git", "submodule", "update", "--recursive", "--init"],
|
||||
check=True)
|
||||
|
||||
|
||||
def copy_file(src, dest):
|
||||
print(f'Copying: {src} to {dest}')
|
||||
@ -382,6 +367,8 @@ def run_install(args):
|
||||
install_args.append('-W')
|
||||
if args.no_webengine:
|
||||
install_args.append('-w')
|
||||
if args.arch:
|
||||
install_args += ('-a', args.arch)
|
||||
|
||||
if args.distribution == OSX_DISTRIBUTION_NAME:
|
||||
# The `universal_newlines` parameter has been renamed to `text` in
|
||||
@ -419,11 +406,9 @@ def run_install(args):
|
||||
print('info: consider setting the TARBALLS environment variable '
|
||||
'to a stable writable location to avoid loosing '
|
||||
'cached tarballs')
|
||||
# Note: we must expose /gnu/store because /etc/ssl/certs
|
||||
# contains certs that are symlinks to store items.
|
||||
command = ['guix', 'shell', '--manifest=guix/manifest.scm',
|
||||
'--expose=/gnu/store', '--expose=/etc/ssl/certs',
|
||||
'--expose=/usr/bin/env',
|
||||
'--symlink=/usr/bin/env=bin/env',
|
||||
'--symlink=/etc/ssl/certs=etc/ssl/certs',
|
||||
'--container', '--network'] + share_tarballs_args \
|
||||
+ ['--'] + command
|
||||
|
||||
@ -612,6 +597,7 @@ def parse_args():
|
||||
ap.add_argument('--no-webengine', dest='no_webengine',
|
||||
default=False, action='store_true',
|
||||
help='Do not use Qt WebEngine.')
|
||||
ap.add_argument('--arch')
|
||||
|
||||
dist = choose_distribution()
|
||||
|
||||
|
||||
2
daemon
2
daemon
Submodule daemon updated: 5e35e71d09...49e70f07d5
@ -1,7 +1,7 @@
|
||||
# Taken from:
|
||||
# https://cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
|
||||
#
|
||||
# Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2015-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2015-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
|
||||
# Author: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>
|
||||
@ -39,6 +39,8 @@ else()
|
||||
set(LIBJAMI_INCLUDE_DIRS ${RING_BUILD_DIR}/jami)
|
||||
elseif(EXISTS ${CMAKE_INSTALL_PREFIX}/include/jami/jami.h)
|
||||
set(LIBJAMI_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include/jami)
|
||||
elseif(EXISTS ${CMAKE_INSTALL_PREFIX}/daemon/include/jami/jami.h)
|
||||
set(LIBJAMI_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/daemon/include/jami)
|
||||
else()
|
||||
message(STATUS "Jami daemon headers not found!
|
||||
Set -DLIBJAMI_BUILD_DIR or -DCMAKE_INSTALL_PREFIX")
|
||||
@ -55,6 +57,7 @@ if(WITH_DAEMON_SUBMODULE)
|
||||
find_library(LIBJAMI_LIB NAMES jami ring
|
||||
PATHS ${DAEMON_DIR}/src/.libs
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/bin
|
||||
NO_DEFAULT_PATH)
|
||||
@ -64,6 +67,7 @@ else()
|
||||
PATHS ${LIBJAMI_BUILD_DIR}/.libs
|
||||
PATHS ${RING_BUILD_DIR}/.libs
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/bin
|
||||
NO_DEFAULT_PATH)
|
||||
@ -83,6 +87,7 @@ if(NOT LIBJAMI_LIB)
|
||||
PATHS ${DAEMON_DIR}/src/.libs
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
@ -92,6 +97,7 @@ if(NOT LIBJAMI_LIB)
|
||||
PATHS ${RING_BUILD_DIR}/.libs
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
|
||||
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
|
||||
2
extras/ci/client-qt-gnulinux/Jenkinsfile
vendored
2
extras/ci/client-qt-gnulinux/Jenkinsfile
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (C) 2015-2022 Savoir-faire Linux Inc. -->
|
||||
<!-- Copyright (C) 2015-2023 Savoir-faire Linux Inc. -->
|
||||
<component type="desktop-application">
|
||||
<id>net.jami.Jami</id>
|
||||
<metadata_license>CC-BY-SA-3.0</metadata_license>
|
||||
|
||||
58
extras/packaging/gnu-linux/Jenkinsfile
vendored
58
extras/packaging/gnu-linux/Jenkinsfile
vendored
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
// Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
//
|
||||
// Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
|
||||
//
|
||||
@ -32,7 +32,10 @@
|
||||
// - Allow publishing from any node, to avoid relying on a single machine.
|
||||
|
||||
// Configuration globals.
|
||||
def SUBMODULES = ['daemon', '3rdparty/SortFilterProxyModel', '3rdparty/qrencode-win32', 'extras/packaging/update/sparkle/Sparkle']
|
||||
def SUBMODULES = ['daemon',
|
||||
'3rdparty/SortFilterProxyModel',
|
||||
'3rdparty/qrencode-win32',
|
||||
'extras/packaging/update/sparkle/Sparkle']
|
||||
def TARGETS = [:]
|
||||
def REMOTE_HOST = env.SSH_HOST_DL_RING_CX
|
||||
def REMOTE_BASE_DIR = '/srv/repository/ring'
|
||||
@ -43,6 +46,7 @@ def GIT_PUSH_URL = 'ssh://jenkins@review.jami.net:29420/jami-client-qt'
|
||||
def JENKINS_SSH_KEY = '35cefd32-dd99-41b0-8312-0b386df306ff'
|
||||
def DL_SSH_KEY = '5825b39b-dfc6-435f-918e-12acc1f56221'
|
||||
def SNAPCRAFT_KEY = '106e398c-43ca-41c0-8f7e-4f45030f8bdd'
|
||||
def PACKAGING_DIR = 'extras/packaging/gnu-linux'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
@ -70,14 +74,13 @@ pipeline {
|
||||
booleanParam(name: 'BUILD_ARM',
|
||||
defaultValue: false,
|
||||
description: 'Whether to build ARM packages.')
|
||||
booleanParam(name: 'BUILD_DEB_PACK',
|
||||
defaultValue: false,
|
||||
description: 'Whether to build DEB PACK packages.')
|
||||
string(name: 'PACKAGING_TARGETS',
|
||||
defaultValue: '',
|
||||
description: 'A whitespace-separated list of packaging ' +
|
||||
'targets, e.g. "debian_10 snap". ' +
|
||||
'When left unspecified, all the packaging targets are built.')
|
||||
'targets, e.g. "debian_10 deb-pack-x86-64 rpm-pack-x86-64 snap". ' +
|
||||
'When left unspecified, all the packaging targets are built. ' +
|
||||
'To see the available targets, run: ' +
|
||||
'make -f extras/packaging/gnu-linux/Makefile list-package-targets')
|
||||
}
|
||||
|
||||
environment {
|
||||
@ -122,7 +125,7 @@ See https://wiki.savoirfairelinux.com/wiki/Jenkins.jami.net#Configuration_client
|
||||
steps {
|
||||
sh """\
|
||||
#!/usr/bin/env -S bash -l
|
||||
make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-version
|
||||
make -f ${PACKAGING_DIR}/Makefile portable-release-tarball .tarball-version
|
||||
"""
|
||||
stash(includes: '*.tar.gz, .tarball-version',
|
||||
name: 'release-tarball')
|
||||
@ -140,22 +143,21 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve
|
||||
sshagent(credentials: [JENKINS_SSH_KEY, DL_SSH_KEY]) {
|
||||
echo "Publishing to git repository..."
|
||||
script {
|
||||
def wantedTag = sh (
|
||||
script: "echo ${params.CHANNEL}/\$(date +\"%Y%m%d\")",
|
||||
def wantedTag = "${params.CHANNEL}/" + sh (
|
||||
script: "${PACKAGING_DIR}/scripts/release-version.sh" +
|
||||
" ${params.CHANNEL}",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
sh """
|
||||
git tag -am \"Jami new ${params.CHANNEL} version\" ${wantedTag}
|
||||
"""
|
||||
sh "git tag -am \"Jami new ${params.CHANNEL} version\"" +
|
||||
" ${wantedTag}"
|
||||
sh "git push origin --tags"
|
||||
if (params.CHANNEL == 'stable') {
|
||||
// Only stables releases get tarballs and a tag.
|
||||
sh "git push origin --tags"
|
||||
// Only stable releases get a source
|
||||
// tarball.
|
||||
echo "Publishing release tarball..."
|
||||
sh 'rsync --verbose jami*.tar.gz ' +
|
||||
"${REMOTE_HOST}:${REMOTE_BASE_DIR}" +
|
||||
"/release/tarballs/"
|
||||
} else {
|
||||
sh "git push origin --tags"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -170,17 +172,16 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve
|
||||
script {
|
||||
def targetsText = params.PACKAGING_TARGETS.trim()
|
||||
if (!targetsText) {
|
||||
targetsText = sh(script: 'make -f extras/packaging/gnu-linux/Makefile -s list-package-targets',
|
||||
returnStdout: true).trim()
|
||||
targetsText = sh(
|
||||
script: "make -f ${PACKAGING_DIR}/Makefile" +
|
||||
' -s list-package-targets',
|
||||
returnStdout: true).trim()
|
||||
}
|
||||
|
||||
TARGETS = targetsText.split(/\s/)
|
||||
if (!params.BUILD_ARM) {
|
||||
TARGETS = TARGETS.findAll { !(it =~ /_(armhf|arm64)$/) }
|
||||
}
|
||||
if (!params.BUILD_DEB_PACK) {
|
||||
TARGETS = TARGETS.findAll { !(it =~ /_(deb-pack)$/) }
|
||||
}
|
||||
|
||||
def stages = [:]
|
||||
|
||||
@ -199,9 +200,9 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve
|
||||
echo Building on node \$NODE_NAME
|
||||
whoami
|
||||
tar xf *.tar.gz --strip-components=1
|
||||
make -f extras/packaging/gnu-linux/Makefile ${target}
|
||||
make -f ${PACKAGING_DIR}/Makefile ${target}
|
||||
"""
|
||||
stash(includes: 'extras/packaging/gnu-linux/packages/**',
|
||||
stash(includes: "${PACKAGING_DIR}/packages/**",
|
||||
name: target)
|
||||
}
|
||||
}
|
||||
@ -236,15 +237,18 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve
|
||||
}
|
||||
|
||||
def distributionsText = sh(
|
||||
script: 'find extras/packaging/gnu-linux/packages/* -maxdepth 1 -type d -print0 ' +
|
||||
script: "find ${PACKAGING_DIR}/packages/* " +
|
||||
'-maxdepth 1 -type d -print0 ' +
|
||||
'| xargs -0 -n1 basename -z',
|
||||
returnStdout: true).trim()
|
||||
def distributions = distributionsText.split("\0")
|
||||
|
||||
distributions.each { distribution ->
|
||||
echo "Deploying ${distribution} packages..."
|
||||
withCredentials([string(credentialsId: SNAPCRAFT_KEY, variable: 'SNAPCRAFT_STORE_CREDENTIALS')]) {
|
||||
sh """extras/packaging/gnu-linux/scripts/deploy-packages.sh \
|
||||
withCredentials(
|
||||
[string(credentialsId: SNAPCRAFT_KEY,
|
||||
variable: 'SNAPCRAFT_STORE_CREDENTIALS')]) {
|
||||
sh """${PACKAGING_DIR}/scripts/deploy-packages.sh \
|
||||
--distribution=${distribution} \
|
||||
--keyid="${JAMI_PUBLIC_KEY_FINGERPRINT}" \
|
||||
--remote-repository-location="${REMOTE_HOST}:${REMOTE_BASE_DIR}/${params.CHANNEL}" \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# -*- mode: makefile; -*-
|
||||
# Copyright (C) 2016-2021 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
|
||||
#
|
||||
@ -27,17 +27,17 @@ export TARBALLS ?= /var/cache/jami
|
||||
TARBALL_VERSION := $(shell cat $(CURDIR)/.tarball-version 2> /dev/null)
|
||||
|
||||
ifeq ($(TARBALL_VERSION),)
|
||||
LAST_COMMIT_DATE := $(shell git log -1 --format=%cd --date=format:'%Y%m%d.%H%M')
|
||||
COMMIT_ID := $(shell git rev-parse --short HEAD)
|
||||
RELEASE_VERSION := $(LAST_COMMIT_DATE).$(COMMIT_ID)
|
||||
RELEASE_VERSION := $(shell ./extras/packaging/gnu-linux/scripts/release-version.sh)
|
||||
else
|
||||
$(warning Using version from the .tarball-version file: $(TARBALL_VERSION))
|
||||
RELEASE_VERSION := $(TARBALL_VERSION)
|
||||
endif
|
||||
RELEASE_TARBALL_FILENAME := jami_$(RELEASE_VERSION).tar.gz
|
||||
RELEASE_DIRNAME := jami-$(RELEASE_VERSION)
|
||||
RELEASE_TARBALL_FILENAME := $(RELEASE_DIRNAME).tar.gz
|
||||
|
||||
# Export for consumption in child processes.
|
||||
export RELEASE_VERSION
|
||||
export RELEASE_DIRNAME
|
||||
export RELEASE_TARBALL_FILENAME
|
||||
|
||||
# Debian versions
|
||||
@ -57,8 +57,8 @@ QT_JAMI_PREFIX := /usr/lib/libqt-jami
|
||||
## Other variables ##
|
||||
#####################
|
||||
TMPDIR := $(shell mktemp -d)
|
||||
CURRENT_UID:=$(shell id -u)
|
||||
CURRENT_GID:=$(shell id -g)
|
||||
CURRENT_UID := $(shell id -u)
|
||||
CURRENT_GID := $(shell id -g)
|
||||
|
||||
#############################
|
||||
## Release tarball targets ##
|
||||
@ -78,7 +78,7 @@ TAR_REPRODUCIBILITY_OPTIONS = \
|
||||
echo $(RELEASE_VERSION) > $@
|
||||
|
||||
purge-release-tarballs:
|
||||
rm -f jami_*.tar.* tarballs.manifest
|
||||
rm -f jami-*.tar.* tarballs.manifest
|
||||
|
||||
release-tarball:
|
||||
rm -f "$(RELEASE_TARBALL_FILENAME)" tarballs.manifest
|
||||
@ -98,9 +98,9 @@ guix-share-tarball-arg = $${TARBALLS:+"--share=$$TARBALLS"}
|
||||
portable-release-tarball: has-guix-p
|
||||
guix shell --container --network \
|
||||
--preserve=TARBALLS $(guix-share-tarball-arg) \
|
||||
--expose=/usr/bin/env \
|
||||
--expose=$$SSL_CERT_DIR=/etc/ssl/certs \
|
||||
--manifest=$(CURDIR)/extras/packaging/gnu-linux/guix/minimal-manifest.scm \
|
||||
--symlink=/usr/bin/env=bin/env \
|
||||
--symlink=/etc/ssl/certs=etc/ssl/certs \
|
||||
--manifest=extras/packaging/gnu-linux/guix/minimal-manifest.scm \
|
||||
-- $(MAKE) -f extras/packaging/gnu-linux/Makefile release-tarball
|
||||
|
||||
daemon/contrib/native/Makefile:
|
||||
@ -123,27 +123,27 @@ ifeq ($(TARBALL_VERSION),)
|
||||
$(RELEASE_TARBALL_FILENAME): tarballs.manifest
|
||||
# Prepare the sources of the top repository and relevant submodules.
|
||||
rm -f "$@"
|
||||
mkdir $(TMPDIR)/client-qt
|
||||
git archive HEAD | tar xf - -C $(TMPDIR)/client-qt
|
||||
mkdir $(TMPDIR)/$(RELEASE_DIRNAME)
|
||||
git archive HEAD | tar xf - -C $(TMPDIR)/$(RELEASE_DIRNAME)
|
||||
for m in \
|
||||
./daemon \
|
||||
. \
|
||||
./3rdparty/SortFilterProxyModel; do \
|
||||
(cd "$$m" && git archive --prefix "$$m/" HEAD \
|
||||
| tar xf - -C $(TMPDIR)/client-qt); \
|
||||
| tar xf - -C $(TMPDIR)/$(RELEASE_DIRNAME)); \
|
||||
done
|
||||
# Create the base archive.
|
||||
tar -cf $(TMPDIR)/client-qt.tar $(TMPDIR)/client-qt \
|
||||
--transform 's,.*/client-qt,client-qt,' \
|
||||
tar -cf $(TMPDIR)/$(RELEASE_DIRNAME).tar $(TMPDIR)/$(RELEASE_DIRNAME) \
|
||||
--transform "s,.*/$(RELEASE_DIRNAME),$(RELEASE_DIRNAME)," \
|
||||
$(TAR_REPRODUCIBILITY_OPTIONS)
|
||||
# Append the cached tarballs listed in the manifest.
|
||||
tar --append --file $(TMPDIR)/client-qt.tar \
|
||||
tar --append --file $(TMPDIR)/$(RELEASE_DIRNAME).tar \
|
||||
--files-from $< \
|
||||
--transform 's,^.*/,client-qt/daemon/contrib/tarballs/,' \
|
||||
$(TAR_REPRODUCIBILITY_OPTIONS)
|
||||
--transform "s,^.*/,$(RELEASE_DIRNAME)/daemon/contrib/tarballs/," \
|
||||
$(TAR_REPRODUCIBILITY_OPTIONS)
|
||||
# Compress the tarball and move it into place.
|
||||
gzip --no-name $(TMPDIR)/client-qt.tar
|
||||
mv $(TMPDIR)/client-qt.tar.gz "$@"
|
||||
gzip --no-name $(TMPDIR)/$(RELEASE_DIRNAME).tar
|
||||
mv $(TMPDIR)/$(RELEASE_DIRNAME).tar.gz "$@"
|
||||
rm -rf $(TMPDIR)
|
||||
else
|
||||
# If TARBALL_VERSION is defined, assume it's already been generated,
|
||||
@ -189,6 +189,7 @@ $(1)-docker-image-file := .docker-image-$$($(1)-docker-image-name)
|
||||
$(1)-docker-run-command := docker run \
|
||||
--rm --privileged --security-opt apparmor=docker-default \
|
||||
-e RELEASE_VERSION="$(RELEASE_VERSION)" \
|
||||
-e RELEASE_DIRNAME="$(RELEASE_DIRNAME)" \
|
||||
-e RELEASE_TARBALL_FILENAME="$(RELEASE_TARBALL_FILENAME)" \
|
||||
-e DEBIAN_VERSION="$(DEBIAN_VERSION)" \
|
||||
-e DEBIAN_QT_VERSION="$(DEBIAN_QT_VERSION)" \
|
||||
@ -238,42 +239,45 @@ $(foreach target,$(DISTRIBUTIONS),\
|
||||
# Guix-generated Debian packages (deb packs) targets.
|
||||
#
|
||||
SUPPORTED_GNU_ARCHS = x86_64
|
||||
DEB_PACK_TARGETS =
|
||||
GUIX_PACK_FORMATS = deb rpm
|
||||
|
||||
# TODO: Add a postin script for the RPM pack.
|
||||
# Arg1: the 'guix pack' format to use, e.g. 'deb' or 'rpm'.
|
||||
define guix-pack-command
|
||||
guix pack -C xz -f deb -m $(CURDIR)/extras/packaging/gnu-linux/guix/guix-pack-manifest.scm -v3 \
|
||||
guix pack -C xz -f $(1) -m $(CURDIR)/extras/packaging/gnu-linux/guix/guix-pack-manifest.scm -v3 \
|
||||
-S /usr/bin/jami=bin/jami \
|
||||
-S /usr/share/applications/jami.desktop=share/applications/jami.desktop \
|
||||
-S /usr/share/icons/hicolor/scalable/apps/jami.svg=share/icons/hicolor/scalable/apps/jami.svg \
|
||||
-S /usr/share/icons/hicolor/48x48/apps/jami.png=share/icons/hicolor/48x48/apps/jami.png \
|
||||
-S /usr/share/metainfo/jami.appdata.xml=share/metainfo/jami.appdata.xml \
|
||||
--postinst-file=$(CURDIR)/extras/packaging/gnu-linux/guix/guix-pack-deb.postinst
|
||||
$(and $(findstring deb,$(1)), \
|
||||
--postinst-file=$(CURDIR)/extras/packaging/gnu-linux/guix/guix-pack-deb.postinst)
|
||||
endef
|
||||
|
||||
# Arg1: the GNU architecture type (e.g., x86_64, i686, powerpcle, etc.)
|
||||
define define-deb-pack-rule
|
||||
deb-file-name := extras/packaging/gnu-linux/packages/guix-deb-pack/jami-$(RELEASE_VERSION)-$(1).deb
|
||||
DEB_PACK_TARGETS += deb-pack-$(subst _,-,$(1))
|
||||
.PHONY: deb-pack-$(subst _,-,$(1))
|
||||
deb-pack-$(subst _,-,$(1)): $$(deb-file-name)
|
||||
$$(deb-file-name): has-guix-p $(RELEASE_TARBALL_FILENAME)
|
||||
output=$$$$($(guix-pack-command) --system=$(1)-linux $$(GUIX_PACK_ARGS)) && \
|
||||
# Arg1: the 'guix pack' format to use, e.g. 'deb' or 'rpm'.
|
||||
# Arg2: the GNU architecture type (e.g., x86_64, i686, powerpcle, etc.)
|
||||
define define-guix-pack-rule
|
||||
$(1)-file-name := extras/packaging/gnu-linux/packages/guix-$(1)-pack/jami-$(RELEASE_VERSION)-$(2).$(1)
|
||||
PACKAGE-TARGETS += $(1)-pack-$(subst _,-,$(2))
|
||||
.PHONY: $(1)-pack-$(subst _,-,$(2))
|
||||
$(1)-pack-$(subst _,-,$(2)): $$($(1)-file-name)
|
||||
$$($(1)-file-name): has-guix-p $(RELEASE_TARBALL_FILENAME)
|
||||
output=$$$$($(call guix-pack-command,$(1)) --system=$(2)-linux $$(GUIX_PACK_ARGS)) && \
|
||||
mkdir -p "$$$$(dirname "$$@")" && \
|
||||
cp --reflink=auto "$$$$output" "$$@" && \
|
||||
guix gc --delete "$$$$output"
|
||||
chmod +w "$$@"
|
||||
endef
|
||||
|
||||
$(foreach arch,$(SUPPORTED_GNU_ARCHS),\
|
||||
$(eval $(call define-deb-pack-rule,$(arch))))
|
||||
|
||||
PACKAGE-TARGETS += $(DEB_PACK_TARGETS)
|
||||
$(foreach format,$(GUIX_PACK_FORMATS),\
|
||||
$(foreach arch,$(SUPPORTED_GNU_ARCHS),\
|
||||
$(eval $(call define-guix-pack-rule,$(format),$(arch)))))
|
||||
|
||||
package-all: $(PACKAGE-TARGETS)
|
||||
|
||||
.PHONY: list-package-targets
|
||||
list-package-targets:
|
||||
@$(foreach p,$(PACKAGE-TARGETS),\
|
||||
@$(foreach p,$(sort $(PACKAGE-TARGETS)),\
|
||||
echo $(p);)
|
||||
|
||||
###################
|
||||
@ -296,8 +300,7 @@ env:
|
||||
clean:
|
||||
rm -rf env
|
||||
rm -rf docs/build
|
||||
rm -f jami_*.tar.gz
|
||||
rm -f jami-*.tar.gz
|
||||
rm -rf extras/packaging/gnu-linux/packages
|
||||
rm -f Makefile.packaging.distro_targets
|
||||
rm -f .docker-image-*
|
||||
rm -rf client-qt/daemon/contrib/tarballs/*
|
||||
rm -rf daemon/contrib/tarballs/*
|
||||
|
||||
@ -96,7 +96,8 @@ RUN dnf install -y \
|
||||
libxshmfence-devel \
|
||||
ninja-build \
|
||||
clang \
|
||||
cmake
|
||||
cmake \
|
||||
fmt-devel
|
||||
|
||||
ADD extras/packaging/gnu-linux/scripts/build-package-rpm.sh /opt/build-package-rpm.sh
|
||||
|
||||
|
||||
@ -96,7 +96,8 @@ RUN dnf install -y \
|
||||
libxshmfence-devel \
|
||||
ninja-build \
|
||||
clang \
|
||||
cmake
|
||||
cmake \
|
||||
fmt-devel
|
||||
|
||||
ADD extras/packaging/gnu-linux/scripts/build-package-rpm.sh /opt/build-package-rpm.sh
|
||||
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
(list (channel
|
||||
(inherit %default-guix-channel)
|
||||
(commit
|
||||
"f5cc7d03a778f20e2ad487e2c17cc8853bc871f0"))) ;2022-08-01
|
||||
"fbbbc2088ce933d83f5b0be75308fdcb6b40fa57"))) ;2023-02-21
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2021 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
|
||||
#
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
;;; Copyright (C) 2021 Savoir-faire Linux Inc.
|
||||
;;; Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
;;;
|
||||
;;; Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
|
||||
;;;
|
||||
@ -18,9 +18,9 @@
|
||||
;;; This GNU Guix manifest is used along the Makefile to build the
|
||||
;;; latest Jami as a Guix pack.
|
||||
|
||||
(use-modules (gnu packages certs)
|
||||
(use-modules (gnu packages)
|
||||
(gnu packages certs)
|
||||
(gnu packages jami)
|
||||
(gnu packages python)
|
||||
(guix base32)
|
||||
(guix gexp)
|
||||
(guix packages)
|
||||
@ -28,14 +28,14 @@
|
||||
(guix store)
|
||||
(guix utils))
|
||||
|
||||
;;; XXX: Below is a rather strenuous way to specify something that
|
||||
;;; would have been nicer if it could have been specified via:
|
||||
;;; Rather than using something like in the Makefile:
|
||||
;;;
|
||||
;;; --with-source=libjami=$(RELEASE_TARBALL_FILENAME) \
|
||||
;;; --with-source=jami=$(RELEASE_TARBALL_FILENAME) in the Makefile.
|
||||
;;; --with-source=jami=$(RELEASE_TARBALL_FILENAME)
|
||||
;;;
|
||||
;;; The above doesn't currently rewrite the dependency graph
|
||||
;;; recursively, hence why it is not sufficient.
|
||||
;;; the transformations must be made in this manifest file, because
|
||||
;;; packages from manifest are not affected by input rewriting
|
||||
;;; options, by design (see: https://issues.guix.gnu.org/61676).
|
||||
|
||||
(define %release-version (getenv "RELEASE_VERSION"))
|
||||
|
||||
@ -63,12 +63,30 @@
|
||||
(uri %release-file-name)
|
||||
(sha256 %release-file-hash)))
|
||||
|
||||
;;; 'with-source' cannot currently be combined with 'with-patch' (see:
|
||||
;;; https://issues.guix.gnu.org/61684).
|
||||
(define (with-latest-sources name)
|
||||
(options->transformation
|
||||
`((with-source . ,(format #f "~a@~a=~a" name
|
||||
%release-version %release-file-name)))))
|
||||
%release-version %release-file-name))
|
||||
;; XXX: This is not effective, due to the above bug.
|
||||
,@(if (string=? name "libjami")
|
||||
`((with-patch . ,(string-append
|
||||
name "="
|
||||
(search-patch
|
||||
"jami-disable-integration-tests.patch"))))
|
||||
'()))))
|
||||
|
||||
(define libjami/latest ((with-latest-sources "libjami") libjami))
|
||||
(define libjami/latest
|
||||
((with-latest-sources "libjami")
|
||||
(package
|
||||
(inherit libjami)
|
||||
;; FIXME: Disable test suite until #61684 above is fixed or the
|
||||
;; 'jami-disable-integration-tests.patch' merged (also see:
|
||||
;; https://git.jami.net/savoirfairelinux/jami-daemon/-/issues/824).
|
||||
(arguments (substitute-keyword-arguments (package-arguments libjami)
|
||||
((#:tests? _ #t)
|
||||
#f))))))
|
||||
|
||||
(define with-libjami/latest
|
||||
(package-input-rewriting `((,libjami . ,libjami/latest))))
|
||||
@ -82,6 +100,13 @@
|
||||
(append nss-certs)))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments jami)
|
||||
;; This is necessary due to the missing
|
||||
;; jami-libjami-headers-search.patch patch.
|
||||
((#:configure-flags flags '())
|
||||
#~(cons (string-append "-DLIBJAMI_INCLUDE_DIR="
|
||||
#$(this-package-input "libjami")
|
||||
"/include/jami")
|
||||
#$flags))
|
||||
((#:phases phases '%standard-phases)
|
||||
#~(modify-phases #$phases
|
||||
(add-after 'qt-wrap 'wrap-ssl-cert-dir
|
||||
@ -93,6 +118,6 @@
|
||||
exec-line)))))))))))
|
||||
|
||||
(define jami-with-certs/latest
|
||||
((with-latest-sources "jami") jami-with-certs))
|
||||
(with-libjami/latest ((with-latest-sources "jami") jami-with-certs)))
|
||||
|
||||
(packages->manifest (list jami-with-certs/latest))
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: jami
|
||||
Upstream-Contact: Alexandre Viau <alexandre.viau@savoirfairelinux.net>
|
||||
Upstream-Contact: Amin Bandali <bandali@gnu.org>
|
||||
Source: https://dl.jami.net/release/tarballs/
|
||||
Files: *
|
||||
Copyright: 2004-2021 Savoir-faire Linux Inc.
|
||||
Copyright: 2004-2023 Savoir-faire Linux Inc.
|
||||
License: GPL-3+
|
||||
Comment: Upstream embeds everything that is needed to build Jami inside the release tarball.
|
||||
Everything that is already in Debian has been removed.
|
||||
@ -50,7 +50,7 @@ Files: daemon/src/media/audio/opensl/audio_common.h
|
||||
daemon/src/media/audio/opensl/audio_recorder.h
|
||||
daemon/src/media/audio/opensl/buf_manager.h
|
||||
Copyright: 2015 The Android Open Source Project
|
||||
2015-2019 Savoir-faire Linux Inc.
|
||||
2015-2023 Savoir-faire Linux Inc.
|
||||
License: Apache-2.0
|
||||
|
||||
Files: daemon/extras/tools/bootstrap
|
||||
@ -91,7 +91,7 @@ License: BSD-3-Clause
|
||||
##################
|
||||
|
||||
Files: lrc/*
|
||||
Copyright: 2009-2019 by Savoir-faire Linux
|
||||
Copyright: 2009-2023 by Savoir-faire Linux Inc.
|
||||
License: LGPL-2.1+
|
||||
|
||||
################
|
||||
|
||||
@ -8,9 +8,9 @@ Release: %{release}%{?dist}
|
||||
Summary: Daemon component of Jami
|
||||
Group: Applications/Internet
|
||||
License: GPLv3+
|
||||
Vendor: Savoir-faire Linux
|
||||
Vendor: Savoir-faire Linux Inc.
|
||||
URL: https://jami.net/
|
||||
Source: jami_%{version}.tar.gz
|
||||
Source: jami-%{version}.tar.gz
|
||||
Requires: jami-daemon = %{version}
|
||||
|
||||
# Build dependencies
|
||||
@ -59,14 +59,14 @@ universal communication which respects the freedoms and privacy of its
|
||||
users.
|
||||
|
||||
%prep
|
||||
%setup -n client-qt
|
||||
%setup -n jami-%{version}
|
||||
|
||||
%build
|
||||
CFLAGS="${CFLAGS} -fno-lto"
|
||||
CXXFLAGS="${CXXFLAGS} -fno-lto"
|
||||
# Configure the Jami bundled libraries (ffmpeg & pjproject).
|
||||
mkdir -p daemon/contrib/native
|
||||
cd %{_builddir}/client-qt/daemon/contrib/native && \
|
||||
cd %{_builddir}/jami-%{version}/daemon/contrib/native && \
|
||||
../bootstrap \
|
||||
--no-checksums \
|
||||
--disable-ogg \
|
||||
@ -83,19 +83,19 @@ cd %{_builddir}/client-qt/daemon/contrib/native && \
|
||||
make %{_smp_mflags} V=1 && \
|
||||
make %{_smp_mflags} V=1 .ffmpeg
|
||||
# Configure the daemon.
|
||||
cd %{_builddir}/client-qt/daemon && \
|
||||
cd %{_builddir}/jami-%{version}/daemon && \
|
||||
./autogen.sh && \
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir}
|
||||
# Build the daemon.
|
||||
make -C %{_builddir}/client-qt/daemon %{_smp_mflags} V=1
|
||||
pod2man %{_builddir}/client-qt/daemon/man/jamid.pod \
|
||||
> %{_builddir}/client-qt/daemon/jamid.1
|
||||
make -C %{_builddir}/jami-%{version}/daemon %{_smp_mflags} V=1
|
||||
pod2man %{_builddir}/jami-%{version}/daemon/man/jamid.pod \
|
||||
> %{_builddir}/jami-%{version}/daemon/jamid.1
|
||||
|
||||
%install
|
||||
DESTDIR=%{buildroot} make -C daemon install
|
||||
cp %{_builddir}/client-qt/daemon/jamid.1 \
|
||||
cp %{_builddir}/jami-%{version}/daemon/jamid.1 \
|
||||
%{buildroot}/%{_mandir}/man1/jamid.1
|
||||
rm -rfv %{buildroot}/%{_libdir}/*.a
|
||||
rm -rfv %{buildroot}/%{_libdir}/*.la
|
||||
|
||||
@ -13,9 +13,9 @@ Release: %{release}%{?dist}
|
||||
Summary: Transitional package for Jami; can be safely removed
|
||||
Group: Applications/Internet
|
||||
License: GPLv3+
|
||||
Vendor: Savoir-faire Linux
|
||||
Vendor: Savoir-faire Linux Inc.
|
||||
URL: https://jami.net/
|
||||
Source: jami_%{version}.tar.gz
|
||||
Source: jami-%{version}.tar.gz
|
||||
|
||||
%description
|
||||
This is a transitional package. Jami libclient has been merged into
|
||||
|
||||
@ -23,9 +23,9 @@ Release: %{release}%{?dist}
|
||||
Summary: Library for Jami-qt
|
||||
Group: Applications/Internet
|
||||
License: GPLv3+
|
||||
Vendor: Savoir-faire Linux
|
||||
Vendor: Savoir-faire Linux Inc.
|
||||
URL: https://jami.net/
|
||||
Source: jami-qtlib_%{version}.tar.xz
|
||||
Source: jami-libqt-%{version}.tar.xz
|
||||
Patch0: 0001-qtbug-101201-fatal-error-getcurrenkeyboard.patch
|
||||
|
||||
%global gst 0.10
|
||||
|
||||
@ -13,9 +13,9 @@ Release: %{release}%{?dist}
|
||||
Summary: Transitional package for Jami; can be safely removed
|
||||
Group: Applications/Internet
|
||||
License: GPLv3+
|
||||
Vendor: Savoir-faire Linux
|
||||
Vendor: Savoir-faire Linux Inc.
|
||||
URL: https://jami.net/
|
||||
Source: jami_%{version}.tar.gz
|
||||
Source: jami-%{version}.tar.gz
|
||||
Requires: jami
|
||||
|
||||
%description
|
||||
|
||||
@ -8,9 +8,9 @@ Release: %{release}%{?dist}
|
||||
Summary: Qt client for Jami
|
||||
Group: Applications/Internet
|
||||
License: GPLv3+
|
||||
Vendor: Savoir-faire Linux
|
||||
Vendor: Savoir-faire Linux Inc.
|
||||
URL: https://jami.net/
|
||||
Source: jami_%{version}.tar.gz
|
||||
Source: jami-%{version}.tar.gz
|
||||
Requires: jami-daemon = %{version}
|
||||
Requires: jami-libqt
|
||||
Provides: jami-qt = %{version}
|
||||
@ -36,12 +36,12 @@ software for universal communication which respects freedoms and
|
||||
privacy of its users.
|
||||
|
||||
%prep
|
||||
%setup -n client-qt
|
||||
%setup -n jami-%{version}
|
||||
|
||||
%build
|
||||
# Configure and build bundled ffmpeg (for libavutil/avframe).
|
||||
mkdir -p %{_builddir}/client-qt/daemon/contrib/native
|
||||
cd %{_builddir}/client-qt/daemon/contrib/native && \
|
||||
mkdir -p %{_builddir}/jami-%{version}/daemon/contrib/native
|
||||
cd %{_builddir}/jami-%{version}/daemon/contrib/native && \
|
||||
../bootstrap \
|
||||
--no-checksums \
|
||||
--disable-ogg \
|
||||
@ -57,19 +57,19 @@ cd %{_builddir}/client-qt/daemon/contrib/native && \
|
||||
make fetch && \
|
||||
make %{_smp_mflags} V=1 .ffmpeg
|
||||
# Qt-related variables
|
||||
cd %{_builddir}/client-qt && \
|
||||
cd %{_builddir}/jami-%{version} && \
|
||||
mkdir build && cd build && \
|
||||
cmake -DENABLE_LIBWRAP=true \
|
||||
-DLIBJAMI_BUILD_DIR=%{_builddir}/client-qt/daemon/src \
|
||||
-DLIBJAMI_BUILD_DIR=%{_builddir}/jami-%{version}/daemon/src \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
|
||||
-DWITH_DAEMON_SUBMODULE=true \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
..
|
||||
make -C %{_builddir}/client-qt/build %{_smp_mflags} V=1
|
||||
make -C %{_builddir}/jami-%{version}/build %{_smp_mflags} V=1
|
||||
|
||||
%install
|
||||
DESTDIR=%{buildroot} make -C %{_builddir}/client-qt/build install
|
||||
DESTDIR=%{buildroot} make -C %{_builddir}/jami-%{version}/build install
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
@ -81,4 +81,4 @@ DESTDIR=%{buildroot} make -C %{_builddir}/client-qt/build install
|
||||
%{_datadir}/pixmaps/jami.xpm
|
||||
%{_datadir}/metainfo/jami.appdata.xml
|
||||
%{_datadir}/jami/translations/*
|
||||
%doc %{_mandir}/man1/jami*
|
||||
%doc %{_mandir}/man1/jami*
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
|
||||
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
||||
@ -312,6 +312,7 @@ parts:
|
||||
- libdbus-c++-dev
|
||||
- libpulse-dev # pulse
|
||||
- libudev-dev
|
||||
- libopus-dev # Avoid to build opus from contrib
|
||||
- libglu1-mesa-dev # Qt 6
|
||||
- zlib1g-dev
|
||||
- libgl-dev
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2016-2021 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
|
||||
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2016-2021 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
|
||||
# Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
|
||||
@ -26,7 +26,7 @@ set -e
|
||||
# Import the spec file.
|
||||
mkdir -p /opt/client-qt
|
||||
cd /opt/client-qt
|
||||
tar xf "/src/$RELEASE_TARBALL_FILENAME" client-qt/extras/packaging/gnu-linux/rules/rpm \
|
||||
tar xf "/src/$RELEASE_TARBALL_FILENAME" --wildcards 'jami-*/extras/packaging/gnu-linux/rules/rpm' \
|
||||
--strip-components=5 && mv rpm/* . && rmdir rpm
|
||||
rm jami-libqt.spec
|
||||
|
||||
@ -74,7 +74,7 @@ if [ ! -f "${RPM_PATH}" ]; then
|
||||
mkdir /opt/qt-jami-build
|
||||
cd /opt/qt-jami-build
|
||||
tar xf "/src/$RELEASE_TARBALL_FILENAME" \
|
||||
client-qt/extras/packaging/gnu-linux/rules/rpm/jami-libqt.spec \
|
||||
--wildcards 'jami-*/extras/packaging/gnu-linux/rules/rpm/jami-libqt.spec' \
|
||||
--strip-components=6
|
||||
|
||||
# Fetch and cache the tarball, if not already available.
|
||||
@ -93,7 +93,7 @@ if [ ! -f "${RPM_PATH}" ]; then
|
||||
) 8>"${CACHED_QT_TARBALL}.lock"
|
||||
fi
|
||||
|
||||
cp "$CACHED_QT_TARBALL" "/root/rpmbuild/SOURCES/jami-qtlib_$QT_MAJOR_MINOR_PATCH.tar.xz"
|
||||
cp "$CACHED_QT_TARBALL" "/root/rpmbuild/SOURCES/jami-libqt-$QT_MAJOR_MINOR_PATCH.tar.xz"
|
||||
sed -i "s/RELEASE_VERSION/$QT_MAJOR_MINOR_PATCH/g" jami-libqt.spec
|
||||
rpmdev-bumpspec --comment="Automatic nightly release" \
|
||||
--userstring="Jenkins <jami@lists.savoirfairelinux.net>" jami-libqt.spec
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2020-2021 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
||||
#
|
||||
@ -24,7 +24,7 @@
|
||||
set -e
|
||||
|
||||
tar xf "/src/$RELEASE_TARBALL_FILENAME" -C /opt
|
||||
cd /opt/client-qt/
|
||||
cd /opt/jami-*/
|
||||
cp -r extras/packaging/gnu-linux/rules/snap/common .
|
||||
cp -r extras/packaging/gnu-linux/rules/snap/${SNAP_PKG_NAME}/snapcraft.yaml .
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2016-2021 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
|
||||
# Author: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
|
||||
@ -272,7 +272,7 @@ function package()
|
||||
{
|
||||
if [[ $DISTRIBUTION =~ debian|ubuntu|raspbian|guix-deb-pack ]]; then
|
||||
package_deb
|
||||
elif [[ $DISTRIBUTION =~ fedora|rhel|opensuse ]]; then
|
||||
elif [[ $DISTRIBUTION =~ fedora|rhel|opensuse|guix-rpm-pack ]]; then
|
||||
package_rpm
|
||||
elif [[ $DISTRIBUTION =~ snap ]]; then
|
||||
package_snap
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2021 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
||||
#
|
||||
|
||||
35
extras/packaging/gnu-linux/scripts/release-version.sh
Executable file
35
extras/packaging/gnu-linux/scripts/release-version.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This script is used in the packaging containers to build a snap
|
||||
# package on an ubuntu base distro.
|
||||
|
||||
if [ $# -gt 1 ]; then
|
||||
echo "Usage: $0 {stable,beta,nightly}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# default to stable if no release type given
|
||||
release_type=${1:-stable}
|
||||
|
||||
last_commit_date=$(git log -1 --format=%cd --date=format:'%Y%m%d')
|
||||
same_day_releases=$(git tag -l "${release_type}/${last_commit_date}*" | wc -l)
|
||||
release_counter=${same_day_releases:-0}
|
||||
release_version=${last_commit_date}.${release_counter}
|
||||
printf "${release_version}"
|
||||
@ -1,16 +0,0 @@
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/asio-asio-1-22-1.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/ffmpeg-n5.0.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/ffnvcodec-n11.1.5.1.tar.xz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/fmt-9.1.0.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/gmp-6.2.1.tar.bz2
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/http-parser-2.9.4.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/libarchive-3.6.0.tar.xz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/libgit2-v1.1.0.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/libnatpmp-20150609.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/opendht-af7d88b057fa4c84ab9096c6a1932bd5d34634ef.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/pjproject-513a3f14c44b2c2652f9219ec20dea64b236b713.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/restinio-bbaa034dbcc7555ce67df0f8a1475591a7441733.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/secp256k1-0b7024185045a49a1a6a4c5615bf31c94f63d9c4.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/pupnp-release-1.14.13.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/libvpx-v1.12.0.tar.gz
|
||||
/home/amarok/Projects/jami/daemon/contrib/tarballs/webrtc-audio-processing-v0.3.1.tar.gz
|
||||
142
extras/scripts/build_daemon_macos.sh
Executable file
142
extras/scripts/build_daemon_macos.sh
Executable file
@ -0,0 +1,142 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Flags:
|
||||
|
||||
# -a: architecture to build. Accepted values arm64, x86_64, unified
|
||||
# -d: debug
|
||||
set -e
|
||||
|
||||
arch=''
|
||||
debug=
|
||||
while getopts "a:d:" OPT; do
|
||||
case "$OPT" in
|
||||
a)
|
||||
arch="${OPTARG}"
|
||||
;;
|
||||
d)
|
||||
debug=true
|
||||
;;
|
||||
\?)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$arch" == 'unified' ]]; then
|
||||
echo "unified build"
|
||||
ARCHS=("arm64" "x86_64")
|
||||
elif [[ "$arch" == '' ]]; then
|
||||
ARCHS=("arm64")
|
||||
else
|
||||
ARCHS=("$arch")
|
||||
fi
|
||||
|
||||
TOP="$(pwd)"
|
||||
INSTALL="${TOP}/install"
|
||||
OS_VER=$(uname -r)
|
||||
|
||||
DAEMON=${TOP}/daemon
|
||||
cd "$DAEMON"
|
||||
|
||||
FAT_CONTRIB_DIR=$DAEMON/contrib/apple-darwin
|
||||
mkdir -p "$FAT_CONTRIB_DIR"
|
||||
# build contrib for every arch
|
||||
for ARCH in "${ARCHS[@]}"; do
|
||||
HOST="${ARCH}-apple-darwin${OS_VER}"
|
||||
mkdir -p contrib/native-"${ARCH}"
|
||||
(
|
||||
cd contrib/native-"${ARCH}"
|
||||
../bootstrap --host="$HOST"
|
||||
|
||||
echo "Building contrib for $ARCH"
|
||||
# force to build every contrib
|
||||
for dir in "$DAEMON"/contrib/src/*/; do
|
||||
PKG=$(basename -- "$dir")
|
||||
if [ "$PKG" != "dbus-cpp" ] && [ "$PKG" != "natpmp" ] &&
|
||||
[ "$PKG" != "portaudio" ] && [ "$PKG" != "pthreads" ] &&
|
||||
[ "$PKG" != "lttng-ust" ] && [ "$PKG" != "openssl" ] &&
|
||||
[ "$PKG" != "media-sdk" ] && [ "$PKG" != "jack" ] &&
|
||||
[ "$PKG" != "onnx" ] && [ "$PKG" != "opencv" ] &&
|
||||
[ "$PKG" != "opencv_contrib" ] && [ "$PKG" != "uuid" ] &&
|
||||
[ "$PKG" != "webrtc-audio-processing" ] && [ "$PKG" != "liburcu" ]; then
|
||||
make -j"$NPROC" ."$PKG"
|
||||
fi
|
||||
done
|
||||
)
|
||||
done
|
||||
|
||||
# make fat libs for contrib
|
||||
mkdir -p "$FAT_CONTRIB_DIR"/lib
|
||||
if ((${#ARCHS[@]} == "2")); then
|
||||
echo "Making fat lib for ${ARCHS[0]} and ${ARCHS[1]}"
|
||||
LIBFILES="$DAEMON/contrib/${ARCHS[0]}-apple-darwin$OS_VER/lib/*".a
|
||||
for f in $LIBFILES; do
|
||||
# filter out arch from file name
|
||||
arch0=${ARCHS[0]}
|
||||
if [ "$arch0" = "arm64" ]; then
|
||||
arch0="aarch64"
|
||||
fi
|
||||
# file name for first arch
|
||||
libfile0=${f##*/}
|
||||
# file name without arch
|
||||
libfile="${libfile0//"-$arch0"/}"
|
||||
# replace arch0 with ARCHS[1] to get file name for second arch
|
||||
libfile1="${libfile0//$arch0/${ARCHS[1]}}"
|
||||
echo "Processing $libfile from $libfile0 and $libfile1 $ lib..."
|
||||
lipo -create "$DAEMON/contrib/${ARCHS[0]}-apple-darwin$OS_VER/lib/$libfile0" \
|
||||
"$DAEMON/contrib/${ARCHS[1]}-apple-darwin$OS_VER/lib/$libfile1" \
|
||||
-output "$FAT_CONTRIB_DIR/lib/$libfile"
|
||||
done
|
||||
else
|
||||
echo "No need for fat lib"
|
||||
rsync -ar --delete "$DAEMON/contrib/${ARCHS[0]}-apple-darwin$OS_VER/lib/"*.a "$FAT_CONTRIB_DIR/lib"
|
||||
fi
|
||||
|
||||
rsync -ar --delete "$DAEMON/contrib/${ARCHS[0]}-apple-darwin$OS_VER/include"* "$FAT_CONTRIB_DIR/"
|
||||
|
||||
# build deamon for every arch
|
||||
for ARCH in "${ARCHS[@]}"; do
|
||||
echo "$ARCH"
|
||||
cd "$DAEMON"
|
||||
HOST="${ARCH}-apple-darwin"
|
||||
CONFIGURE_FLAGS=" --without-dbus --host=${HOST} -with-contrib=$DAEMON/contrib/${ARCH}-apple-darwin${OS_VER} --prefix=${INSTALL}/daemon/$ARCH"
|
||||
|
||||
if [ "${debug}" = "true" ]; then
|
||||
CONFIGURE_FLAGS+=" --enable-debug"
|
||||
fi
|
||||
|
||||
echo "$CONFIGURE_FLAGS"
|
||||
./autogen.sh || exit
|
||||
|
||||
# We need to copy this file or else it's just an empty file
|
||||
rsync -a "$DAEMON"/src/buildinfo.cpp ./src/buildinfo.cpp
|
||||
mkdir -p "build-macos-${ARCH}"
|
||||
cd "build-macos-${ARCH}"
|
||||
|
||||
"$DAEMON"/configure $CONFIGURE_FLAGS ARCH="$ARCH" || exit 1
|
||||
|
||||
echo "$CONFIGURE_FLAGS"
|
||||
|
||||
rsync -a "$DAEMON"/src/buildinfo.cpp ./src/buildinfo.cpp
|
||||
|
||||
make -j"$NPROC" || exit 1
|
||||
make install || exit 1
|
||||
cd "$DAEMON"
|
||||
done
|
||||
|
||||
# make fat lib for daemon
|
||||
FAT_INSTALL_DIR="${INSTALL}"/daemon/
|
||||
mkdir -p "${FAT_INSTALL_DIR}"
|
||||
|
||||
if ((${#ARCHS[@]} == "2")); then
|
||||
echo "Creating daemon fat lib"
|
||||
mkdir -p "$FAT_INSTALL_DIR"/lib
|
||||
lipo -create "${INSTALL}/daemon/${ARCHS[0]}/lib/libjami.a" \
|
||||
"${INSTALL}/daemon/${ARCHS[1]}/lib/libjami.a" \
|
||||
-output "${FAT_INSTALL_DIR}"/lib/libjami.a
|
||||
else
|
||||
echo "No need for daemon fat lib"
|
||||
rsync -ar --delete "${INSTALL}/daemon/${ARCHS[0]}/lib/libjami.a" "${FAT_INSTALL_DIR}"/lib/
|
||||
fi
|
||||
|
||||
rsync -ar --delete "${INSTALL}/daemon/${ARCHS[0]}/include/"* "$FAT_INSTALL_DIR"/include
|
||||
61
extras/scripts/build_qrencode.sh
Executable file
61
extras/scripts/build_qrencode.sh
Executable file
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Flags:
|
||||
|
||||
# -a: architecture to build. Accepted values arm64, x86_64, unified
|
||||
|
||||
arch=''
|
||||
while getopts "a:" OPT; do
|
||||
case "$OPT" in
|
||||
a)
|
||||
arch="${OPTARG}"
|
||||
;;
|
||||
\?)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$arch" == 'unified' ]]; then
|
||||
ARCHS=("arm64" "x86_64")
|
||||
elif [[ "$arch" == '' ]]; then
|
||||
ARCHS=("arm64")
|
||||
else
|
||||
ARCHS=("$arch")
|
||||
fi
|
||||
|
||||
TOP="$(pwd)"
|
||||
QRENCODEDIR="${TOP}/3rdparty/libqrencode"
|
||||
if [ -z "$NPROC" ]; then
|
||||
NPROC=$(sysctl -n hw.ncpu || echo -n 1)
|
||||
fi
|
||||
|
||||
for ARCH in "${ARCHS[@]}"; do
|
||||
cd "$QRENCODEDIR" || exit 1
|
||||
BUILDDIR="$ARCH-libqrencode"
|
||||
mkdir "$BUILDDIR"
|
||||
make clean
|
||||
./autogen.sh
|
||||
./configure --host="$ARCH" --without-png --prefix="${QRENCODEDIR}/${BUILDDIR}" CFLAGS=" -arch $ARCH $CFLAGS"
|
||||
make -j"$NPROC"
|
||||
make install
|
||||
done
|
||||
mkdir -p "$QRENCODEDIR"/lib
|
||||
mkdir -p "$QRENCODEDIR"/include
|
||||
|
||||
if ((${#ARCHS[@]} == "2")); then
|
||||
echo "Making fat lib for ${ARCHS[0]} and ${ARCHS[1]}"
|
||||
LIBFILES="$QRENCODEDIR/${ARCHS[0]}-libqrencode/lib/*.a"
|
||||
for f in $LIBFILES; do
|
||||
libFile=${f##*/}
|
||||
echo "$libFile"
|
||||
lipo -create "$QRENCODEDIR/${ARCHS[0]}-libqrencode/lib/$libFile" \
|
||||
"$QRENCODEDIR/${ARCHS[1]}-libqrencode/lib/$libFile" \
|
||||
-output "${QRENCODEDIR}/lib/$libFile"
|
||||
done
|
||||
else
|
||||
echo "No need for fat lib"
|
||||
rsync -ar --delete "$QRENCODEDIR/${ARCHS[0]}-libqrencode/lib/"*.a "${QRENCODEDIR}/lib/"
|
||||
fi
|
||||
|
||||
rsync -ar --delete "$QRENCODEDIR/${ARCHS[0]}-libqrencode/include/"* "${QRENCODEDIR}/include/"
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# format.sh --- set up clang-format for source files
|
||||
|
||||
# Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# install.sh --- build and install Jami daemon and client
|
||||
|
||||
# Copyright (C) 2016-2022 Savoir-faire Linux Inc.
|
||||
# Copyright (C) 2016-2023 Savoir-faire Linux Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -28,6 +28,7 @@ export OSTYPE
|
||||
# -u: disable use of privileges (sudo) during install
|
||||
# -W: disable libwrap and shared library
|
||||
# -w: do not use Qt WebEngine
|
||||
# -a: arch to build
|
||||
|
||||
set -ex
|
||||
|
||||
@ -42,8 +43,9 @@ proc='1'
|
||||
priv_install=true
|
||||
enable_libwrap=true
|
||||
enable_webengine=true
|
||||
arch=''
|
||||
|
||||
while getopts gsc:dQ:P:p:uWw OPT; do
|
||||
while getopts gsc:dQ:P:p:uWw:a: OPT; do
|
||||
case "$OPT" in
|
||||
g)
|
||||
global='true'
|
||||
@ -72,6 +74,9 @@ while getopts gsc:dQ:P:p:uWw OPT; do
|
||||
w)
|
||||
enable_webengine='false'
|
||||
;;
|
||||
a)
|
||||
arch="${OPTARG}"
|
||||
;;
|
||||
\?)
|
||||
exit 1
|
||||
;;
|
||||
@ -102,64 +107,68 @@ 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"}
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sh "${TOP}"/extras/scripts/build_daemon_macos.sh -a "$arch" -d "$debug"
|
||||
else
|
||||
./configure ${CONFIGURE_FLAGS} --prefix="${INSTALL_DIR}"
|
||||
fi
|
||||
make -j"${proc}" V=1
|
||||
make_install "${global}" "${priv_install}"
|
||||
cd "$DAEMON"
|
||||
|
||||
# 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;
|
||||
# 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
|
||||
|
||||
sys_qtver=${sys_qtver#*Qt version}
|
||||
sys_qtver=${sys_qtver%\ in\ *}
|
||||
BUILD_TYPE="Release"
|
||||
if [ "${debug}" = "true" ]; then
|
||||
BUILD_TYPE="Debug"
|
||||
CONFIGURE_FLAGS+=" --enable-debug"
|
||||
fi
|
||||
|
||||
installed_qtver=$(echo "$sys_qtver" | cut -d'.' -f 2)
|
||||
required_qtver=$(echo $QT_MIN_VER | cut -d'.' -f 2)
|
||||
# Build the daemon itself.
|
||||
test -f configure || ./autogen.sh
|
||||
|
||||
if [[ $installed_qtver -ge $required_qtver ]] ; then
|
||||
# Set qtpath to empty in order to use system's Qt.
|
||||
qtpath=""
|
||||
if [ "${global}" = "true" ]; then
|
||||
./configure ${CONFIGURE_FLAGS} ${prefix:+"--prefix=$prefix"}
|
||||
else
|
||||
echo "No valid Qt found"; exit 1;
|
||||
./configure ${CONFIGURE_FLAGS} --prefix="${INSTALL_DIR}"
|
||||
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
|
||||
fi
|
||||
|
||||
@ -172,6 +181,21 @@ client_cmake_flags=(-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
|
||||
-DCMAKE_PREFIX_PATH="${qtpath}"
|
||||
-DENABLE_LIBWRAP="${enable_libwrap}"
|
||||
-DWITH_WEBENGINE="${enable_webengine}")
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
#detect arch for macos
|
||||
CMAKE_OSX_ARCHITECTURES="arm64"
|
||||
if [[ "$arch" == 'unified' ]]; then
|
||||
CMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
||||
elif [[ "$arch" != '' ]]; then
|
||||
CMAKE_OSX_ARCHITECTURES="$arch"
|
||||
fi
|
||||
client_cmake_flags+=(-DCMAKE_OSX_ARCHITECTURES="${CMAKE_OSX_ARCHITECTURES}")
|
||||
# build qrencode
|
||||
(
|
||||
cd ${TOP}
|
||||
./extras/scripts/build_qrencode.sh -a "$arch"
|
||||
)
|
||||
fi
|
||||
|
||||
if [ "${global}" = "true" ]; then
|
||||
client_cmake_flags+=(${prefix:+"-DCMAKE_INSTALL_PREFIX=$prefix"}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
##
|
||||
## Copyright (C) 2016-2022 Savoir-faire Linux Inc.
|
||||
## Copyright (C) 2016-2023 Savoir-faire Linux Inc.
|
||||
##
|
||||
## Author: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com>
|
||||
## Author: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
|
||||
|
||||
@ -36,5 +36,7 @@
|
||||
<string>Jami requires to access your microphone to make calls and record audio</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Jami requires to access your photo library to show image on profile and send via chat</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
13
resources/icons/informations_black_24dp.svg
Normal file
13
resources/icons/informations_black_24dp.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<g id="noun-about-3359358" transform="translate(-188.36 -188.36)">
|
||||
<path id="Path_14" d="M200.4,190.4c-5.5,0-10,4.5-10,10s4.5,10,10,10s10-4.5,10-10C210.4,194.8,205.9,190.4,200.4,190.4z
|
||||
M200.4,208.5c-4.5,0-8.2-3.7-8.2-8.2s3.7-8.2,8.2-8.2c4.5,0,8.2,3.7,8.2,8.2C208.5,204.9,204.9,208.5,200.4,208.5L200.4,208.5z"/>
|
||||
<path id="Path_15" d="M200.4,197.7c-0.5,0-0.9,0.4-0.9,0.9c0,0,0,0,0,0v7.7c0,0.5,0.4,0.9,0.9,0.9s0.9-0.4,0.9-0.9l0,0v-7.7
|
||||
C201.3,198.1,200.9,197.7,200.4,197.7C200.4,197.7,200.4,197.7,200.4,197.7z"/>
|
||||
<path id="Path_16" d="M201.3,195.3c0,0.5-0.4,0.9-0.9,0.9c-0.5,0-0.9-0.4-0.9-0.9c0-0.5,0.4-0.9,0.9-0.9l0,0
|
||||
C200.9,194.4,201.3,194.8,201.3,195.3"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1022 B |
19
resources/icons/screenshot_black_24dp.svg
Normal file
19
resources/icons/screenshot_black_24dp.svg
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M2.9,9.1c0.5,0,0.9-0.4,0.9-0.9V4.2c0-0.2,0.2-0.3,0.3-0.3h3.9c0.5,0,1-0.4,1-0.9S8.6,2,8.1,2H4.2C3,2,2,3,2,4.2v3.9
|
||||
C2,8.6,2.4,9.1,2.9,9.1z"/>
|
||||
<path d="M21.1,14.9c-0.5,0-0.9,0.4-0.9,0.9v3.9c0,0.2-0.2,0.3-0.3,0.3h-3.9c-0.5,0-0.9,0.4-0.9,0.9c0,0.5,0.4,1,0.9,1h3.9
|
||||
c1.2,0,2.2-1,2.2-2.2v-3.9C22,15.4,21.6,14.9,21.1,14.9z"/>
|
||||
<path d="M8.1,20.1H4.2c-0.2,0-0.3-0.2-0.3-0.3v-3.9c0-0.5-0.4-1-1-1c-0.5,0-0.9,0.4-0.9,1v3.9C2,21,3,22,4.2,22h3.9
|
||||
c0.5,0,1-0.4,1-1C9.1,20.5,8.6,20.1,8.1,20.1z"/>
|
||||
<path d="M15.9,3.9h3.9c0.2,0,0.3,0.2,0.3,0.3v3.9c0,0.5,0.4,0.9,0.9,0.9S22,8.6,22,8.1V4.2C22,3,21,2,19.8,2h-3.9
|
||||
c-0.5,0-0.9,0.4-0.9,0.9S15.4,3.9,15.9,3.9z"/>
|
||||
<path d="M16.8,12c0-1.3-0.5-2.5-1.4-3.4c-0.9-0.9-2.1-1.4-3.4-1.4c0,0,0,0,0,0c-1.3,0-2.5,0.5-3.4,1.4C7.7,9.5,7.2,10.7,7.2,12
|
||||
c0,2.7,2.2,4.8,4.8,4.8c0,0,0,0,0,0C14.7,16.8,16.8,14.7,16.8,12z M12,9.1C12,9.1,12,9.1,12,9.1c1.6,0,2.9,1.3,2.9,2.9
|
||||
c0,0.8-0.3,1.5-0.9,2.1c-0.5,0.5-1.3,0.9-2.1,0.9c0,0,0,0,0,0c-1.6,0-2.9-1.3-2.9-2.9c0-0.8,0.3-1.5,0.9-2.1
|
||||
C10.5,9.4,11.2,9.1,12,9.1z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
resources/icons/search.svg
Normal file
1
resources/icons/search.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M39.8 41.95 26.65 28.8q-1.5 1.3-3.5 2.025-2 .725-4.25.725-5.4 0-9.15-3.75T6 18.75q0-5.3 3.75-9.05 3.75-3.75 9.1-3.75 5.3 0 9.025 3.75 3.725 3.75 3.725 9.05 0 2.15-.7 4.15-.7 2-2.1 3.75L42 39.75Zm-20.95-13.4q4.05 0 6.9-2.875Q28.6 22.8 28.6 18.75t-2.85-6.925Q22.9 8.95 18.85 8.95q-4.1 0-6.975 2.875T9 18.75q0 4.05 2.875 6.925t6.975 2.875Z"/></svg>
|
||||
|
After Width: | Height: | Size: 417 B |
@ -85,5 +85,9 @@ function parseMessage(messageId, message, showPreview, color='#0645AD') {
|
||||
}
|
||||
if (showPreview)
|
||||
getPreviewInfo(messageId, links[0].href)
|
||||
window.jsbridge.emitLinkified(messageId, linkifyStr(message, color))
|
||||
window.jsbridge.emitLinkified(messageId, linkifyStr(message, {
|
||||
attributes: {
|
||||
style: "color:" + color + ";"
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@ Mohamed Chibani<br>
|
||||
Mohamed Amine Younes Bouacida<br>
|
||||
Nicolas Jäger<br>
|
||||
Nicolas Reynaud<br>
|
||||
Nicolas Vengeon<br>
|
||||
Olivier Gregoire<br>
|
||||
Olivier Soldano<br>
|
||||
Patrick Keroulas<br>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -126,7 +126,7 @@ QtObject {
|
||||
// Adds an item to the fullscreen item stack. Automatically puts
|
||||
// the main window in fullscreen mode if needed. Callbacks should be used
|
||||
// to perform component-specific tasks upon successful transitions.
|
||||
function pushFullScreenItem(item, originalParent, pushedCb, removedCb) {
|
||||
function pushFullScreenItem(item, prevParent, pushedCb, removedCb) {
|
||||
if (item === null || item === undefined
|
||||
|| priv.fullScreenItems.length >= 3) {
|
||||
return
|
||||
@ -138,10 +138,12 @@ QtObject {
|
||||
// Add the item to our list and reparent it to appContainer.
|
||||
priv.fullScreenItems.push({
|
||||
"item": item,
|
||||
"originalParent": originalParent,
|
||||
"prevParent": prevParent,
|
||||
"prevAnchorsFill": item.anchors.fill,
|
||||
"removedCb": removedCb
|
||||
})
|
||||
item.parent = appContainer
|
||||
item.anchors.fill = item.parent
|
||||
if (pushedCb) {
|
||||
pushedCb()
|
||||
}
|
||||
@ -164,7 +166,8 @@ QtObject {
|
||||
}
|
||||
if (obj !== undefined) {
|
||||
if (obj.item !== appWindow) {
|
||||
obj.item.parent = obj.originalParent
|
||||
obj.item.anchors.fill = obj.prevAnchorsFill
|
||||
obj.item.parent = obj.prevParent
|
||||
if (obj.removedCb) {
|
||||
obj.removedCb()
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
* Author: Albert Babí <albert.babi@savoirfairelinux.com>
|
||||
@ -51,6 +51,10 @@ ApplicationWindow {
|
||||
property LayoutManager layoutManager: LayoutManager {
|
||||
appContainer: appContainer
|
||||
}
|
||||
property ViewManager viewManager: ViewManager {}
|
||||
property ViewCoordinator viewCoordinator: ViewCoordinator {
|
||||
viewManager: root.viewManager
|
||||
}
|
||||
|
||||
property bool windowSettingsLoaded: false
|
||||
property bool allowVisibleWindow: true
|
||||
@ -85,6 +89,7 @@ ApplicationWindow {
|
||||
!UtilsAdapter.getAccountListSize()) {
|
||||
// Save the window geometry and state before quitting.
|
||||
layoutManager.saveWindowSettings()
|
||||
viewCoordinator.dismissAll()
|
||||
Qt.quit()
|
||||
} else {
|
||||
layoutManager.closeToTray()
|
||||
@ -105,10 +110,6 @@ ApplicationWindow {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
DaemonReconnectPopup {
|
||||
id: daemonReconnectPopup
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: mainApplicationLoader
|
||||
|
||||
@ -117,7 +118,14 @@ ApplicationWindow {
|
||||
|
||||
asynchronous: true
|
||||
visible: status == Loader.Ready
|
||||
source: ""
|
||||
|
||||
Connections {
|
||||
target: viewCoordinator
|
||||
|
||||
function onRequestAppWindowWizardView() {
|
||||
mainApplicationLoader.setSource(JamiQmlUtils.wizardViewLoadPath)
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: mainApplicationLoader.item
|
||||
@ -149,6 +157,14 @@ ApplicationWindow {
|
||||
// Main window, load any valid app settings, and allow the
|
||||
// layoutManager to handle as much as possible.
|
||||
layoutManager.restoreWindowSettings()
|
||||
|
||||
// Present the welcome view once the viewCoordinator is setup.
|
||||
viewCoordinator.initialized.connect(function() {
|
||||
viewCoordinator.present("WelcomePage")
|
||||
viewCoordinator.preload("ConversationView")
|
||||
})
|
||||
// Set the viewCoordinator's root item.
|
||||
viewCoordinator.setRootView(item)
|
||||
}
|
||||
if (Qt.platform.os.toString() === "osx") {
|
||||
MainApplication.setEventFilter()
|
||||
@ -206,14 +222,11 @@ ApplicationWindow {
|
||||
ignoreUnknownSignals: true
|
||||
|
||||
function onShowDaemonReconnectPopup(visible) {
|
||||
if (visible)
|
||||
daemonReconnectPopup.open()
|
||||
else
|
||||
daemonReconnectPopup.close()
|
||||
}
|
||||
|
||||
function onDaemonReconnectFailed() {
|
||||
daemonReconnectPopup.connectionFailed = true
|
||||
if (visible) {
|
||||
viewCoordinator.presentDialog(
|
||||
appWindow,
|
||||
"commoncomponents/DaemonReconnectPopup.qml")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
340
src/app/ViewCoordinator.qml
Normal file
340
src/app/ViewCoordinator.qml
Normal file
@ -0,0 +1,340 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import net.jami.Constants 1.1
|
||||
import net.jami.Models 1.1
|
||||
|
||||
// This object should be implemented as a QML singleton, or be instantiated
|
||||
// once in the main application window component. The top-level application window
|
||||
// contains a loader[mainview, wizardview] and "rootView" MUST parent a horizontal
|
||||
// SplitView with a StackView in each pane.
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
required property QtObject viewManager
|
||||
|
||||
signal requestAppWindowWizardView
|
||||
|
||||
// A map of view names to file paths for QML files that define each view.
|
||||
property variant resources: {
|
||||
"WelcomePage": "mainview/components/WelcomePage.qml",
|
||||
"SidePanel": "mainview/components/SidePanel.qml",
|
||||
"ConversationView": "mainview/ConversationView.qml",
|
||||
"NewSwarmPage": "mainview/components/NewSwarmPage.qml",
|
||||
"WizardView": "wizardview/WizardView.qml",
|
||||
"SettingsView": "settingsview/SettingsView.qml",
|
||||
}
|
||||
|
||||
// Maybe this state needs to be toggled because the SidePanel content is replaced.
|
||||
// This makes it so the state can't be inferred from loaded views in single pane mode.
|
||||
property bool inSettings: viewManager.hasView("SettingsView")
|
||||
property bool inWizard: viewManager.hasView("WizardView")
|
||||
property bool inNewSwarm: viewManager.hasView("NewSwarmPage")
|
||||
property bool inhibitConversationView: inSettings || inWizard || inNewSwarm
|
||||
|
||||
property bool busy: false
|
||||
|
||||
// The `main` view of the application window.
|
||||
property Item rootView: null
|
||||
|
||||
// HACKS.
|
||||
property real mainViewWidth: rootView ? rootView.width : 0
|
||||
property real previousWidth: mainViewWidth
|
||||
property real mainViewSidePanelRectWidth: sv1 ? sv1.width : 0
|
||||
property real lastSideBarSplitSize: mainViewSidePanelRectWidth
|
||||
onMainViewWidthChanged: resolvePanes()
|
||||
|
||||
function resolvePanes(force=false) {
|
||||
if (forceSinglePane) return
|
||||
const isExpanding = previousWidth < mainViewWidth
|
||||
if (mainViewWidth < JamiTheme.chatViewHeaderMinimumWidth + mainViewSidePanelRectWidth
|
||||
&& sv2.visible && (!isExpanding || force)) {
|
||||
lastSideBarSplitSize = mainViewSidePanelRectWidth
|
||||
singlePane = true
|
||||
} else if (mainViewWidth >= lastSideBarSplitSize + JamiTheme.chatViewHeaderMinimumWidth
|
||||
&& !sv2.visible && (isExpanding || force) && !layoutManager.isFullScreen) {
|
||||
singlePane = false
|
||||
}
|
||||
previousWidth = mainViewWidth
|
||||
}
|
||||
|
||||
// Must be the child of `rootView`.
|
||||
property Item splitView: null
|
||||
|
||||
// StackView objects, which are children of `splitView`.
|
||||
property StackView sv1: null
|
||||
property StackView sv2: null
|
||||
|
||||
// The StackView object that is currently active, determined by the value
|
||||
// of singlePane.
|
||||
readonly property StackView activeStackView: singlePane ? sv1 : sv2
|
||||
|
||||
readonly property string currentViewName: {
|
||||
if (activeStackView == null || activeStackView.depth === 0) return ''
|
||||
return activeStackView.currentItem.objectName
|
||||
}
|
||||
|
||||
readonly property var currentView: {
|
||||
return activeStackView ? activeStackView.currentItem : null
|
||||
}
|
||||
|
||||
// Handle single/dual pane mode.
|
||||
property bool forceSinglePane: false
|
||||
property bool singlePane
|
||||
onForceSinglePaneChanged: {
|
||||
if (forceSinglePane) singlePane = true
|
||||
else resolvePanes(true)
|
||||
}
|
||||
|
||||
onSinglePaneChanged: {
|
||||
// Hiding sv2 before moving items from, and after moving
|
||||
// items to, reduces stack item visibility change events.
|
||||
if (singlePane) {
|
||||
sv2.visible = false
|
||||
if (forceSinglePane) Qt.callLater(move, sv2, sv1)
|
||||
else move(sv2, sv1)
|
||||
} else {
|
||||
move(sv1, sv2)
|
||||
sv2.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
// Emitted once at the end of setRootView.
|
||||
signal initialized()
|
||||
|
||||
// Create, present, and return a dialog object.
|
||||
function presentDialog(parent, path, props={}) {
|
||||
// Open the dialog once the object is created
|
||||
return viewManager.createView(path, parent, function(obj) {
|
||||
const doneCb = function() { viewManager.destroyView(path) }
|
||||
if (obj.closed !== undefined) {
|
||||
obj.closed.connect(doneCb)
|
||||
} else {
|
||||
if (obj.accepted !== undefined) { obj.accepted.connect(doneCb) }
|
||||
if (obj.rejected !== undefined) { obj.rejected.connect(doneCb) }
|
||||
}
|
||||
obj.open()
|
||||
}, props)
|
||||
}
|
||||
|
||||
// Dismiss all views.
|
||||
function dismissAll() {
|
||||
for (var path in viewManager.views) {
|
||||
viewManager.destroyView(path)
|
||||
}
|
||||
}
|
||||
|
||||
// Get a view regardless of whether it is currently active.
|
||||
function getView(viewName) {
|
||||
if (!viewManager.hasView(viewName)) {
|
||||
return null
|
||||
}
|
||||
return viewManager.views[viewManager.viewPaths[viewName]]
|
||||
}
|
||||
|
||||
// Sets object references, onInitialized is a good time to present views.
|
||||
function setRootView(obj) {
|
||||
rootView = obj
|
||||
splitView = rootView.splitView
|
||||
sv1 = rootView.sv1
|
||||
sv1.parent = Qt.binding(() => singlePane ? rootView : splitView)
|
||||
sv1.anchors.fill = Qt.binding(() => singlePane ? rootView : undefined)
|
||||
sv2 = rootView.sv2
|
||||
|
||||
initialized()
|
||||
resolvePanes()
|
||||
}
|
||||
|
||||
// Finds a view and gets its index within the StackView it's in.
|
||||
function getStackIndex(viewName) {
|
||||
for (const [key, value] of Object.entries(viewManager.views)) {
|
||||
if (value.objectName === viewName) {
|
||||
return value.StackView.index
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
// Load a view without presenting it.
|
||||
function preload(viewName) {
|
||||
if (!viewManager.createView(resources[viewName], null)) {
|
||||
console.log("Failed to load view: " + viewName)
|
||||
}
|
||||
}
|
||||
|
||||
// This function presents the view with the given viewName in the
|
||||
// specified StackView. Return the view if successful.
|
||||
function present(viewName, sv=activeStackView) {
|
||||
if (!rootView) return
|
||||
|
||||
if (viewName === "ConversationView" && inhibitConversationView) {
|
||||
return
|
||||
}
|
||||
|
||||
// If the view already exists in the StackView, the function will attempt
|
||||
// to navigate to its StackView position by dismissing elevated views.
|
||||
if (sv.find(function(item) {
|
||||
return item.objectName === viewName;
|
||||
})) {
|
||||
const viewIndex = getStackIndex(viewName)
|
||||
if (viewIndex >= 0) {
|
||||
for (var i = (sv.depth - 1); i > viewIndex; i--) {
|
||||
dismissObj(sv.get(i, StackView.DontLoad))
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// If we are in single-pane mode and the view was previously forced into
|
||||
// sv2, we can move it back to the top of sv1.
|
||||
if (singlePane && sv === sv1) {
|
||||
// See if the item is at the top of sv2
|
||||
if (sv2.currentItem && sv2.currentItem.objectName === viewName) {
|
||||
// Move it to the top of sv1
|
||||
const view = sv2.pop(StackView.Immediate)
|
||||
sv1.push(view, StackView.Immediate)
|
||||
view.presented()
|
||||
return view
|
||||
}
|
||||
}
|
||||
|
||||
const obj = viewManager.createView(resources[viewName], appWindow)
|
||||
if (!obj) {
|
||||
print("could not create view:", viewName)
|
||||
return null
|
||||
}
|
||||
if (obj === currentView) {
|
||||
print("view is current:", viewName)
|
||||
return null
|
||||
}
|
||||
|
||||
// If we are in single-pane mode and the view should start hidden
|
||||
// (requiresIndex), we can push it into sv2.
|
||||
if (singlePane && sv === sv1 && obj.requiresIndex) {
|
||||
sv = sv2
|
||||
} else {
|
||||
forceSinglePane = obj.singlePaneOnly
|
||||
}
|
||||
|
||||
const view = sv.push(obj, StackView.Immediate)
|
||||
if (!view) {
|
||||
return null
|
||||
}
|
||||
if (view.objectName === '') {
|
||||
view.objectName = viewName
|
||||
}
|
||||
view.presented()
|
||||
return view
|
||||
}
|
||||
|
||||
// Dismiss by object.
|
||||
function dismissObj(obj, sv=activeStackView) {
|
||||
if (obj.StackView.view !== sv) {
|
||||
print("view not in the stack:", obj)
|
||||
return
|
||||
}
|
||||
|
||||
// If we are dismissing a view that is not at the top of the stack,
|
||||
// we need to store each of the views on top into a temporary stack
|
||||
// and then restore them after the view is dismissed.
|
||||
// So we get the index of the view we are dismissing.
|
||||
const viewIndex = obj.StackView.index
|
||||
var tempStack = []
|
||||
for (var i = (sv.depth - 1); i > viewIndex; i--) {
|
||||
var item = sv.pop(StackView.Immediate)
|
||||
tempStack.push(item)
|
||||
}
|
||||
// And we define a function to restore and resolve the views.
|
||||
var resolveStack = () => {
|
||||
for (var i = 0; i < tempStack.length; i++) {
|
||||
sv.push(tempStack[i], StackView.Immediate)
|
||||
}
|
||||
|
||||
forceSinglePane = sv.currentItem.singlePaneOnly
|
||||
sv.currentItem.presented()
|
||||
}
|
||||
|
||||
// Now we can dismiss the view at the top of the stack.
|
||||
const depth = sv.depth
|
||||
if (obj === sv.get(depth - 1, StackView.DontLoad)) {
|
||||
var view = sv.pop(StackView.Immediate)
|
||||
if (!view) {
|
||||
print("could not pop view:", obj.objectName)
|
||||
resolveStack()
|
||||
return
|
||||
}
|
||||
|
||||
// If the view is managed, we can destroy it, otherwise, it can
|
||||
// be reused and destroyed by it's parent.
|
||||
if (view.managed) {
|
||||
var objectName = view ? view.objectName : obj.objectName
|
||||
if (!viewManager.destroyView(resources[objectName])) {
|
||||
print("could not destroy view:", objectName)
|
||||
}
|
||||
} else {
|
||||
view.dismissed()
|
||||
}
|
||||
}
|
||||
resolveStack()
|
||||
}
|
||||
|
||||
// Dismiss by view name.
|
||||
function dismiss(viewName) {
|
||||
if (!rootView) return
|
||||
|
||||
const depth = activeStackView.depth
|
||||
for (var i = (depth - 1); i >= 0; i--) {
|
||||
const view = activeStackView.get(i, StackView.DontLoad)
|
||||
if (view.objectName === viewName) {
|
||||
dismissObj(view)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the view is hidden on the top of sv2 (if in single-pane mode),
|
||||
// and dismiss it in that case.
|
||||
if (singlePane && sv2.currentItem && sv2.currentItem.objectName === viewName) {
|
||||
dismissObj(sv2.currentItem, sv2)
|
||||
}
|
||||
}
|
||||
|
||||
// Move items from one stack to another. We avoid the recursive technique to
|
||||
// avoid visibility change events.
|
||||
function move(from, to, depth=1) {
|
||||
busy = true
|
||||
var tempStack = []
|
||||
while (from.depth > depth) {
|
||||
var item = from.pop(StackView.Immediate)
|
||||
tempStack.push(item)
|
||||
}
|
||||
while (tempStack.length) {
|
||||
to.push(tempStack.pop(), StackView.Immediate)
|
||||
}
|
||||
busy = false
|
||||
}
|
||||
|
||||
// Effectively hide the current view by moving it to the other StackView.
|
||||
// This function only works when in single-pane mode.
|
||||
function hideCurrentView() {
|
||||
if (singlePane) move(sv1, sv2)
|
||||
}
|
||||
}
|
||||
87
src/app/ViewManager.qml
Normal file
87
src/app/ViewManager.qml
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
id: viewManager
|
||||
|
||||
// A map of path strings to view objects.
|
||||
property variant views: ({})
|
||||
// A map of view names to path strings.
|
||||
property variant viewPaths: ({})
|
||||
// The number of views.
|
||||
property int nViews: 0
|
||||
|
||||
function createView(path, parent=null, cb=null, props={}) {
|
||||
if (views[path] !== undefined) {
|
||||
// an instance of <path> already exists
|
||||
return views[path]
|
||||
}
|
||||
|
||||
const component = Qt.createComponent(Qt.resolvedUrl(path))
|
||||
if (component.status === Component.Ready) {
|
||||
const obj = component.createObject(parent, props)
|
||||
if (obj === null) {
|
||||
print("error creating object")
|
||||
return null
|
||||
}
|
||||
views[path] = obj
|
||||
// Set the view name to the object name if it has one.
|
||||
const viewName = obj.objectName.toString() !== '' ?
|
||||
obj.objectName :
|
||||
path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "")
|
||||
viewPaths[viewName] = path
|
||||
nViews = Object.keys(views).length
|
||||
if (cb !== null) {
|
||||
cb(obj)
|
||||
}
|
||||
return views[path]
|
||||
}
|
||||
print("error creating component", path)
|
||||
console.error(component.errorString())
|
||||
Qt.exit(1)
|
||||
return null
|
||||
}
|
||||
|
||||
function destroyView(path) {
|
||||
if (views[path] === undefined) {
|
||||
print(path, "instance does not exist", Object.keys(views))
|
||||
return false
|
||||
}
|
||||
views[path].destroy()
|
||||
views[path] = undefined
|
||||
// QObject::destroy is queued, and we can't connect to its completion,
|
||||
// so we queue the resulting mutation to our view storage.
|
||||
Qt.callLater(function() {
|
||||
delete views[path]
|
||||
// Remove the view name from the viewPaths map.
|
||||
for (var viewName in viewPaths) {
|
||||
if (viewPaths[viewName] === path) {
|
||||
delete viewPaths[viewName]
|
||||
break
|
||||
}
|
||||
}
|
||||
nViews = Object.keys(views).length
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
function hasView(viewName) {
|
||||
return nViews && viewPaths[viewName] !== undefined
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
* Author: Yang Wang <yang.yang@savoirfairelinux.com>
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
@ -183,7 +183,8 @@ AccountAdapter::createSIPAccount(const QVariantMap& settings)
|
||||
confProps.hostname = settings["hostname"].toString();
|
||||
confProps.username = settings["username"].toString();
|
||||
confProps.password = settings["password"].toString();
|
||||
confProps.routeset = settings["proxy"].toString();
|
||||
confProps.TLS.enable = settings["tls"].toBool();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
confProps.Ringtone.ringtonePath = Utils::GetRingtonePath();
|
||||
#endif
|
||||
@ -327,23 +328,6 @@ AccountAdapter::getDefaultModerators(const QString& accountId)
|
||||
return lrcInstance_->accountModel().getDefaultModerators(accountId);
|
||||
}
|
||||
|
||||
bool
|
||||
AccountAdapter::hasPassword()
|
||||
{
|
||||
auto confProps = lrcInstance_->accountModel().getAccountConfig(
|
||||
lrcInstance_->get_currentAccountId());
|
||||
return confProps.archiveHasPassword;
|
||||
}
|
||||
|
||||
void
|
||||
AccountAdapter::setArchiveHasPassword(bool isHavePassword)
|
||||
{
|
||||
auto confProps = lrcInstance_->accountModel().getAccountConfig(
|
||||
lrcInstance_->get_currentAccountId());
|
||||
confProps.archiveHasPassword = isHavePassword;
|
||||
lrcInstance_->accountModel().setAccountConfig(lrcInstance_->get_currentAccountId(), confProps);
|
||||
}
|
||||
|
||||
bool
|
||||
AccountAdapter::exportToFile(const QString& accountId,
|
||||
const QString& path,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -50,8 +50,6 @@ public:
|
||||
QObject* parent = nullptr);
|
||||
~AccountAdapter() = default;
|
||||
|
||||
void safeInit() override {}
|
||||
|
||||
// Change to account corresponding to combox box index.
|
||||
Q_INVOKABLE void changeAccount(int row);
|
||||
|
||||
@ -64,8 +62,6 @@ public:
|
||||
Q_INVOKABLE void deleteCurrentAccount();
|
||||
|
||||
// Conf property
|
||||
Q_INVOKABLE bool hasPassword();
|
||||
Q_INVOKABLE void setArchiveHasPassword(bool isHavePassword);
|
||||
Q_INVOKABLE bool exportToFile(const QString& accountId,
|
||||
const QString& path,
|
||||
const QString& password = {}) const;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -57,6 +57,13 @@ AppSettingsManager::setValue(const Settings::Key key, const QVariant& value)
|
||||
settings_->setValue(Settings::toString(key), value);
|
||||
}
|
||||
|
||||
QString
|
||||
AppSettingsManager::getLanguage()
|
||||
{
|
||||
auto pref = getValue(Settings::Key::LANG).toString();
|
||||
return pref == "SYSTEM" ? QLocale::system().name() : pref;
|
||||
}
|
||||
|
||||
void
|
||||
AppSettingsManager::loadTranslations()
|
||||
{
|
||||
@ -75,9 +82,7 @@ AppSettingsManager::loadTranslations()
|
||||
qApp->removeTranslator(tr);
|
||||
installedTr_.clear();
|
||||
|
||||
auto pref = getValue(Settings::Key::LANG).toString();
|
||||
|
||||
QString locale_name = pref == "SYSTEM" ? QLocale::system().name() : pref;
|
||||
QString locale_name = getLanguage();
|
||||
qDebug() << QString("Using locale: %1").arg(locale_name);
|
||||
QString locale_lang = locale_name.split('_')[0];
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -111,6 +111,7 @@ public:
|
||||
|
||||
Q_INVOKABLE QVariant getValue(const Settings::Key key);
|
||||
Q_INVOKABLE void setValue(const Settings::Key key, const QVariant& value);
|
||||
QString getLanguage();
|
||||
|
||||
void loadTranslations();
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author : Edric Ladent Milaret<edric.ladent - milaret @savoirfairelinux.com>
|
||||
* Author : Andreas Traczyk<andreas.traczyk @savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
@ -267,7 +267,7 @@ AvAdapter::getSharingResource(int screenId, const QString& windowProcessId, cons
|
||||
rect.moveTop(0);
|
||||
#endif
|
||||
|
||||
return lrcInstance_->getCurrentCallModel()->getDisplay(screenId,
|
||||
return lrcInstance_->getCurrentCallModel()->getDisplay(getScreenNumber(screenId),
|
||||
rect.x(),
|
||||
rect.y(),
|
||||
rect.width()
|
||||
@ -290,14 +290,23 @@ AvAdapter::getListWindows()
|
||||
}
|
||||
|
||||
void
|
||||
AvAdapter::stopSharing()
|
||||
AvAdapter::stopSharing(const QString& source)
|
||||
{
|
||||
auto callId = lrcInstance_->getCurrentCallId();
|
||||
if (!callId.isEmpty()) {
|
||||
lrcInstance_->getCurrentCallModel()->removeMedia(callId,
|
||||
libjami::Media::Details::MEDIA_TYPE_VIDEO,
|
||||
libjami::Media::VideoProtocolPrefix::DISPLAY,
|
||||
muteCamera_);
|
||||
if (!source.isEmpty() && !callId.isEmpty()) {
|
||||
if (source.startsWith(libjami::Media::VideoProtocolPrefix::DISPLAY)) {
|
||||
qDebug() << "Stopping display: " << source;
|
||||
lrcInstance_->getCurrentCallModel()->removeMedia(callId,
|
||||
libjami::Media::Details::MEDIA_TYPE_VIDEO,
|
||||
libjami::Media::VideoProtocolPrefix::DISPLAY,
|
||||
muteCamera_);
|
||||
} else {
|
||||
qDebug() << "Stopping file: " << source;
|
||||
lrcInstance_->getCurrentCallModel()->removeMedia(callId,
|
||||
libjami::Media::Details::MEDIA_TYPE_VIDEO,
|
||||
libjami::Media::VideoProtocolPrefix::FILE,
|
||||
muteCamera_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,13 +347,6 @@ AvAdapter::onRendererStarted(const QString& id, const QSize& size)
|
||||
return;
|
||||
auto rendererInfo = rendererInfoList.first();
|
||||
rendererInformationListModel_->addElement(qMakePair(id, rendererInfo));
|
||||
|
||||
auto callModel = lrcInstance_->getCurrentCallModel();
|
||||
auto renderDevice = callModel->getCurrentRenderedDevice(callId);
|
||||
if (!id.contains("://"))
|
||||
return;
|
||||
set_currentRenderingDeviceId(id);
|
||||
set_currentRenderingDeviceType(renderDevice.type);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -31,10 +31,6 @@
|
||||
class AvAdapter final : public QmlAdapterBase
|
||||
{
|
||||
Q_OBJECT
|
||||
// TODO: currentRenderingDeviceType is only used in QML to check if
|
||||
// we're sharing or not, so it should maybe just be a boolean.
|
||||
QML_RO_PROPERTY(lrc::api::video::DeviceType, currentRenderingDeviceType)
|
||||
QML_RO_PROPERTY(QString, currentRenderingDeviceId)
|
||||
QML_PROPERTY(bool, muteCamera)
|
||||
QML_RO_PROPERTY(QStringList, windowsNames)
|
||||
QML_RO_PROPERTY(QList<QVariant>, windowsIds)
|
||||
@ -50,8 +46,6 @@ Q_SIGNALS:
|
||||
void audioDeviceListChanged(int inputs, int outputs);
|
||||
|
||||
protected:
|
||||
void safeInit() override {};
|
||||
|
||||
/**
|
||||
* Check if user is sharing a media
|
||||
*/
|
||||
@ -89,12 +83,14 @@ protected:
|
||||
Q_INVOKABLE void shareWindow(const QString& windowProcessId, const QString& windowId);
|
||||
|
||||
// Returns the screensharing resource
|
||||
Q_INVOKABLE QString getSharingResource(int screenId = -2, const QString& windowProcessId = "", const QString& key = "");
|
||||
Q_INVOKABLE QString getSharingResource(int screenId = -2,
|
||||
const QString& windowProcessId = "",
|
||||
const QString& key = "");
|
||||
|
||||
Q_INVOKABLE void getListWindows();
|
||||
|
||||
// Stop sharing the screen or file
|
||||
Q_INVOKABLE void stopSharing();
|
||||
Q_INVOKABLE void stopSharing(const QString& source = {});
|
||||
|
||||
Q_INVOKABLE void startAudioMeter();
|
||||
Q_INVOKABLE void stopAudioMeter();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Isa Nanic <isa.nanic@savoirfairelinux.com>
|
||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Isa Nanic <isa.nanic@savoirfairelinux.com>
|
||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>
|
||||
* Author: Anthony Léonard <anthony.leonard@savoirfairelinux.com>
|
||||
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com>
|
||||
@ -416,8 +416,6 @@ CallAdapter::acceptACall(const QString& accountId, const QString& convUid)
|
||||
return;
|
||||
|
||||
lrcInstance_->getAccountInfo(accountId).callModel->accept(convInfo.callId);
|
||||
auto& accInfo = lrcInstance_->getAccountInfo(convInfo.accountId);
|
||||
accInfo.callModel->setCurrentCall(convInfo.callId);
|
||||
}
|
||||
|
||||
void
|
||||
@ -518,7 +516,13 @@ CallAdapter::updateCall(const QString& convUid, const QString& accountId, bool f
|
||||
if (convInfo.uid == lrcInstance_->get_selectedConvUid()) {
|
||||
auto& accInfo = lrcInstance_->accountModel().getAccountInfo(accountId_);
|
||||
if (accInfo.profileInfo.type != lrc::api::profile::Type::SIP) {
|
||||
accInfo.callModel->setCurrentCall(call->id);
|
||||
// Only setCurrentCall if call is actually answered
|
||||
try {
|
||||
if (call->status == call::Status::IN_PROGRESS
|
||||
|| call->status == call::Status::PAUSED)
|
||||
accInfo.callModel->setCurrentCall(call->id);
|
||||
} catch (...) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
@ -49,9 +49,6 @@ public:
|
||||
explicit CallAdapter(SystemTray* systemTray, LRCInstance* instance, QObject* parent = nullptr);
|
||||
~CallAdapter() = default;
|
||||
|
||||
protected:
|
||||
void safeInit() override {};
|
||||
|
||||
public:
|
||||
Q_INVOKABLE void startTimerInformation();
|
||||
Q_INVOKABLE void stopTimerInformation();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
@ -54,7 +54,9 @@ PendingConferenceesListModel::PendingConferenceesListModel(LRCInstance* instance
|
||||
, lrcInstance_(instance)
|
||||
{
|
||||
connectSignals();
|
||||
connect(lrcInstance_, &LRCInstance::currentAccountIdChanged, [this]() { connectSignals(); });
|
||||
connect(lrcInstance_, &LRCInstance::currentAccountIdChanged, this, [this]() {
|
||||
connectSignals();
|
||||
});
|
||||
}
|
||||
|
||||
int
|
||||
@ -128,10 +130,14 @@ PendingConferenceesListModel::connectSignals()
|
||||
return;
|
||||
|
||||
using namespace PendingConferences;
|
||||
callsStatusChanged_
|
||||
= connect(currentCallModel, &CallModel::callStatusChanged, [this](const QString&, int) {
|
||||
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1), {Role::CallStatus});
|
||||
});
|
||||
callsStatusChanged_ = connect(currentCallModel,
|
||||
&CallModel::callStatusChanged,
|
||||
this,
|
||||
[this](const QString&, int) {
|
||||
Q_EMIT dataChanged(index(0, 0),
|
||||
index(rowCount() - 1),
|
||||
{Role::CallStatus});
|
||||
});
|
||||
|
||||
beginInsertPendingConferencesRows_ = connect(
|
||||
currentCallModel,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
42
src/app/commoncomponents/BaseView.qml
Normal file
42
src/app/commoncomponents/BaseView.qml
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
|
||||
Rectangle {
|
||||
id: viewNode
|
||||
|
||||
// True if this view is managed by the view coordinator.
|
||||
// False if this view is managed by its parent view, and will
|
||||
// only be destroyed when its parent is destroyed.
|
||||
property bool managed: true
|
||||
|
||||
// True if this view functions in a single-pane context only.
|
||||
property bool singlePaneOnly: false
|
||||
|
||||
// True if this view requires and initial selection from
|
||||
// a group of menu options when in single-pane mode (e.g. settings).
|
||||
property bool requiresIndex: false
|
||||
|
||||
function dismiss() { viewCoordinator.dismiss(objectName) }
|
||||
|
||||
signal presented
|
||||
signal dismissed
|
||||
|
||||
Component.onCompleted: { if (managed) presented() }
|
||||
Component.onDestruction: { if (managed) dismissed() }
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -61,12 +61,10 @@ SBSMessageBase {
|
||||
if (ConfId === "" && Duration === 0) {
|
||||
// If missed, we can add a darker pattern
|
||||
return isOutgoing ?
|
||||
Qt.darker(JamiTheme.messageOutBgColor, 1.5) :
|
||||
Qt.lighter(CurrentConversation.color, 1.5) :
|
||||
Qt.darker(JamiTheme.messageInBgColor, 1.5)
|
||||
}
|
||||
return isOutgoing ?
|
||||
JamiTheme.messageOutBgColor :
|
||||
CurrentConversation.isCoreDialog ? JamiTheme.messageInBgColor : Qt.lighter(CurrentConversation.color, 1.5)
|
||||
return isOutgoing ? CurrentConversation.color : JamiTheme.messageInBgColor
|
||||
}
|
||||
|
||||
innerContent.children: [
|
||||
@ -88,8 +86,13 @@ SBSMessageBase {
|
||||
return Body
|
||||
}
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
font.pointSize: JamiTheme.contactEventPointSize
|
||||
|
||||
font.pixelSize: JamiTheme.emojiBubbleSize
|
||||
font.hintingPreference: Font.PreferNoHinting
|
||||
font.bold: true
|
||||
renderType: Text.NativeRendering
|
||||
textFormat: Text.MarkdownText
|
||||
|
||||
color: UtilsAdapter.luma(bubble.color) ?
|
||||
JamiTheme.chatviewTextColorLight :
|
||||
JamiTheme.chatviewTextColorDark
|
||||
@ -115,4 +118,4 @@ SBSMessageBase {
|
||||
opacity: 0
|
||||
Behavior on opacity { NumberAnimation { duration: 100 } }
|
||||
Component.onCompleted: opacity = 1
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -29,11 +29,13 @@ BaseModalDialog {
|
||||
|
||||
signal accepted
|
||||
|
||||
width: Math.min(mainView.width - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogWidth)
|
||||
height: Math.min(mainView.height - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogHeight)
|
||||
width: Math.min(appWindow.width - 2 * JamiTheme.preferredMarginSize,
|
||||
JamiTheme.preferredDialogWidth)
|
||||
height: Math.min(appWindow.height - 2 * JamiTheme.preferredMarginSize,
|
||||
JamiTheme.preferredDialogHeight)
|
||||
|
||||
property var confirmLabel: ""
|
||||
property var textLabel: ""
|
||||
property string confirmLabel: ""
|
||||
property string textLabel: ""
|
||||
|
||||
popupContent: ColumnLayout {
|
||||
id: column
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -39,6 +39,7 @@ Column {
|
||||
|
||||
ColumnLayout {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width
|
||||
|
||||
TimestampInfo {
|
||||
id:timestampItem
|
||||
@ -56,7 +57,7 @@ Column {
|
||||
width: childrenRect.width
|
||||
height: JamiTheme.contactMessageAvatarSize + 12
|
||||
radius: JamiTheme.contactMessageAvatarSize / 2 + 6
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
color: "transparent"
|
||||
border.width: 1
|
||||
border.color: CurrentConversation.isCoreDialog ? JamiTheme.messageInBgColor : CurrentConversation.color
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -31,6 +31,26 @@ BaseModalDialog {
|
||||
|
||||
autoClose: false
|
||||
|
||||
Connections {
|
||||
target: {
|
||||
if (Qt.platform.os.toString() !== "windows" && Qt.platform.os.toString() !== "osx")
|
||||
return DBusErrorHandler
|
||||
return null
|
||||
}
|
||||
ignoreUnknownSignals: true
|
||||
|
||||
function onShowDaemonReconnectPopup(visible) {
|
||||
if (!visible) {
|
||||
viewCoordinator.dismiss(this)
|
||||
}
|
||||
}
|
||||
|
||||
function onDaemonReconnectFailed() {
|
||||
connectionFailed = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onPopupContentLoadStatusChanged: {
|
||||
if (popupContentLoadStatus === Loader.Ready) {
|
||||
root.height = Qt.binding(function() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Trevor Tabah <trevor.tabah@savoirfairelinux.com>
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -35,8 +35,8 @@ BaseModalDialog {
|
||||
|
||||
title: JamiStrings.deleteAccount
|
||||
|
||||
width: Math.min(mainView.width - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogWidth)
|
||||
height: Math.min(mainView.height - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogHeight)
|
||||
width: Math.min(appWindow.width - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogWidth)
|
||||
height: Math.min(appWindow.height - 2 * JamiTheme.preferredMarginSize, JamiTheme.preferredDialogHeight)
|
||||
|
||||
popupContent: ColumnLayout {
|
||||
id: deleteAccountContentColumnLayout
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Sébastien blin <sebastien.blin@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -95,4 +95,4 @@ BaseModalDialog {
|
||||
onClicked: close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Albert Babí <albert.babig@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Nicolas Vengeon <nicolas.vengeon@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Nicolas Vengeon <nicolas.vengeon@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Trevor Tabah <trevor.tabah@savoirfairelinux.com>
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2021-2023 Savoir-faire Linux Inc.
|
||||
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2022-2023 Savoir-faire Linux Inc.
|
||||
* Author: Fadi Shehadeh <fadi.shehadeh@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -27,6 +27,17 @@ FileDialog {
|
||||
// Use enum to avoid importing Qt.labs.platform when using JamiFileDialog.
|
||||
property int mode: JamiFileDialog.Mode.OpenFile
|
||||
|
||||
signal fileAccepted(string file)
|
||||
signal filesAccepted(var files)
|
||||
|
||||
onAccepted: {
|
||||
switch(fileMode) {
|
||||
case FileDialog.OpenFile: fileAccepted(file); break
|
||||
case FileDialog.OpenFiles: filesAccepted(files); break
|
||||
default: fileAccepted(file)
|
||||
}
|
||||
}
|
||||
|
||||
enum Mode {
|
||||
OpenFile = 0,
|
||||
OpenFiles,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2020-2023 Savoir-faire Linux Inc.
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Savoir-faire Linux Inc.
|
||||
* Copyright (C) 2019-2023 Savoir-faire Linux Inc.
|
||||
* Author: Yang Wang <yang.wang@savoirfairelinux.com>
|
||||
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
|
||||
*
|
||||
@ -26,6 +26,8 @@ import net.jami.Models 1.1
|
||||
ListView {
|
||||
id: root
|
||||
|
||||
property alias verticalScrollBar: verticalScrollBar
|
||||
|
||||
layer.mipmap: false
|
||||
clip: true
|
||||
maximumFlickVelocity: 1024
|
||||
@ -36,11 +38,6 @@ ListView {
|
||||
attachedFlickableMoving: root.moving
|
||||
}
|
||||
|
||||
property bool isScrolling: verticalScrollBar.active
|
||||
onIsScrollingChanged: {
|
||||
JamiQmlUtils.isChatviewScrolling = isScrolling
|
||||
}
|
||||
|
||||
Keys.onUpPressed: verticalScrollBar.decrease()
|
||||
Keys.onDownPressed: verticalScrollBar.increase()
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user