Skip to content

Commit dee988b

Browse files
committed
Merge branch 'v0.3.0-dev'
2 parents f817f42 + 34d1526 commit dee988b

File tree

275 files changed

+7510
-27706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+7510
-27706
lines changed

.gitmodules

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
1-
[submodule "lib/rotor"]
2-
path = lib/rotor
3-
url = https://github.com/basiliscos/cpp-rotor
4-
[submodule "lib/spdlog"]
5-
path = lib/spdlog
6-
url = https://github.com/gabime/spdlog
7-
[submodule "lib/json"]
8-
path = lib/json
9-
url = https://github.com/nlohmann/json.git
10-
[submodule "lib/pugixml"]
11-
path = lib/pugixml
12-
url = https://github.com/zeux/pugixml.git
13-
[submodule "lib/uriparser"]
14-
path = lib/uriparser
15-
url = https://github.com/uriparser/uriparser.git
16-
[submodule "lib/tomlplusplus"]
17-
path = lib/tomlplusplus
18-
url = https://github.com/marzer/tomlplusplus.git
19-
[submodule "lib/lz4"]
20-
path = lib/lz4
21-
url = https://github.com/lz4/lz4.git
221
[submodule "lib/mbdx"]
232
path = lib/mbdx
243
url = https://gitflic.ru/project/erthink/libmdbx.git
25-
[submodule "lib/catch"]
26-
path = lib/catch
27-
url = https://github.com/catchorg/Catch2/
4+

CMakeLists.txt

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
cmake_minimum_required (VERSION 3.2)
22
project (syncspirit)
33

4-
set(CMAKE_CXX_STANDARD 17)
4+
set(CMAKE_CXX_STANDARD 20)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6-
# does not works because of pugixml
7-
#set(CMAKE_CXX_VISIBILITY_PRESET hidden)
8-
#set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
9-
#cmake_policy(SET CMP0063 NEW)
6+
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
7+
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
8+
cmake_policy(SET CMP0063 NEW)
9+
cmake_policy(SET CMP0077 NEW)
1010

