Installation OpenRA on Gentoo

using ebuild from unofficial repository

Discussion about the game and its default mods.
Post Reply
ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Installation OpenRA on Gentoo

Post by ddd »

OpenRA was included in portage tree tnx to hasufell. If you want have more fresh ebuilds of openra (aka playtests) you can try to add dr overlay.

To use the dr overlay you need to emerge layman and add that overlay:

Code: Select all

emerge -va layman
echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf
P.S. For Gentoo installations after 2012-09-09 you should use /etc/portage/make.conf instead of /etc/make.conf.

Code: Select all

nano -w /etc/layman/layman.cfg
Add "https://raw.github.com/cerebrum/dr/master/repo.xml" URL to your remote lists of overlays in layman.cfg like in example below:

Code: Select all

overlays  : https://api.gentoo.org/overlays/repositories.xml
            https://raw.github.com/cerebrum/dr/master/repo.xml
Add the dr overlay from the remote list to your locally installed overlays:

Code: Select all

layman -a dr
You can then regularly update to the latest reviewed revision:

Code: Select all

layman -s dr
or alternatively for all your layman overlays:

Code: Select all

layman -S
Allow install of openra unstable package:

Code: Select all

printf '%s\n' "games-strategy/openra" >> /etc/portage/package.accept_keywords
It is recommended to install dotnet overlay too and upgrade mono to the latest version.

Code: Select all

layman -a dotnet

Code: Select all

printf '%s\n' "dev-lang/mono" >> /etc/portage/package.accept_keywords

Code: Select all

emerge -1 dev-lang/mono
Then you may emerge OpenRA (game will be compiled from sources on your machine) from that overlay:

Code: Select all

emerge -av openra
(This ebuild only tested on amd64 branch, but you probably may test it on another one.)

You can also install some development tools such as editor by adding tools USE-flag into openra portage package.use.

If you have any questions you can ask me in IRC. But I recommend read the following manual first:

Code: Select all

less /usr/share/doc/openra-20150118/README.gentoo.bz2
(Your installed version of the game may differ)

P.S. P.S. The following posts there are outdated except of announcements of the new ebuilds in the end.
Last edited by ddd on Thu Jun 08, 2017 9:40 am, edited 17 times in total.

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

New ebuild commited, but you probably need to add to FETCHCOMMAND variable in '/etc/make.conf' parameter '--no-check-certificate':

Code: Select all

FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp --no-check-certificate  -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
If you are using app-portage/getdelta, then you probably need to change the following command in '/etc/deltup/getdelta.rc':

Code: Select all

# command to use for downloading
FETCH="/usr/bin/wget -c -t 1 --passive-ftp --no-check-certificate"
P.S. Since Thu Mar 10, 2011 8:44 pm you DOESN'T need to use '--no-check-certificate' option by adding to FETCHCOMMAND variable in '/etc/make.conf' ALREADY! ALL ebuilds are written with EAPI 2 NOW!
Last edited by ddd on Thu Mar 10, 2011 4:59 pm, edited 1 time in total.

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

New ebuild (20101107_alpha_rc1) added.

Use '--no-check-certificate' option for now.

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

I can't install OpenRA. New (20101121-2) version of OpenRA have the following bug:

Code: Select all

...
Installing OpenRA to /var/tmp/portage/games-strategy/openra-20101121_alpha_rc1-r1/image//usr/local/share/openra
cp: omitting directory `mods/cnc/bits'
cp: omitting directory `mods/cnc/chrome'
cp: omitting directory `mods/cnc/maps'
cp: omitting directory `mods/cnc/packages'
cp: omitting directory `mods/cnc/rules'
cp: omitting directory `mods/cnc/sequences'
cp: omitting directory `mods/cnc/tilesets'
cp: omitting directory `mods/cnc/uibits'
make: [install] Error 1 (ignored)
cp: omitting directory `mods/ra/bits'
cp: omitting directory `mods/ra/chrome'
cp: omitting directory `mods/ra/maps'
cp: omitting directory `mods/ra/packages'
cp: omitting directory `mods/ra/rules'
cp: omitting directory `mods/ra/tilesets'
cp: omitting directory `mods/ra/uibits'
make: [install] Error 1 (ignored)
cp: cannot stat `shaders': No such file or directory
make: *** [install] Error 1
It looks like you guys either forgave to exclude the following line from your Makefile:155

Code: Select all

 @cp -r shaders $(INSTALL_DIR)
or forgave to add 'shaders' path to new release package.

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

It looks like you forgave also to exclude the following line:

Code: Select all

Makefile:158
@$(INSTALL_PROGRAM) thirdparty/WindowsBase.dll $(INSTALL_DIR)
After exclusion of that 2 lines, I tried to execute OpenRA and it crashed with the following exception log:

Code: Select all

xor@ddd /usr/local/share/openra $ mono OpenRA.Game.exe Game.Mods=ra
Loading settings file /home/xor/OpenRA/settings.yaml
Using Gl renderer

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidProgramException: Unsupported GPU. OpenRA requires the GL_ARB_vertex_shader and GL_ARB_fragment_shader extensions.
  at OpenRA.Renderer.Glsl.GraphicsDevice..ctor &#40;Int32 width, Int32 height, WindowMode window, Boolean vsync&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at &#40;wrapper managed-to-native&#41; System.Reflection.MonoCMethod&#58;InternalInvoke &#40;object,object&#91;&#93;,System.Exception&&#41;
  at System.Reflection.MonoCMethod.Invoke &#40;System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object&#91;&#93; parameters, System.Globalization.CultureInfo culture&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke &#40;System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object&#91;&#93; parameters, System.Globalization.CultureInfo culture&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at System.Reflection.MonoCMethod.Invoke &#40;BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object&#91;&#93; parameters, System.Globalization.CultureInfo culture&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at System.Reflection.ConstructorInfo.Invoke &#40;System.Object&#91;&#93; parameters&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer.CreateDevice &#40;System.Reflection.Assembly rendererDll, Int32 width, Int32 height, WindowMode window, Boolean vsync&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer.Initialize &#40;WindowMode windowMode&#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
