I glanced at Slashdot yesterday while bored and found an interesting article on the CDE packaging tool. An impressive piece of work, CDE automatically packages up all of your dependencies into a self-contained directory structure. If I wanted to package up Dungeons of Dredmor and to be able to guarantee that it would work on your computer, all I would have to do is to run CDE on my computer, where I know Dredmor works, and sha-zam! Instant package.
This is something I have been fretting about: how do we distribute Dredmor for Linux?
Never mind figuring out where to sell it, how do we even package up a binary that will work on everybody’s computers? CDE gives a good estimate for just how much stuff you need to pack with your binary in order to guarantee that it will work. Look at the “hello world” example in the video cast. That’s a *lot* of touched files – not atypical, but certainly enough that I wouldn’t want to have to go through the trial-and-error process needed to figure out what I needed to pack into my MojoSetup redistributable. I can’t trust CDE to do the work, either – CDE isn’t very careful about making sure that it doesn’t include anything in its package which would violate the GPL, so there’s a chance that a GPL’ed library could sneak its way into a redistributable package. For games using OpenGL, I would be very worried about CDE getting the bright idea to start including chunks of DRI, or proprietary GL drivers, in its redistributable as well. Ugh.
Still, you know what? It’s a nice idea, and it gives me some indication of what I will have to do in order to make sure that a Linux Dredmor binary runs everywhere.
The comments on Slashdot, however, are pretty sad and predictable. The Linux community, in their infinite wisdom, proceeds to flame the hell out of CDE. Most of their objections are tangentially related to the objections that have already been aired for, say, the FatELF project which aimed to add support to Linux for Universal Binaries. As with FatELF, everybody’s solution is the same: “We should all just be using package management.”
Here is what I want to say, and let my words be carried down from the mountaintops, written on tiny stone tablets:
Package management is not a universal panacea.
Package management does not guarantee that I can take my game, package it, sell it, and guarantee that the resulting binary will execute on your computer, my computer, and Derek’s computer, running Fedora, Slackware, and Ubuntu respectively. Package management isn’t standard across distributions, and package management is not an acceptable installation tool for commercial, closed-source software produced by independent software vendors. Package management doesn’t work on distributions that don’t exist yet – back when I started in the Linux biz, Ubuntu didn’t exist yet.
Closed source software exists. ISVs exist. Games are going to continue to be closed-source for all of their lifespan, or at least until their creators feel that they’ve shipped enough units to justify open sourcing it. Get used to it.
What is worse is that there is no *standard* way that I can build a game, as a binary, and guarantee that the resulting binary will work across all distributions. The best case scenario is that I include shared libraries for everything, target a “close enough” version of libc, write a shell-script that munges the library loading path, and then hope and pray. As a consequence, most Loki games no longer run on modern Linux distributions. (Conversely, I can build Dredmor on my Windows 7 machine and the resulting binary runs on Windows 95, 98, 2000, XP, Vista, and 7.)
I am not saying CDE is a solution. Of course it’s not. Arguably, FatELF may not have been a solution either; I’m sure some of the objections raised on the LKML and other places were perfectly reasonable, and I’m also sure that most of them could have been worked around through reasoned discussion and technical debate. Both of these projects are starting points for coming up with a solution, and every time anybody – usually somebody *outside* of the mainstream community of users, like Ryan or Philip – tries to make my life easier, I get to watch as the Linux community demonstrates that it is totally uninterested in providing ISVs with a mechanism that will let them install software, across distributions and across systems, and which will guarantee that the resulting binary will work. At the same time, everyone likes to complain about how no commercial game developers want to support Linux… and then wonder why Windows continues to dominate on the desktop.
I have supported Linux game development for ten years, and I will continue to support Linux game development at Gaslamp. That said, some days it’s sure not easy.