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

×
using lgogdownloader 1.7 with no_extras patch

downloading a recently bought game:
$ lgogdownloader --directory /games/goodoldgames/ --download --game ^myst
reulsted in the download of all game fles amd extras to the single directory myst_5_end_of_ages which i recnelt purchased
but:
$ lgogdownloader --directory /games/goodoldgames/ --repair --game ^myst
resulted in the checking of the install files but not the extras which gave errors such as the following:
Repairing file /games/goodoldgames/myst_5_end_of_ages/myst5_making_of_video_hd.zip
XML: Using local file
XML: Parsing failed / not valid XML

is this expected behaviour? does "repair" only work on exes and bins?
if i move all my extra files into "extra" subdirectories will repair then work on them? (using the non patched version)

diziet

p.s. i've just found that doing a repair on alone in the dark only seems to recognise the setup_alone_in_the_dark.exe the other exes give the XML error i list above
Post edited September 07, 2012 by diziet_sma
avatar
diziet_sma: is this expected behaviour? does "repair" only work on exes and bins?
if i move all my extra files into "extra" subdirectories will repair then work on them? (using the non patched version)
Moving the files to extras subdirectory won't help.
GOG doesn't have the XML for extras so the downloader tries to use local file.
However if you haven't created a local XML using --create-xml there isn't any and it gives parsing error.
I probably should change it so that the error says local XML was not found.

avatar
diziet_sma: p.s. i've just found that doing a repair on alone in the dark only seems to recognise the setup_alone_in_the_dark.exe the other exes give the XML error i list above
That's weird. Are the other exes listed as extras?
avatar
Sude: Moving the files to extras subdirectory won't help.
GOG doesn't have the XML for extras so the downloader tries to use local file.
However if you haven't created a local XML using --create-xml there isn't any and it gives parsing error.
I probably should change it so that the error says local XML was not found.
could you give some examples of how to use --create-xml, from the usage list it seems that i have to run --creat-xml for every file that i have downloaded, in which case what should i call each xml file and what structure under .gogdownloader/xml should i have?

avatar
Sude: That's weird. Are the other exes listed as extras?
yes it seems that the other exes are listed as extras,

diziet
Post edited September 08, 2012 by diziet_sma
avatar
diziet_sma: could you give some examples of how to use --create-xml, from the usage list it seems that i have to run --creat-xml for every file that i have downloaded, in which case what should i call each xml file and what structure under .gogdownloader/xml should i have?
It creates the filename for the xml automatically from the input filename by appending .xml to it
Here is what I usally do after I've downloaded a game
cd to extras subdirectory
for i in *.zip; do lgogdownloader --create-xml "$i" --chunk-size 2; done

alternatively when I update/create xml for many games
find . -name "*.zip" | while read line; do lgogdownloader --create-xml "${line}" --chunk-size 2; done

avatar
diziet_sma: yes it seems that the other exes are listed as extras,
Sadly I don't think there's anything I can do about that. GOG should move those exes to the installers list.
I was able to login and list my games, however, anything I try to download sits at 0.00 kB/s with a nan% complete. Does anyone have any clues what I'm doing wrong? I've tried a few games in different directories and it just won't start.

Getting game info 1 / 1
Downloading cover beneath_a_steel_sky/cover_0.jpg
-nan% [ ] 0.00/0.00MB @ 0.00kB/s
this is my fourth attempt to reply post no 33 :) only this time i'm trying it as a new post, the other attempts just seemed to disappear into the ether.

using sude's one liner i can make the xml files for the extras, it occurs to me that a nice addition to lgogdownloader would be an option to automagically create the xml files during the download

anyway, i've just bought 7th guest and using lgogdownloader to fetch it. yey!

diziet
avatar
skeaser: I was able to login and list my games, however, anything I try to download sits at 0.00 kB/s with a nan% complete. Does anyone have any clues what I'm doing wrong? I've tried a few games in different directories and it just won't start.

Getting game info 1 / 1
Downloading cover beneath_a_steel_sky/cover_0.jpg
-nan% [ ] 0.00/0.00MB @ 0.00kB/s
I guess it doesn't get connection to server. Perhaps the image host was down?
Try downloading with --no-cover

If it works with --no-cover you could add a timeout to curl connection by adding this to src/curlhandle.cpp at the end of curlhandle::curlhandle() function
this->setopt(CURLOPT_CONNECTTIMEOUT, 5);

That should make CURL timeout after 5 seconds and abort the transfer. The downloader should then move on to the next file.

avatar
diziet_sma: a nice addition to lgogdownloader would be an option to automagically create the xml files during the download
I'll add that to my list of things to do when I get the time. A simple solution would be to call createXML in main.cpp at line 974
createXML(filepath, config->iChunkSize);
Post edited October 09, 2012 by Sude
Hi Sude. Thanks very much for programming this. I'm having exactly the same problem as skeaser. Running Ubuntu 12.04, and compiled using the workaround on this thread & your recommended repo for libauth upgrade. --no-cover doesn't help. I'm a massive noob, and don't know what log file to look in (for any problem, not just this one) sadly, so I can't tell you much more than that!
I had some free time so I updated this to work better with the new API changes and added automatic XML creation.

