You are not logged in.

#1 2017-05-29 07:56:35

lamarpavel
Member
Registered: 2015-10-18
Posts: 48

Package management for proprietary installers (eg GOG games)

Every once in a while I am faced with installing games from gog.com. For those that have never done so: It's an installer that packs all data in a single archive and is wrapped in a shell script. Not as convenient as using pacman, but much more convenient than other game installers I have seen (eg. installing Unreal Tournament 2k4 from disk). Naturally those installers do not do any package management and so I have to figure out which packages are needed for any given game and then install them with pacman.

At this point a discrepancy occurs: When uninstalling the game I have to remember which packages I had installed earlier for the game to run. So far I simply checked the mtime of the game files to find out when the gog installer wrote them to disk and then grep pacmans log for everything installed in the hours afterwards. Kinda works, but is tedious and error prone.

At some point I tried creating dummy PKGBUILDS that simply list the dependencies for games but never managed to bring up the discipline to do it properly for every game.

Another idea I had was manually editing /var/log/pacman.log along the lines of

echo installing gog_somegame.sh >> /var/log/pacman.log

to quickly mark relevant places. I'm not sure about the implications of manually editing pacmans log though.

Are there commonly accepted solutions for this scenario?

Offline

#2 2017-05-29 08:40:14

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Package management for proprietary installers (eg GOG games)

Create proper PKGBUILDs that list the dependencies. Use the build/package functions to install the game to $pkgdir with the gog installer. If you can't install the game to a custom directory with the gog installer, download the files first, dump them in the directory with the PKGBUILD, add them as local sources (i.e. just add the filename to the source array), and install them with the install command.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2017-05-29 08:45:04

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Package management for proprietary installers (eg GOG games)

Well, UT2004 is probably the worst example, since it was distributed multiple times, in different patch-states with different installers - see ebuild tweaks.

I'd suggest, to keep things simple, just adding a game's package dependencies to an Arch wiki page.

Wrapping the game's installer within your distro's package manager is of course neater, but is substantially more effort, and barely worthwhile for most (almost all) people.

Offline

#4 2017-05-29 09:40:14

lamarpavel
Member
Registered: 2015-10-18
Posts: 48

Re: Package management for proprietary installers (eg GOG games)

Xyne wrote:

Create proper PKGBUILDs that list the dependencies. Use the build/package functions to install the game to $pkgdir with the gog installer. If you can't install the game to a custom directory with the gog installer, download the files first, dump them in the directory with the PKGBUILD, add them as local sources (i.e. just add the filename to the source array), and install them with the install command.

The gog installer launches a GUI and looking through the shell script it looks like this is inevitable. I'll manually have to download the installer anyway, the PKGBUILD could launch the installer but would probably have no idea where the game would be installed and could not be used for uninstalling the game data. This doesn't seem very clean I don't see much benefit in launching the installer from the PKGBUILD, hence why I would only use it for the dependencies.
But as I said, I tried that before and it requires discipline that I ended up neglecting.
It might be more motivating to use the AUR for this, but I'm not sure how well it is received to upload dummy PKGBUILDs there.

Offline

#5 2017-05-29 09:42:15

lamarpavel
Member
Registered: 2015-10-18
Posts: 48

Re: Package management for proprietary installers (eg GOG games)

brebs wrote:

Well, UT2004 is probably the worst example, since it was distributed multiple times, in different patch-states with different installers - see ebuild tweaks.

I'd suggest, to keep things simple, just adding a game's package dependencies to an Arch wiki page.

Wrapping the game's installer within your distro's package manager is of course neater, but is substantially more effort, and barely worthwhile for most (almost all) people.

I thought about this before and I remember a page were a bunch of games were listed with instructions to get them running, but that is even more inconvenient than having dummy PKGBUILDs for the dependencies and thus would be more prone to slacking...

Offline

#6 2017-05-29 10:22:36

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Package management for proprietary installers (eg GOG games)

The current gog installer seems to be a *.sh file that's packed with mojosetup .

unzip is able to extract the contents , makepkg should also be able to do it.

here's an existing AUR package https://aur.archlinux.org/packages/gog- … ed-edition

Last edited by Lone_Wolf (2017-05-29 10:24:42)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2017-05-29 10:38:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,517
Website

Re: Package management for proprietary installers (eg GOG games)

lamarpavel wrote:

But as I said, I tried that before and it requires discipline that I ended up neglecting.

So do you seek help learning discipline?  If so, you're asking on the wrong forum.  If you want the dependencies managed by pacman, make a PKGBUILD - it's really quite trivial to do so.  If you are unwilling or unable to do so, there is no magic wand that can do it for you.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2017-05-29 11:22:27

