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

×
Hello all,

the new Debian Wheezy Packages (32 and 64bit) for LGOGDownloader 2.17 are now available from the repository(*) and from here:

http://mash-systeme.de/sites/default/files/downloads/lgogdownloader_2.17-1_amd64.deb
http://mash-systeme.de/sites/default/files/downloads/lgogdownloader_2.17-1_i386.deb

(*) deb http://mash-systeme.de/debian/ wheezy main
avatar
eiii: Now my question: I do not understand the option "--create-xml automatic". It seems to make no difference if I set this option or not. I always get the same XML files (for the game installers but not for other downloaded files). Does this option only work when you download a file the first time? Or what is this option meant for?
With "--create-xml automatic" the downloader should automatically create XML data for a file after it finishes downloading if the downloader doesn't get XML data from GOG and libcurl returns CURLE_OK. Mainly this affects the extras because GOG doesn't provide XML data for extras.
It probably fails on resume attempts of already completed downloads because libcurl returns CURLE_RANGE_ERROR

src/downloader.cpp line 815

Changing the condition to this

if (config.sXMLFile == "automatic" && (result==CURLE_OK || result==CURLE_RANGE_ERROR))
will make the downloader create xml for extras even on resume attempts
However the downside is that it will create xml on every resume attempt

Checking for previously created XML file is probably better.

boost::filesystem::path path = filepath;
std::string filepathXML = config.sXMLDirectory + "/" + games[i].gamename + "/" + path.filename().string() + ".xml";
if (config.sXMLFile == "automatic" && (result==CURLE_OK || result==CURLE_RANGE_ERROR) && !boost::filesystem::exists(filepathXML))
Using this will create XML data on resume attempts but skips the XML creation if old data exists.
Let me know if this works as intended and I'll add it to git later
Post edited August 30, 2014 by Sude
Thanks for the bugfix and the release!

avatar
Sude: LGOGDownloader 2.17
* Add DESTDIR variable to Makefile to allow easier packaging
Can you please extend this two ways:
1. add PREFIX and use it instead of /usr (e.g., for non-root installs or /opt or whatever)
2. add MANDIR and use it instead of share/man (some operating systems prefer plain 'man')

Thank you.
avatar
Loenas: Can you please extend this two ways:
1. add PREFIX and use it instead of /usr (e.g., for non-root installs or /opt or whatever)
2. add MANDIR and use it instead of share/man (some operating systems prefer plain 'man')
Does this work ok?
https://sites.google.com/site/gogdownloader/makefile_prefix_mandir.diff
avatar
Sude: With "--create-xml automatic" the downloader should automatically create XML data for a file after it finishes downloading if the downloader doesn't get XML data from GOG and libcurl returns CURLE_OK. Mainly this affects the extras because GOG doesn't provide XML data for extras.
Ok, so when I would have used "--create-xml automatic" from the first download and would have used it on every download I would have had all the XML files now, right?

avatar
Sude: It probably fails on resume attempts of already completed downloads because libcurl returns CURLE_RANGE_ERROR
[..]
Using this will create XML data on resume attempts but skips the XML creation if old data exists.
Let me know if this works as intended and I'll add it to git later
Recreating the XML files on each resume sounds not like a good idea, checking if the XML file exist is definitely the better way. Though there's still the risk that the XML is created from an already corrupted local file. I'm not sure if it's better to automatically do this or leave it as it is and let the user create the XML files explicitly when needed. It's probably more convenient to automatically create all missing XML files.
avatar
Loenas: Can you please extend this two ways:
1. add PREFIX and use it instead of /usr (e.g., for non-root installs or /opt or whatever)
2. add MANDIR and use it instead of share/man (some operating systems prefer plain 'man')
avatar
Sude: Does this work ok?
https://sites.google.com/site/gogdownloader/makefile_prefix_mandir.diff
Yes. But while testing that, I found that the Makefile uses "install -D" which only Linux supports (not *BSD, not OS X). Please pre-create the directories, e.g. using "install -d". Usually DESTDIR is completely empty.
corrected..
Post edited September 03, 2014 by DonCorleon
lgogdownloader doesn't download the surgeon simulator DLC for me.
In the game card it's listed as
https://www.gog.com/downlink/surgeon_simulator_anniversary_edition/en1installer1
while the game itself is listed as
https://www.gog.com/downlink/surgeon_simulator_2013/en1installer1
so perhaps the changing path is a problem?
avatar
Loenas: lgogdownloader doesn't download the surgeon simulator DLC for me.
In the game card it's listed as
https://www.gog.com/downlink/surgeon_simulator_anniversary_edition/en1installer1
while the game itself is listed as
https://www.gog.com/downlink/surgeon_simulator_2013/en1installer1
so perhaps the changing path is a problem?
The different name shouldn't matter.
Actually the downloader expects DLC to have different name:
https://github.com/Sude-/lgogdownloader/blob/master/src/downloader.cpp#L2022-L2040