But I have GeForce 7600 GS PCI-E card. Maybe I need to try with cg toolkit or try to install something else package instead of media-gfx/nvidia-cg-toolkit?

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

BTW, how to execute OpenRA with alternative old renderer (through nvidia-cg-toolkit)?

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

OK, I have just tried to exec the following:

Code: Select all

xor@ddd /usr/local/share/openra $ mono --debug OpenRA.Game.exe Game.Mods=ra Graphics.Renderer=Cg
Loading settings file /home/xor/OpenRA/settings.yaml
Using Cg renderer

Unhandled Exception&#58; System.IO.FileNotFoundException&#58; File not found&#58; cg/world-shp.fx
File name&#58; 'cg/world-shp.fx'
  at OpenRA.FileFormats.FileSystem.Open &#40;System.String filename&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Cg.Shader..ctor &#40;OpenRA.Renderer.Cg.GraphicsDevice dev, System.String name&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Cg.GraphicsDevice.CreateShader &#40;System.String name&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer..ctor &#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
cp -r shaders from previous package to openra folder also doesn't help.

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

Looks like someone has fouled up the linux package builds.

There should be `cg` and `glsl` directories containing appropriate shaders, in the main OpenRA directory. The old `shaders` directory is dead.

beedee
Posts: 94
Joined: Mon Sep 06, 2010 5:02 am
Location: Wellington
Contact:

Post by beedee »

Due to the new packaging system, the Makefile install target has probably bitrotted. I'll fix it for the next release.

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

I'm sorry guys, it looks like I also forgot to restart after updating my x11-drivers/nvidia-drivers to 260.19.21. So, the exception log from the post http://www.sleipnirstuff.com/forum/view ... 457#278457 isn't valid. There is the following exception log with new Gl Renderer now:

Code: Select all

xor@ddd /usr/local/share/openra $ mono OpenRA.Game.exe Game.Mods=ra
Loading settings file /home/xor/OpenRA/settings.yaml
Using Gl renderer

Unhandled Exception&#58; System.IO.FileNotFoundException&#58; File not found&#58; glsl/world-shp.vert
File name&#58; 'glsl/world-shp.vert'
  at OpenRA.FileFormats.FileSystem.Open &#40;System.String filename&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Glsl.Shader..ctor &#40;OpenRA.Renderer.Glsl.GraphicsDevice dev, System.String type&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Renderer.Glsl.GraphicsDevice.CreateShader &#40;System.String name&#41; &#91;0x00000&#93; in <filename unknown>&#58;0 
  at OpenRA.Graphics.Renderer..ctor &#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
So, I try to extract 'glsl' and 'cg' paths from other packages (debian, 4ex.), and then I'll post the final result to you.

beedee
Posts: 94
Joined: Mon Sep 06, 2010 5:02 am
Location: Wellington
Contact:

Post by beedee »

Don't be in to much of a rush. We're going to push a new release today that fixes the Makefile and gives saner OpenGL error messages.

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

Well, guys, It looks like after extracting 'glsl' and 'cg' folders into openra everything works fine now:

Code: Select all

xor@ddd /usr/local/share/openra $ mono OpenRA.Game.exe Game.Mods=ra
Loading settings file /home/xor/OpenRA/settings.yaml
Using Gl renderer
Available mods&#58;
        cnc&#58; C&C &#40;a0001&#41;
        ra&#58; Red Alert &#40;a0001&#41;
Loading mods&#58; ra

Code: Select all

xor@ddd /usr/local/share/openra $ mono OpenRA.Game.exe Game.Mods=ra Graphics.Renderer=Cg
Loading settings file /home/xor/OpenRA/settings.yaml
Using Cg renderer
Available mods&#58;
        cnc&#58; C&C &#40;a0001&#41;
        ra&#58; Red Alert &#40;a0001&#41;
Loading mods&#58; ra
xor@ddd /usr/local/share/openra $ 

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

New ebuild (20101202_alpha_rc1) added.

Use '--no-check-certificate' option for now.

Updates:

• Added USE flags: cg, cnc, ra.
'cg': Enable support of old renderer through NVidia Cg (maybe needed 4 odd videcards);
'ra': Download & Install RA mod packages from internet (automatically);
'cnc': Download & Install C&C mod packages from internet (automatically);
(Better install manually full packs with all music & other from game .iso downloaded from original RA website)

• Tao deps (.dll and .config) installs automatically with inst_tao_deps.sh script
• Added game menu .desktop's & icons
• Added servers list link info

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

New ebuild (20101202_alpha_rc1-r1) added.

Use '--no-check-certificate' option for now.

Updates:

• Gl renderer parameters were added explicitly to .desktop icons to fix previously saving Cg parameters exclusively in settings.yaml
• Some info in postinst were rewritten.

ddd
Posts: 272
Joined: Sat Oct 23, 2010 5:04 pm

Post by ddd »

New ebuild (openra-20101220_alpha_rc1-r2) added for test version 1220-3.

Use '--no-check-certificate' option for now.

Updates:

• Excluded video_cards_nvidia USE flag for cg renderer (nvidia-cg-toolkit isn't for nvidia cards only).

Post Reply