Commit Graph

660 Commits

Author SHA1 Message Date
Sude
8caca0e62a Galaxy: Add split file support to MojoSetup hack 2020-02-19 13:49:06 +02:00
Sude
0a7648d80b Use separate thread count option for info threads
Adds --info-threads option to set number of threads the downloader uses for getting product info
2020-02-17 19:33:15 +02:00
Sude
56a06133d2 Override global config values in Downloader::checkOrphans
Previously orphan checking was limited to user selected language and platform values.
This meant that by default only English language and Windows+Linux was selected.
Overriding the global config values and clearing previously got details before starting the orphan check makes --check-orphans work as intended.
2020-02-17 19:24:04 +02:00
Sude
8f69f44bb1 Check for HTTP response code 416 in Downloader::repairFile 2020-02-17 19:18:14 +02:00
Sude
de05d16651 Merge branch 'jsoncpp' of https://github.com/chewi/lgogdownloader 2019-11-21 00:31:35 +02:00
James Le Cuirot
ff353126ec
Fix find_path for newer jsoncpp release
features.h was renamed but allocator.h wasn't so the latter works with
both old and new versions.
2019-11-20 22:24:10 +00:00
Sude
8829f44e37 Remove dependency on liboauth
liboauth is no longer needed.
Removed references to oauth token and secret from code.
I forgot to remove these in 42c71884a2
2019-11-14 18:57:37 +02:00
Sude
42c71884a2 Remove old GOG downloader API
Removed all remaining code related to old API.
Removed dead or commented out code that I noticed while checking the code for references to old API.
2019-11-14 18:25:12 +02:00
Sude
a884e8c0a3 Make --download-file option use Galaxy API 2019-11-14 17:52:04 +02:00
Sude
04b63d4c76 CMake: Disable search for boost-cmake
Fixes building with Boost >= 1.70.0
https://cmake.org/cmake/help/latest/module/FindBoost.html#boost-cmake
2019-10-26 18:57:52 +03:00
Sude
60bd888788 Don't exit when failing to get valid game details json 2019-10-24 11:33:13 +03:00
Sude
30cdd41d90 Make Downloader::getRemoteFileHash use Galaxy API
There was no reason to use the old downloader API for this because we can get the same data using Galaxy API.
This also means that Downloader::downloadFileWithId is now the only function using the old API.
2019-10-24 11:20:52 +03:00
Sude
367c80293a Retry on CURLE_RECV_ERROR 2019-10-24 10:50:55 +03:00
Sude
00df6d6099 Save xml data before skipping complete file
This changes the behavior so that we save XML data before skipping complete file.
Previously we skipped to next file right after determining that the file we were attempting to download was already complete.
This caused issues when user changed XML directory with --xml-directory option after already downloading some files.
The new XML directory would never have XML data for complete files but because we skipped before saving XML data.
2019-09-17 11:06:06 +03:00
Sude
f042e6dfad Suppress warnings about unused parameters 2019-09-04 13:02:20 +03:00
Sude
50972aaafe GUI: Remove usage of QDesktopWidget
QDesktopWidget is obsolete and some of its methods don't work correctly.
Remove all code related to QDesktopWidget.
2019-09-04 12:57:29 +03:00
Sude
fe494e8e74 Merge branch 'latomic' of https://github.com/janisozaur/lgogdownloader 2019-09-04 12:54:47 +03:00
Michał Janiszewski
460e28bff1 Add -latomic when required
Some platforms ship with atomic builtins packaged in their own library
which needs to be linked in order to make use of them.

This patch, based on
https://github.com/WebPlatformForEmbedded/meta-wpe/issues/210 adds a
configure-time check to verify if the library is needed and adds it when
necessary.
2019-07-12 22:16:42 +02:00
Sude
65961de041 Galaxy: Automatically delete old files when updating or downgrading
Determine id of old build and then compare file list to selected build.
Automatically delete files that have been removed between the builds.
2019-06-07 14:51:05 +03:00
Sude
bcccec416f Galaxy: Add option to delete orphaned files 2019-06-06 20:00:38 +03:00
Sude
bdf2716eaa Add language: Hebrew 2019-05-27 16:42:51 +03:00
Sude
d85d9316e4 Version 3.5 2019-04-22 18:21:49 +03:00
Sude
39c4a617bf Update README.md 2019-04-22 18:20:00 +03:00
Sude
86bb528c39 Add regex support to --galaxy-install and --galaxy-show-builds
Check if option value is regex and then ask user to select one product from a list of products matching the regex.
2019-04-22 18:14:53 +03:00
Sude
8540955af8 Reverse previous behavior of GUI login being enabled by default
Adds option --enable-login-gui which is used to enable GUI login when reCAPTCHA is encountered on login form.
This reverses the previous behavior added in ea0ec2a9bd and removes --disable-login-gui option.
It's better to have GUI login disabled by default just in case user is running lgogdownloader through SSH without X forwarding.
Because user has to enable login GUI first there won't be any unexpected behavior.
2019-04-22 18:01:19 +03:00
Sude
deb29802d2 GUI: Add autofill
Make login GUI automatically fill email and password fields
Users no longer need to type email and password again just because normal login method failed due to reCAPTCHA and GUI was launched
2019-04-22 17:39:10 +03:00
Sude
ea0ec2a9bd Add option to disable GUI login
Adds option --disable-login-gui which is used to disable GUI login when reCAPTCHA is encountered on login form.
Useful when downloader is compiled with GUI support but user is using it through SSH without X forwarding.
2019-03-01 23:12:04 +02:00
Sude
a8d9d466c9 Make progress info show estimated total remaining size and time 2019-03-01 14:09:52 +02:00
Sude
1e8ebbfd94 Add GUI login
Use QtWebEngine for getting cookies and authorization code if login form contains recaptcha and downloader is compiled with -DUSE_QT_GUI=ON
2019-03-01 10:05:16 +02:00
Sude
01eed3ec9e Add language: Arabic, Romanian 2019-02-17 01:19:37 +02:00
Sude
178ca66997 Merge branch 'fix_rhash_memory_corruption' of https://github.com/nathanel23/lgogdownloader 2019-01-06 14:06:31 +02:00
nathanel23
f65599e216 Fix for memory corruption/crash related to rhash
This patch fixes issues with some calls to the rhash C library that
cause subtle memory corruptions. There are two main issues that this
patch addresses:

1) The library init function is called multiple times in various places
within in the Util class. This is not necessary and may cause issues
if the initialization is repeated simultaneously in multiple threads.
Therefore the call was moved to the beginning of the main() function.

2) There is not enough space in the output buffers to store the
terminating NUL character of the hex-formatted hashes. The print
function from the rhash library writes a regular C string to
the output buffer and expects enough space to include the end
marker.

Depending on the memory layout generated by the compiler, this results
in one byte of the stack to be overwritten, which might lead to random
issues that are hard to find. On AArch64 (ARM) with GCC 6.3 the call to
the rhash_print() function happens to destroy the lower byte of the
frame pointer and causes a crash due to an invalid free() operation some
time after the Util::createXML function returned.
2019-01-06 01:06:23 +01:00
Sude
9bd416e3b0 Add support for retry and wait to Galaxy API and downloader API 2018-12-22 11:35:17 +02:00
Sude
df628b2a59 Add option to include hidden products
Adds option --include-hidden-products that allows user to list and download products that have been set hidden in account page.
2018-12-20 13:10:27 +02:00
Sude
f4c8db78ae CMake: Fix compiling when path contains spaces 2018-12-20 11:12:58 +02:00
Sude
f559c6c014 Fix unclosed file handle in Util::createXML
File handle for input file was not closed in case of errors.
Added fclose() to all error cases.
2018-12-20 11:10:42 +02:00
Sude
8683fe0a4e Galaxy: Fix segfault when getting download url fails 2018-09-30 20:05:06 +03:00
Sude
f5afc8957d Version 3.4 2018-09-15 15:22:19 +03:00
Sude
ab84d6f827 Galaxy: Add option to set CDN priority
--galaxy-cdn-priority option allows to set priorities for content delivery networks
2018-09-12 20:07:59 +03:00
Sude
8e55b81ca1 Galaxy: Extend subdir option to work with MojoSetup hack
Extends subdir option introduced in 1b3b04b28c to work with Downloader::galaxyInstallGame_MojoSetupHack
2018-09-12 16:02:34 +03:00
Sude
1b3b04b28c Galaxy: Add option to set subdirectory for installation
New option --subdir-galaxy-install allows user to set installation subdirectory when using --galaxy-install
2018-09-12 15:18:54 +03:00
Sude
6f44277d4c Galaxy: Small optimization to galaxyAPI::getFilteredDepotItemsVectorFromJson
Check if product id exists once instead of checking it again for each item
2018-09-05 18:21:35 +03:00
Sude
05e9409d52 Add separate option to set libcurl to verbose mode
New --curl-verbose option is used to set libcurl to verbose mode.
Old --verbose option is still used to print more information but no longer sets libcurl to verbose mode.
2018-09-05 17:51:03 +03:00
Sude
35b178e674 Galaxy: Add support for downloading dependencies
Adds support for downloading dependencies for a game
Added --galaxy-no-dependencies option to disable downloading dependencies during --galaxy-install
2018-09-05 17:41:43 +03:00
Sude
cae5f80698 Allow saving empty option values to config
Fixes issues caused by boost program options overriding desired value with default value because it wasn't found in config file.

For example using --subdir-extras "" --save-config would erase subdir-extras from config file.
Trying to download something would then cause the downloader to use default value for subdir-extras because it wasn't found in config.
2018-08-23 21:30:24 +03:00
Sude
9804215de8 Add missing include 2018-08-01 11:40:58 +03:00
Sude
8e9c094929 Replace --update-check option and remove --game aliases
Replace --update-check option with --updated and --notifications options
--updated restricts downloader to operate only on games that have update flag set in account page
--notifications shows the number of new forum replies, updates games, unread chat messages and pending friend requests
--clear-update-flags clears update notification flags for all games

Remove aliases for --game option
"free" could no longer be used as originally intended and "all" was unnecessary because leaving regex empty has the same effect
2018-07-21 23:59:08 +03:00
Sude
9dc5d4124c Add OS and arch to default user agent 2018-07-01 22:51:32 +03:00
Sude
3b733fcb4b Galaxy: Set timestamp for downloaded file 2018-05-29 11:23:51 +03:00
Sude
dd5714690c Galaxy: Use regex for language detection in --galaxy-install
Some builds use different language codes.
It looks like all of them are in format Language-Country/Region.
Added these new codes to regex in GlobalConstants::LANGUAGES.
Use regular expression to detect the language instead of language code.
2018-05-29 09:56:38 +03:00