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'm currently working on a new linux gog downloader. This time using the OAuth API used by the official GOG Downloader. https://github.com/lhw/gogdownloader/
The wiki contains information about the API and current working status: https://github.com/lhw/gogdownloader/wiki
I hope to have this working by next month. I will create a headless downloader for homeservers and maybe a GUI downloader or similar.

Additionally I will start working on a few scripts to unpack and extract games for ScummVM and DOSBox. Some kind of one-click solution.
Not quite one-click yet but I'm getting there: https://gist.github.com/2963266 (ScummVM)

I'm currently working on getting innoextractor mainline debian (which also means it will land in Ubuntu). My package sponsor just didn't upload it yet. Till then you can find a ppa with the package here [url=https://launchpad.net/~arx/+archive/release]https://launchpad.net/~arx/+archive/release[/url] it's not mine so I can't guarantee for anything.
Post edited June 20, 2012 by lhw
Good stuff! May be in addition to the deb package it's good to have an option of making some tar.xz archive with an optional installation script so it'd be distro agnostic.

I don't really use GOG downloader - I simply use wget/curl with URL and referers taken from the browser (with resume options). Though the session can expire and sometimes one needs to update the URL, so having an automated tool for Linux is useful!
Post edited June 21, 2012 by shmerl
avatar
shmerl: Good stuff! May be in addition to the deb package it's good to have an option of making some tar.xz archive with an optional installation script so it'd be distro agnostic.
What do you have in mind? A self-extracting shell script? Or just a plain tar archive. Well the last one would be pretty easy. For the self-extracting script I would have to take a look at awk probably.
avatar
shmerl: I don't really use GOG downloader - I simply use wget/curl with URL and referers taken from the browser (with resume options). Though the session can expire and sometimes one needs to update the URL, so having an automated tool for Linux is useful!
Exactly. Downloading on linux is quite a hassle. The downloader doesn't work with mono because of WPF. And manually continuing files often leads to broken 2GB files. Well at least for me it did.
nice work on the documentation of the GOG API.
avatar
lhw: What do you have in mind? A self-extracting shell script? Or just a plain tar archive. Well the last one would be pretty easy. For the self-extracting script I would have to take a look at awk probably.
Probably archive package tar.xz, tar.bz2, zip or whatever, and a script (tailored for that package). So either one can unpack the package manually, or run script to install it. Manually unpacking self extracting package is less comfortable, but on the other hand self extracting binary/script is just one file with less hassle. If you provide an option there just to unpack (without installing), you'll cover both use cases using just one file as well.

Making deb will work for Debian and derivatives, but won't be good for other distors (RPM and even non RPM based ones).
Post edited June 21, 2012 by shmerl
avatar
shmerl: Probably archive package tar.xz, tar.bz2, zip or whatever, and a script (tailored for that package). So either one can unpack the package manually, or run script to install it. Manually unpacking self extracting package is less comfortable, but on the other hand self extracting binary/script is just one file with less hassle. If you provide an option there just to unpack (without installing), you'll cover both use cases using just one file as well.

Making deb will work for Debian and derivatives, but won't be good for other distors (RPM and even non RPM based ones).
I think this https://gist.github.com/2969494 should be working for you then. It asks for a target directory. Though there is no nice *.desktop file or anything. But I included the converted .ico
Ah, I didn't realize there is such tool as innoextract. You don't even need anything then, just unpack it with innoextract wherever you need to :)

(I see you already added it to prospected packages in Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678294 )

Having installing self extract is still nice, since you could use it in Fedora, openSUSE, Gentoo and etc. I use Debian anyway, but let's assume many GOG users can use different distros.
Post edited June 21, 2012 by shmerl
The package is already completed: http://anonscm.debian.org/gitweb/?p=collab-maint/innoextract.git;a=summary It just hasn't been uploaded yet. My sponsor is quite busy right now.
Hey, just found out about your project, looks pretty cool. I'll take a look at the code in the next few days and see if I can help.

As a coincidence, I've also been thinking about the problem of installing (or re-packaging) some of the games for Linux. I've started with Dragonsphere (which happens to be the game I'm playing now) and I ended up with a couple of scripts.

https://github.com/rafaelmessias/gog-installer

I'm assuming that the user already downloaded the game setup; I focus on the work of extracting the setup, choosing the important files, restructuring them in a more interesting way, applying a few tweaks if necessary (using info from the game's forum) and leaving the game's directory ready for the easiest possible way to run the game.

Since you're focusing more on downloading the games, I think we might be able to work together and make the two ends meet. Every game has a few individual quirks that must be addressed by the installer, but there are also many common parts that can be generalized. My ideal goal would be to have the biggest possible common script for all games and the smallest possible individual scripts for each game.
Just wanted to say thanks, I've been doing things the manual way so far :)
avatar
rmartins: Hey, just found out about your project, looks pretty cool. I'll take a look at the code in the next few days and see if I can help.

