Oooh, this is even neater: 0install

Help test release candidates for the next release
Post Reply
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Oooh, this is even neater: 0install

Post by Z-Man »

ZeroInstall is another one of those cross-distribution application installation systems. It's a lot more sophisticated than autopackage ever was and PortableLinuxApps strives to be, and yet it seems easier to build packages with it. Took maybe half an hour, and it would have been possible to let it work from binary archives we already have; I opted to create a binary tarball regardless for speed and simplicity. This system supports dependencies so we don't need to bundle all our libraries in every package. It automatically checks for updates periodically, developers can attach stability ratings to versions, users can override them. So if there's a bug in one version, everyone can mark it as bugged and until an update is out, the previous version will be used. We know this is going to be useful sooner or later :)

Further advantage over PortableLinuxApps in particular: native 64 bit support is possible. Not only that, but it also supports other Unixes (Unices?), Mac and Windows. I'll have to check what's up with that.

The downside: you need to install something before you can use it. Check out here for instructions: http://0install.net/users.html

After that, you can test-launch the latest armagetronad-alpha build via:

Code: Select all

0launch http://armagetron.kicks-ass.net/~manuel/stuff/0install/armagetronad-alpha.xml
(setting an alias via 0alias is not recommended right now, the URI is obviously temporary.)

Again, please test and report. Even though the single build in there is 32 bit, it worked well on 64 bit, though the system I tested on was already well prepared for that.

For Fedora 64 bit to work with the 32 bit binaries, you need "yum install compat-libstdc++*i686 mesa-libGLU.*i686 zlib-1*i686 zeroinstall-injector" as preparation. (Edited for trunk compatibility, edited again after dependency reduction)
Suse 32 bit (11.4) and Ubuntu 10.4 confirmed working as per official instructions.
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Oooh, this is even neater: 0install

Post by kyle »

I did not have much trouble on gentoo.
just had to

Code: Select all

emerge -av zeroinstall-injector
Then I had to download the libraries, apparently it does not get them automatically when you install it. Not really a big deal just remove it and reinstall. It seamed to work as well as 0.2.8 based normally works (I just prefer camera in trunk).
Image
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Oooh, this is even neater: 0install

Post by Z-Man »

kyle wrote:Then I had to download the libraries
Which libraries? Support libraries for zeroinstall or SDL and SDL_image?
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Oooh, this is even neater: 0install

Post by kyle »

sdl_image is what the error message was saying.
Image
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Oooh, this is even neater: 0install

Post by Z-Man »

Dang, that looks like something that shouldn't be happening. Can you clear out the cache (chmod -R 755 ~/.cache/0install.net; rm -rf ~/.cache/0install.net), try again with

Code: Select all

0launch -v http://armagetron.kicks-ass.net/~manuel/stuff/0install/armagetronad-alpha.xml
(just the -v changed)
And if there are still problems, paste the console output of that here?
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Oooh, this is even neater: 0install

Post by kyle »

I used 0store manage to clear it out.
After that I got it to work.
Image
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Oooh, this is even neater: 0install

Post by Z-Man »

I'm in love and want to get married :)

Permanent feed locations (not on armagetronad.net because I have quicker access on simamo):

Code: Select all

0alias 0armagetronad http://simamo.de/0install/armagetronad.xml
0alias 0armagetronad-beta http://simamo.de/0install/armagetronad-beta.xml
0alias 0armagetronad-alpha http://simamo.de/0install/armagetronad-alpha.xml
0alias 0armagetronad-experimental http://simamo.de/0install/armagetronad-experimental.xml
Gives you instant access to all our code stability branches in reasonably recent versions. The 0 prefix can be omitted, of course; I just have it here so the aliases don't conflict with the ppa builds. And actually, you can get all versions from the armagetronad.xml feed: it includes the other three as subfeeds. If you prefer, you can get your favorite flavor by running

Code: Select all

