Jump to content

Portable 0ad for Linux


RazZziel
 Share

Recommended Posts

Hi, I've been packaging 0ad for Linux, I've uploaded a package to https://sourceforge.net/projects/pg4l/files/0%20A.D./0%20A.D.%20a11-r1/download. Feel free to give it a try and tell me if it works correctly on your machine, or if forgot to add any dependency (all dependencies should be included in the package). More info about the file format in http://www.barros2.o...ablelinuxgames/ and http://portablelinuxapps.org/

I've found a problem with 0ad having hardcoded absolute paths (/usr/share/0ad/data/ in particular), which makes the game difficult to make portable, but I kind of solved it with good old sed -e "s/\/usr\/share\/0ad\/data/\.\/..\/share\/0ad\/data/g" right in the pyrogenesis binary.

Cheers,

Ismael

Edited by RazZziel
Link to comment
Share on other sites

  • 2 weeks later...

I googled a little, and looks like you need to have ia32-libs installed. Also you can try this out: http://blog.linuxmint.com/?p=2211

Anyway, the packages definitely need more testing and documentation, I should install some VMs with different typical Linux distros. Thanks a lot for trying!

I've been thinking about how to add 64bit support, and it looks difficult. It'd be much easier if something like fatelf was commonplace, but I'm afraid it won't happen anytime soon...

Link to comment
Share on other sites

I've found a problem with 0ad having hardcoded absolute paths (/usr/share/0ad/data/ in particular), which makes the game difficult to make portable, but I kind of solved it with good old sed -e "s/\/usr\/share\/0ad\/data/\.\/..\/share\/0ad\/data/g" right in the pyrogenesis binary.

Can't you just use the -writableRoot command line option? See readme.txt.

Link to comment
Share on other sites

Can't you just use the -writableRoot command line option? See readme.txt.

Wouldn't think so, the data root is actually read-only (it's inside an ISO image, and mounted on the fly, but still read only)

The problem is that the data directory is expected to be in /usr/share/0ad/data, which doesn't exist, as the data directory will be inside /tmp/some_random_mountpoint/usr/share/0ad/data, or ../share/0ad/data, relative to the usr/bin directory from where 0ad is launched. However it's is not a huge issue, a simple sed hack on the 0ad binary fixes the problem. I think the only possible problem would be that, besides not being very elegant, it does change the binary md5, which in some games is used as an anticheat method AFAIK.

Link to comment
Share on other sites

Wouldn't think so, the data root is actually read-only (it's inside an ISO image, and mounted on the fly, but still read only)

The problem is that the data directory is expected to be in /usr/share/0ad/data, which doesn't exist, as the data directory will be inside /tmp/some_random_mountpoint/usr/share/0ad/data, or ../share/0ad/data, relative to the usr/bin directory from where 0ad is launched. However it's is not a huge issue, a simple sed hack on the 0ad binary fixes the problem. I think the only possible problem would be that, besides not being very elegant, it does change the binary md5, which in some games is used as an anticheat method AFAIK.

Oops, I misunderstood how the portable build is meant to work. But there's no hardcoded paths in 0 A.D. unless you use the specific build options, otherwise custom SVN builds of the game wouldn't work with the bundled data (which is most certainly located in arbitrary relative paths) :)

Link to comment
Share on other sites

  • 3 months later...
  • 9 months later...

Gaaaah, I'm sorry idanwin, forum didn't notify me

libfuse and glib need to be installed in the system in order to run AppImages, and they're installed by default on most distros (except minimalistic ones like TinyCore). What distro are you using? If you're in a 64bit system with multilib support installed, it may also happen that you lack the 32bit version of libfuse, because for instance in Ubuntu it's pretty tricky to install. I'm working on a script to automate the process, a preliminary version can be found here: https://github.com/RazZziel/p4gl/blob/master/setup64bitSystemForAppImages

By the way, I'm packing 0 A.D. Alpha 15, to celebrate the victory of the Linux Game Awards contest. I'm finding that in most Live Ubuntus I try the game on, the game runs out o the box, but the ground inside the game is always black until I disable shadows. I receive several shader compilation errors: http://pastebin.com/kzbHiQSG. System info on Mint 15: http://pastebin.com/eUeS7dY3 and main log: http://pastebin.com/WkxSz0wn. Is this a driver problem or a package problem? For now I'm workarrounding the error disabling shadows by default.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...