PDA

View Full Version : Qt .pro files



adhit
14th September 2008, 17:43
Hello! Does anybody know some library to work with .pro files, or convert them into xml files?

Thanks!

jacek
14th September 2008, 17:53
KDevelop must contain some code that parses .pro files, but I don't think it's in a form of a library.

adhit
14th September 2008, 17:56
I'm programming in Visual Studio...

wysota
15th September 2008, 00:42
KDevelop's .pro parser sucks, avoid it at all cost :) QMake should contain a .pro parser, though.

fullmetalcoder
15th September 2008, 19:21
qmake .pro parser sucks at least as much as KDevelop one.

Ooops... What did I just say? :eek:

Turns out qmake does not so much parses files as it *interprets* them. As far as qmake is concerned pro files are scripts meant to fill a list of variable/values pairs.

If all you need is that list (which may vary depending on the platform and other stuff and comes with a lot of internal variables you are probably not interested in) then you can safely pull the code from qmake (it will need some care to embed it but that's not particularly hard.

However, if you want to keep all informations on structure (scopes, dependency between variables using $$, functions, ...) qmake is definitely not the way to go... Qt 4 IDEs, such as Edyuk, Monkey Studio would be a better place to start.

p.s : I intentionally did NOT mention QDevelop as a suitable place to start because its pro parser is very limited (does not support include(), support only one type of SUBDIRS assignement out of 3, does not support 'else' scope...)

wysota
15th September 2008, 22:51
Honestly I'd wait until TT releases its qmake successor, whenever that happens. It is said to contain a library one can link against with his own apps.