Hello! Does anybody know some library to work with .pro files, or convert them into xml files?
Thanks!
Hello! Does anybody know some library to work with .pro files, or convert them into xml files?
Thanks!
Last edited by adhit; 14th September 2008 at 17:45. Reason: spelling error
Denis Davidov
KDevelop must contain some code that parses .pro files, but I don't think it's in a form of a library.
I'm programming in Visual Studio...
Denis Davidov
KDevelop's .pro parser sucks, avoid it at all cost QMake should contain a .pro parser, though.
qmake .pro parser sucks at least as much as KDevelop one.
Ooops... What did I just say?
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...)
Current Qt projects : QCodeEdit, RotiDeCode
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.
Bookmarks