Page 1 of 1

Datafiles relative paths

Posted: Sat Dec 04, 2004 02:38
by Slicky
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'.

Datafiles relative paths

Posted: Sat Dec 04, 2004 03:29
by Slicky
I changed the working directory to debug or release as appropriate in VC settings and had better results.

Datafiles relative paths

Posted: Sat Dec 04, 2004 03:36
by _mental_
The relative paths to work but they have to be in the style for the current OS (ie. \ for Windows and / for Linux/OSX).

Datafiles relative paths

Posted: Sat Dec 04, 2004 19:42
by Nihilus
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)

Datafiles relative paths

Posted: Sat Dec 04, 2004 21:24
by CrazyEddie
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.