It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
coffeecup: Well, there were no major activities on the github project for the last three months on lgogdownloader, just a couple of minor fixes.
I think I remember Sude saying he planned to wait to see how different Galaxy's API will be, rather than doing a ton of work that might need to be thrown out.
Post edited March 07, 2015 by ssokolow
216cfae Add support for saving serial numbers
a708f3d Show response of HTTP error in API::getResponse when using debug build

I've been quite busy so I haven't had much time to work on the downloader but I managed to get some time to add support for saving serial numbers.

You can use --save-serials to save the serial numbers when using --download
It can also be used with --list-details and --update-cache
With --update-cache the serials are saved to the cache file and with --list-details the serials are shown in the output
Hello,

V2.20 returns the following error when trying to download a game or update-cache :

[i]$ lgogdownloader --version
LGOGDownloader 2.20M git 7d5874d
$ lgogdownloader --directory ~/Games/ --platform 4 --no-deb --no-language-packs --download --game wasteland_2_kickstarter
lgogdownloader: symbol lookup error: lgogdownloader: undefined symbol: _ZN4Json5ValueaSERKS0_
$ lgogdownloader --directory ~/Games/ --platform 4 --no-deb --no-language-packs --download --game dreamfall_chapters_season_pass
lgogdownloader: symbol lookup error: lgogdownloader: undefined symbol: _ZN4Json5ValueaSERKS0_[/i]

There are no errors when I use --list. It worked a few weeks/months ago and it is compiled from source.

I pulled the new commits to try the latest version but make release returns also an error, apparently JSON related :

