RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 175 forks source link

Make path to plugins.cfg configurable #541

Open Hubbitus opened 8 years ago

Hubbitus commented 8 years ago

Console:

$ RoRConfig 
Warning: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1008,wx containers,compatible with 2.4,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1009,wx containers,compatible with 2.4,compatible with 2.6).
 * log path:         /home/pasha/.rigsofrods/logs/
 * config path:      /home/pasha/.rigsofrods/config/
 * user path:        /home/pasha/.rigsofrods/
 * program path:     /usr/bin/
 * used plugins.cfg: /usr/share/rigsofrods/resources/plugins.cfg
 * used ogre.cfg:    /home/pasha/.rigsofrods/config/ogre.cfg
 * used ogre.log:    /home/pasha/.rigsofrods/logs/RoR.log
15:24:13: log started
15:24:13: searching languages in languages
15:24:13: no Languages found!
15:24:13: asking system for default language.
15:24:13:  system returned: Russian(ru_RU)
15:24:13: preferred language: Russian
15:24:13: lang file: languages/ru/LC_MESSAGES/ror.mo
15:24:13: looking for catalog 'wxstd' in path 'languages/ru_RU.UTF-8/LC_MESSAGES:languages/:languages/ru_RU.UTF-8:/usr/share/locale/ru_RU.UTF-8/LC_MESSAGES:/usr/share/locale/ru_RU.UTF-8/LC_MESSAGES:/usr/share/locale/:/usr/share/locale/ru_RU.UTF-8:languages/ru_RU/LC_MESSAGES:languages/:languages/ru_RU:/usr/share/locale/ru_RU/LC_MESSAGES:/usr/share/locale/ru_RU/LC_MESSAGES:/usr/share/locale/:/usr/share/locale/ru_RU:languages/ru/LC_MESSAGES:languages/:languages/ru:/usr/share/locale/ru/LC_MESSAGES:/usr/share/locale/ru/LC_MESSAGES:/usr/share/locale/:/usr/share/locale/ru'.
15:24:13: using catalog 'wxstd' from '/usr/share/locale/ru/LC_MESSAGES/wxstd.mo'.
15:24:13: поиск каталога 'wxgtk' в пути 'languages/ru_RU.UTF-8/LC_MESSAGES:languages/:languages/ru_RU.UTF-8:/usr/share/locale/ru_RU.UTF-8/LC_MESSAGES:/usr/share/locale/ru_RU.UTF-8/LC_MESSAGES:/usr/share/locale/:/usr/share/locale/ru_RU.UTF-8:languages/ru_RU/LC_MESSAGES:languages/:languages/ru_RU:/usr/share/locale/ru_RU/LC_MESSAGES:/usr/share/locale/ru_RU/LC_MESSAGES:/usr/share/locale/:/usr/share/locale/ru_RU:languages/ru/LC_MESSAGES:languages/:languages/ru:/usr/share/locale/ru/LC_MESSAGES:/usr/share/locale/ru/LC_MESSAGES:/usr/share/locale/:/usr/share/locale/ru'.
15:24:13: файл каталога для домена 'wxgtk' не найден.
15:24:13: language not existing, no lang_locale support!
15:24:13: Creating dialog

(RoRConfig:12114): Gtk-CRITICAL **: IA__gtk_window_resize: assertion 'width > 0' failed
15:24:13: Known Audio Devices: 
15:24:13:  *Встроенное аудио Аналоговый стерео
15:24:13:  *Встроенное аудио Digital Stereo (HDMI)
15:24:13: Sound Extensions: 
15:24:13: Setting default values
15:24:13: Loading config
15:24:13: Loading RoR.cfg
15:24:13: reading from Config file: /home/pasha/.rigsofrods//config/RoR.cfg
15:24:13: Creating Ogre root
Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
ArchiveFactory for archive type EmbeddedZip registered.
DDS codec registering
FreeImage version: 3.17.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,sgi,rgb,rgba,bw,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti,x3f,webp,jxr,wdp,hdp
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
*-*-* OGRE Initialising
*-*-* Version 1.9.0 (Ghadamon)
/usr/bin//plugins.cfg not found, automatic plugin loading disabled.
15:24:13: Root restore config

And in GUI message:

Unable to load the render systems. Please check if all required files are there and the plugins.cfg file is correct.
This is a fatal error and the game will not start.

I think /usr/bin//plugins.cfg is incorrect. Why? But on first lines it correctly stated:

 * used plugins.cfg: /usr/share/rigsofrods/resources/plugins.cfg

And that file present and contains:

$ cat /usr/share/rigsofrods/resources/plugins.cfg
# Defines plugins to load

# Define plugin folder
PluginFolder=/usr/lib64/OGRE/

# Define plugins
Plugin=RenderSystem_GL
#Plugin=RenderSystem_GL3Plus
Plugin=Plugin_ParticleFX
Plugin=Plugin_OctreeSceneManager
#Plugin=Plugin_CgProgramManager
#Plugin=libCaelum.so
Hiradur commented 8 years ago

resources/plugins.cfg is copied over by RoRConfig make to the folder where the binary is and then this plugins.cfg is used by RoR. Perhaps it can't copy due to permission issues?

Hubbitus commented 8 years ago

Sure. Is it possible override such path on build time?

Hiradur commented 8 years ago

Actually, it's not copied over by RoRConfig but instead by make. Sorry, my mistake. I don't think you can configure the path for plugins.cfg but if make can create binaries in that folder it should be able to copy over plugins.cfg as well, shouldn't it?

Hubbitus commented 8 years ago

I work to package rigs of rods into RPM for inclusion into Fedora (it long time on review, but I want update and speedup it slightly). So, it should work out of the box for users. And files placement should mostly reflect FHS.

Hubbitus commented 8 years ago

I try deal with it in libexec dir and binary wrapper.

Hiradur commented 8 years ago

I work to package rigs of rods into RPM for inclusion into Fedora

:+1:

Not sure how packages work on Fedora but couldn't plugins.cfg copied over by a simple script? Users rarely if ever have to touch it if they aren't developers.

Hubbitus commented 8 years ago

It can't be placed in /usr/bin (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) as it is not binary.

tritonas00 commented 5 years ago

@Hubbitus

I work to package rigs of rods into RPM for inclusion into Fedora (it long time on review, but I want update and speedup it slightly). So, it should work out of the box for users. And files placement should mostly reflect FHS.

check this https://forum.rigsofrods.org/development-discussion/1342-ror-development-builds-windows-linux.html

(and i think this can be closed now, plugins.cfg is properly included and configured in the precompiled zip archive)