libolt
15-11-2007 23:42:46
There seem to be some fundamental problems with the way skinset loading and saving is done. I have run into this issue under linux. Currently QuickGUIConfigScriptParser.cpp and I believe QuicKGUISkinSet.cpp want to write values to the directory where a skinset is loaded from. Now this is not always possible on Linux. For example, the QuickGUI default skinset, qgui on linux is generally installed into /usr/local/share/QuickGUI/media/skins or /usr/share/QuickGUI/media/skins which are generally not going to be writable from a normal user account.
There is also an issue with a "/" getting appended to the beginning of a filename, which can be a major problem especially if you're trying to load a skin from your own resource path. This causes Linux to look into the / or root directory of the filesystem and attempt to write out say the: qgui.skinset and SkinSet.qgui.png files, which is impossible from a standard user account.
I have hacked around this problem by changing the following in QuickGUISkinSet.cpp:
to:
I feel there is a better solution, but I don't know my way around the code base well enough to make such changes. The current hack above causes the .skinset and .png files to be written out into the same directory the executable file is run from, which is not a good situation in my opinion.
What I would like to do is have there be a way to define where these files get written out to by the users code.
Any help or comments are greatly appreciated.
There is also an issue with a "/" getting appended to the beginning of a filename, which can be a major problem especially if you're trying to load a skin from your own resource path. This causes Linux to look into the / or root directory of the filesystem and attempt to write out say the: qgui.skinset and SkinSet.qgui.png files, which is impossible from a standard user account.
I have hacked around this problem by changing the following in QuickGUISkinSet.cpp:
resourcePath = resourcePath + "/";
to:
if (resourcePath != "")
{
resourcePath = resourcePath + "/";
}
I feel there is a better solution, but I don't know my way around the code base well enough to make such changes. The current hack above causes the .skinset and .png files to be written out into the same directory the executable file is run from, which is not a good situation in my opinion.
What I would like to do is have there be a way to define where these files get written out to by the users code.
Any help or comments are greatly appreciated.