0armagetronad --versions
right clicking on Armagetron Advanced, picking "Show Versions" (That's also where you can mark specific versions as bugged so you revert to the previous one until a fix is out) and selecting your Preferred Stability there. Stable gives you official final builds (0.2.8.2.1, soon 0.2.8.3.2), Testing gives beta builds (0.2.8.3.2-rc1) and Developer gives you Trunk builds (0.3_alphaX). Yeah, there are just three choices, so there is no way to get the 0.2.8 snapshots this way, for them, you either just use the armagetronad-alpha.xml feed or pick Developer stability and use

Code: Select all

0launch --before 0.3-pre http://simamo.de/0install/armagetronad.xml
So yeah, that's a bit complicated, so why put all versions into the same feed? Three reasons: it's easy to do, some people may prefer the single feed way, and so that this script can do its magic:

Code: Select all

#/bin/bash
# plays back arma recording
# usage: multiplayback <recording> <additional arguments to client>

VERSION=$(head -n 3 "$1" | grep VERSION | sed -e "s,VERSION L,," )
ZEROVERSION=$(echo ${VERSION} | sed -e "s,_,-,g" -e "s,-alpha,-pre0.," -e "s,-beta,-pre1.," -e "s,\.-z,.," )
echo Version: "${VERSION} (${ZEROVERSION})"

0launch --not-before=$ZEROVERSION --before $ZEROVERSION.0.0.0.0.1 http://simamo.de/0install/armagetronad.xml --playback "$*"
Yep, it plays back any recording, provided the version it was done with is in 0install.

If you absolutely want to be sure you're running the latest builds, you can edit the aliases. They're just shell scripts in ~/.local/bin. For example,

Code: Select all

#!/bin/sh
if [ "$*" = "--versions" ]; then
  exec 0launch -gd 'http://simamo.de/0install/armagetronad-experimental.xml' "$@"
else
  exec 0launch -c -r 'http://simamo.de/0install/armagetronad-experimental.xml' "$@"
fi
as 0armagetronad-experimental will always check whether it's up to date (-r) and not bother you with a popup window (-c). Actually, I'd recommend putting the "-c" in all of them, it avoids the popup when it checks for updates and just makes them.

The overhead is really low: if no online checks are done, it's about 70 ms per launch for me (the portable app has about 200 ms launch overhead) and a bit under one second with online update checks (more, of course, if downloads need to be made).

And if you check out the trunk build, you'll notice it's split up into main, data and library packages. The data package consists of all the big data blocks unlikely to change from one build to the next (sound, music, graphics) and the libraries are even more stable (I'll try to properly factor them out and use existing feeds when available). This minimizes download bandwidth and storage usage. A little code change was required to make the game find the data in the separate package.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Oooh, this is even neater: 0install

Post by Z-Man »

New special feed:

Code: Select all

0alias 0armagetronad-stable http://simamo.de/0install/armagetronad-stable.xml
Just gives official releases. In case you want to mess with the preferences of the full feed and want a fallback to a known sane version, say for tournament play or making recordings.

Also, I put some 64 bit builds in there, one for each feed. A tiny problem there, though: if you're on 64 bit, 0install will assume a native build is *better* than a 32 bit build, but there is no way to tell it to never get 32 bit builds. Right now, the most recent builds all have both 32 and 64 bit builds, and you'll get the 64 bit build. But If a new version comes out only with a 32 bit build for it (and it will, 64 bit builds are like Windows builds, I need to fire up a different machine), you'll fetch that. So if you want to use the feeds already given, you'll need to either mark the non-working 32 bit builds as bugged or make your system 32 bit enabled (I just made that a bit easier by reducing the external dependencies).

Of course, we can't have that. So for every feed mentioned so far, there is a feed with added extension "-Linux-x86_64" and you can use

Code: Select all

0alias 0armagetronad http://simamo.de/0install/armagetronad-Linux-x86_64.xml
0alias 0armagetronad-stable http://simamo.de/0install/armagetronad-stable-Linux-x86_64.xml
0alias 0armagetronad-beta http://simamo.de/0install/armagetronad-beta-Linux-x86_64.xml
0alias 0armagetronad-alpha http://simamo.de/0install/armagetronad-alpha-Linux-x86_64.xml
0alias 0armagetronad-experimental http://simamo.de/0install/armagetronad-experimental-Linux-x86_64.xml
Those give you only 64 bit builds. You won't be as up to date, but run native code only. (There also are -Linux-i486 feeds, of course.)

Now, off to solve the library problem: currently, all the libraries supplied by us are used. How do we make it so that it defaults to system libraries whenever they're available? Or, better, whenever they're available and newer than the packed stuff? Or even better, not download anything at all if something better is already available? (Might be easiest, 0install helps there, for the others, some meddling with LD_LIBRARY_PATH in custom scripts would be required.) Oh, and then: ship new library binaries, but have the executable linked against really old ones.

Edit: aand Windows is working, too. The UI there isn't feature complete yet, though, there seems to be no good way to make aliases/start menu entries/favorites. Bummer. Still, it installs itself into the path by default, so at least this can be useful for a cross-platform Universal Playback App written in Python.

The Mac side seems to require Leopard, which I don't have and won't get.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Oooh, this is even neater: 0install

Post by Z-Man »

For the Windows users: the attached installer creates the shortcuts for you. Requirements:
- a regular AA version already installed, for the Icon.Yeah, stupid, but I didn't want to actually install something, just shortcuts you can delete yourself.
- 0install for Windows, obviously.
Desktop shortcuts and start menu entries start the game regularly, and in the start menu (Armagetron Zeroinstall Tools) there is a submenu called Setup where the shortcuts will launch the GUI where you can select versions to use.

Oh yeah, as a side effect of this, I automated the Windows builds, at least the trunk ones. They're now done using Wine (for maximal guaranteed equality to actually doing them on Windows) on the same machine doing the Linux builds. So their schedule has been upgraded from "when I can be arsed" to "every snapshot where the build isn't broken because nobody bothered to test". Whether that's going to be an actual improvement remains to be seen.
You do not have the required permissions to view the files attached to this post.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Oooh, this is even neater: 0install

Post by Z-Man »

The feeds have moved from http://simamo.de/0install/ to http://0install.armagetronad.org/ . Full list on the wiki. We apologize for the inconvenience. And the extended downtime.

The Windows installer above does not work any more. Hmm, one download, I don't think I'll bother making a new one.
Edit: Won't bother. The new 0install system can create shortcuts and start menu entries and makes it obsolete.
Also, yeah, the Windows streams are still broken. Working on it.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Oooh, this is even neater: 0install

Post by Z-Man »

Another move you need to adapt to: http://0install.armagetronad.org/ -> https://0install.armagetronad.org/
We now support and enforce https. So a possible future secret thought police can still find out what game you were downloading, but not which version! I bet that is a relief to you all.

Also, Windows is fully supported now and seems to work fine. Both the game and Zero Install itself. The UI is oddly different, only the Windows one has a button where you can delete all non-current versions.

None of the crazy stuff (subscribe to special architecture specific feeds...) above is no longer required. Just subscribe to an architecture-less feed, you'll get the right builds.
Post Reply