Commit Graph

205 Commits

Author SHA1 Message Date
Cœur 0b0f8704d6
build: move CMAKE_OSX_DEPLOYMENT_TARGET FATAL_ERROR next to its default setting (#4323) 2022-12-14 10:11:32 -06:00
Charles Kerr 841419d067 chore: bump version to 4.0.0-beta.2-dev 2022-12-02 08:32:44 -06:00
Charles Kerr bceb368f1b chore: bump version to 4.0.0-beta.2 2022-12-01 18:06:16 -06:00
Charles Kerr e0a44a1e5d
refactor: remove references to FD_SETSIZE (#4263) 2022-11-28 14:36:39 -06:00
Mike Gelfand b2343082b4
Add Windows configuration to GHA sanity builds (#4200) 2022-11-26 16:14:37 +00:00
Mike Gelfand 9e185a17f2
Fix default/minimum `CMAKE_OSX_DEPLOYMENT_TARGET` handling (#4156)
* Fix default/minimum `CMAKE_OSX_DEPLOYMENT_TARGET` handling

* Drop explicit `CMAKE_OSX_DEPLOYMENT_TARGET` in GHA CI

Rely on minimum set in top-level CMakeLists.txt instead.
2022-11-13 12:02:07 +00:00
Mike Gelfand 43acd7e3e4
Remove Xcode project in favor of CMake (#4147)
* Compile images into an assets catalog

* Optionally sign resulting Mac bundle

* Move 3rd-party/utility/test targets to their own folders

* Enable ARC via compile options unconditionally

* Install base and localized resources into correct directory

This seems like a Xcode quirk: if subdirectory containing the resource file
matches the destination directory name (and probably if there's more than one
resource file being installed there), the resulting folder structure then
contains an extra subdirectory, i.e. Resources/dirname/dirname/resname.

* Group source files for better structure in IDEs (Xcode, VS)

* Remove Xcode project

Using Xcode is still possible via "Xcode" CMake generator.

* Use ad-hoc signature if one is not specified

* Always use ad-hoc signature on link, leave proper signing to CPack

* Install localized resources into correct directory (QL plugin)

* Don't include CTest (we don't use additional targets it provides)

* Revert "Remove Xcode project"

This reverts commit dc069f654f.
2022-11-12 20:01:57 +00:00
Mike Gelfand da27c3d18d
Prefer ayatana-appindicator over appindicator, if present (#4001) 2022-10-20 18:15:13 +01:00
Mike Gelfand 8712db3b4c
Support switching between GTK 3 and 4 within the same build directory (#3918) 2022-10-09 10:29:47 +03:00
Mike Gelfand c75c6bf5c8
Add support for GTK 4 (#3916)
* Make compact mode switch work for both GTK 3 and 4

* Implement GTK 4-specific view gesture handling

* Fix torrents view context menu on GTK 4

* Explicitly show/hide menubar on startup/teardown

* Switch from `Gtk::Pixbuf` to `Gio::Icon` for views

* Support GTK 4 exceptions based on `std::exception`

* Fix options menu setup with GTK 4

* Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure

* Add custom file chooser button implementation

GTK 4 drops FileChooserButton widget and suggests implementing it using
Button.

* Add helpers to set X11 hints with GTK 4

* Remove `HigWorkarea` class that's no longer used

* Make main menu shortcuts work with GTK 4

* Make drops work in main window and make dialog with GTK 4

* Remove unused `gtr_action_get_widget()` helper

* Fix text direction mark setup with GTK 4 (due to switch to enum class)

* Fix file tree font size calculation with GTK 4

* Fix crash during shutdown with GTK 4

* Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4

* Fix opening files with GTK 4

* Rework torrent cell renderer to support both GTK 3 and 4

* Disable system tray icon support with GTK 4

* Fix windows positioning with GTK 4

* Fix focus event handling with GTK 4

* Adapt to tree model row/iterator changes in GTK 4

* Adapt to toplevel/root window changes in GTK 4

* Adapt to clipboard changes in GTK 4

* Adapt to icon/theme changes in GTK 4

* Adapt to file/path changes in GTK 4

* Random leftover fixes for GTK 4 compatibility

* Clean up unused code

* Move GTK 3 *.ui files into a subdirectory

* Add GTK 4 *.ui files

* Search for both GTK 3 and 4 during configuration
2022-10-09 01:50:03 +03:00
Charles Kerr 3aff760b53
chore: bump version to post-4.0.0-beta.1 dev (#3879) 2022-10-07 08:43:26 -05:00
Charles Kerr 98cf7d9b3c
build: set version to 4.0.0-beta.1 (#3872) 2022-10-06 20:46:36 -05:00
Charles Kerr 89d6533cd7
build: support semver versioning (#3867)
* build: semver versioning

Xref: https://github.com/transmission/transmission/issues/1037

* test: add base62 tests for client-id

* build: include PATCH_VERSION in Transmission.rc.in

* build: semver versioning in version.h

* fixup! build: semver versioning in version.h

undo experimental verison changes that were made for testing purposes

* Fixup version in MSI package filename

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-10-05 16:53:10 -05:00
Charles Kerr 3f44076e23
build: update dependency versions (#3853)
* build: rename GTK_MINIMUM, etc as GTKMM_MINIMUM in CMakeLists

* build: bump glibmm depdency min version to 2.60.0

https://github.com/transmission/transmission/issues/3846\#issuecomment-1263782526

for extraclassinit.h

* build: fix duplicated version number for deflate dependency

* build: sort dependency list in CMakeLists.txt

no functional changes, just housekeeping

* refactor: remove gtr_get_ptr()
2022-09-30 17:15:21 -05:00
Dmitry Antipov 050ee1cbbd
daemon: use signalfd-based signal handling if available (#3778)
If signalfd(2) interface is available, prefer it over traditional signal
handlers. This is mostly intended to drop dedicated signal handling thread
and hook signal processing into libevent event loop in the most natural way.

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
2022-09-07 15:12:35 -05:00
Charles Kerr e8686095ed
refactor: local peer discovery (#3696) 2022-08-24 16:03:30 -05:00
Charles Kerr 5bcbb7e34b
refactor: aggregate arc4 into libtransmission (#3684) 2022-08-20 13:41:40 -05:00
Charles Kerr 8b983b3d1c
refactor: tr_sys_path_resolve() returns a std::string (#3587)
* refactor: tr_sys_path_resolve returns std::string
2022-08-05 11:36:01 -05:00
Charles Kerr 18e2a04f88
refactor: make sha1, sha256 RAII safe (#3556) 2022-07-31 15:58:14 -05:00
Charles Kerr 2bcab6be7e
refactor: remove tr_dh code (#3443)
Refactor the MSE handshake Diffie-Hellman key code.
2022-07-14 19:54:10 -05:00
Charles Kerr 745adf8332
Update libutp to 3.4+ (TRAC-5888) (#3416)
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-07-08 10:13:22 -05:00
Charles Kerr e9d34519ff
docs: fix installation of release notes (#3390) 2022-07-02 11:25:15 -05:00
Colin B 3237323b8e
Add basic support for v2 hashes in transmission-show (#3380)
* Add basic support for v2 hashes in transmission-show

* Add sha256 for more libraries

* Fix issue with sha256 digest length
* Add sha256 for polarssl
    Note: Bumping miniumum PolarSSL version to 1.3 because of
    sha2->sha256 name change.
* Add sha256 for CommonCrypto/ccrypto
* Add sha256 for cyassl
2022-07-01 09:49:33 -05:00
FX Coudert e0c593741c
Raise minimum supported target to macOS 10.13 (High Sierra) (#3310) 2022-06-18 09:26:45 -05:00
Charles Kerr 12592e20d6
build: remove unused function checks (#3233)
* build: remove unused -DHAVE_ASPRINTF from xcode build

* build: remove unused -DHAVE_ZLIB from cmake and xcode

we use libdeflate instead

* build: remove unused -DHAVE_LIBGEN from xcode
2022-06-08 13:35:07 -05:00
Charles Kerr 2293f4336a
perf: use fast_float to parse floating-point numbers (#3092) 2022-05-16 00:06:17 -05:00
Charles Kerr 2f16e4a143
deps: update libdeflate to v1.10 (#3014) 2022-04-28 12:51:18 -05:00
Charles Kerr 1ebac744a5
build: re-enable cert-err33-c clang-tidy warning (#2968)
* refactor: re-enable cert-err33-c clang-tidy warning

* refactor: use fmt::chrono in transmission-remote

* refactor: use fmt::chrono in transmission-show

* refactor: use fmt::chrono in GTK details dialog

* refactor: use fmt::chrono in tr_session

* refactor: remove tr_localtime_r

* refactor: remove tr_gmtime_r
2022-04-22 14:56:54 -05:00
Charles Kerr 8c51c48472
fix: recent FTBFS in msvc (#2907)
* fix: recent FTBFS in msvc

It's happening a line in qt/WatchDir.cc where an enum named `ERROR` is
declared, so it's probably conflicting with a new `ERROR` name in some
header file. Rename ours and make at an `enum class` for good measure.

* build: fix cmake msvc warning

D9025 : overriding /W3 with /W4
2022-04-12 01:56:09 -05:00
Charles Kerr 4177e286a1
fix: sonarcloud (#2837)
* fix: rename variable to avoid shadow warning w/UTP

* fix: add default dtor for tr_strbuf

* fix: implicit conversion may lose precision

* fix: use init-statement to reduce variable scope

* fix: implicit conversion may lose precision

* fix: extract the assignment from this expression

* fix: use init-statement to reduce variable scope

* fix: use init-statement to reduce variable scope

* fix: do not mix public and private data members

* fix: add a condition to cv.wait call

* fix: do not throw uncaught exceptions in destructor
2022-03-29 05:57:04 -05:00
Mike Gelfand 3cd11ee1fb
Fix USE_QT_VERSION CMake option 2022-03-27 03:45:10 +01:00
Mike Gelfand c2549c3c77
Remove CPack symlinks workaround
Looks like it was a CMake defect.
2022-03-27 00:05:55 +00:00
Charles Kerr 6e8f9f3ff0
feat: add tr_strbuf (#2810)
* feat: add tr_strbuf class for building tmp strings

Based on fmt::basic_memory_buf, this is a growable string buffer that
has an initial size that's large enough to build most filenames or URLs
without needing heap allocations.

Adds a couple of extra helpers such as a `c_str()` method to make dealing
with old zero-terminated string APIs easier.
2022-03-24 16:41:29 -05:00
Charles Kerr 72a67054ea
refactor: fmt part 2 (#2771) 2022-03-15 09:52:16 -05:00
Charles Kerr a942c67199
refactor: use fmt (#2758)
* deps: use fmt (8.1.1 tag) to build log strings

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-03-13 23:43:35 -05:00
Charles Kerr e7d3e205d2 chore: update links to rpc-spec.md 2022-02-21 10:39:58 -06:00
Charles Kerr e14c7f38e5
feat: use libpsl (#2575)
Use libpsl to calculate public and private parts of URL hosts.
2022-02-12 11:30:27 -06:00
Charles Kerr eeccc3788f
docs: move rpc-spec document from txt to markdown (#2606) 2022-02-11 10:48:21 -06:00
Charles Kerr 7bc668680e
chore: remove unused function tr_strcasestr() (#2552) 2022-01-31 15:59:14 -06:00
Charles Kerr 253f4fe009
chore: remove /upload endpoint from rpc-server (#2550)
It's never been documented or supported and is unused by the web client.

In the unlikely case that a 3rd party app is using it, use 'torrent-add'
instead; it's documented + supported.
2022-01-31 14:54:21 -06:00
Charles Kerr 374c24dde1
refactor: trevent use std:: tools intead of pipes (#2520) 2022-01-28 17:56:46 -06:00
Charles Kerr d8d765c595
refactor: use libdeflate instead of zlib's deflate() (#2405)
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2022-01-17 10:20:12 -06:00
Charles Kerr bbe49639d6
refactor: use cpputf for utf8 validation and conversion (#2251)
* refactor: use cpputf for utf8 validation and conversion
2021-11-30 15:13:56 -06:00
Mike Gelfand c95616eb26
Bump minimum GTK version to 3.24 (#2112) 2021-11-07 13:08:17 +03:00
Mike Gelfand be74cb6356
Qt 6 support (#2069)
* Bump minimum Qt version to 5.6

* Switch from QRegExp to QRegularExpression

While still available, QRegExp has been moved to Qt6::Core5Compat module
and is not part of Qt6::Core.

* Use qIsEffectiveTLD instead of QUrl::topLevelDomain

The latter is not part of Qt6::Core. The former is a private utility in
Qt6::Network; using it for now, until (and if) we switch to something
non-Qt-specific.

* Use QStyle::State_Horizontal state when drawing progress bars

Although available for a long time, this state either didn't apply to
progress bars before Qt 6, or was deduced based on bar size. With Qt 6,
failing to specify it results in bad rendering.

* Don't use QStringRef (and associated methods)

While still available, QStringRef has been moved to Qt6::Core5Compat
module and is not part of Qt6::Core. Related method (e.g.
QString::midRef) have been removed in Qt 6.

* Use Qt::ItemIsAutoTristate instead of Qt::ItemIsTristate

The latter was deprecated and replaced with the former in Qt 5.6.

* Don't use QApplication::globalStrut

This property has been deprecated in Qt 5.15 and removed in Qt 6.

* Use QImage::fromHICON instead of QtWin::fromHICON

WinExtras module (providind the latter helper) has been removed in Qt 6.

* Use QStringDecoder instead of QTextCodec

While still available, QTextCodec has been moved to Qt6::Core5Compat
module and is not part of Qt6::Core.

* Don't forward-declare QStringList

Instead of being a standalone class, its definition has changed to
QList<QString> template specialization in Qt 6.

* Use explicit (since Qt 6) QFileInfo constructor

* Use QDateTime's {to,from}SecsSinceEpoch instead of {to,from}Time_t

The latter was deprecated in Qt 5.8 and removed in Qt 6.

* Don't use QFuture<>'s operator==

It has been removed in Qt 6. Since the original issue this code was
solving was caused by future reuse, just don't reuse futures and create
new finished ones when necessary.

* Use std::vector<> instead of QVector<>

The latter has been changed to a typedef for QList<>, which might not be
what one wants, and which also changed behavior a bit leading to
compilation errors.

* Don't use + for flags, cast to int explicitly

Operator+ for enum values has been deleted in Qt 6, so using operator|
instead. Then, there's no conversion from QFlags<> to QVariant, so need
to cast to int.

* Support Qt 6 in CMake and for MSI packaging

* Remove extra (empty) CMake variable use when constructing Qt target names

* Simplify logic in tr_qt_add_translation CMake helper

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-11-04 00:20:11 +03:00
Dzmitry Neviadomski 25f68ec815
Bump minimum required CMake version to 3.9. (#2063)
Remove old CMake version checks.
2021-11-03 00:13:44 -05:00
Mike Gelfand 81147a8fbb
CMake fixes for universal builds on Mac (#2044)
* Use CMake to build libevent on all platforms

* Pass Mac-specific flags down to 3rd-party projects
2021-10-25 11:14:04 +03:00
Mike Gelfand 5edbcb3740
Add CommonCrypto-based crypto utils implementation (#2032)
* Add CommonCrypto-based crypto utils implementation

Ported and adapted from an old (circa 2014-2015) branch of mine.

DH helpers are based on CCBigNum since CCDH doesn't provide acceptable error
reporting, and SecDH interface is a bit weird and limiting. Given that all
mentioned APIs are private, it doesn't seem to matter which one we're using as
any of them could be changed/removed by Apple at any point.

* Switch Xcode project to CommonCrypto backend
2021-10-24 21:19:57 +03:00
Mike Gelfand bf41e1487a
Switch from gtk to gtkmm (#1969)
* Gtk to gtkmm: main.cc

* Gtk to gtkmm: details.cc

* Gtk to gtkmm: tr-window.cc

* Gtk to gtkmm: tr-prefs.cc

* Gtk to gtkmm: open-dialog.cc

* Gtk to gtkmm: file-list.cc

* Gtk to gtkmm: filter.cc

* Gtk to gtkmm: torrent-cell-renderer.cc

* Gtk to gtkmm: msgwin.cc

* Gtk to gtkmm: makemeta-ui.cc

* Gtk to gtkmm: relocate.cc

* Gtk to gtkmm: stats.cc

* Gtk to gtkmm: dialogs.cc

* Gtk to gtkmm: hig.cc

* Gtk to gtkmm: favicon.cc

* Gtk to gtkmm: icons.cc

* Gtk to gtkmm: tr-icon.cc

* Gtk to gtkmm: actions.cc

* Gtk to gtkmm: notify.cc

* Gtk to gtkmm: util.cc

* Gtk to gtkmm: tr-core.cc

* Gtk to gtkmm: conf.cc

* Glibmm <2.62 compatibility (missing Glib::ustring::sprintf)

* Glibmm <2.56 compatibility (missing Glib::RefPtr<>::get)

* Bump glibmm to 2.50.1+ (C++17 fix in Glib::Variant)

* Fix empty timestamps on message log export (broken by #1444)

* Fix LGTM build issues

* Review fixes
2021-10-18 23:22:31 +03:00
Charles Kerr 90605d4bd3
build: skip clang-tidy on lgtm (#1792)
* build: skip clang-tidy on lgtm

* build: skip clang-tidy on appveyor

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-09-12 14:36:51 -05:00
Charles Kerr 4c1b627647
refactor: port libtransmission to C++ (#1787)
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization 
patches!

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00
Mike Gelfand a459e5e11b
Switch to a standalone ARC4 implementation (#1788)
* Switch to a standalone ARC4 implementation

This frees us from expecting it being provided by one of the crypto
libraries we support, all of which deprecated and/or removed it at this
point.

Fixes: #1103
Fixes: #1777

* Suppress lgtm warnings about RC4 being weak (we don't care)
2021-09-12 06:47:29 +03:00
Mike Gelfand 8c9faf1f71 Set default Mac target version in CMake to avoid extra warnings 2021-08-17 00:32:32 +03:00
Mike Gelfand 647c171636 Clean-up leftover mentions of uncrustify, fix custom format targets 2021-08-16 01:08:56 +03:00
RobCrowston 0155252823
Add in-kernel file copying for several platforms. (#1092)
* Add in-kernel copying support for Linux (sendfile64(2), copy_file_range(2)), FreeBSD 13 (copy_file_range(2)), MacOS (copyfile(2)), and Windows (CopyFileExA).

* Fix macro name USE_COPY_FILE_RANGE.

* Minor bugfixes for userspace fallback.

* Fix linux sendfile64 bugs.

* Remove some overzealous asserts.

* Allow transmission-test-copy to take an optional argument for an external reference file.

* Fix return value error of tr_sys_path_copy.

* Use COPYFILE_ALL for Macs without COPYFILE_CLONE.

* Add in-kernel file copying for several platforms.

Numerous operating systems now have support for copying files directly in the
kernel, which is generally more efficient than copying in a userspace read(2)/
write(2) loop. (This becomes particularly relevant for 4th gen PCI-E storage,
which approaches the latency of DRAM.) For Linux I use sendfile64(2), and, for
later kernels, copy_file_range(2). FreeBSD 13 will also support
copy_file_range(2). MacOS has copyfile(2), and Windows has CopyFileExA.
Operating systems lacking such a syscall continue to use the existing
read(2)/write(2) loop.

* Appease uncrustify.

* Appease uncrustify.

* copy-test: generate random content at run time.

* copy-test: Stylistic changes and more check()s.

* copy-test: files_are_identical should follow test idioms

* tr_sys_path_copy: numerous tweaks as requested by review.

* s/old file/source file; s/new file/destination file.

* tr_sys_path_copy: handle win32 wide characters in paths.

* Uncrustify.

* test-copy: Use non-string create_file_with_contents.

* tr_sys_path_copy: numerous fixes.

Per review: generate test file content at runtime; tidy use of check();
fix style; re-measure file sizes in the copy; define a macro when the
system does not provide it; use Unicode APIs on Windows; and fix
documentation.

* Updated as per comments.

* Rebase kernel-copy changes onto 3.0 with gtest.

* Undo irrelevant comment change.

* Fix syntax error.

* Use tr_malloc() instead of tr_valloc().

* Use EXPECT instead of TR_ASSERT in gtest.

* Add error handling.

* Acceptable coding style has changed again.

Now it's camelCase. Also use nullptr instead of NULL, etc.

* Fix east/west const.

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-08-07 12:04:03 +03:00
Dzmitry Neviadomski 59cf023e57
Update libevent to 2.1.12-stable. (#1588)
* Update libevent to 2.1.12-stable.

Fixes `kq_init: detected broken kqueue; not using.: Undefined error: 0`
message on start on macOS.

* Do not build libevent samples.

* Explicitly set library type to static on MSVC for libevent.

Co-authored-by: Mitch Livingston <livings124@mac.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-05-20 11:36:12 -05:00
Charles Kerr 41f225df7b
Remove posix memalign (#1520)
* refactor: remove unnecessary func tr_valloc()

We're only using it in a handful of places, and none of them need the
kind of alignment that posix_memalign() provide. So we can drop a few
dozen lines by removing the portability wrapper.
2020-11-15 15:53:42 -06:00
Charles Kerr cd453764b1
feat: web client refresh (#1476)
Give the web client a major overhaul.

User-visible highlights include:

* Mobile is now fully supported.
* Added fullscreen support on mobile.
* Better support for dark mode.
* Added mime icons to the torrent list.
* Improved theme consistency across the app.

Maintainer highlights include:

* Updated code to use ES6 APIs.
* No longer uses jQuery UI.
* No longer uses jQuery.
* Use Webpack to bundle the Javascript, CSS, and assets together -- the entire bundle size is now 68K gzipped.
* Added eslint / prettier / stylelint tooling.
* Uses torrent-get's 'table' mode for more efficient RPC calls.
2020-10-23 20:04:25 -05:00
Mike Gelfand 4c7153fa48
Remove autotools-based build system (#1465)
* Support .git files (e.g. for worktrees, submodules)
* Fix symlinks in source tarball, switch to TXZ, adjust non-release name
* Remove autotools stuff
2020-10-13 03:15:19 +03:00
Charles Kerr 54a7cac25a
chore: run uncrustify in parallel; add package.json to web directory (#1454)
* refactor: add package.json for web client

* refactor: call uncrustify in parallel
2020-09-20 15:41:45 -05:00
Charles Kerr be219ddee0
chore: add precommit hook for testing code style (#1448)
* chore: add precommit hook for testing code style

* chore: use prettier + eslint for js code
2020-09-13 21:41:32 -05:00
Charles Kerr efaa66a920
fix: resolve some lgtm warnings (#1444)
* fix: warnings found by LGTM static analyzer
2020-09-11 16:07:45 -05:00
Mike Gelfand e61b49c2fe Disable openssl support when building bundled libevent 2020-08-26 04:09:15 +03:00
Mike Gelfand 077f4d8d2b Require C11, switch to standard static_assert 2020-08-18 14:19:55 +03:00
Mike Gelfand 5125feca5d Don't test warning flags inherently unsupported by compiler
MSVC does not support GNU-style compiler flags, and vice versa. Not only
does it make no sense to test for those flags, with MSVC it also takes
considerably longer to do so.

The only flag that MSVC does support is -Wall (/Wall), but since it's
equivalent to Clang's -Weverything and thus issues lots of warnings
nobody usually cares about, including from system header files, it's
preferred to use /W4.
2020-08-18 11:37:25 +03:00
Mike Gelfand 4e5ad7937a Don't add warning flags that don't apply to a specific language
Some compilers issue additional CLI-level warning, that cannot be
suppressed, when passed flags that are irrelevant for a particular
invocation. Temporarily treat warnings as errors when testing flags
support so that those warnings lead to flags being excluded.
2020-08-18 10:51:38 +03:00
Mike Gelfand 057b8a61d6 Use CURL::libcurl imported target when available
When built with CMake, CURL installation includes configuration package
that could be used instead of CMake-bundled find module. The former
doesn't define CURL_INCLUDE_DIRS and CURL_LIBRARIES variables, but only
imported targets.
2020-08-18 09:58:33 +03:00
Charles Kerr 68920f5fa6
refactor: remove exit-time destructors from transmission-qt (#1395)
* refactor: remove exit-time destructors from transmission-qt
2020-08-15 10:42:51 -05:00
Charles Kerr 677dc73eac
refactor: use GTest for running tests (#1383)
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00
Vitaly Potyarkin 2da97b25fa
Lift 1024 open files limit (switch to curl polling API) (#893)
* Switch to new libcurl's polling interface

* Drop unused includes

* Use NOFILE limit value defined by operating system

* Avoid tight loops, ensure blocking for a small timeout

When there are no file descriptors to wait for, select() would work the
same as sleep(). But curl_multi_wait() returns immediately in this case,
so we need to add explicit wait to avoid tight loops.

Documentation: https://curl.haxx.se/libcurl/c/curl_multi_timeout.html
Discussion: https://curl.haxx.se/mail/lib-2018-03/0074.html

* Bump libcurl minimum version to 7.28.0
2020-07-28 21:38:27 -05:00
Charles Kerr d43aeb6a5c
chore: add clang-tidy checks to Qt client (#1236)
* chore: add clang-tidy integration for Qt client
2020-05-19 20:32:51 -05:00
Charles Kerr e7c099b8d8 chore: bump version to '3.00+' 2020-05-15 19:38:43 -05:00
Charles Kerr bb6b5a062e chore: bump version to '3.00'
If at first you don't succeed, bang your fingers on the keyboard until something works
2020-05-15 19:36:16 -05:00
Charles Kerr 6925be34b5
docs: make 'news' a markdown file (#1208)
* chore: fix markdown headers in NEWS.md

* chore: turn closed pulls/issues into links

* chore: linkify the release headers

* chore: fill in the 3.00 release date

* chore: use 'NEWS.md' in build scripts

* chore: tweak date format to YYYY-MM-DD
2020-05-03 18:33:57 -05:00
Charles Kerr 2cc5cfe3e3
feat: smart caching of TorrentDelegate::sizeHint() (#1026)
* feat: smart caching of TorrentDelegate::sizeHint()

* chore: bump c++ requirement to c++17 / c++1z
2019-11-06 18:17:48 -06:00
Mike Gelfand 5a5fe7d7fe Bump version to 3.00 (nightly) 2019-07-21 15:11:49 +03:00
Mike Gelfand ec79767e5f Support OFD locks and missing flock 2019-07-13 22:53:04 +03:00
LaserEyess 750589101a Parse session-id header case-insensitively (#765)
RFC 2616 defines headers as case-insensitive, so if rpc is behind a
reverse proxy that lowers the case of headers, transmission will not
parse them correctly.

A new wrapper function, `tr_strcasestr` is added to
libtransmission/utils.c to allow for comparisons of headers case
insensitively, and checks in cmake and autogen are included.
2019-03-17 17:37:52 +03:00
Mike Gelfand dab4857f90
Merge branch 'master' into rmintltool 2019-02-24 21:52:09 +03:00
Mike Gelfand c951848a5b Merge branch '2.9x' 2018-05-01 22:44:51 +03:00
Mike Gelfand d8e60ee44f Bump version, update news 2018-05-01 20:18:29 +03:00
userwithuid 8c160aad2d cmake: replace intltool with gettext
requires gettext 0.19.7 or higher
2018-04-18 09:25:13 +00:00
Mike Gelfand cefd8a3149 Bump version to 2.93+, fix NEWS date 2018-02-22 23:44:19 +03:00
Mike Gelfand 94be7dbd9b Merge branch '2.9x' 2018-01-25 03:07:52 +03:00
Mike Gelfand 7f008edab6 Improve version.h file generation
Store full revision hash in REVISION file. Write fixes 10 chars of revision
hash to version.h. Use `#pragma once` in version.h. Support getting revision
from TeamCity environment variable (similar to Jenkins).
2018-01-23 21:59:09 +03:00
Mike Gelfand f6b23c02f0 Don't search for SVN revision when calculating version 2018-01-23 21:58:50 +03:00
Mike Gelfand b875e79f3d Replace SVN and SCM with VCS everywhere 2018-01-23 21:58:33 +03:00
Mike Gelfand b237a260c5 Try getting SVN revision from Jenkins environment when using CMake (copy logic from update-version-h.sh) 2018-01-23 21:57:52 +03:00
Mike Gelfand 0b047f7aa5 Update NEWS, bump to 2.93 2018-01-17 20:52:37 +03:00
Mike Gelfand f27596238d Include stdbool.h unconditionally
All the compilers should provide the header file by now. Remove `tr_isBool`
sanity checks along the way as compiler should guarantee that bool (_Bool)
values are 0 or 1 and nothing else.
2017-05-24 22:53:06 +03:00
Mike Gelfand fa6ad47f71 Use C++ linker for anything that depends on static libutp 2017-05-20 13:06:22 +03:00
Mike Gelfand 8fce4173dc Fix CMake check for missing crypto backend
Fixes: #191
2017-02-23 23:18:45 +03:00
Mike Gelfand c6bfe9de15 Use QtWinExtras instead of importing private Qt function to get QPixmap from HICON 2017-02-11 20:48:13 +03:00
Mike Gelfand 8dc6fb48b1 Bump minimum required Qt version to 5.2 2017-02-11 13:24:42 +03:00
Mike Gelfand fd93316466 Improve version.h file generation
Store full revision hash in REVISION file. Write fixes 10 chars of revision
hash to version.h. Use `#pragma once` in version.h. Support getting revision
from TeamCity environment variable (similar to Jenkins).
2017-01-15 00:54:56 +03:00
Mike Gelfand b6d2649ddc Initial Mac support in CMake configuration 2017-01-11 23:43:53 +03:00
Mike Gilbert b7a850b073 cmake: ignore .git when creating source tarball 2017-01-02 21:07:44 -05:00
Mike Gelfand e83a062417 Adjust CMake files to use submodules instead of downloading archives 2017-01-02 02:26:02 +03:00
Mike Gelfand 448d8f39f6 CMake support for Solaris 2016-12-24 20:16:54 +03:00
Mike Gilbert d8cb7b3e0c cmake: add FindSYSTEMD module
Fixes: https://github.com/transmission/transmission/issues/117
2016-12-18 22:06:37 -05:00