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

×
I do know that GOG Galaxy does provide full installer packages, I meant that if you download your games with the new download system, GOG does not guarantee stand-alone functionality if you zip the downloaded directory, transfer the zip file onto another computer without Galaxy, unpack it and try to start it. This was mentioned in the Alpha thread by some developers. You also can verify that by the Beneath a Steel Sky example.


Yes, we have to do some reverse engineering, if the protocol is not published.
Post edited May 06, 2015 by coffeecup
avatar
coffeecup: I do know that GOG Galaxy does provide full installer packages, I meant that if you download your games with the new download system, GOG does not guarantee stand-alone functionality if you zip the downloaded directory, transfer the zip file onto another computer without Galaxy, unpack it and try to start it. This was mentioned in the Alpha thread by some developers. You also can verify that by the Beneath a Steel Sky example.
I guess it depends where the downloaded files are placed. It can be client specific setting and not dictated by the protocol. In such case if you write a client which will put all files into some singular location, this can be avoided. All that can be left up to configuration I think. You don't need to mimic GOG client 1:1.
Post edited May 06, 2015 by shmerl
avatar
coffeecup: I do know that GOG Galaxy does provide full installer packages, I meant that if you download your games with the new download system, GOG does not guarantee stand-alone functionality if you zip the downloaded directory, transfer the zip file onto another computer without Galaxy, unpack it and try to start it. This was mentioned in the Alpha thread by some developers. You also can verify that by the Beneath a Steel Sky example.
let me quote an answer from a dev in the Beta thread:

the only reason why games installed by Client are not trivially backupable yet is that the install script that is launched at the end of installation is not stored inside the installation folder to make it easy to re-launch it upon restoring that installation from whatever backup.

We plan to address during the beta, so every single of your installed games will be able to backed up at any time and by way you want, without any need to download the standalone installer.
from what I have read so far, it sounds as if they indeed move into the direction that quite a few wanted: just the game data + an installer script
if they then open up the API so that I can easily get that, then i would happily throw away the standalone installer.
I keep getting the following error when checking for orphans with version 2.21:

terminate called after throwing an instance of 'std::length_error'
what(): basic_string::replace
Aborted

The last line of output is "Getting game info 434 / 554"
avatar
immi101: if they then open up the API so that I can easily get that, then i would happily throw away the standalone installer.
I don't mind that as long this game directory is a self-contained and working WITHOUT GOG Galaxy installed. This is the whole point of my recent postings here.
Post edited May 09, 2015 by coffeecup
avatar
itchanddino: I keep getting the following error when checking for orphans with version 2.21:

terminate called after throwing an instance of 'std::length_error'
what(): basic_string::replace
Aborted

The last line of output is "Getting game info 434 / 554"
Could you try current git version with this patch
https://sites.google.com/site/gogdownloader/catch_length_error.diff
Might be this gem that is doing it (star_wars_republic_commando_copy3 is - of course - jedi knight: dark forces 2):

$ lgogdownloader --download --game star_wars_republic_commando_copy3
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::replace
Aborted

I don't think that patch helped.
avatar
Rixasha: Might be this gem that is doing it (star_wars_republic_commando_copy3 is - of course - jedi knight: dark forces 2):

$ lgogdownloader --download --game star_wars_republic_commando_copy3
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::replace
Aborted

I don't think that patch helped.
Backtrace from gdb with debug build would be helpful

make debug
gdb ./bin/Debug/lgogdownloader
run --download --game star_wars_republic_commando_copy3
bt
I applied the patch to the git version, and I still got the same error. Here's my output from backtrace:

#0 0x00007ffff59afcc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff59b30d8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff62ba6b5 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff62b8836 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff62b8863 in std::terminate() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff62b8aa2 in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff630a537 in std::__throw_length_error(char const*) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007ffff6315d2b in std::string::replace(unsigned long, unsigned long, char const*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x000000000041d200 in std::string::assign<__gnu_cxx::__normal_iterator<char*, std::string> > (this=0x7fffffffc600, __first=..., __last=...)
at /usr/include/c++/4.8/bits/basic_string.h:1158
#9 0x000000000044a570 in Downloader::getExtrasFromHTML (this=0x7fffffffda40,
html=..., gamename=..., gameid=...) at src/downloader.cpp:2326
#10 0x000000000043a772 in Downloader::getGameDetails (this=0x7fffffffda40)
at src/downloader.cpp:288
#11 0x000000000043ec0d in Downloader::download (this=0x7fffffffda40)
at src/downloader.cpp:782
#12 0x00000000004177a6 in main (argc=4, argv=0x7fffffffdf88) at main.cpp:521
avatar
itchanddino: I applied the patch to the git version, and I still got the same error. Here's my output from backtrace:

#0 0x00007ffff59afcc9 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff59b30d8 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff62ba6b5 in __gnu_cxx::__verbose_terminate_handler() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff62b8836 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff62b8863 in std::terminate() ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff62b8aa2 in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff630a537 in std::__throw_length_error(char const*) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007ffff6315d2b in std::string::replace(unsigned long, unsigned long, char const*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x000000000041d200 in std::string::assign<__gnu_cxx::__normal_iterator<char*, std::string> > (this=0x7fffffffc600, __first=..., __last=...)
at /usr/include/c++/4.8/bits/basic_string.h:1158
#9 0x000000000044a570 in Downloader::getExtrasFromHTML (this=0x7fffffffda40,
html=..., gamename=..., gameid=...) at src/downloader.cpp:2326
#10 0x000000000043a772 in Downloader::getGameDetails (this=0x7fffffffda40)
at src/downloader.cpp:288
#11 0x000000000043ec0d in Downloader::download (this=0x7fffffffda40)
at src/downloader.cpp:782
#12 0x00000000004177a6 in main (argc=4, argv=0x7fffffffdf88) at main.cpp:521
Thank you for the backtrace.
Apparently the error isn't in the obvious place that I expected it to be.
I'm interested in the output with this patch
https://sites.google.com/site/gogdownloader/catch_length_error_v2.diff
It should give more info on what goes wrong with the string assignment and works around the issue by setting the file name to "fileid.zip"
Running release build with this patch should give enough info.
avatar
Sude: Thank you for the backtrace.
Apparently the error isn't in the obvious place that I expected it to be.
I'm interested in the output with this patch
https://sites.google.com/site/gogdownloader/catch_length_error_v2.diff
It should give more info on what goes wrong with the string assignment and works around the issue by setting the file name to "fileid.zip"
Running release build with this patch should give enough info.
I ran it with the new patch and this is what happened (I removed the consumer_key, oauth_token, my username and harddrive info, wasn't sure if they could be used maliciously):

Length error:info 1 / 1
basic_string::replace
path.assign(url.begin()+url.find_last_of("/")+1, url.begin()+url.find_first_of("?"))
gamename = star_wars_jedi_knight_dark_forces_ii_copy3
file id = 39793
url =
url.find_last_of("/")+1 = 0
url.find_first_of("?") = 18446744073709551615
Setting filename to 39793.zip

HTTP ERROR: 403 (https://api.gog.com/downloader2/game/star_wars_jedi_knight_dark_forces_ii_copy3/installer_win_en?oauth_consumer_key=KEY&amp;oauth_nonce=l_FvnLBQix6cdb28mkbUdlmyIxhrkb&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1431274335&amp;oauth_token=TOKEN&amp;oauth_version=1.0&amp;oauth_signature=JRnIUD9SEjYd%2B9da5Py%2Bb60fTvE%3D)
Found nothing in https://api.gog.com/downloader2/game/star_wars_jedi_knight_dark_forces_ii_copy3/installer_win_en
HTTP ERROR: 403 (https://api.gog.com/downloader2/extra/star_wars_jedi_knight_dark_forces_ii_copy3/39793/?oauth_consumer_key=KEY&amp;oauth_nonce=0mf9KlUMEe9kkBlBay4XW5cp&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1431274336&amp;oauth_token=TOKEN&amp;oauth_version=1.0&amp;oauth_signature=Zu3T%2BzgCz2zKfCXVIist2BJxB%2F4%3D)
Found nothing in https://api.gog.com/downloader2/extra/star_wars_jedi_knight_dark_forces_ii_copy3/39793/
Downloading: sw_df_2_manual.zip
/media/USER/HARDDRIVE/GameBKUP/GOG.com Downloads/star_wars_republic_commando_copy3/sw_df_2_manual.zip
100% ▕██████████████████████████▏ 1.90/1.90MB @ 0.00kB/s ETA: 0s
HTTP ERROR: 404 (https://api.gog.com/downloader2/extra//39793/?oauth_consumer_key=KEY&amp;oauth_nonce=uGbkxoSNSa4FvSR_8tNDOI7HB&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1431274340&amp;oauth_token=TOKEN&amp;oauth_version=1.0&amp;oauth_signature=Q6it0CKXEbNiaU15pU3eMS1Xae0%3D)
Found nothing in https://api.gog.com/downloader2/extra//39793/
avatar
itchanddino: I ran it with the new patch and this is what happened (I removed the consumer_key, oauth_token, my username and harddrive info, wasn't sure if they could be used maliciously):
Good. I forgot to mention that you should remove those.

avatar
itchanddino: Length error:info 1 / 1
basic_string::replace
path.assign(url.begin()+url.find_last_of("/")+1, url.begin()+url.find_first_of("?"))
gamename = star_wars_jedi_knight_dark_forces_ii_copy3
file id = 39793
url =
url.find_last_of("/")+1 = 0
url.find_first_of("?") = 18446744073709551615
Setting filename to 39793.zip
Looks like the API call failed to get the url.
Try this patch
https://sites.google.com/site/gogdownloader/extras_redirect_location.diff
It should fix the problem by getting the url from redirect location of account page download link.

avatar
itchanddino: HTTP ERROR: 403 (https://api.gog.com/downloader2/game/star_wars_jedi_knight_dark_forces_ii_copy3/installer_win_en?oauth_consumer_key=KEY&amp;oauth_nonce=l_FvnLBQix6cdb28mkbUdlmyIxhrkb&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1431274335&amp;oauth_token=TOKEN&amp;oauth_version=1.0&amp;oauth_signature=JRnIUD9SEjYd%2B9da5Py%2Bb60fTvE%3D)
Found nothing in https://api.gog.com/downloader2/game/star_wars_jedi_knight_dark_forces_ii_copy3/installer_win_en
HTTP ERROR: 403 (https://api.gog.com/downloader2/extra/star_wars_jedi_knight_dark_forces_ii_copy3/39793/?oauth_consumer_key=KEY&amp;oauth_nonce=0mf9KlUMEe9kkBlBay4XW5cp&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1431274336&amp;oauth_token=TOKEN&amp;oauth_version=1.0&amp;oauth_signature=Zu3T%2BzgCz2zKfCXVIist2BJxB%2F4%3D)
Found nothing in https://api.gog.com/downloader2/extra/star_wars_jedi_knight_dark_forces_ii_copy3/39793/
Downloading: sw_df_2_manual.zip
/media/USER/HARDDRIVE/GameBKUP/GOG.com Downloads/star_wars_republic_commando_copy3/sw_df_2_manual.zip
100% ▕██████████████████████████▏ 1.90/1.90MB @ 0.00kB/s ETA: 0s
HTTP ERROR: 404 (https://api.gog.com/downloader2/extra//39793/?oauth_consumer_key=KEY&amp;oauth_nonce=uGbkxoSNSa4FvSR_8tNDOI7HB&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1431274340&amp;oauth_token=TOKEN&amp;oauth_version=1.0&amp;oauth_signature=Q6it0CKXEbNiaU15pU3eMS1Xae0%3D)
Found nothing in https://api.gog.com/downloader2/extra//39793/
If you get these when using the new patch then try running debug build to see if it gives more information
./bin/Debug/lgogdownload --download --game star_wars_jedi_knight_dark_forces_ii_copy3
Remove all the oauth tokens and consumer keys from the output and post the output, or send it to me in pm or email (lgogdownloader on gmail)
b5cdf10 Support new account page layout
avatar
Sude: b5cdf10 Support new account page layout
Got this error when I tried to update.

test -d bin/Debug || mkdir -p bin/Debug
test -d obj/Debug || mkdir -p obj/Debug
test -d obj/Debug/src || mkdir -p obj/Debug/src
g++ -std=c++11 -Wall -fexceptions -D_FILE_OFFSET_BITS=64 -g -DDEBUG -Iinclude -I/usr/include/rhash -I/usr/include/jsoncpp -c src/util.cpp -o obj/Debug/src/util.o
src/util.cpp: In function ‘void Util::getDownloaderUrlsFromJSON(const Json::Value&, std::vector<std::basic_string<char> >&)’:
src/util.cpp:353:34: error: base operand of ‘->’ has non-pointer type ‘Json::ValueIterator’
urls.push_back(it->asString());
^
make: *** [obj/Debug/src/util.o] Error 1
According to git pull, I was trying to update from d978498 to b5cdf10 so here's the relevant log excerpt:

ssokolow@monolith lgogdownloader [master] % git log d978498..b5cdf10
commit b5cdf10078ca237f2d467e0b9222d935a6441db0
Author: Sude <XXXXXXXXXXXXXXXXx>
Date: Tue May 12 02:19:16 2015 +0300

Support new account page layout

commit 21e6c6119d7bad94b6771a73f323e384576ca725
Author: Sude <XXXXXXXXXXXXXXXXx>
Date: Mon Apr 27 16:51:17 2015 +0300

Make progressbar display 10 second average download speed

commit 43ee08227c39559f0de417340b52b28a52d1bda2
Merge: d97849818e6a 9727b3f5c3c5
Author: Sude <XXXXXXXXXXXXXXXXx>
Date: Thu Apr 23 21:10:54 2015 +0300

Merge branch 'dlc-fix' of https://github.com/itoijala/lgogdownloader

commit 9727b3f5c3c5643c86ccba4e8c6996348e30fca3
Author: Ismo Toijala <XXXXXXXXXXXXXXXXx>
Date: Thu Apr 23 19:43:54 2015 +0200

Fix multiple DLCs when using cache
I'm on Lubuntu 14.04
Post edited May 12, 2015 by ssokolow
I have the same error on compiling, on Debian 7, did the same.