Compare commits
122 Commits
Author | SHA1 | Date | |
---|---|---|---|
a04693e39d | |||
3cce057545 | |||
9a44ae1fa5 | |||
85ff6c25ba | |||
3cc7db8eff | |||
|
ff9a591d6d | ||
8e3f10caff | |||
8bfe88929f | |||
9927bdc38b | |||
|
8083859541 | ||
|
030c374139 | ||
|
2c61b82924 | ||
fb843a1346 | |||
8d82d340a4 | |||
acd60eaba2 | |||
829777935f | |||
0be2648849 | |||
93c5be412e | |||
8f5325b291 | |||
75554c7451 | |||
00af582287 | |||
19835af3cf | |||
e31ef78e71 | |||
be466fbad1 | |||
0a530bfa93 | |||
637eb702a8 | |||
a7d1a28f29 | |||
297e08ba41 | |||
9d688e8596 | |||
23ec80ccba | |||
5fbb03fc46 | |||
81cf0f8d34 | |||
69d797fe51 | |||
4f295fee3c | |||
fffef9876a | |||
283e9ebc4d | |||
21b40a9ccb | |||
76a9c5da0c | |||
8ec0af3205 | |||
4b68da458f | |||
927bdf0dab | |||
5ba97ecc25 | |||
9fff409630 | |||
99fd001292 | |||
2d8f32c257 | |||
77dd28b600 | |||
6f32e99593 | |||
ec362cef55 | |||
e4a2728ef8 | |||
bf11d8a74e | |||
edf1ee60cd | |||
4af16b75bf | |||
bb304ce774 | |||
3c6b611a41 | |||
73d83f55af | |||
b72a837754 | |||
d4bf7e599a | |||
15fb4bbd62 | |||
2aed8a1209 | |||
78ef3664f7 | |||
5aa0f4bca9 | |||
b45a73b723 | |||
758a9d95f3 | |||
dfe72ca36c | |||
db3bc358a7 | |||
0b61b6e928 | |||
820dc845ea | |||
87973b3b67 | |||
b6ba022bff | |||
7b2b7ee5d5 | |||
c50cd1140e | |||
037dabbe06 | |||
2ae75a4b91 | |||
d162494ec8 | |||
7e9eed2075 | |||
7192286aeb | |||
645b92ba51 | |||
80c5e2f2b4 | |||
1f065f23e6 | |||
3c48577eee | |||
0340db7f2f | |||
c3a45ec58c | |||
7ba94e9deb | |||
eac87e713f | |||
d86e2c28a0 | |||
2fcc432aef | |||
e58213b294 | |||
3916aec358 | |||
721d3a1a89 | |||
83cb220175 | |||
18859cb960 | |||
4c20a314f0 | |||
51ac1ac709 | |||
8f949277f6 | |||
ce686e121b | |||
f64e5c2df0 | |||
2c26c7e264 | |||
69e0c88d8d | |||
82d54ba4df | |||
1b66fda318 | |||
9f746d203b | |||
27377e0ec5 | |||
4baa3bccbf | |||
4786388822 | |||
62f02c18d7 | |||
1fcd403dba | |||
5f6691067a | |||
788c6ca556 | |||
bf4a27f35d | |||
0823b35148 | |||
73b1b58a96 | |||
d8b5ccb2da | |||
243edff8bd | |||
da19eb86bb | |||
0ff9f12157 | |||
802e2f11a1 | |||
c708c33a92 | |||
a8a7ce2538 | |||
841e526e59 | |||
6bee149e6b | |||
62a59eb7a1 | |||
296328f12d |
45
.gitea/workflows/release.yml
Normal file
45
.gitea/workflows/release.yml
Normal file
@ -0,0 +1,45 @@
|
||||
name: Squawk Release workflow
|
||||
run-name: ${{ gitea.actor }} is running Squawk Release workflow on release ${{ gitea.event.release.tag_name }}
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
Archlinux:
|
||||
runs-on: archlinux
|
||||
steps:
|
||||
- name: Download the release tarball
|
||||
run: curl -sL ${{ gitea.server_url }}/${{ gitea.repository }}/archive/${{ gitea.event.release.tag_name }}.tar.gz --output tarball.tar.gz
|
||||
|
||||
- name: Calculate SHA256 for the tarball
|
||||
run: echo "tbSum=$(sha256sum tarball.tar.gz | cut -d ' ' -f 1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Unarchive tarball
|
||||
run: tar -xvzf tarball.tar.gz
|
||||
|
||||
- name: Clone the AUR repository
|
||||
run: |
|
||||
echo "${{ secrets.DEPLOY_TO_AUR_PRIVATE_KEY }}" > key
|
||||
chmod 600 key
|
||||
GIT_SSH_COMMAND="ssh -i key -o 'IdentitiesOnly yes' -o 'StrictHostKeyChecking no'" git clone ssh://aur@aur.archlinux.org/squawk.git aur
|
||||
chmod 777 -R aur
|
||||
cd aur
|
||||
git config user.name ${{ secrets.DEPLOY_TO_AUR_USER_NAME }}
|
||||
git config user.email ${{ secrets.DEPLOY_TO_AUR_EMAIL }}
|
||||
|
||||
|
||||
- name: Copy PKGBUILD to the directory
|
||||
run: cp squawk/packaging/Archlinux/PKGBUILD aur/
|
||||
|
||||
- name: Put SHA256 sum to PKGBUILD file, and generate .SRCINFO
|
||||
working-directory: aur
|
||||
run: |
|
||||
sed -i "/sha256sums=/c\sha256sums=('${{ env.tbSum }}')" PKGBUILD
|
||||
sudo -u build makepkg --printsrcinfo > .SRCINFO
|
||||
|
||||
- name: Commit package to aur
|
||||
working-directory: aur
|
||||
run: |
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m "${{ gitea.event.release.body//\"/\\\" }}"
|
||||
GIT_SSH_COMMAND="ssh -i ../key -o 'IdentitiesOnly yes' -o 'StrictHostKeyChecking no'" git push
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,3 +1,9 @@
|
||||
[submodule "external/qxmpp"]
|
||||
path = external/qxmpp
|
||||
url = https://github.com/qxmpp-project/qxmpp.git
|
||||
[submodule "external/storage"]
|
||||
path = external/storage
|
||||
url = https://git.macaw.me/blue/storage
|
||||
[submodule "external/lmdbal"]
|
||||
path = external/lmdbal
|
||||
url = gitea@git.macaw.me:blue/lmdbal.git
|
||||
|
3640
.uncrustify.cfg
Normal file
3640
.uncrustify.cfg
Normal file
File diff suppressed because it is too large
Load Diff
61
CHANGELOG.md
61
CHANGELOG.md
@ -1,5 +1,66 @@
|
||||
# Changelog
|
||||
|
||||
## Squawk 0.2.3 (February 04, 2024)
|
||||
### Bug fixes
|
||||
- "Add contact" and "Join conference" menu are enabled once again (pavavno)!
|
||||
- availability is now read from the same section of config file it was stored
|
||||
- automatic avatars (if a contact doesn't have one) get generated once again
|
||||
|
||||
### Improvements
|
||||
- deactivated accounts now don't appear in combobox of "Add contact" and "Join conference" dialogues
|
||||
- all of the expandable roster items now get saved between launches
|
||||
- settings file on the disk is not rewritten every roster element expansion or collapse
|
||||
- removed unnecessary own vcard request at sturtup (used to do it to discover my own avatar)
|
||||
- vcard window now is Info system and it can display more information
|
||||
- reduced vcard request spam in MUCs
|
||||
|
||||
### New features
|
||||
- now you can enable tray icon from settings!
|
||||
- there is a job queue now, this allowes to spread a bit the spam on the server at connection time
|
||||
- squawk now queries clients of it's peers, you can see what programs other people use
|
||||
|
||||
## Squawk 0.2.2 (May 05, 2022)
|
||||
### Bug fixes
|
||||
- now when you remove an account it actually gets removed
|
||||
- segfault on uninitialized Availability in some rare occasions
|
||||
- fixed crash when you open a dialog with someone that has only error messages in archive
|
||||
- message height is now calculated correctly on Chinese and Japanese paragraphs
|
||||
- the app doesn't crash on SIGINT anymore
|
||||
|
||||
### Improvements
|
||||
- there is a way to disable an account and it wouldn't connect when you change availability
|
||||
- if you cancel password query an account becomes inactive and doesn't annoy you anymore
|
||||
- if you filled password field and chose KWallet as a storage Squawk wouldn't ask you again for the same password
|
||||
- if left the password field empty and chose KWallet as a storage Squawk will try to get that password from KWallet before asking you to input it
|
||||
- accounts now connect to the server asynchronously - if one is stopped on password prompt another is connecting
|
||||
- actualized translations, added English localization file
|
||||
|
||||
### New features
|
||||
- new "About" window with links, license, gratitudes
|
||||
- if the authentication failed Squawk will ask again for your password and login
|
||||
- now there is an amount of unread messages showing on top of Squawk launcher icon
|
||||
- notifications now have buttons to open a conversation or to mark that message as read
|
||||
|
||||
## Squawk 0.2.1 (Apr 02, 2022)
|
||||
### Bug fixes
|
||||
- build in release mode now no longer spams warnings
|
||||
- build now correctly installs all build plugin libs
|
||||
- a bug where the correction message was received, the indication was on but the text didn't actually change
|
||||
- message body now doesn't intecept context menu from the whole message
|
||||
- message input now doesn't increase font when you remove everything from it
|
||||
|
||||
### Improvements
|
||||
- reduced amount of places where platform specific path separator is used
|
||||
- now message input is automatically focused when you open a dialog or a room
|
||||
- what() method on unhandled exception now actually tells what happened
|
||||
|
||||
### New features
|
||||
- the settings are here! You con config different stuff from there
|
||||
- now it's possible to set up different qt styles from settings
|
||||
- if you have KConfig nad KConfigWidgets packages installed - you can choose from global color schemes
|
||||
- it's possible now to choose a folder where squawk is going to store downloaded files
|
||||
- now you can correct your message
|
||||
|
||||
## Squawk 0.2.0 (Jan 10, 2022)
|
||||
### Bug fixes
|
||||
- carbon copies switches on again after reconnection
|
||||
|
191
CMakeLists.txt
191
CMakeLists.txt
@ -1,10 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.4)
|
||||
project(squawk VERSION 0.1.6 LANGUAGES CXX)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(squawk VERSION 0.2.3 LANGUAGES CXX)
|
||||
|
||||
cmake_policy(SET CMP0076 NEW)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
cmake_policy(SET CMP0079 NEW)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(QT_VERSION_MAJOR 5)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
@ -27,42 +30,43 @@ add_executable(squawk ${WIN32_FLAG} ${MACOSX_BUNDLE_FLAG})
|
||||
target_include_directories(squawk PRIVATE ${CMAKE_SOURCE_DIR})
|
||||
|
||||
option(SYSTEM_QXMPP "Use system qxmpp lib" ON)
|
||||
option(SYSTEM_LMDBAL "Use system lmdbal lib" ON)
|
||||
option(WITH_KWALLET "Build KWallet support module" ON)
|
||||
option(WITH_KIO "Build KIO support module" ON)
|
||||
option(WITH_KCONFIG "Build KConfig support module" ON)
|
||||
option(WITH_OMEMO "Build OMEMO support module" OFF) #it should be off by default untill I sort the problems out
|
||||
option(WITH_SIMPLE_CRYPT "Builds with SimpleCrypt to obfuscate password" ON)
|
||||
|
||||
# Dependencies
|
||||
## Qt
|
||||
find_package(Qt5 COMPONENTS Widgets DBus Gui Xml Network Core REQUIRED)
|
||||
if (NOT DEFINED QT_VERSION_MAJOR)
|
||||
find_package(QT NAMES Qt6 Qt5 CONFIG REQUIRED COMPONENTS Widgets DBus Gui Xml Network Core)
|
||||
else ()
|
||||
find_package(Qt${QT_VERSION_MAJOR} CONFIG REQUIRED COMPONENTS Widgets DBus Gui Xml Network Core)
|
||||
endif()
|
||||
|
||||
find_package(Boost COMPONENTS)
|
||||
|
||||
target_include_directories(squawk PRIVATE ${Boost_INCLUDE_DIRS})
|
||||
target_include_directories(squawk PRIVATE ${Qt5_INCLUDE_DIRS})
|
||||
target_include_directories(squawk PRIVATE ${Qt5Widgets_INCLUDE_DIRS})
|
||||
target_include_directories(squawk PRIVATE ${Qt5DBus_INCLUDE_DIRS})
|
||||
target_include_directories(squawk PRIVATE ${Qt5Gui_INCLUDE_DIRS})
|
||||
target_include_directories(squawk PRIVATE ${Qt5Xml_INCLUDE_DIRS})
|
||||
target_include_directories(squawk PRIVATE ${Qt5Network_INCLUDE_DIRS})
|
||||
target_include_directories(squawk PRIVATE ${Qt5Core_INCLUDE_DIRS})
|
||||
|
||||
## QXmpp
|
||||
if (SYSTEM_QXMPP)
|
||||
find_package(QXmpp CONFIG)
|
||||
|
||||
if (NOT QXmpp_FOUND)
|
||||
set(SYSTEM_QXMPP OFF)
|
||||
message("QXmpp package wasn't found, trying to build with bundled QXmpp")
|
||||
## OMEMO
|
||||
if (WITH_OMEMO)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(OMEMO libomemo-c)
|
||||
if (OMEMO_FOUND)
|
||||
target_compile_definitions(squawk PRIVATE WITH_OMEMO)
|
||||
message("Building with support of OMEMO")
|
||||
else ()
|
||||
message("libomemo-c package wasn't found, trying to build without OMEMO support")
|
||||
set(WITH_OMEMO OFF)
|
||||
endif ()
|
||||
else ()
|
||||
message("Building with system QXmpp")
|
||||
message("PKG_CONFIG module wasn't found, can not check libomemo-c support, trying to build without OMEMO support")
|
||||
set(WITH_OMEMO OFF)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT SYSTEM_QXMPP)
|
||||
target_link_libraries(squawk PRIVATE qxmpp)
|
||||
add_subdirectory(external/qxmpp)
|
||||
else ()
|
||||
target_link_libraries(squawk PRIVATE QXmpp::QXmpp)
|
||||
endif ()
|
||||
|
||||
## KIO
|
||||
if (WITH_KIO)
|
||||
find_package(KF5KIO CONFIG)
|
||||
@ -89,24 +93,110 @@ if (WITH_KWALLET)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
## Signal (TODO)
|
||||
# find_package(Signal REQUIRED)
|
||||
## KConfig
|
||||
if (WITH_KCONFIG)
|
||||
find_package(KF5Config CONFIG)
|
||||
if (NOT KF5Config_FOUND)
|
||||
set(WITH_KCONFIG OFF)
|
||||
message("KConfig package wasn't found, KConfig support modules wouldn't be built")
|
||||
else()
|
||||
find_package(KF5ConfigWidgets CONFIG)
|
||||
if (NOT KF5ConfigWidgets_FOUND)
|
||||
set(WITH_KCONFIG OFF)
|
||||
message("KConfigWidgets package wasn't found, KConfigWidgets support modules wouldn't be built")
|
||||
else()
|
||||
target_compile_definitions(squawk PRIVATE WITH_KCONFIG)
|
||||
message("Building with support of KConfig")
|
||||
message("Building with support of KConfigWidgets")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
## LMDB
|
||||
find_package(LMDB REQUIRED)
|
||||
## QXmpp
|
||||
if (SYSTEM_QXMPP)
|
||||
if (WITH_OMEMO)
|
||||
find_package(QXmpp CONFIG COMPONENTS Omemo)
|
||||
else ()
|
||||
find_package(QXmpp CONFIG)
|
||||
endif ()
|
||||
|
||||
# Linking
|
||||
target_link_libraries(squawk PRIVATE Qt5::Core Qt5::Widgets Qt5::DBus Qt5::Network Qt5::Gui Qt5::Xml)
|
||||
target_link_libraries(squawk PRIVATE lmdb)
|
||||
target_link_libraries(squawk PRIVATE simpleCrypt)
|
||||
# Link thread libraries on Linux
|
||||
if (NOT QXmpp_FOUND)
|
||||
set(SYSTEM_QXMPP OFF)
|
||||
message("QXmpp package wasn't found, trying to build with bundled QXmpp")
|
||||
else ()
|
||||
message("Building with system QXmpp")
|
||||
endif ()
|
||||
endif () #it's endif() + if() and not else() because I want it to have a fallback behaviour
|
||||
if (NOT SYSTEM_QXMPP) #we can fail finding system QXmpp and this way we'll check bundled before failing completely
|
||||
message("Building with bundled QXmpp")
|
||||
|
||||
target_include_directories(squawk PRIVATE ${CMAKE_SOURCE_DIR}/external/qxmpp/src/base)
|
||||
target_include_directories(squawk PRIVATE ${CMAKE_SOURCE_DIR}/external/qxmpp/src/client)
|
||||
target_include_directories(squawk PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/external/qxmpp/src)
|
||||
|
||||
if (WITH_OMEMO)
|
||||
target_include_directories(squawk PRIVATE ${CMAKE_SOURCE_DIR}/external/qxmpp/src/omemo)
|
||||
target_include_directories(squawk PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/external/qxmpp/src/omemo)
|
||||
set(BUILD_OMEMO ON)
|
||||
set(BUILD_TESTS OFF)
|
||||
else ()
|
||||
set(BUILD_OMEMO OFF)
|
||||
endif ()
|
||||
add_subdirectory(external/qxmpp)
|
||||
add_library(QXmpp::QXmpp ALIAS QXmppQt${QT_VERSION_MAJOR})
|
||||
if (WITH_OMEMO)
|
||||
target_include_directories(QXmppOmemoQt${QT_VERSION_MAJOR} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/external/qxmpp/src)
|
||||
add_library(QXmpp::Omemo ALIAS QXmppOmemoQt${QT_VERSION_MAJOR})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
## LMDBAL
|
||||
if (SYSTEM_LMDBAL)
|
||||
find_package(lmdbal)
|
||||
if (NOT lmdbal_FOUND)
|
||||
set(SYSTEM_LMDBAL OFF)
|
||||
message("LMDBAL package wasn't found, trying to build with bundled LMDBAL")
|
||||
else ()
|
||||
message("Building with system LMDBAL")
|
||||
endif ()
|
||||
else()
|
||||
message("Building with bundled LMDBAL")
|
||||
set(BUILD_STATIC ON)
|
||||
add_subdirectory(external/lmdbal)
|
||||
add_library(LMDBAL::LMDBAL ALIAS LMDBAL)
|
||||
endif()
|
||||
|
||||
## Linking
|
||||
target_link_libraries(squawk
|
||||
PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::DBus
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Xml
|
||||
LMDBAL::LMDBAL
|
||||
QXmpp::QXmpp
|
||||
)
|
||||
|
||||
if (WITH_OMEMO)
|
||||
target_link_libraries(squawk PRIVATE QXmpp::Omemo)
|
||||
endif ()
|
||||
|
||||
if (WITH_SIMPLE_CRYPT)
|
||||
target_compile_definitions(squawk PRIVATE WITH_SIMPLE_CRYPT)
|
||||
add_subdirectory(external/simpleCrypt)
|
||||
target_link_libraries(squawk PRIVATE simpleCrypt)
|
||||
endif ()
|
||||
|
||||
## Link thread libraries on Linux
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(squawk PRIVATE Threads::Threads)
|
||||
endif()
|
||||
|
||||
# Build type
|
||||
## Build type
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif ()
|
||||
@ -114,16 +204,27 @@ endif ()
|
||||
message("Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
target_compile_options(squawk PRIVATE
|
||||
"-Wall;-Wextra"
|
||||
"$<$<CONFIG:DEBUG>:-g>"
|
||||
"$<$<CONFIG:RELEASE>:-O3>"
|
||||
"-fno-sized-deallocation" # for eliminating _ZdlPvm
|
||||
)
|
||||
set (COMPILE_OPTIONS -fno-sized-deallocation) # for eliminating _ZdlPvm
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
list(APPEND COMPILE_OPTIONS -O3)
|
||||
endif()
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
list(APPEND COMPILE_OPTIONS -g)
|
||||
list(APPEND COMPILE_OPTIONS -Wall)
|
||||
list(APPEND COMPILE_OPTIONS -Wextra)
|
||||
endif()
|
||||
|
||||
message("Compilation options: " ${COMPILE_OPTIONS})
|
||||
target_compile_options(squawk PRIVATE ${COMPILE_OPTIONS})
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# I am not really sure about this solution
|
||||
# This should enable plugins to be found in path like /usr/lib/squawk instead of just /usr/lib
|
||||
set(PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/squawk")
|
||||
add_compile_definitions(PLUGIN_PATH="${PLUGIN_PATH}")
|
||||
|
||||
add_subdirectory(main)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(external/simpleCrypt)
|
||||
add_subdirectory(packaging)
|
||||
add_subdirectory(plugins)
|
||||
add_subdirectory(resources)
|
||||
@ -131,13 +232,15 @@ add_subdirectory(shared)
|
||||
add_subdirectory(translations)
|
||||
add_subdirectory(ui)
|
||||
|
||||
# Install the executable
|
||||
## Install the executable
|
||||
install(TARGETS squawk DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(FILES README.md DESTINATION ${CMAKE_INSTALL_DATADIR}/macaw.me/squawk)
|
||||
install(FILES LICENSE.md DESTINATION ${CMAKE_INSTALL_DATADIR}/macaw.me/squawk)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
if (APPLE)
|
||||
add_custom_command(TARGET squawk POST_BUILD COMMENT "Running macdeployqt..."
|
||||
COMMAND "${Qt5Widgets_DIR}/../../../bin/macdeployqt" "${CMAKE_CURRENT_BINARY_DIR}/squawk.app"
|
||||
COMMAND "${Qt${QT_VERSION_MAJOR}Widgets_DIR}/../../../bin/macdeployqt" "${CMAKE_CURRENT_BINARY_DIR}/squawk.app"
|
||||
)
|
||||
endif(APPLE)
|
||||
endif()
|
||||
|
@ -595,17 +595,17 @@ pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
|
||||
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/>.
|
||||
|
||||
|
83
README.md
83
README.md
@ -4,17 +4,20 @@
|
||||
[![AUR version](https://img.shields.io/aur/version/squawk?style=flat-square)](https://aur.archlinux.org/packages/squawk/)
|
||||
[![Liberapay patrons](https://img.shields.io/liberapay/patrons/macaw.me?logo=liberapay&style=flat-square)](https://liberapay.com/macaw.me)
|
||||
|
||||
![Squawk screenshot](https://macaw.me/images/squawk/0.2.0.png)
|
||||
![Squawk screenshot](https://macaw.me/projects/squawk/0.2.2.png)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- QT 5.12 *(lower versions might work but it wasn't tested)*
|
||||
- lmdb
|
||||
- CMake 3.3 or higher
|
||||
- CMake 3.4 or higher
|
||||
- qxmpp 1.1.0 or higher
|
||||
- LMDBAL (my own [library](https://git.macaw.me/blue/lmdbal) for lmdb)
|
||||
- KDE Frameworks: kwallet (optional)
|
||||
- KDE Frameworks: KIO (optional)
|
||||
- Boost
|
||||
- KDE Frameworks: KConfig (optional)
|
||||
- KDE Frameworks: KConfigWidgets (optional)
|
||||
- Boost (just one little hpp from there)
|
||||
- Imagemagick (for compilation, to rasterize an SVG logo)
|
||||
|
||||
### Getting
|
||||
|
||||
@ -30,14 +33,49 @@ $ pacaur -S squawk
|
||||
|
||||
### Building
|
||||
|
||||
You can also clone the repo and build it from source
|
||||
You can also the repo and build it from source
|
||||
|
||||
Squawk requires Qt with SSL enabled. It uses CMake as build system.
|
||||
|
||||
Please check the prerequisites and install them before installation.
|
||||
|
||||
---
|
||||
|
||||
There are several ways to build Squawk. The one you need depends on whether you have `qxmpp` and `lmdbal` installed in your system.
|
||||
|
||||
#### Building with system dependencies
|
||||
|
||||
This is the easiest way but it requires you to have `qxmpp` and `lmdbal` installed as system packages. Here is what you do:
|
||||
|
||||
```
|
||||
$ git clone https://git.macaw.me/blue/squawk
|
||||
$ cd squawk
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ..
|
||||
$ cmake --build .
|
||||
```
|
||||
|
||||
#### Building with bundled qxmpp
|
||||
|
||||
If you don't have any of `qxmpp` or `lmdbal` (or both) installed the process is abit mor complicated.
|
||||
On the configuration stage you need to enable one or both entries in the square brackets, depending on what package your system lacks.
|
||||
|
||||
Here is what you do
|
||||
|
||||
```
|
||||
$ git clone --recurse-submodules https://git.macaw.me/blue/squawk
|
||||
$ cd squawk
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake .. [-D SYSTEM_QXMPP=False] [-D SYSTEM_LMDBAL=False]
|
||||
$ cmake --build .
|
||||
```
|
||||
|
||||
#### For Windows (Mingw-w64) build
|
||||
|
||||
**Building for windows is not mainteined, but was possible in the past, you can try, but it probably won't work**
|
||||
|
||||
You need Qt for mingw64 (MinGW 64-bit) platform when installing Qt.
|
||||
|
||||
The best way to acquire library `lmdb` and `boost` is through Msys2.
|
||||
@ -46,51 +84,30 @@ First install Msys2, and then install `mingw-w64-x86_64-lmdb` and `mingw-w64-x86
|
||||
|
||||
Then you need to provide the cmake cache entry when calling cmake for configuration:
|
||||
|
||||
```
|
||||
cmake .. -D LMDB_ROOT_DIR:PATH=<Msys2 Mingw64 Root Directory> -D BOOST_ROOT:PATH=<Msys2 Mingw64 Root Directory>
|
||||
```
|
||||
|
||||
`<Msys2 Mingw64 Root Directory>`: e.g. `C:/msys64/mingw64`.
|
||||
|
||||
---
|
||||
|
||||
There are two ways to build, it depends whether you have qxmpp installed in your system
|
||||
|
||||
#### Building with system qxmpp
|
||||
|
||||
Here is what you do
|
||||
|
||||
```
|
||||
$ git clone https://git.macaw.me/blue/squawk
|
||||
$ cd squawk
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake .. [-D LMDB_ROOT_DIR:PATH=...] [-D BOOST_ROOT:PATH=...]
|
||||
$ cmake --build .
|
||||
```
|
||||
|
||||
#### Building with bundled qxmpp
|
||||
|
||||
Here is what you do
|
||||
|
||||
```
|
||||
$ git clone --recurse-submodules https://git.macaw.me/blue/squawk
|
||||
$ cd squawk
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake .. -D SYSTEM_QXMPP=False [-D LMDB_ROOT_DIR:PATH=...] [-D BOOST_ROOT:PATH=...]
|
||||
$ cmake .. -D SYSTEM_QXMPP=False -D SYSTEM_LMDBAL=False -D LMDB_ROOT_DIR:PATH=<Msys2 Mingw64 Root Directory> -D BOOST_ROOT:PATH=<Msys2 Mingw64 Root Directory>
|
||||
$ cmake --build .
|
||||
```
|
||||
|
||||
You can always refer to `appveyor.yml` to see how AppVeyor build squawk.
|
||||
You can always refer to `appveyor.yml` to see how AppVeyor build squawk for windows.
|
||||
|
||||
### List of keys
|
||||
|
||||
Here is the list of keys you can pass to configuration phase of `cmake ..`.
|
||||
Here is the list of keys you can pass to configuration phase of `cmake ..`:
|
||||
|
||||
- `CMAKE_BUILD_TYPE` - `Debug` just builds showing all warnings, `Release` builds with no warnings and applies optimizations (default is `Debug`)
|
||||
- `SYSTEM_QXMPP` - `True` tries to link against `qxmpp` installed in the system, `False` builds bundled `qxmpp` library (default is `True`)
|
||||
- `SYSTEM_LMDBAL` - `True` tries to link against `LMDABL` installed in the system, `False` builds bundled `LMDBAL` library (default is `True`)
|
||||
- `WITH_KWALLET` - `True` builds the `KWallet` capability module if `KWallet` is installed and if not goes to `False`. `False` disables `KWallet` support (default is `True`)
|
||||
- `WITH_KIO` - `True` builds the `KIO` capability module if `KIO` is installed and if not goes to `False`. `False` disables `KIO` support (default is `True`)
|
||||
- `WITH_KCONFIG` - `True` builds the `KConfig` and `KConfigWidgets` capability module if such packages are installed and if not goes to `False`. `False` disables `KConfig` and `KConfigWidgets` support (default is `True`)
|
||||
- `WITH_OMEMO` - `True` builds the OMEMO encryption, requires `qxmpp` of version >= 1.5.0 built with OMEMO support. `False` disables OMEMO support (default is `False`)
|
||||
|
||||
## License
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
#This file is taken from here https://gitlab.ralph.or.at/causal-rt/causal-cpp/, it was GPLv3 license
|
||||
#Thank you so much, mr. Ralph Alexander Bariz, I hope you don't mind me using your code
|
||||
|
||||
# Try to find LMDB headers and library.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# find_package(LMDB)
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# LMDB_ROOT_DIR Set this variable to the root installation of
|
||||
# LMDB if the module has problems finding the
|
||||
# proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# LMDB_FOUND System has LMDB library/headers.
|
||||
# LMDB_LIBRARIES The LMDB library.
|
||||
# LMDB_INCLUDE_DIRS The location of LMDB headers.
|
||||
|
||||
find_path(LMDB_ROOT_DIR
|
||||
NAMES include/lmdb.h
|
||||
)
|
||||
|
||||
find_library(LMDB_LIBRARIES
|
||||
NAMES liblmdb.a liblmdb.so liblmdb.so.a liblmdb.dll.a # We want lmdb to be static, if possible
|
||||
HINTS ${LMDB_ROOT_DIR}/lib
|
||||
)
|
||||
|
||||
add_library(lmdb UNKNOWN IMPORTED)
|
||||
set_target_properties(lmdb PROPERTIES
|
||||
IMPORTED_LOCATION ${LMDB_LIBRARIES}
|
||||
)
|
||||
|
||||
find_path(LMDB_INCLUDE_DIRS
|
||||
NAMES lmdb.h
|
||||
HINTS ${LMDB_ROOT_DIR}/include
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LMDB DEFAULT_MSG
|
||||
LMDB_LIBRARIES
|
||||
LMDB_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
LMDB_ROOT_DIR
|
||||
LMDB_LIBRARIES
|
||||
LMDB_INCLUDE_DIRS
|
||||
)
|
@ -1,15 +0,0 @@
|
||||
find_path(Signal_INCLUDE_DIR NAMES signal/signal_protocol.h)
|
||||
find_library(Signal_LIBRARY signal-protocol-c)
|
||||
mark_as_advanced(Signal_INCLUDE_DIR Signal_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Signal REQUIRED_VARS Signal_LIBRARY Signal_INCLUDE_DIR)
|
||||
|
||||
if (Signal_FOUND AND NOT TARGET Signal::Signal)
|
||||
add_library(Signal::Signal UNKNOWN IMPORTED)
|
||||
set_target_properties(Signal::Signal PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${Signal_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Signal_INCLUDE_DIR}"
|
||||
)
|
||||
endif ()
|
@ -3,32 +3,34 @@ if(WIN32)
|
||||
set(SIGNALCATCHER_SOURCE signalcatcher_win32.cpp)
|
||||
endif(WIN32)
|
||||
|
||||
set(SOURCE_FILES
|
||||
account.cpp
|
||||
adapterfunctions.cpp
|
||||
conference.cpp
|
||||
contact.cpp
|
||||
rosteritem.cpp
|
||||
${SIGNALCATCHER_SOURCE}
|
||||
squawk.cpp
|
||||
)
|
||||
|
||||
set(HEADER_FILES
|
||||
account.h
|
||||
adapterfunctions.h
|
||||
conference.h
|
||||
contact.h
|
||||
rosteritem.h
|
||||
signalcatcher.h
|
||||
squawk.h
|
||||
)
|
||||
|
||||
target_sources(squawk PRIVATE
|
||||
account.cpp
|
||||
account.h
|
||||
adapterFuctions.cpp
|
||||
archive.cpp
|
||||
archive.h
|
||||
conference.cpp
|
||||
conference.h
|
||||
contact.cpp
|
||||
contact.h
|
||||
main.cpp
|
||||
networkaccess.cpp
|
||||
networkaccess.h
|
||||
rosteritem.cpp
|
||||
rosteritem.h
|
||||
${SIGNALCATCHER_SOURCE}
|
||||
signalcatcher.h
|
||||
squawk.cpp
|
||||
squawk.h
|
||||
storage.cpp
|
||||
storage.h
|
||||
urlstorage.cpp
|
||||
urlstorage.h
|
||||
)
|
||||
${SOURCE_FILES}
|
||||
${HEADER_FILES}
|
||||
)
|
||||
|
||||
target_include_directories(squawk PRIVATE ${LMDB_INCLUDE_DIRS})
|
||||
|
||||
add_subdirectory(handlers)
|
||||
add_subdirectory(passwordStorageEngines)
|
||||
add_subdirectory(components)
|
||||
add_subdirectory(delayManager)
|
||||
|
841
core/account.cpp
841
core/account.cpp
File diff suppressed because it is too large
Load Diff
115
core/account.h
115
core/account.h
@ -15,9 +15,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CORE_ACCOUNT_H
|
||||
#define CORE_ACCOUNT_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QCryptographicHash>
|
||||
@ -29,9 +27,14 @@
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <list>
|
||||
|
||||
#include <QXmppRosterManager.h>
|
||||
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 5, 0)
|
||||
#include <QXmppCarbonManagerV2.h>
|
||||
#else
|
||||
#include <QXmppCarbonManager.h>
|
||||
#endif
|
||||
#include <QXmppDiscoveryManager.h>
|
||||
#include <QXmppMamManager.h>
|
||||
#include <QXmppMucManager.h>
|
||||
@ -39,32 +42,58 @@
|
||||
#include <QXmppBookmarkManager.h>
|
||||
#include <QXmppBookmarkSet.h>
|
||||
#include <QXmppUploadRequestManager.h>
|
||||
#include <QXmppVCardIq.h>
|
||||
#include <QXmppVCardManager.h>
|
||||
#include <QXmppMessageReceiptManager.h>
|
||||
#include <QXmppPubSubManager.h>
|
||||
|
||||
#include "shared/shared.h"
|
||||
#include <shared/shared.h>
|
||||
#include <shared/identity.h>
|
||||
#include <shared/info.h>
|
||||
#include <shared/clientid.h>
|
||||
#include "contact.h"
|
||||
#include "conference.h"
|
||||
#include "networkaccess.h"
|
||||
#include <core/components/networkaccess.h>
|
||||
#include <core/delayManager/manager.h>
|
||||
|
||||
#include "handlers/messagehandler.h"
|
||||
#include "handlers/rosterhandler.h"
|
||||
#include "handlers/vcardhandler.h"
|
||||
#include "handlers/discoveryhandler.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 5, 0)
|
||||
#include <QXmppTrustManager.h>
|
||||
#ifdef WITH_OMEMO
|
||||
#include <QXmppOmemoManager.h>
|
||||
#include "handlers/omemohandler.h"
|
||||
#endif
|
||||
#include "handlers/trusthandler.h"
|
||||
#endif
|
||||
|
||||
class Account : public QObject
|
||||
{
|
||||
namespace Core {
|
||||
|
||||
class Account : public QObject {
|
||||
Q_OBJECT
|
||||
friend class MessageHandler;
|
||||
friend class RosterHandler;
|
||||
friend class VCardHandler;
|
||||
friend class DiscoveryHandler;
|
||||
#ifdef WITH_OMEMO
|
||||
friend class OmemoHandler;
|
||||
friend class TrustHandler;
|