lamarpavel
Member
Registered: 2015-10-18
Posts: 48

Re: Package management for proprietary installers (eg GOG games)

Trilby wrote:
lamarpavel wrote:

But as I said, I tried that before and it requires discipline that I ended up neglecting.

So do you seek help learning discipline?  If so, you're asking on the wrong forum.  If you want the dependencies managed by pacman, make a PKGBUILD - it's really quite trivial to do so.  If you are unwilling or unable to do so, there is no magic wand that can do it for you.

Oh no, I'm just practical. From experience I know that it's unrealistic that I'll create a PKGBUILD, or update an existing one every time I install a GOG game, so I'm looking for other solutions. If there are no "better" ways to go about it I'll just have to deal with either putting in the effort or the annoyance of not having having done so (:

Lone_Wolf wrote:

The current gog installer seems to be a *.sh file that's packed with mojosetup .

unzip is able to extract the contents , makepkg should also be able to do it.

here's an existing AUR package https://aur.archlinux.org/packages/gog- … ed-edition

Very nice, thanks. I'll try and see if this works for all gog-installers I have.

Last edited by lamarpavel (2017-05-29 11:28:10)

Offline

#9 2017-05-29 12:37:47

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Package management for proprietary installers (eg GOG games)

lamarpavel wrote:

Oh no, I'm just practical. From experience I know that it's unrealistic that I'll create a PKGBUILD, or update an existing one every time I install a GOG game...

lamarpavel wrote:

Very nice, thanks. I'll try and see if this works for all gog-installers I have.

These replies are contradictory. Modifying the Baldur's Gate PKGBUILD to work with your gog installers will lead to new PKGBUILDs, i.e. you will be creating PKGBUILDs.

So far you've already proposed more complicated solutions such as creating dummy metapackages to manage deps. All you need to do is create a real PKGBUILD that includes the deps and upzips the game files. We're talking about a few lines in a text editor. You can't avoid the PKGBUILD if you want pacman to correctly manage the deps, and all of the other workarounds proposed so far are kludgy and prone to error. So far you've probably put more effort into avoiding it.

It's also bad form to ask for help then throw your hands up and say "actually, I'm too lazy and don't feel like doing this" when you get your answers. I might understand if we were talking about patching makepkg or doing something else far more involved that would require possibly repeated effort at regular intervals, but again, we're talking about some simple one-shot text editing. hmm


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#10 2017-05-29 13:17:23

lamarpavel
Member
Registered: 2015-10-18
Posts: 48

Re: Package management for proprietary installers (eg GOG games)

Xyne wrote:
lamarpavel wrote:

Oh no, I'm just practical. From experience I know that it's unrealistic that I'll create a PKGBUILD, or update an existing one every time I install a GOG game...

lamarpavel wrote:

Very nice, thanks. I'll try and see if this works for all gog-installers I have.

These replies are contradictory.

Yes indeed. But if you quote me fully rather than selectively they are not:

lamarpavel wrote:

Oh no, I'm just practical. From experience I know that it's unrealistic that I'll create a PKGBUILD, or update an existing one every time I install a GOG game, so I'm looking for other solutions. If there are no "better" ways to go about it I'll just have to deal with either putting in the effort or the annoyance of not having having done so (:

lamarpavel wrote:

Very nice, thanks. I'll try and see if this works for all gog-installers I have.

That could probably have been worded better, I admit.

Xyne wrote:

Modifying the Baldur's Gate PKGBUILD to work with your gog installers will lead to new PKGBUILDs, i.e. you will be creating PKGBUILDs.

So far you've already proposed more complicated solutions such as creating dummy metapackages to manage deps. All you need to do is create a real PKGBUILD that includes the deps and upzips the game files. We're talking about a few lines in a text editor. You can't avoid the PKGBUILD if you want pacman to correctly manage the deps, and all of the other workarounds proposed so far are kludgy and prone to error. So far you've probably put more effort into avoiding it.

It's also bad form to ask for help then throw your hands up and say "actually, I'm too lazy and don't feel like doing this" when you get your answers. I might understand if we were talking about patching makepkg or doing something else far more involved that would require possibly repeated effort at regular intervals, but again, we're talking about some simple one-shot text editing. hmm

I'm sorry if I came across as brushing off the answers, that was not my intention. I think I felt like disregarding PKGBUILDs because my previous attempts didn't seem like clean solutions. The prospect of automatically extracting the data from the gog-installer as part of the PKGBUILD pretty much changes that. Thanks again for the replies.

Last edited by lamarpavel (2017-05-29 13:18:33)

Offline

Board footer

Powered by FluxBB