As a coincidence, I've also been thinking about the problem of installing (or re-packaging) some of the games for Linux. I've started with Dragonsphere (which happens to be the game I'm playing now) and I ended up with a couple of scripts.

https://github.com/rafaelmessias/gog-installer

I'm assuming that the user already downloaded the game setup; I focus on the work of extracting the setup, choosing the important files, restructuring them in a more interesting way, applying a few tweaks if necessary (using info from the game's forum) and leaving the game's directory ready for the easiest possible way to run the game.

Since you're focusing more on downloading the games, I think we might be able to work together and make the two ends meet. Every game has a few individual quirks that must be addressed by the installer, but there are also many common parts that can be generalized. My ideal goal would be to have the biggest possible common script for all games and the smallest possible individual scripts for each game.
I posted two versions of a shell script which basically turns an innosetup with scummvm content into a .deb or self-extracting tar in the first posts. If you are starting a all-purpose installer feel free to use my scripts or part of my scripts however you like. Consider them MIT/Expat licensed.

The gogdownloader really only take care of the downloading part but one could add a desktop component which would make use of your scripts. I will take a look at that as soon as the downloader ist working.
avatar
lhw: I posted two versions of a shell script which basically turns an innosetup with scummvm content into a .deb or self-extracting tar in the first posts. If you are starting a all-purpose installer feel free to use my scripts or part of my scripts however you like. Consider them MIT/Expat licensed.

The gogdownloader really only take care of the downloading part but one could add a desktop component which would make use of your scripts. I will take a look at that as soon as the downloader ist working.
Cool, I've been rethinking the whole thing these last few days. I started thinking about making individual scripts for each game, but that seems kinda far-fetched. So I went back to working on a generic installer. I've seen you ScummVM scripts, but so far I haven't tested any ScummVM games (only dosbox ones). I'll definitely check them.

So far I'm only extracting the innosetup file and deleting some of the less useful files. I'll add an option for "full-install": copying the game into a default path (like ~/.local/share), adding executable links on $PATH and desktop icons. Also an uninstall option.

The ideal thing would be if we had access to the post-install scripts inside innosetup. For example: it's not always easy to predict where we have to copy the dosbox.conf files. I'll maybe check the innoextract code and try to contribute too.
avatar
lhw: I'm currently working on a new linux gog downloader. This time using the OAuth API used by the official GOG Downloader. https://github.com/lhw/gogdownloader/
it segfaults for me..(token and secret obsucred just in case)
Program received signal SIGSEGV, Segmentation fault.
0x0804a902 in setup_handler (oauth=0x805acf0,
reply=0x8071558 "{\"result\":\"ok\",\"timestamp\":1341550492,\"game\":{\"title\":\"Beneath a Steel Sky\",\"icon\":\"\\/upload\\/images\\/2008\\/11\\/56aebdac6283fd249fd5dfa569ae5668fbf15ba6.jpg\",\"installers\ ":[{\"id\":0,\"path\":\"\\/beneath_a_"...) at util.c:10
10 oauth->msg->result = !strcmp(json_object_get_string(json_object_object_get(answer, "result")), "ok");
(gdb) p oauth
$1 = (struct oauth_t *) 0x805acf0
(gdb) p *oauth
$2 = {token = 0x81e6aa0 "xxxxxxxxxxxxxxxxxxxxxxxx",
secret = 0x805bf88 "xxxxxxxxxxxxxxxxxxxxxxx", error = 0x0,
msg = 0x0,
verifier = 0x805c148 "/beneath_a_steel_sky/extras/bass_manual.zip"}
Post edited July 06, 2012 by jasen13
avatar
jasen13: it segfaults for me..(token and secret obsucred just in case)
Program received signal SIGSEGV, Segmentation fault.
0x0804a902 in setup_handler (oauth=0x805acf0,
reply=0x8071558 "{\"result\":\"ok\",\"timestamp\":1341550492,\"game\":{\"title\":\"Beneath a Steel Sky\",\"icon\":\"\\/upload\\/images\\/2008\\/11\\/56aebdac6283fd249fd5dfa569ae5668fbf15ba6.jpg\",\"installers\ ":[{\"id\":0,\"path\":\"\\/beneath_a_"...) at util.c:10
10 oauth->msg->result = !strcmp(json_object_get_string(json_object_object_get(answer, "result")), "ok");
(gdb) p oauth
$1 = (struct oauth_t *) 0x805acf0
(gdb) p *oauth
$2 = {token = 0x81e6aa0 "xxxxxxxxxxxxxxxxxxxxxxxx",
secret = 0x805bf88 "xxxxxxxxxxxxxxxxxxxxxxx", error = 0x0,
msg = 0x0,
verifier = 0x805c148 "/beneath_a_steel_sky/extras/bass_manual.zip"}
Yes the token/secret should always be omitted they would allow others access to your collection. I fixed this bug in f2cd00c3. But it would be helpful if you would report bugs on github so I get notified and can fix them faster.