Portable OpenRA for Linux

Discussion about the game and its default mods.
Post Reply
RazZziel
Posts: 4
Joined: Sun Jan 20, 2013 12:05 pm

Portable OpenRA for Linux

Post by RazZziel »

Hi there,

I'm trying to pack up a portable version of OpenRA, with Mono embedded, for http://www.portablelinuxgames.org/

I'm facing a problem: when I run the application, I get this error

Code: Select all

[raziel@Bebop openra]$ ./AppRun 
Usage:
If the game doesn't run, try using the Cg renderer ~/.openra/settings.yaml
like so:
Graphics:
        Renderer: Cg
Be careful to only use one indenting tab with 8 shift width.
Platform is Linux
Using Gl renderer
Desktop resolution: 1920x1080
No custom resolution provided, using desktop resolution
Using resolution: 1920x1080
Available mods:
        cnc: C&C (release-20121019)
        d2k: Dune 2000 (beta) ({DEV_VERSION})
        ra: Red Alert (release-20121019)
Exception of type `System.TypeInitializationException`: An exception was thrown by the type initializer for OpenRA.Support.PerfHistory
Inner Exception of type `System.TypeInitializationException`: An exception was thrown by the type initializer for System.Drawing.KnownColors
  Inner Exception of type `System.TypeInitializationException`: An exception was thrown by the type initializer for System.Drawing.GDIPlus
    Inner Exception of type `System.DllNotFoundException`: libc
      TypeName=``
        at (wrapper managed-to-native) System.Drawing.GDIPlus:uname (intptr)
  at System.Drawing.GDIPlus..cctor &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
      at System.Drawing.KnownColors..cctor &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
    at System.Drawing.Color.get_Red &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Support.PerfHistory..cctor &#40;&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Game.Initialize &#40;OpenRA.Arguments args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Program.Run &#40;System.String&#91;&#93; args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Program.Main &#40;System.String&#91;&#93; args&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
I have very little experience with .NET/Mono, so I don't really know what can be going on. Does any of you guys have an idea?

Run script (AppRun): http://pastebin.com/fuHsWywj
Contents of the package: http://pastebin.com/L0kv5pWg

Matt
Posts: 1155
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »


User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

The OSX builds of OpenRA used to ship with a stripped down version of Mono.

At the time (Mono 2.4 - 2.6), this required patching hardcoded library paths in the mono executable and support files, and also setting $LD_LIBRARY_PATH and $MONO_PATH before running the patched build.

Things are probably different with newer versions and Linux vs OSX, but these may be useful references:

builddeps.sh
OSX Launcher script
osx-deps-v4.zip

RazZziel
Posts: 4
Joined: Sun Jan 20, 2013 12:05 pm

Post by RazZziel »

Oops, sorry about the late reply, looks like the message notifier didn't work

Thanks a lot for the info and the scripts. I added the missing dependencies and tweaked some environment variables and mono parameters, but the error still persists.

What bugs me is that the error seems to be that mono is not able to find libc for some reason. It must be something about the binary patching needed to make mono run in a portable way. Ugly stuff.

I'll keep trying!

RazZziel
Posts: 4
Joined: Sun Jan 20, 2013 12:05 pm

Post by RazZziel »

I almost managed to get it working with the tool mkbundle, but libgdiplus.so somehow still resists to be found...

RazZziel
Posts: 4
Joined: Sun Jan 20, 2013 12:05 pm

Post by RazZziel »

I had to do some pretty nasty hacks, but in the end I think I got it working. I tested it on my Archlinux and on a Ubuntu 10.04 LiveUSB, so it should be pretty portable.

I uploaded the package to http://www.portablelinuxgames.org/. Feel free to test it out and report back any error, I'd appreciate that :)

Matt
Posts: 1155
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt »

We now allow a portable support directory since playtest-20130818 https://github.com/OpenRA/OpenRA/commit ... e01b4cc4cf

Post Reply