delphi - How do I extract `$Platform` and `$config` from the dproj file -
i want extend gpprofile works xe2.
the problem why not not know how translate file path in xe2's .dproj file.
the following error occurs:
exception class eoserror message tgphugefile.accessfile(c:\users\johan\documents\rad studio\projects\project8\ $(platform)\$(config) \project8.gpd) failed. win32 error. code: 3. system cannot find given path.'
the program extracts path, not know how translate $platform
, $config
variables.
whilst it's easy enough hardcode these vars win32/win64
, release/debug
respectively, i'd properly. mean want extract values ide saves .dproj file selected values of variables when files saved.
how extract these values .dproj
file?
you can work out little reverse engineering. take default project , add win64 platform. save .dproj file. change values of both platform , config, , save .dproj file. run these files through difference program. output looks this:
8,9c8,9 < <config condition="'$(config)'==''">debug</config> < <platform condition="'$(platform)'==''">win32</platform> --- > <config condition="'$(config)'==''">release</config> > <platform condition="'$(platform)'==''">win64</platform>
now know values live, it's simple xml parsing task extract them file.
now rant. if emba reads this, possible change program store settings ide in different file? perhaps named .dproj.local or .dproj. or similar. allow commit .dproj file revision control , not have show modified every time switch platforms debugging session.
Comments
Post a Comment