[i]$ make release
test -d bin/Release || mkdir -p bin/Release
test -d obj/Release || mkdir -p obj/Release
test -d obj/Release/src || mkdir -p obj/Release/src
g++ -s obj/Release/main.o obj/Release/src/api.o obj/Release/src/downloader.o obj/Release/src/progressbar.o obj/Release/src/util.o obj/Release/src/blacklist.o obj/Release/src/gamedetails.o obj/Release/src/gamefile.o -lcurl -loauth -ljsoncpp -lhtmlcxx -lboost_system -lboost_filesystem -lboost_regex -lboost_program_options -lboost_date_time -ltinyxml -lrhash -o bin/Release/lgogdownloader
obj/Release/src/gamefile.o: In function `gameFile::getAsJson()':
gamefile.cpp:(.text+0x3c5): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x3f5): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x427): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x459): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x491): undefined reference to `Json::Value::operator=(Json::Value const&)'
obj/Release/src/gamefile.o:gamefile.cpp:(.text+0x4cb): more undefined references to `Json::Value::operator=(Json::Value const&)' follow
collect2: error: ld returned 1 exit status
Makefile:116: recipe for target 'out_release' failed
make: *** [out_release] Error 1[/i]

My system is an up-to-date Arch Linux.
avatar
Dihldrek: obj/Release/src/gamefile.o: In function `gameFile::getAsJson()':
gamefile.cpp:(.text+0x3c5): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x3f5): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x427): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x459): undefined reference to `Json::Value::operator=(Json::Value const&)'
gamefile.cpp:(.text+0x491): undefined reference to `Json::Value::operator=(Json::Value const&)'
obj/Release/src/gamefile.o:gamefile.cpp:(.text+0x4cb): more undefined references to `Json::Value::operator=(Json::Value const&)' follow
collect2: error: ld returned 1 exit status
Makefile:116: recipe for target 'out_release' failed
make: *** [out_release] Error 1[/i]

My system is an up-to-date Arch Linux.
I can't replicate this on my Arch installation

sude@ArchLinux ~/lgogdownloader $ sudo pacman -Syu
[sudo] password for sude:
:: Synchronizing package databases...
core 121,6 KiB 2,12M/s 00:00 [######################] 100%
extra 1813,9 KiB 10,5M/s 00:00 [######################] 100%
community 2,6 MiB 11,2M/s 00:00 [######################] 100%
multilib 124,3 KiB 12,1M/s 00:00 [######################] 100%
nephyrin-aur is up to date
repo-ck is up to date
:: Starting full system upgrade...
there is nothing to do
sude@ArchLinux ~/lgogdownloader $ sudo aura -Ayux --hotedit
:: Synchronizing package databases...
core 121,6 KiB 2,42M/s 00:00 [######################] 100%
extra 1813,9 KiB 10,5M/s 00:00 [######################] 100%
community 2,6 MiB 11,2M/s 00:00 [######################] 100%
multilib 124,3 KiB 12,1M/s 00:00 [######################] 100%
nephyrin-aur is up to date
repo-ck is up to date
aura >>= Fetching package information...
aura >>= Comparing package versions...
aura >>= No AUR package upgrades necessary.
aura >>= No valid packages specified.
sude@ArchLinux ~/lgogdownloader :( $ make clean
rm -f obj/Debug/main.o obj/Debug/src/api.o obj/Debug/src/downloader.o obj/Debug/src/progressbar.o obj/Debug/src/util.o obj/Debug/src/blacklist.o obj/Debug/src/gamedetails.o obj/Debug/src/gamefile.o bin/Debug/lgogdownloader
rm -rf bin/Debug
rm -rf obj/Debug
rm -rf obj/Debug/src
rm -f obj/Release/main.o obj/Release/src/api.o obj/Release/src/downloader.o obj/Release/src/progressbar.o obj/Release/src/util.o obj/Release/src/blacklist.o obj/Release/src/gamedetails.o obj/Release/src/gamefile.o bin/Release/lgogdownloader
rm -rf bin/Release
rm -rf obj/Release
rm -rf obj/Release/src
rm -f man/lgogdownloader.1 man/lgogdownloader.1.gz
sude@ArchLinux ~/lgogdownloader $ make -j7 release
test -d bin/Release || mkdir -p bin/Release
test -d obj/Release || mkdir -p obj/Release
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -DVERSION_STRING="\"LGOGDownloader 2.20 git a708f3d\"" -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c main.cpp -o obj/Release/main.o
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/api.cpp -o obj/Release/src/api.o
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/downloader.cpp -o obj/Release/src/downloader.o
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/progressbar.cpp -o obj/Release/src/progressbar.o
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/util.cpp -o obj/Release/src/util.o
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/blacklist.cpp -o obj/Release/src/blacklist.o
test -d obj/Release/src || mkdir -p obj/Release/src
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/gamedetails.cpp -o obj/Release/src/gamedetails.o
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -O2 -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/gamefile.cpp -o obj/Release/src/gamefile.o
g++ -s obj/Release/main.o obj/Release/src/api.o obj/Release/src/downloader.o obj/Release/src/progressbar.o obj/Release/src/util.o obj/Release/src/blacklist.o obj/Release/src/gamedetails.o obj/Release/src/gamefile.o -lcurl -loauth -ljsoncpp -lhtmlcxx -lboost_system -lboost_filesystem -lboost_regex -lboost_program_options -lboost_date_time -ltinyxml -lrhash -o bin/Release/lgogdownloader
help2man -N -i man/lgogdownloader.supplemental.groff -o man/lgogdownloader.1 bin/Release/lgogdownloader
gzip -f -9 man/lgogdownloader.1
edit:
Try adding "#include <json/json.h>" to src/gamefile.cpp to see if helps.
Post edited March 20, 2015 by Sude
avatar
Sude: Try adding "#include <json/json.h>" to src/gamefile.cpp to see if helps.
That worked, thank you.
avatar
Sude: 216cfae Add support for saving serial numbers

I've been quite busy so I haven't had much time to work on the downloader but I managed to get some time to add support for saving serial numbers.

You can use --save-serials to save the serial numbers when using --download
It can also be used with --list-details and --update-cache
With --update-cache the serials are saved to the cache file and with --list-details the serials are shown in the output
I was looking for an easy way to download serial numbers already for a long time, yet even for an easy way to get a clue for which of my games I have or need a serial number.

Thank you very much!

Edit:
I just have tried out the option together with --list-details, works great. :)
And I'm quite surprised how many of my games have serial numbers ...
Post edited March 24, 2015 by eiii
ok, i seem to have had some of my games unbundled, i have a tomb raider123 folder and also separate folders for each of the first 3 tomb raiders, but --check-orphans doesn't report the original tomb_raider_123 folder as an orphan.
how are the orphans worked out, is there an account specific list of files that should exist, or is there a list of all files that gog have on their servers and this is checked with what i have? the former would suggest that something has gone wrong but the latter would make sense since my library would say what to download - hence the new unbundled files - but would leave the bundled files for those whose libraries still show bundled games.
i removed the tomb_raider_123 folder and --download --repair --game tomb did not redownload them.
i put the folder back and --check-orphans --game tomb said there were no orphans.
is this something that needs gog to get around to cleaning up?

diziet
The unbundling has caused a massive duplication of extras. I guess lgogdownloader isn't being developed much at this time, but a feature to avoid downloading them multiple times could come in handy.

In my own download directory I've replaced the duplicates with hardlinks to save disk space.
avatar
diziet_sma: ok, i seem to have had some of my games unbundled, i have a tomb raider123 folder and also separate folders for each of the first 3 tomb raiders, but --check-orphans doesn't report the original tomb_raider_123 folder as an orphan.
how are the orphans worked out, is there an account specific list of files that should exist, or is there a list of all files that gog have on their servers and this is checked with what i have? the former would suggest that something has gone wrong but the latter would make sense since my library would say what to download - hence the new unbundled files - but would leave the bundled files for those whose libraries still show bundled games.
i removed the tomb_raider_123 folder and --download --repair --game tomb did not redownload them.
i put the folder back and --check-orphans --game tomb said there were no orphans.
is this something that needs gog to get around to cleaning up?

diziet
Orphans are checked using the game names from account page so the check only works for games that exist on the account page.
It might be possible to change orphan check so that it works when the game is removed or renamed. I'll check this when I have more time to work on the downloader.

avatar
Rixasha: The unbundling has caused a massive duplication of extras. I guess lgogdownloader isn't being developed much at this time, but a feature to avoid downloading them multiple times could come in handy.

In my own download directory I've replaced the duplicates with hardlinks to save disk space.
The downloader could keep a database of file hashes for the extras and if they match it could automatically symlink or hardlink the files.
Unfortunately the API doesn't provide file hashes for extras.
pillars of eternity is not compatible with lgogdownloader, at least for me.
I've tried ~10 times to get the files, and see that it finds 1/1 games but then:

terminate called after throwing an instance of 'std::length_error'
what(): basic_string::replace
[1] Abort trap (core dumped) lgogdownloader -...

(gdb) bt
#0 0x00007f7ff4d10e3a in _lwp_kill () from /usr/lib/libc.so.12
#1 0x00007f7ff4d10ac5 in abort () at /archive/foreign/src/lib/libc/stdlib/abort.c:74
#2 0x00007f7ff5479056 in __gnu_cxx::__verbose_terminate_handler () at /archive/foreign/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/vterminate.cc:95
#3 0x00007f7ff5480c98 in __cxxabiv1::__terminate (handler=<optimized out>) at /archive/foreign/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_terminate.cc:38
#4 0x00007f7ff5480cde in std::terminate () at /archive/foreign/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_terminate.cc:48
#5 0x00007f7ff5480c42 in __cxxabiv1::__cxa_throw (obj=0x7f7ff733f070, tinfo=0x7f7ff56f3bb0 <typeinfo for std::length_error>, dest=
0x7f7ff5478c86 <std::length_error::~length_error()>) at /archive/foreign/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_throw.cc:87
#6 0x00007f7ff54782b9 in std::__throw_length_error (__s=__s@entry=0x7f7ff54c4718 "basic_string::replace")
at /archive/foreign/src/external/gpl3/gcc/dist/libstdc++-v3/src/c++11/functexcept.cc:76
#7 0x00007f7ff548681a in _M_check_length (__s=0x7f7ff54c4718 "basic_string::replace", __n2=<optimized out>, __n1=0, this=0x7f7fffffbaf0)
at /archive/foreign/src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_string.h:332
#8 std::string::replace (this=0x7f7fffffbaf0, __pos=0, __n1=0, __s=<optimized out>, __n2=<optimized out>)
at /archive/foreign/src/external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_string.tcc:420
#9 0x0000000000426a80 in ?? ()
#10 0x000000000042adb7 in ?? ()
#11 0x000000000042c872 in ?? ()
#12 0x0000000000448a53 in main ()

I have the royal edition in case it matters, and lgogdownloader from git from a couple of days ago.
Commandline:
lgogdownloader --check-orphans --download --repair --create-xml automatic --no-subdirectories --language=524287 --platform=7 --game pillars_

When I look at the game in my Account, there are ~30 links, half of which work. Perhaps that's the cause...
avatar
Loenas: ...
Log into GOG, then refresh your account refresh your account.
After that, launch LGOGDownloader, I did it a moment ago and it works now for me.
That did indeed fix the problem. You can never refresh enough, can you?
Thanks!
Hi there. I'm trying to download pillars_of_eternity for linux.

For some reason it is not listing a linux version, even though the GOG website shows a linux version: gog_pillars_of_eternity_1.0.0.1.tar.gz

Note the difference below when I use --list instead of --list --platform 4:

dukereg@dukereg-compy ~ $ lgogdownloader --list
arcanum_of_steamworks_and_magick_obscura
arx_fatalis
baldurs_gate_2_complete
baldurs_gate_the_original_saga
beyond_good_and_evil
caesar_3
divine_divinity
dragonsphere
dungeons_dragons_dragonshard
forgotten_realms_demon_stone
icewind_dale_2
icewind_dale_complete
journeyman_project_3
neverwinter_nights_diamond_edition
pillars_of_eternity
+> pillars_of_eternity_kickstarter_item
+> pillars_of_eternity_preorder_bonus
+> pillars_of_eternity_kickstarter_hero_bonus_goodies
planescape_torment
the_temple_of_elemental_evil
ultima_4

dukereg@dukereg-compy ~ $ lgogdownloader --list --platform 4
baldurs_gate_2_complete
baldurs_gate_the_original_saga
dragonsphere
planescape_torment


Obviously it starts downloading the Windows version if I use "--download", but does nothing but print a blank line if I use "--download --platform 4".

Any ideas or similar experiences with other games?
avatar
dukereg: Hi there. I'm trying to download pillars_of_eternity for linux.

For some reason it is not listing a linux version, even though the GOG website shows a linux version: gog_pillars_of_eternity_1.0.0.1.tar.gz

Note the difference below when I use --list instead of --list --platform 4:

dukereg@dukereg-compy ~ $ lgogdownloader --list
arcanum_of_steamworks_and_magick_obscura
arx_fatalis
baldurs_gate_2_complete
baldurs_gate_the_original_saga
beyond_good_and_evil
caesar_3
divine_divinity
dragonsphere
dungeons_dragons_dragonshard
forgotten_realms_demon_stone
icewind_dale_2
icewind_dale_complete
journeyman_project_3
neverwinter_nights_diamond_edition
pillars_of_eternity
+> pillars_of_eternity_kickstarter_item
+> pillars_of_eternity_preorder_bonus
+> pillars_of_eternity_kickstarter_hero_bonus_goodies
planescape_torment
the_temple_of_elemental_evil
ultima_4

dukereg@dukereg-compy ~ $ lgogdownloader --list --platform 4
baldurs_gate_2_complete
baldurs_gate_the_original_saga
dragonsphere
planescape_torment

Obviously it starts downloading the Windows version if I use "--download", but does nothing but print a blank line if I use "--download --platform 4".

Any ideas or similar experiences with other games?
I noticed this also. It is caused by the platform detection code that I use.
https://github.com/Sude-/lgogdownloader/blob/master/src/downloader.cpp#L2053-L2064
It tries to speed up the detection of supported platforms for games by looking for platform identifier in the game shelf HTML. This fails because for some reason the 'data-title' attribute for Pillars of Eternity doesn't have Linux in it (and it is also missing Mac).

I have written a patch that allows skipping the fast platform detection. I'll commit it as soon as I've cleaned it up.

edit: committed
3834c1e Add option to skip fast platform detection
Post edited March 28, 2015 by Sude
2fc7fa8 Fix skipping some files due to uncleared API error state
Sometimes when trying to get XML data failed and set API error it was never cleared.
This caused some files being skipped due to API still being in error state.