On Linux you can't run SampleBrowser from install dir.

Description

On Linux running SampleBrowser from the install directory fails. The media files are installed to "media" sub-directory and SampleContext adds paths for shaders to the "Media" sub-directory. The shader programs etc are never found. The following error occurs.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Parsing script Instancing.program
An exception has occurred: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource shadows.glsl in resource group Popular or any other group. in ResourceGroupManager::openResource at /media/sda1/>> Libraries/OGRE/src/v1-9/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

On Linux the media is installed under <CMAKE_INSTALL_PREFIX>/share/OGRE/media, see InstallResources.cmake:

elseif (UNIX)
set(OGRE_MEDIA_PATH "share/OGRE/media")

SampleContext.h adds the additional resource locations to ".../Media/.....".
Ogre::ResourceGroupManager::getSingleton().addResourceLocation(arch + "Media/materials/programs/GLSL150", type, sec);

Environment

None

Assignee

Unassigned

Reporter

Dermont Gill

Labels

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure