Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
setvisible committed Dec 30, 2023
2 parents 81c8ab3 + 69dc92b commit 087c336
Show file tree
Hide file tree
Showing 395 changed files with 11,095 additions and 7,379 deletions.
52 changes: 40 additions & 12 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
BOOST_VERSION: 1.77.0
BOOST_PATH: ${{github.workspace}}/../install/boost/
#rem qt_standard_project_setup() was introduced in Qt 6.3.
Qt6_VERSION: 6.3.1
Qt6_VERSION: 6.5.3
LibtorrentRasterbar_SOURCE_DIR: ${{github.workspace}}/3rd/libtorrent-rasterbar
LibtorrentRasterbar_BUILD_DIR: ${{github.workspace}}/00/build/libtorrent-rasterbar
LibtorrentRasterbar_INSTALL_DIR: ${{github.workspace}}/00/install/libtorrent-rasterbar
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
qt_host: 'linux'
qt_target: 'desktop'
qt_arch: 'gcc_64'
qt_tools: 'tools_openssl_x64'
qt_tools: '' # To build OpenSSLv3: 'tools_opensslv3_src'
Qt6_CUSTOM_INSTALL_PATH: "/home/runner/work/DownZemAll/qt/"
DIRECTIVE_CMAKE_GENERATOR: ''
INSTALL_BOOST_PLATFORM_VERSION: '18.04' # 18.04, 20.04 Rem: Ubuntu 20.04 doesn't have Boost 1.77.0
Expand All @@ -102,7 +102,7 @@ jobs:
qt_host: 'windows'
qt_target: 'desktop'
qt_arch: 'win64_mingw'
qt_tools: 'tools_openssl_x64'
qt_tools: 'tools_opensslv3_x64'
Qt6_CUSTOM_INSTALL_PATH: "D:\\a\\DownZemAll\\qt\\"
DIRECTIVE_CMAKE_GENERATOR: '-G "MinGW Makefiles"'
INSTALL_BOOST_PLATFORM_VERSION: '2019' # 2019, 2022
Expand Down Expand Up @@ -246,7 +246,8 @@ jobs:
arch: ${{matrix.INSTALL_BOOST_ARCH}}
cache: true

- name: List files in Boost
- name: List files in Boost (if Debug Logging is enabled)
if: runner.debug == '1'
shell: bash
env:
Installed_Boost_VER: ${{ steps.install-boost.outputs.Boost_VER }}
Expand All @@ -261,8 +262,9 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
# Rem: Once installed, ${{env.Qt6_DIR}} is set.
# https://ddalcino.github.io/aqt-list-server/
with:
aqtversion: '==2.1.*'
aqtversion: '==3.1.*'
version: ${{env.Qt6_VERSION}}
dir: ${{matrix.Qt6_CUSTOM_INSTALL_PATH}}
host: ${{matrix.qt_host}}
Expand All @@ -271,7 +273,8 @@ jobs:
tools: ${{matrix.qt_tools}}
cache: true

- name: List files in Qt
- name: List files in Qt (if Debug Logging is enabled)
if: runner.debug == '1'
shell: bash
run: cd "${{env.Qt6_DIR}}/../../" && ls -alR
# env.Qt6_DIR
Expand All @@ -282,6 +285,24 @@ jobs:
# The thing is that "env.Qt6_DIR" is defined only at runtime, *after* install-qt-action has run.
id: qt6openssl
shell: python
# 2 versions present in Ubuntu:
# * Default version (3.0.2-0ubuntu1.12)
# in /usr/ (see "apt list libssl-dev")
# => openssl_dir = os.path.normpath("/usr")
#
# * Qt6 version (3.0.12)
# To build it:
# openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSLv3", "src"))
# cd "${{openssl_dir}}"
# ./config
# make
# make test
# sudo make install_sw
# Then:
# openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSLv3", "src"))
# openssl_lib_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libcrypto.a"))
# openssl_ssl_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libssl.a"))
#
run: |
import os
Expand All @@ -290,22 +311,23 @@ jobs:
# ssleay32 -> libssl
if "${{ matrix.os }}" == "windows-latest":
openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSL", "Win_x64"))
openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSLv3", "Win_x64"))
openssl_lib_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libcrypto.lib"))
openssl_ssl_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libssl.lib"))
if "${{ matrix.os }}" == "ubuntu-latest":
openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSL", "binary"))
openssl_lib_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libcrypto.a"))
openssl_ssl_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libssl.a"))
openssl_dir = os.path.normpath("/usr")
openssl_lib_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "x86_64-linux-gnu", "libcrypto.a"))
openssl_ssl_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "x86_64-linux-gnu", "libssl.a"))
if "GITHUB_OUTPUT" in os.environ:
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
print(f"OpenSSL_ROOT_DIR={ openssl_dir }", file=f)
print(f"OpenSSL_LIB_EAY={ openssl_lib_eay }", file=f)
print(f"OpenSSL_SSL_EAY={ openssl_ssl_eay }", file=f)
- name: List files in OpenSSL
- name: List files in OpenSSL (if Debug Logging is enabled)
if: runner.debug == '1'
shell: bash
env:
OpenSSL_ROOT_DIR: ${{ steps.qt6openssl.outputs.OpenSSL_ROOT_DIR }}
Expand Down Expand Up @@ -357,7 +379,8 @@ jobs:
working-directory: "${{env.LibtorrentRasterbar_BUILD_DIR}}"
run: cmake --build . --target install

- name: List files in Libtorrent
- name: List files in Libtorrent (if Debug Logging is enabled)
if: runner.debug == '1'
shell: bash
run: cd "${{env.LibtorrentRasterbar_INSTALL_DIR}}" && ls -alR

Expand Down Expand Up @@ -517,30 +540,35 @@ jobs:
os.makedirs(directory)
- name: Download Chromium Addon
continue-on-error: true
uses: actions/download-artifact@v3
with:
name: artifact_chromium
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Firefox Addon
continue-on-error: true
uses: actions/download-artifact@v3
with:
name: artifact_firefox
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Linux Portable
continue-on-error: true
uses: actions/download-artifact@v3
with:
name: artifact_linux_portable
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Windows MinGW 64 Portable
continue-on-error: true
uses: actions/download-artifact@v3
with:
name: artifact_windows_mingw_64_portable
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Windows 64 Installer
continue-on-error: true
uses: actions/download-artifact@v3
with:
name: artifact_windows_64_installer
Expand Down
7 changes: 1 addition & 6 deletions 3rd/libtorrent-rasterbar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,6 @@ if(static_runtime)
set(OPENSSL_MSVC_STATIC_RT ON)
endif()

if (NOT BUILD_SHARED_LIBS)
set(Boost_USE_STATIC_LIBS ON)
set(OPENSSL_USE_STATIC_LIBS ON)
endif()

add_library(torrent-rasterbar
${sources}
${try_signal_sources}
Expand Down Expand Up @@ -618,7 +613,7 @@ if (WIN32)
debug dbghelp crypt32
)

add_definitions(-D_WIN32_WINNT=0x0600) # target Windows Vista or later
add_definitions(-D_WIN32_WINNT=0x0601) # target Windows 7 or later

