Datafiles relative paths

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

Slicky
Quite a regular
Quite a regular
Posts: 63
Joined: Wed Jan 12, 2005 12:06

Datafiles relative paths

Postby Slicky » Sat Dec 04, 2004 02:38

I'm having some problems with I think relative paths. Maybe it is me but I had to start modifying the taharezlook.scheme to take out the ..\ before the datafiles path. Does this work for everyone else out of the box :?:

Here is my current log:

04/11/2004 02:33:52 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
04/11/2004 02:33:52 (InfL1) + Crazy Eddie's GUI System - Event log +
04/11/2004 02:33:52 (InfL1) + (http://crayzedsgui.sourceforge.net) +
04/11/2004 02:33:52 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

04/11/2004 02:33:52 (InfL1) CEGUI::Logger singleton created.
04/11/2004 02:33:52 (InfL1) ---- Begining CEGUI System initialisation ----
04/11/2004 02:33:52 (InfL1) CEGUI::ImagesetManager singleton created
04/11/2004 02:33:52 (InfL1) CEGUI::FontManager singleton created.
04/11/2004 02:33:52 (InfL1) CEGUI::WindowFactoryManager singleton created
04/11/2004 02:33:52 (InfL1) CEGUI::WindowManager singleton created
04/11/2004 02:33:52 (InfL1) CEGUI::SchemeManager singleton created.
04/11/2004 02:33:52 (InfL1) CEGUI::MouseCursor singleton created.
04/11/2004 02:33:52 (InfL1) WindowFactory for 'DefaultWindow' windows added.
04/11/2004 02:33:52 (InfL1) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
04/11/2004 02:33:52 (InfL1) CEGUI::System singleton created.
04/11/2004 02:33:52 (InfL1) ---- CEGUI System initialisation completed ----
04/11/2004 02:33:54 (InfL1) Attempting to load Scheme from file 'datafiles\schemes\TaharezLook.scheme'.
04/11/2004 02:33:54 (InfL2) Started creation of Scheme 'TaharezLook' via XML file.
04/11/2004 02:33:54 (InfL2) Finished creation of Scheme 'TaharezLook' via XML file.
04/11/2004 02:33:54 (InfL2) Loaded GUI scheme 'TaharezLook' from data in file 'datafiles\schemes\TaharezLook.scheme'.
04/11/2004 02:33:54 (InfL2) ---- Begining resource loading for GUI scheme 'TaharezLook' ----
04/11/2004 02:33:54 (InfL1) Attempting to create an Imageset from the information specified in file 'datafiles/imagesets/TaharezLook.imageset'.
04/11/2004 02:33:54 (InfL2) Started creation of Imageset 'TaharezLook' via XML file.
04/11/2004 02:33:54 (InfL2) Finished creation of Imageset 'TaharezLook' via XML file.
04/11/2004 02:33:54 (InfL1) Attempting to create Font from the information specified in file 'datafiles/fonts/tahoma-12.font'.
04/11/2004 02:33:54 (InfL2) Started creation of Font 'Tahoma-12' via XML file.
04/11/2004 02:33:54 (InfL1) Attempting to create Imageset 'Tahoma-12_auto_glyph_images' with texture only.
04/11/2004 02:33:54 (InfL2) Imageset 'Tahoma-12_auto_glyph_images' has been destroyed.
04/11/2004 02:33:54 (Error) Exception: Font::constructor_impl - An error occurred while trying to create a FreeType face from source font '../datafiles/fonts/tahoma.ttf'.

Slicky
Quite a regular
Quite a regular
Posts: 63
Joined: Wed Jan 12, 2005 12:06

Datafiles relative paths

Postby Slicky » Sat Dec 04, 2004 03:29

I changed the working directory to debug or release as appropriate in VC settings and had better results.

User avatar
_mental_
CEGUI Team (Retired)
Posts: 157
Joined: Wed Jan 12, 2005 12:06
Contact:

Datafiles relative paths

Postby _mental_ » Sat Dec 04, 2004 03:36

The relative paths to work but they have to be in the style for the current OS (ie. \ for Windows and / for Linux/OSX).

User avatar
Nihilus
Just popping in
Just popping in
Posts: 15
Joined: Wed Jan 12, 2005 12:06
Location: Tampa, FL. USA

Datafiles relative paths

Postby Nihilus » Sat Dec 04, 2004 19:42

The relative paths to work but they have to be in the style for the current OS (ie. \ for Windows and / for Linux/OSX).


On Windows
<Imageset Name="TaharezLook" Filename="../datafiles/imagesets/TaharezLook.imageset" />

seems to work for me. If I change said path, it can't find the imageset file properly.

I think the issue Slicky is having is that the TaharezLook.imageset file from the "WidgetSets\TaharezLook\Imageset" folder begin with "../../datafiles". The TaharezLook.imageset file from the "Samples\datafiles\imagesets" folder however begins with "../datafiles".

(I say seems above because I haven't been able to get a system working lately, but as I mentioned, if I change the path then it throws an error finding TaharezLook.imageset)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Datafiles relative paths

Postby CrazyEddie » Sat Dec 04, 2004 21:24

Currently all paths are relative to the working directory. This generally causes issues where people specify the path between the imageset xml file and the imagefile; a common mistake is to state the image path relative to the xml file, which is incorrect. To repeat: all paths are relative to the current working directory of the app.

The files under the 'datafiles' directory have paths relative to the Samples/bin directory; this is to support the samples framework that only exists on my machine here :)

The "WidgetSets\TaharezLook\Imageset" copy of TaharezLook.imageset has the incorrect path; that version should really have no path specified at all. I'll fix this tomorrow.

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 18 guests