LGOGDownloader 1.8
- GOG started using strings in installer ids; id in gameFile class is now std::string instead of int. All API functions changed to reflect this change.
- Use ["game"]["win_installer"] node from JSON instead of ["game"]["installers"] node. No Mac installer support currently.
- Automatic XML creation for extras. Use "--create-xml automatic" to enable.
- Timeout libcurl connection request after 5 seconds.
- Added Warsow to free games alias

New functions:
* api.h - void API::clearError()
* util.h - std::string Util::intToString(int)

Listing and automatically downloading updated files got broken with the new site changes and the feature is not fixed in this version.

https://sites.google.com/site/gogdownloader/lgogdownloader-1.8.tar.gz
Post edited November 03, 2012 by Sude
Hey, this looks pretty neat! Is there an Ubuntu PPA with this in anywhere? :)

P.S. Haha, loving the licence!
Post edited November 08, 2012 by MrPopinjay
hey sude, just downloaded 1.8, compiles and works fine on my x64 main machine, but i wanted to compile and run it on my i598 server box over night since i just bought a wack of games:)
i managed to compile it okay but when it runs it just stops with
-nan% [ ] 0.00/0.00MB @ 0.00kB/s
i've tried --no-cover as you suggested to skeaser above, but no joy, my server and main box both run mageia2 just one is x64 and the other i586 any ideas?

also, i had wanted to share the xml directory between the two boxes on a share, any chance of maybe being able to specify the location of the xml files?

diziet
LGOGDownloader 1.9
- Some instances of integer to string conversions that I missed the last time have been changed to use Util::intToString
- Added lots of debug info to be printed when using debug build
- Added --xml-directory to set the directory for GOG XML files

Listing and automatically downloading updated files is still broken in this version.
The debug build prints everything to stderr so you can log all the info to file by using "lgogdownloader [options] 2> debug_log.txt"

http://sites.google.com/site/gogdownloader/lgogdownloader-1.9.tar.gz


avatar
MrPopinjay: Hey, this looks pretty neat! Is there an Ubuntu PPA with this in anywhere? :)

P.S. Haha, loving the licence!
Don't know about the PPA since I use Debian.

avatar
diziet_sma: hey sude, just downloaded 1.8, compiles and works fine on my x64 main machine, but i wanted to compile and run it on my i598 server box over night since i just bought a wack of games:)
i managed to compile it okay but when it runs it just stops with
-nan% [ ] 0.00/0.00MB @ 0.00kB/s
i've tried --no-cover as you suggested to skeaser above, but no joy, my server and main box both run mageia2 just one is x64 and the other i586 any ideas?

also, i had wanted to share the xml directory between the two boxes on a share, any chance of maybe being able to specify the location of the xml files?

diziet
Does it timeout after 5 seconds?
Try running 1.9 debug build to see if anything weird happens that gets logged
make -j`expr $(grep -c ^processor /proc/cpuinfo) + 1` debug
sudo install bin/Debug/lgogdownloader /usr/bin
lgogdownloader options 2> log.txt
hi sude,

quick response on the xml directory option, nice :)

haven't tried it yet, still trying to get my i586 compiled version to work,
using the debug binary and selecting to download from scratch into a brand new directory:
$mkdir test
$cd test/
$~/downloads/lgogdownloader-1.9/bin/Debug/lgogdownloader --download 2> ~/lgog.log
Getting game info 61 / 61
Downloading cover the_7th_guest/cover_0.jpg
-nan% [ ] 0.00/0.00MB @ 0.00kB/ss

and it just hangs there, the contents of lgog.log is 4807 lines the last few of which are:

"title" : "Wing Commander ®: Privateer ™",
"win_installer" :
[

{
"id" : "1_installer_0",
"path" : "/wc_privateer/setup_wing_commander_privateer.exe",
"size_mb" : "78"
}
]
},
"result" : "ok",
"timestamp" : 1352594212
}

wing_commander_privateer being indeed my last alphabetically sorted game :), no matter how long i let the above command run before CTRL-C'ing it the log file stays at a constant 4807 lines with no indication of any attempt to do anything after listing the last game

$ ls
the_7th_guest/

and in there is a 0 size file cover_0.jpg

the 64bit binary seems to work fine

diziet
avatar
MrPopinjay: Hey, this looks pretty neat! Is there an Ubuntu PPA with this in anywhere? :)
I finally got around to put this up at my PPA, and in true spirit of the WTFPL license I did not ask Sude for permission to do so :)
Available for Ubuntu 12.10 at https://launchpad.net/~gabriel-thornblad/+archive/lgogdownloader
Hopefully this can be of some use for Ubuntu users who wants to try this awesome downloader.

avatar
diziet_sma: i managed to compile it okay but when it runs it just stops with
-nan% [ ] 0.00/0.00MB @ 0.00kB/s
Are you sure you tried the debug build? I had the same trouble with the 32-bit build when using compiler optimization (-O2). After I removed that (or used the debug build) it worked fine.
avatar
diziet_sma: i managed to compile it okay but when it runs it just stops with
-nan% [ ] 0.00/0.00MB @ 0.00kB/s
avatar
gthornblad: Are you sure you tried the debug build? I had the same trouble with the 32-bit build when using compiler optimization (-O2). After I removed that (or used the debug build) it worked fine.
i compiled using the following:
make -j`expr $(grep -c ^processor /proc/cpuinfo) + 1` debug

which made a binary in bin/Debug which is the one i used

diziet