Compare commits

...

103 Commits

Author SHA1 Message Date
a04693e39d
fix: build without KConfig is possible once more 2024-11-19 18:45:11 +02:00
3cce057545
fix: omitting from attribute not to wreck the stream
fix: build without kwallet
2024-11-18 22:43:46 +02:00
9a44ae1fa5
SimpleCrypt password jamming is now optional 2024-11-17 20:25:33 +02:00
85ff6c25ba
find boos cmake new policy
magick instead of convert rendering images
2024-10-27 20:02:34 +02:00
3cc7db8eff
A workaround to store plugins in a subdirectory 2024-10-27 19:33:03 +02:00
Benson Muite
ff9a591d6d
Private libraries directory 2024-10-27 19:33:03 +02:00
8e3f10caff Merge pull request 'Add appdata file' (#94) from bmckwm/squawk:appdata into master
Reviewed-on: #94
Reviewed-by: Blue <blue@macaw.me>
2024-10-13 07:37:05 +00:00
8bfe88929f Merge pull request 'Fix license text error' (#90) from bmckwm/squawk:license into master
Reviewed-on: #90
Reviewed-by: Blue <blue@macaw.me>
2024-10-13 07:35:29 +00:00
9927bdc38b Merge pull request 'Update image link' (#87) from bmckwm/squawk:image-link-update into master
Reviewed-on: #87
Reviewed-by: Blue <blue@macaw.me>
2024-10-13 07:34:34 +00:00
Benson Muite
8083859541 Fix license text error 2024-10-07 13:45:15 +03:00
Benson Muite
030c374139 Update image link 2024-10-06 19:29:38 +03:00
Benson Muite
2c61b82924 Add appdata file 2024-10-06 19:26:44 +03:00
fb843a1346
ci 2024-02-04 13:51:16 -03:00
8d82d340a4
0.2.3 preparation, typo fix, readme changes 2024-02-04 13:36:51 -03:00
acd60eaba2
Fixing build without omemo, release preparation, unnecessary inheritance removed, info widget fix 2024-02-04 09:44:19 -03:00
829777935f
fixes for bundled LMDBAL build 2024-02-01 13:10:52 -03:00
0be2648849
Now avatars are properly autogenerated, reduced vCard spam 2024-01-31 20:22:49 -03:00
93c5be412e
trying linter settings 2023-11-17 21:52:33 -03:00
8f5325b291
beginning of keys setting 2023-11-16 21:08:40 -03:00
75554c7451
refactorng 2023-11-14 20:23:39 -03:00
00af582287
Own omemo key display, a bit of CMake clean up 2023-11-13 19:05:26 -03:00
19835af3cf
some debug, fix a crash removing a currently selected contact 2023-11-12 19:55:32 -03:00
e31ef78e71
some refactoring, some improvements 2023-11-10 19:26:16 -03:00
be466fbad1
removed Order, resolved a crash on several files being uploaded simultaniuosly 2023-11-09 19:36:30 -03:00
0a530bfa93
encrypted messages now are displayed in the feed 2023-11-06 20:57:08 -03:00
637eb702a8
cant believe it, first ever encrypted messages! 2023-11-05 16:29:44 -03:00
a7d1a28f29
some work towards encryption 2023-11-04 22:12:15 -03:00
297e08ba41
somewhat working... 2023-11-03 20:13:45 -03:00
9d688e8596
full transition to lmdbal, DOESNT WORK, DONT TAKE! 2023-11-02 19:55:11 -03:00
23ec80ccba
cleanup some warnings suppression 2023-08-15 12:28:25 -03:00
5fbb03fc46
transitioned urlstorage to LMDBAL, made it possible to build against latest qxmpp 2023-04-15 15:07:27 -03:00
81cf0f8d34
transition to LMDBAL 2023-03-27 21:45:29 +03:00
69d797fe51
showing the button for encryption if there is at least one omemo key, trust summary update calculations 2023-03-18 02:50:04 +03:00
4f295fee3c
trust summary gui delivery 2023-03-17 23:59:51 +03:00
fffef9876a
Refactoring, account destruction fix, some thoughts about where to store contact settings (omemo enable status for instance) 2023-03-16 22:38:05 +03:00
283e9ebc4d
some thoughts on detecting condition for enablining or showing the button for encryption in chat window 2023-03-15 21:17:44 +03:00
21b40a9ccb
Client node now displays in all participants and presences, some additional checkups before querying empty clients, refactoring 2023-03-14 22:49:58 +03:00
76a9c5da0c
extracted clientId from clientInfo to use it in the presence information later 2023-03-13 22:07:10 +03:00
8ec0af3205
transition to QXMppCarbonManagerV2 if QXmpp version is heigher than 1.5.0 2023-03-12 01:38:54 +03:00
4b68da458f
debugged a crash, keys are now fetching, refactored main, added some exceptions instead of ints, debugged termination process 2023-03-11 19:46:23 +03:00
927bdf0dab
DONT TAKE, BROKEN! first application of delay manager in code, reception of bundles 2023-03-10 21:43:31 +03:00
5ba97ecc25
some hopefully final preparations for delay manager 2023-03-08 23:28:48 +03:00
9fff409630
some more thinking about delay manager 2023-03-07 21:45:01 +03:00
99fd001292
some more thinking about delay manager 2023-03-05 01:36:53 +03:00
2d8f32c257
some ideas over delay manager 2023-03-04 00:27:12 +03:00
77dd28b600
some further work on omemo, far from done yet 2023-03-02 21:17:06 +03:00
6f32e99593
an idea how to manage info object better 2023-03-01 22:32:41 +03:00
ec362cef55
some further thinking of info widget 2023-02-21 23:27:28 +03:00
e4a2728ef8
hopefully end of refactoring of vcard to Info widget 2023-02-20 21:12:32 +03:00
bf11d8a74e
keeping with the refactoring 2023-02-03 21:43:13 +03:00
edf1ee60cd
keep going on refactoring vcard 2023-02-02 21:39:38 +03:00
4af16b75bf
started refactoring of the VCard UI 2023-02-01 18:56:00 +03:00
bb304ce774
just some unfinished thoughts 2023-01-30 20:52:26 +03:00
3c6b611a41
keeping up with qxmpp 2023-01-29 20:26:54 +03:00
73d83f55af
context menu to trust or distrust keys 2023-01-15 21:17:38 +03:00
b72a837754
trust level display in delegate, list size tweaking 2023-01-14 18:34:14 +03:00
d4bf7e599a
better way to solve yesterday font problem, small visual avatar rendering fix 2023-01-12 20:56:01 +03:00
15fb4bbd62
some thoughts about fonts, lastInteraction and label into keyDelegate 2023-01-11 23:45:38 +03:00
2aed8a1209
a bit better drawing of a key fingerprint 2023-01-08 18:16:41 +03:00
78ef3664f7
some initial delegate stuff 2023-01-07 17:30:22 +03:00
5aa0f4bca9
some initial classes for keys form 2023-01-03 18:27:03 +03:00
b45a73b723
some initial work and thoughts about encryption 2023-01-01 20:25:51 +03:00
758a9d95f3
replaced one structure, stored omemo support in Global object 2022-12-29 01:41:59 +03:00
dfe72ca36c
support of the new managers in account code, new states, new lambdas, even launches now, even receives some bundles 2022-12-27 01:01:01 +03:00
db3bc358a7
work progress: trust manager. DOESN'T START! 2022-12-19 18:43:24 +03:00
0b61b6e928
Some work on omemo handler, NOT DONE, BUILD FAILS! 2022-12-15 02:08:08 +03:00
820dc845ea
BUILD FAILS! some ideas of storage and cache 2022-09-03 14:39:42 +03:00
87973b3b67
first attempts to build against upstream qxmpp 2022-08-29 21:34:25 +03:00
b6ba022bff
removed own VCard request at the start if the presence doesn't show that the avatar changed, little refactoring 2022-08-27 14:39:24 +03:00
7b2b7ee5d5
first thought about forms, discovering contact pep support 2022-08-26 01:49:49 +03:00
c50cd1140e
first ever received and cached client data! 2022-08-25 01:41:06 +03:00
037dabbe06
some new shared classes, little reorganization, preparation to cache client info 2022-08-22 23:29:43 +03:00
2ae75a4b91
New object for cached database, also ClientInfo class 2022-08-20 00:28:59 +03:00
d162494ec8
Better way to store expanded elements in roster, several clean ups, translations 2022-08-17 19:25:35 +03:00
7e9eed2075
First tray attempt, seems to be working 2022-08-15 19:40:07 +03:00
7192286aeb
fix some bugs about disabled menus 2022-06-03 09:44:48 +03:00
645b92ba51
release 0.2.2 preparation 2022-05-05 20:46:49 +03:00
80c5e2f2b4
added en lolcalization file, actualized localizations 2022-05-04 19:20:30 +03:00
1f065f23e6
double click word selection handle, sigint sermentation fault fix 2022-05-03 12:17:08 +03:00
3c48577eee
selection message body now actually working 2022-05-02 22:25:50 +03:00
0340db7f2f
first successfull attempt to visualize selection on message body 2022-05-01 23:19:52 +03:00
c3a45ec58c
merge conflicts, text copying from context menu in message line 2022-04-30 21:41:25 +03:00
7ba94e9deb
link clicking and hovering in message body now works! 2022-04-29 00:29:44 +03:00
eac87e713f
seem to have found a text block, to activate with the click later 2022-04-28 00:08:59 +03:00
d86e2c28a0
an attempt to display text in a better way with QTextDocument + QTextBrowser 2022-04-27 01:17:53 +03:00
2fcc432aef
some polish 2022-04-26 23:08:25 +03:00
e58213b294
Now notifications have actions! Some more usefull functions to roster model 2022-04-24 18:52:29 +03:00
3916aec358
unread messages count now is displayed on the launcher icon 2022-04-23 16:58:08 +03:00
721d3a1a89
refactoring: UI squawk now belongs to a new class, it enables me doing trayed mode, when main window is destroyed 2022-04-22 18:26:18 +03:00
83cb220175
better notification sending, edited message now modifies notification (or sends), little structure change 2022-04-19 20:24:41 +03:00
18859cb960
first ideas for notifications 2022-04-18 19:54:42 +03:00
4c20a314f0
a crash fix on one of archive corner cases 2022-04-17 16:25:15 +03:00
51ac1ac709
first attempt 2022-04-17 14:58:46 +03:00
8f949277f6
actual pasword reasking on failed authentication 2022-04-14 11:13:27 +03:00
ce686e121b
account removal bugfix, some testing 2022-04-13 22:02:48 +03:00
f64e5c2df0
account connect/disconnect now activate/deactivate, it's a bit less contraversial; async account password asking new concept 2022-04-12 23:33:10 +03:00
2c26c7e264
ui squawk refactoring 2022-04-11 18:45:12 +03:00
69e0c88d8d
account refactoring, pep support discovery started 2022-04-08 19:18:15 +03:00
82d54ba4df
Report bugs tab and thanks to tab in about widget 2022-04-07 18:26:43 +03:00
1b66fda318
License is now can be viewed locally, some organization name packaging issies 2022-04-05 22:00:56 +03:00
9f746d203b
new tab in About: components 2022-04-04 23:49:01 +03:00
27377e0ec5
first attempt to make About window 2022-04-03 23:53:46 +03:00
4baa3bccbf
new screenshot 2022-04-02 16:09:11 +03:00
238 changed files with 21874 additions and 8333 deletions

View 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
View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,46 @@
# 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

View File

@ -1,10 +1,13 @@
cmake_minimum_required(VERSION 3.4)
project(squawk VERSION 0.2.1 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,44 +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
set(QT_VERSION_MAJOR 5)
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)
@ -91,6 +93,7 @@ if (WITH_KWALLET)
endif ()
endif ()
## KConfig
if (WITH_KCONFIG)
find_package(KF5Config CONFIG)
if (NOT KF5Config_FOUND)
@ -109,24 +112,91 @@ if (WITH_KCONFIG)
endif()
endif()
## Signal (TODO)
# find_package(Signal REQUIRED)
## QXmpp
if (SYSTEM_QXMPP)
if (WITH_OMEMO)
find_package(QXmpp CONFIG COMPONENTS Omemo)
else ()
find_package(QXmpp CONFIG)
endif ()
## LMDB
find_package(LMDB REQUIRED)
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")
# 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
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 ()
@ -148,8 +218,13 @@ if(CMAKE_COMPILER_IS_GNUCXX)
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)
@ -157,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()

View File

@ -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/>.

View File

@ -4,14 +4,14 @@
[![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.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)
- KDE Frameworks: KConfig (optional)
@ -33,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.
@ -49,52 +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

View File

@ -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
)

View File

@ -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 ()

View File

@ -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)

File diff suppressed because it is too large Load Diff

View File

<
@ -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;
#endif
public:
enum class Error {
authentication,
other,
none
};
Account(
const QString& p_login,
const QString& p_server,
const QString& p_password,
const QString& p_name,
bool p_active,
NetworkAccess* p_net,
QObject* parent = 0);
~Account();
@ -76,8 +105,12 @@ public:
QString getPassword() const;
QString getResource() const;
QString getAvatarPath() const;
QString getBareJid() const;
QString getFullJid() const;
Shared::Availability getAvailability() const;
Shared::AccountPassword getPasswordType() const;
Error getLastError() const;
bool getActive() const;
void setName(const QString& p_name);
void setLogin(const QString& p_login);
@ -86,8 +119,8 @@ public:
void setResource(const QString& p_resource);
void setAvailability(Shared::Availability avail);
void setPasswordType(Shared::AccountPassword pt);
QString getFullJid() const;
void sendMessage(const Shared::Message& data);
void setActive(bool p_active);
void requestArchive(const QString& jid, int count, const QString& before);
void subscribeToContact(const QString& jid, const QString& reason);
void unsubscribeFromContact(const QString& jid, const QString& reason);
@ -97,20 +130,24 @@ public:
void removeContactFromGroupRequest(const QString& jid, const QString& groupName);
void renameContactRequest(const QString& jid, const QString& newName);
void requestChangeMessage(const QString& jid, const QString& messageId, const QMap<QString, QVariant>& data);
void setContactEncryption(const QString& jid, Shared::EncryptionProtocol value);
void setRoomJoined(const QString& jid, bool joined);
void setRoomAutoJoin(const QString& jid, bool joined);
void removeRoomRequest(const QString& jid);
void addRoomRequest(const QString& jid, const QString& nick, const QString& password, bool autoJoin);
void uploadVCard(const Shared::VCard& card);
void updateInfo(const Shared::Info& info);
void resendMessage(const QString& jid, const QString& id);
void replaceMessage(const QString& originalId, const Shared::Message& data);
void invalidatePassword();
void discoverInfo(const QString& address, const QString& node);
public slots:
void connect();
void disconnect();
void reconnect();
void requestVCard(const QString& jid);
void requestInfo(const QString& jid);
signals:
void changed(const QMap<QString, QVariant>& data);
@ -134,9 +171,12 @@ signals:
void addRoomParticipant(const QString& jid, const QString& nickName, const QMap<QString, QVariant>& data);
void changeRoomParticipant(const QString& jid, const QString& nickName, const QMap<QString, QVariant>& data);
void removeRoomParticipant(const QString& jid, const QString& nickName);
void receivedVCard(const QString& jid, const Shared::VCard& card);
void infoReady(const Shared::Info& info);
void uploadFile(const QFileInfo& file, const QUrl& set, const QUrl& get, QMap<QString, QString> headers);
void uploadFileError(const QString& jid, const QString& messageId, const QString& error);
void needPassword();
void infoDiscovered(const QString& address, const QString& node, const std::set<Shared::Identity>& identities, const std::set<QString>& features);
void pepSupportChanged(Shared::Support support);
private:
QString name;
@ -145,7 +185,26 @@ private:
QXmppConfiguration config;
QXmppPresence presence;
Shared::ConnectionState state;
MessageHandler* mh;
RosterHandler* rh;
VCardHandler* vh;
DiscoveryHandler* dh;
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 5, 0)
TrustHandler* th;
#endif
#ifdef WITH_OMEMO
OmemoHandler* oh;
QXmppOmemoManager* om;
#endif
#if (QXMPP_VERSION) >= QT_VERSION_CHECK(1, 5, 0)
QXmppTrustManager* tm;
QXmppCarbonManagerV2* cm;
QXmppPubSubManager* psm;
#else
QXmppCarbonManager* cm;
#endif
QXmppMamManager* am;
QXmppMucManager* mm;
QXmppBookmarkManager* bm;
@ -157,16 +216,14 @@ private:
bool reconnectScheduled;
QTimer* reconnectTimer;
std::set<QString> pendingVCardRequests;
QString avatarHash;
QString avatarType;
bool ownVCardRequestInProgress;
NetworkAccess* network;
DelayManager::Manager* delay;
Shared::AccountPassword passwordType;
MessageHandler* mh;
RosterHandler* rh;
Error lastError;
Shared::Support pepSupport;
bool active;
bool notReadyPassword;
bool loadingOmemo;
private slots:
void onClientStateChange(QXmppClient::State state);
@ -179,22 +236,13 @@ private slots:
void onMamResultsReceived(const QString &queryId, const QXmppResultSetReply &resultSetReply, bool complete);
void onMamLog(QXmppLogger::MessageType type, const QString &msg);