target_compile_definitions(torrent-rasterbar
PUBLIC WIN32_LEAN_AND_MEAN # prevent winsock1 to be included
Expand Down
32 changes: 31 additions & 1 deletion 3rd/libtorrent-rasterbar/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
* fix uTP streams timing out instead of closing cleanly
2.0.9 released

* fix issue with web seed connections when they close and re-open
* fallocate() not supported is not a fatal error
* fix proxying of IPv6 connections via IPv4 proxy
* treat CGNAT address range as local IPs
* add stricter checking of piece layers when loading torrents
* add stricter checking of v1 and v2 hashes being consistent
* cache failed DNS lookups as well as successful ones
* add an i2p torrent state to control interactions with clear swarms
* fix i2p SAM protocol parsing of quoted messages
* expose i2p peer destination in peer_info
* fix i2p tracker announces
* fix issue with read_piece() stopping torrent on pieces not yet downloaded
* improve handling of allow_i2p_mixed setting to work for magnet links
* fix web seed request for renamed single-file torrents
* fix issue where web seeds could disappear from resume data
* extend save_resume with additional conditional flags
* fix issue with retrying trackers in tiers > 0
* fix last_upload and last_download resume data fields to use posix time
* improve error messages for no_connect_privileged_ports, by untangle it from the port filter
* fix I2P issue introduced in 2.0.0
* add async tracker status query, post_trackers()
* add async torrent status query, post_status()
* support loading version 2 of resume data format
* fix issue with odd piece sizes
* add async piece availability query, post_piece_availability()
* add async download queue query, post_download_queue()
* add async file_progress query, post_file_progress()
* add async peer_info query, post_peer_info()

2.0.8 released

* fix uTP streams timing out instead of closing cleanly
* add write_torrent_file_buf() overload for generating .torrent files
* add create_torrent::generate_buf() function to generate into a buffer
* fix copy_file when the file ends with a sparse region
Expand Down
14 changes: 11 additions & 3 deletions 3rd/libtorrent-rasterbar/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import cast ;

# we need version numbers in the form X.Y.Z in order to trigger the built-in
# support for generating symlinks to the installed library
VERSION = 2.0.8 ;
VERSION = 2.0.9 ;

BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
CXXFLAGS = [ modules.peek : CXXFLAGS ] ;
Expand Down Expand Up @@ -206,6 +206,13 @@ rule linking ( properties * )
result += <library>boost_system ;
}

if ! <target-os>windows in $(properties)
{
# MingW defines a macro called "stat" if this is set, which causes build
# failures
result += <define>_FILE_OFFSET_BITS=64 ;
}

result += <define>BOOST_ALL_NO_LIB
<define>BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
<define>BOOST_SYSTEM_NO_DEPRECATED
Expand Down Expand Up @@ -405,6 +412,7 @@ rule openssl-lib-path ( properties * )
local address_model = [ feature.get-values <address-model> : $(properties) ] ;
OPENSSL_LIB += "C:/Program Files/OpenSSL-Win$(address_model)/lib" ;
OPENSSL_LIB += "C:/Program Files (x86)/OpenSSL-Win$(address_model)/lib" ;
OPENSSL_LIB += "C:/Program Files/OpenSSL/lib" ;
}

local result ;
Expand Down Expand Up @@ -432,6 +440,7 @@ rule openssl-include-path ( properties * )
local address_model = [ feature.get-values <address-model> : $(properties) ] ;
OPENSSL_INCLUDE += "C:/Program Files/OpenSSL-Win$(address_model)/include" ;
OPENSSL_INCLUDE += "C:/Program Files (x86)/OpenSSL-Win$(address_model)/include" ;
OPENSSL_INCLUDE += "C:/Program Files/OpenSSL/include" ;
}

local result ;
Expand Down Expand Up @@ -547,7 +556,7 @@ feature.compose <asserts>on : <define>TORRENT_USE_ASSERTS=1 ;
feature.compose <asserts>production : <define>TORRENT_USE_ASSERTS=1 <define>TORRENT_PRODUCTION_ASSERTS=1 ;
feature.compose <asserts>system : <define>TORRENT_USE_ASSERTS=1 <define>TORRENT_USE_SYSTEM_ASSERTS=1 ;

feature windows-version : vista win7 win10 xp : composite propagated ;
feature windows-version : win7 win10 vista xp : composite propagated ;
feature.compose <windows-version>vista : <define>_WIN32_WINNT=0x0600 ;
feature.compose <windows-version>win7 : <define>_WIN32_WINNT=0x0601 ;
feature.compose <windows-version>win10 : <define>_WIN32_WINNT=0x0A00 ;
Expand Down Expand Up @@ -883,7 +892,6 @@ local usage-requirements =
<include>./include
<include>./include/libtorrent
<variant>release:<define>NDEBUG
<define>_FILE_OFFSET_BITS=64
# enable cancel support in asio
<define>BOOST_ASIO_ENABLE_CANCELIO
# make sure asio uses std::chrono
Expand Down
8 changes: 6 additions & 2 deletions 3rd/libtorrent-rasterbar/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=2.0.8
VERSION=2.0.9