1111
include(GenerateExportHeader)
1212
set(CMAKE_POSITION_INDEPENDENT_CODE True)
@@ -23,11 +23,19 @@ find_package(
2323
find_package(OpenSSL REQUIRED)
2424
find_package(Protobuf REQUIRED)
2525
find_package(ZLIB REQUIRED)
26+
find_package(rotor COMPONENTS asio thread REQUIRED)
27+
find_package(lz4 REQUIRED)
28+
find_package(fmt REQUIRED)
29+
find_package(spdlog REQUIRED)
30+
find_package(pugixml REQUIRED)
31+
find_package(uriparser REQUIRED)
32+
find_package(tomlplusplus REQUIRED)
33+
find_package(nlohmann_json REQUIRED)
2634

27-
set(SYNCSPIRIT_VERSION "v0.2.0")
35+
set(SYNCSPIRIT_VERSION "v0.3.0")
2836

2937
configure_file(misc/syncspirit-config.h.in include/syncspirit-config.h @ONLY)
30-
set(Protobuf_IMPORT_DIRS ${syncspirit_SOURCE_DIR}/src)
38+
set(Protobuf_IMPORT_DIRS ${syncspirit_SOURCE_DIR}/src/protobuf)
3139
protobuf_generate_cpp(
3240
PROTO_SRCS PROTO_HDRS
3341
EXPORT_MACRO SYNCSPIRIT_API
@@ -57,10 +65,11 @@ add_library(syncspirit_lib
5765
src/db/prefix.cpp
5866
src/db/transaction.cpp
5967
src/db/utils.cpp
68+
src/fs/chunk_iterator.cpp
6069
src/fs/file.cpp
6170
src/fs/file_actor.cpp
6271
src/fs/fs_supervisor.cpp
63-
src/fs/messages.cpp
72+
src/fs/new_chunk_iterator.cpp
6473
src/fs/scan_actor.cpp
6574
src/fs/scan_task.cpp
6675
src/fs/utils.cpp
@@ -86,19 +95,23 @@ add_library(syncspirit_lib
8695
src/model/diff/load/load_cluster.cpp
8796
src/model/diff/load/unknown_folders.cpp
8897
src/model/diff/modify/append_block.cpp
98+
src/model/diff/modify/block_ack.cpp
99+
src/model/diff/modify/block_rej.cpp
100+
src/model/diff/modify/block_transaction.cpp
89101
src/model/diff/modify/blocks_availability.cpp
90102
src/model/diff/modify/clone_block.cpp
91103
src/model/diff/modify/clone_file.cpp
92104
src/model/diff/modify/connect_request.cpp
93105
src/model/diff/modify/create_folder.cpp
94106
src/model/diff/modify/file_availability.cpp
95107
src/model/diff/modify/finish_file.cpp
96-
src/model/diff/modify/flush_file.cpp
97-
src/model/diff/modify/local_update.cpp
108+
src/model/diff/modify/finish_file_ack.cpp
98109
src/model/diff/modify/lock_file.cpp
99-
src/model/diff/modify/new_file.cpp
110+
src/model/diff/modify/mark_reachable.cpp
111+
src/model/diff/modify/local_update.cpp
100112
src/model/diff/modify/relay_connect_request.cpp
101113
src/model/diff/modify/share_folder.cpp
114+
src/model/diff/modify/unshare_folder.cpp
102115
src/model/diff/modify/update_contact.cpp
103116
src/model/diff/modify/update_peer.cpp
104117
src/model/diff/peer/peer_state.cpp
@@ -109,6 +122,7 @@ add_library(syncspirit_lib
109122
src/model/misc/error_code.cpp
110123
src/model/misc/file_block.cpp
111124
src/model/misc/file_iterator.cpp
125+
src/model/misc/updates_streamer.cpp
112126
src/model/misc/uuid.cpp
113127
src/model/misc/version_utils.cpp
114128
src/model/block_info.cpp
@@ -121,6 +135,7 @@ add_library(syncspirit_lib
121135
src/model/folder_info.cpp
122136
src/model/ignored_device.cpp
123137
src/model/ignored_folder.cpp
138+
src/model/remote_folder_info.cpp
124139
src/model/unknown_folder.cpp
125140
src/net/acceptor_actor.cpp
126141
src/net/cluster_supervisor.cpp
@@ -158,41 +173,15 @@ add_library(syncspirit_lib
158173
src/utils/uri.cpp
159174
)
160175

161-
set(BUILD_BOOST_ASIO true CACHE BOOL "BUILD_BOOST_ASIO")
162-
set(URIPARSER_BUILD_WCHAR_T false CACHE BOOL "URIPARSER_BUILD_WCHAR_T")
163-
set(URIPARSER_BUILD_TOOLS false CACHE BOOL "URIPARSER_BUILD_TOOLS")
164-
set(URIPARSER_BUILD_DOCS false CACHE BOOL "DURIPARSER_BUILD_DOCS")
165-
set(URIPARSER_BUILD_TESTS false CACHE BOOL "URIPARSER_BUILD_TESTS")
166-
set(URIPARSER_ENABLE_INSTALL false CACHE BOOL "URIPARSER_ENABLE_INSTALL")
167176
set(BUILD_SHARED_LIBS false CACHE BOOL "BUILD_SHARED_LIBS")
168-
set(LZ4_BUILD_CLI false CACHE BOOL "LZ4_BUILD_CLI")
169-
set(LZ4_BUILD_LEGACY_LZ4C false CACHE BOOL "LZ4_BUILD_LEGACY_LZ4C")
170177
set(MDBX_BUILD_TOOLS false CACHE BOOL "MDBX_BUILD_TOOLS")
171178
set(MDBX_ENABLE_TESTS false CACHE BOOL "MDBX_ENABLE_TESTS")
172179
set(MDBX_BUILD_CXX false CACHE BOOL "MDBX_BUILD_CXX")
173180

174-
cmake_policy(SET CMP0077 NEW)
175-
set(PUGIXML_NO_EXCEPTIONS on)
176-
177-
add_subdirectory("lib/spdlog")
178-
add_subdirectory("lib/lz4/build/cmake/")
179-
add_subdirectory("lib/pugixml")
180-
add_subdirectory("lib/rotor")
181-
add_subdirectory("lib/uriparser")
182181
add_subdirectory("lib/mbdx")
183182

184-
185183
target_include_directories(syncspirit_lib PUBLIC
186-
${syncspirit_SOURCE_DIR}/lib/rotor/include
187-
${syncspirit_SOURCE_DIR}/lib/spdlog/include
188-
${syncspirit_SOURCE_DIR}/lib/spdlog/include/spdlog/
189-
${syncspirit_SOURCE_DIR}/lib/json/include
190-
${syncspirit_SOURCE_DIR}/lib/pugixml/src
191-
${syncspirit_SOURCE_DIR}/lib/uriparser/include
192-
${syncspirit_SOURCE_DIR}/lib/tomlplusplus/include
193-
${syncspirit_SOURCE_DIR}/lib/lz4/lib
194184
${syncspirit_SOURCE_DIR}/lib/mbdx
195-
${Boost_INCLUDE_DIRS}
196185
${OPENSSL_INCLUDE_DIR}
197186
${CMAKE_CURRENT_BINARY_DIR}
198187
${CMAKE_CURRENT_SOURCE_DIR}/src
@@ -202,17 +191,18 @@ target_link_libraries(syncspirit_lib
202191
syncspirit_pb
203192
rotor::asio
204193
rotor::thread
205-
pugixml
194+
pugixml::pugixml
206195
Boost::iostreams
207196
Boost::filesystem
208197
Boost::program_options
209198
Boost::system
210-
${Boost_LIBRARIES}
211199
OpenSSL::SSL
200+
fmt::fmt
212201
spdlog::spdlog
213-
uriparser
214-
lz4_static
215-
ZLIB::ZLIB
202+
uriparser::uriparser
203+
tomlplusplus::tomlplusplus
204+
nlohmann_json::nlohmann_json
205+
lz4::lz4
216206
mdbx-static
217207
$<$<PLATFORM_ID:Windows>:iphlpapi>
218208
$<$<PLATFORM_ID:Windows>:ws2_32>

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and still is in heavy development.
1616

1717
# status
1818

19-
- [x] downloading files from peer devices (aka all folders are receive only)
19+
- [x] full-powered files synchronization (aka send and receive)
2020

2121
- [x] [global peer discovery](https://docs.syncthing.net/specs/globaldisco-v3.html)
2222

@@ -32,7 +32,6 @@ and still is in heavy development.
3232

3333
This list is probably incomplete, here are the most important changes
3434

35-
- [ ] full-powered files synchronization (aka send and receive)
3635

3736
- [ ] conflict resolution
3837

@@ -118,6 +117,13 @@ after the core completion.
118117

119118
# changes
120119

120+
## 0.3.0 (14-Apr-2024)
121+
- [feature] implemented complete files syncrhonisation
122+
- [feature] added local files watcher and updates streamer
123+
- [build] switched from git submodules to [conan2](https://conan.io)
124+
- [win32] better platform support
125+
126+
121127
## 0.2.0 (22-May-2022)
122128
- [feature] implement [relay transport](https://docs.syncthing.net/specs/relay-v1.html),
123129
the relay is randombly chosen from the public relays [pool](https://relays.syncthing.net/endpoint)

conanfile.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
[requires]
3+
openssl/1.1.1s
4+
boost/1.84.0
5+
lz4/1.9.4
6+
nlohmann_json/3.11.2
7+
protobuf/3.21.9
8+
pugixml/1.13
9+
rotor/0.29
10+
spdlog/1.13.0
11+
tomlplusplus/3.3.0
12+
uriparser/0.9.7
13+
zlib/1.2.13
14+
15+
[test_requires]
16+
catch2/3.3.1
17+
18+
[tool_requires]
19+
protobuf/3.21.9
20+
21+
[options]
22+
pugixml/*:no_exceptions=True
23+
rotor/*:enable_asio=True
24+
rotor/*:enable_thread=True
25+
26+
[generators]
27+
CMakeDeps
28+
CMakeToolchain
29+

0 commit comments

Comments
 (0)