Page 1 of 1

XML attribute first character case issue

Posted: Tue Aug 28, 2012 11:30
by gjaegy
Hi,

I have been trying to load the AlfiskoSkin scheme, which is provided as an sample of CEGUI Unified Editor, using CEGUI.

However, an exception is being triggered.

Reason for that is that the XML processor (Scheme_xmlHandler class) is looking for a "Filename" attribute, where the xml file generated by the editor contains a lower case version ("filename").

Check "AlfiskoSkin.scheme" to see what I mean:

Code: Select all

<Imageset filename="AlfiskoSkin.imageset" />


and the definition of the filename attribute string in CEGUIScheme_xmlHandler.cpp:

Code: Select all

const String Scheme_xmlHandler::FilenameAttribute("Filename");


Is there anything I have missed ? I am using the TinyXML parser, but I don't think this is a problem.

Thanks for your support !

Re: XML attribute first character case issue

Posted: Tue Aug 28, 2012 12:37
by Kulik
You are trying to load CEGUI 1.0 (unreleased yet) data with CEGUI 0.7.

That won't work unfortunately.

You might try to use ceed-migrate to migrate the skin's assets to CEGUI 0.7, I think it should work. Keep in mind that AlfiskoSkin is unfinished and work in progress at this point.

Re: XML attribute first character case issue

Posted: Tue Aug 28, 2012 13:32
by gjaegy
Is it possible to convert the .scheme file as well, I didn't find a way to do it...

BTW, is it possible to access CEGUI 1.0 branch of the source code ?

Re: XML attribute first character case issue

Posted: Tue Aug 28, 2012 16:13
by Kulik
Yes, ceed-migrate can do that too, just replace looknfeel with scheme.

Yes, use the mercurial repo: http://crayzedsgui.hg.sourceforge.net/h ... cegui_mk2/

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 07:27
by gjaegy
Thanks, I have cloned the repository, and tried to build the project files (Visual Studio 2010) using CMake.

I have some issues with the dependencies: I have therefore downloaded the 0.8 dependencies (http://sourceforge.net/projects/crayzed ... p/download), and copied them into a "cegui\cegui_mk2\dependencies" folder (so for instance, i have "cegui\cegui_mk2\dependencies\src\tolua++-1.0.93").

However, CMAKE is unable to locate the dependencies, and I couldn't find any post/wiki explaining where the dependencies should be located.

Any idea ?

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 07:34
by Kulik
The dependency pack is source-based, you have to build it. There are no docs for this as it's unreleased and in mercurial only for now.

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 07:43
by gjaegy
OK, I see, I have built them, and it created a "dependencies" folder, which has to be copied into the "cegui_mk2" folder (or directly generated there, even better).

Thanks for your help, very appreciated !

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 07:55
by gjaegy
Still one issue: I have generated the dependencies project, and build it, it generated both a dynamic and static version (lib/dynamic and lib/static).

Then, I have generated the CEGUI project in CMAKE, and checked both the "CEGUI_BUILD_SHARED_LIBS_WIT§H_STATIC_DEPENDENCIES" and the "CEGUI_BUILD_STATIC_CONFIGURATION", so that both dynamic and static versions of CEGUI are built, both using the static version of the dependencies.

I have inlcluded TinyXML as the only XML parser.

However, when compiling CEGUI, the linker complains, as it doesn't find the "TinyXMLParser_Static.lib" file.

It should rather look for "dynamic/tinyxml.lib" instead.

Any misconfiguration from me ?

[EDIT: OK, it seems only the demos have a problem, I guess I can live with that ;)]

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 08:45
by gjaegy
Still not done ;(

Some further link error, (linking with the static library):

CEGUIBase_Static_d.lib(WidgetLookFeel.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)

I guess the template specialization are not exported correctly.Any idea ?

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 09:20
by Kulik
Use dynamic linking.

At this point I think I will write an article on why static linking sucks and why people should never use it for development. Its only use case "MAY" be when deploying final versions.

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 09:30
by gjaegy
I know the advantage of static linking.

However, I also like having one single DLL for my CEGUI wrapper (containing all CEGUI libs and dependencies), it's much nicer compared to have all the dependencies DLLs in the program folder...

Re: XML attribute first character case issue

Posted: Wed Aug 29, 2012 13:33
by Kulik
With regards to your problem, it may be a bug in the unreleased CEGUI 1.0 version. CEGUI team doesn't test on Windows while developing, Windows is not our platform of choice. Issues are expected and any patches are welcome.

gjaegy wrote:I know the advantage of static linking.


Please enlighten me. Most people come up with "nicer", "no DLL hell" (they have no idea what DLL hell is when they say that), "less files", ... This is simply not an issue unless you have OCD.

The only time this may be an issue is when releasing and even then I wouldn't opt for it.

Static linking is definitely more error prone, it's way more complex than people think (most people who have problems using it don't understand how linking works). Linking takes more time and eats more RAM. The order of libraries that you are linking matters and the whole thing isn't "transitive" as in dynamic linking.