BUILD_CONFIG=release link=shared crypto=openssl warnings=off address-model=64

Expand Down Expand Up @@ -776,7 +776,9 @@ SIM_SOURCES = \
test_torrent_status.cpp \
test_tracker.cpp \
test_transfer.cpp \
test_transfer_matrix.cpp \
test_transfer_full_invalid_files.cpp \
test_transfer_no_files.cpp \
test_transfer_partial_valid_files.cpp \
test_utp.cpp \
test_web_seed.cpp \
transfer_sim.hpp \
Expand Down Expand Up @@ -1059,7 +1061,9 @@ TEST_TORRENTS = \
v2_incomplete_piece_layer.torrent \
v2_invalid_pad_file.torrent \
v2_invalid_piece_layer.torrent \
v2_invalid_piece_layer_root.torrent \
v2_invalid_piece_layer_size.torrent \
v2_unknown_piece_layer_entry.torrent \
v2_multiple_files.torrent \
v2_bad_file_alignment.torrent \
v2_unordered_files.torrent \
Expand Down
2 changes: 1 addition & 1 deletion 3rd/libtorrent-rasterbar/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR) # Configurable policies: <= C
# See https://devguide.python.org/#status-of-python-branches for supported python versions
function(_get_compatible_python_versions _ret)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20)
list(APPEND _tmp 3.6 3.7 3.8 3.9 3.10)
list(APPEND _tmp 3.6 3.7 3.8 3.9 3.10 3.11)
endif()
set(${_ret} ${_tmp} PARENT_SCOPE)
endfunction()
Expand Down
24 changes: 24 additions & 0 deletions 3rd/libtorrent-rasterbar/bindings/python/src/alert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,30 @@ void bind_alert()
.add_property("metadata", make_getter(&torrent_conflict_alert::metadata, by_value()))
;

class_<peer_info_alert, bases<torrent_alert>, noncopyable>(
"peer_info_alert", no_init)
.add_property("peer_info", make_getter(&peer_info_alert::peer_info, by_value()))
;

class_<file_progress_alert, bases<torrent_alert>, noncopyable>(
"file_progress_alert", no_init)
.add_property("files", make_getter(&file_progress_alert::files, by_value()))
;

class_<piece_info_alert, bases<torrent_alert>, noncopyable>(
"piece_info_alert", no_init)
.add_property("piece_info", make_getter(&piece_info_alert::piece_info, by_value()))
;

class_<piece_availability_alert, bases<torrent_alert>, noncopyable>(
"piece_availability_alert", no_init)
.add_property("piece_availability", make_getter(&piece_availability_alert::piece_availability, by_value()))
;

class_<tracker_list_alert, bases<torrent_alert>, noncopyable>(
"tracker_list_alert", no_init)
.add_property("trackers", make_getter(&tracker_list_alert::trackers, by_value()))
;
}

#ifdef _MSC_VER
Expand Down
4 changes: 4 additions & 0 deletions 3rd/libtorrent-rasterbar/bindings/python/src/peer_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ void bind_peer_info()
.def_readonly("estimated_reciprocation_rate", &peer_info::estimated_reciprocation_rate)
#endif
.add_property("local_endpoint", get_local_endpoint)
#if TORRENT_USE_I2P
.def("i2p_destination", &peer_info::i2p_destination)
#endif
;

// flags
Expand All @@ -120,6 +123,7 @@ void bind_peer_info()
pi.attr("outgoing_connection") = peer_info::outgoing_connection;
pi.attr("handshake") = peer_info::handshake;
pi.attr("connecting") = peer_info::connecting;
pi.attr("i2p_socket") = peer_info::i2p_socket;
#if TORRENT_ABI_VERSION == 1
pi.attr("queued") = peer_info::queued;
#endif
Expand Down
Loading

0 comments on commit 087c336

Please sign in to comment.