Does the game have DLC counter on the game shelf? (div with class="shelf-game-dlc-counter")
Does the DLC link div have "data-gameindex" attribute?
https://www.gog.com/upload/forum/2014/09/da25e106d9f946ca4f98e48056fb3477bebf2cfe.jpg
Attachments:
untitled.jpg (376 Kb)
Post edited September 05, 2014 by Sude
The new --cover option breaks my convenience solution for shell aliasing because it seems to provide no way to set cover=true and then override that in the few shell aliases which are the excepton to the rule.

(Instead, I have to write a shell function which checks for existing covers, backs them up if present, runs lgogdownloader, deletes newly-downloaded covers, and then restores any backups it may have made.)

Also, I've ignored options like --repair until now but, with the Linux release of The Witcher 2 being a single tarball that's just under 20GiB in size (which will take almost 24 hours to download here), I'd really appreciate instructions on what set of options to pass to lgogdownloader to request "Download the requested things, creating new files and folders as necessary, but re-download as little data as possible when encounting incomplete or corrupted files and do it in a way which is compatible with Ctrl+C or a power failure interrupting LGOGDownloader's previous attempt.")

...in fact, to be honest, having that as the default behaviour is what any employably competent UI/UX designer would insist on.

I know it's not --repair --download because I seem to remember that being over-eager to re-download entire files and I know it's not --repair because that gives a 404 error when asked to download something new.
Post edited September 05, 2014 by ssokolow
avatar
ssokolow: The new --cover option breaks my convenience solution for shell aliasing because it seems to provide no way to set cover=true and then override that in the few shell aliases which are the excepton to the rule.

(Instead, I have to write a shell function which checks for existing covers, backs them up if present, runs lgogdownloader, deletes newly-downloaded covers, and then restores any backups it may have made.)
369e8bb Add --no-cover option back

avatar
ssokolow: Also, I've ignored options like --repair until now but, with the Linux release of The Witcher 2 being a single tarball that's just under 20GiB in size (which will take almost 24 hours to download here), I'd really appreciate instructions on what set of options to pass to lgogdownloader to request "Download the requested things, creating new files and folders as necessary, but re-download as little data as possible when encounting incomplete or corrupted files and do it in a way which is compatible with Ctrl+C or a power failure interrupting LGOGDownloader's previous attempt.")

...in fact, to be honest, having that as the default behaviour is what any employably competent UI/UX designer would insist on.

I know it's not --repair --download because I seem to remember that being over-eager to re-download entire files and I know it's not --repair because that gives a 404 error when asked to download something new.
Unfortunately there isn't a good way to do this other than running the downloader twice. First with --download to resume everything and then a second time with --repair to check and fix any possible corruptions.

This is a feature that I've been meaning to add to the dowloader for a while now but it's pretty painful to add because of the current structure of the downloader. This is one of the reasons I would like to restructure/rewrite the code.
I should have restructured the code a long time ago when I started adding more features and noticed that the current structure is bad. There's lots of duplicated code everywhere and some parts are really confusing due to multiple checks to accommodate all the new features.
However with Galaxy coming sometime soon (maybe?) and not knowing what happens to the old API, I don't really want to spend time on a rewrite just to realize that all the work was for nothing if/when the API gets discontinued.
Post edited September 05, 2014 by Sude
Just a question,

How to download the Linux version of "The Witcher 2" for example ?

If i launch "lgogdownloader --download --game the_witcher_2", i download the Windows version.

Thanks,

Edit : "man lgogdownloader" give me the solution.
Post edited September 05, 2014 by berillions
avatar
berillions: Just a question,

How to download the Linux version of "The Witcher 2" for example ?

If i launch "lgogdownloader --download --game the_witcher_2", i download the Windows version.

Thanks,
Here is how I did it:

lgogdownloader --download --no-extras --platform 4 --game the_witcher_2

(I already downloaded extras before with the Windows version).
Post edited September 05, 2014 by shmerl
avatar
berillions: Just a question,

How to download the Linux version of "The Witcher 2" for example ?

If i launch "lgogdownloader --download --game the_witcher_2", i download the Windows version.

Thanks,
By default the downloader will download Windows and Linux version (--platform 5). Use "--platform 4" to download Linux only.
avatar
Sude: By default the downloader will download Windows and Linux version (--platform 5). Use "--platform 4" to download Linux only.
May be it makes sense to give platforms mnemonic names and allow a comma separated list? I.e.:

--platform linux

or

--platform all

or

--platform linux,osx

and so on. It's going to be easier to guess for new users.
Post edited September 05, 2014 by shmerl