Mattias, I've used the FPC DOM unit to add to and delete from XML files without destroying everything else in the file. Use TDOMNode.RemoveChild to delete a node (for example, <VersionInfo>). Use TDOMNode.OwnerDocument.CreateElement and TDOMNode.AppendChild to add a node to an existing XML file.
It would seem as though the change would need to be made in TProject.WriteProject, which calls CreateClean rather than Create. I believe Create loads the XML file rather than starting a new one the way CreateClean does. My thinking is that possibly the Version Info panel could have a "Mac Info.plist" button, which would be disabled in non-Mac versions of the IDE. Clicking this displays another dialog with a grid for entering any of the settings for the app bundle's Info.plist file. These would be saved in the .lpi, either as a subsection (<Info_plist>) of <VersionInfo> or in its own section. Eventually when the IDE has the ability to create an app bundle folder when it compiles a project, it could use this info to populate the bundle's Info.plist file. Does that sound like a reasonable way to go about it? Or should we not "dirty" the IDE with platform-specific stuff in this way? Thanks. -Phil -----Original Message----- From: Mattias Gaertner [mailto:[EMAIL PROTECTED] Sent: Sun 6/3/2007 4:29 PM To: [email protected] Subject: Re: [lazarus] Debugger on Mac OS X On Sun, 3 Jun 2007 16:39:29 -0400 "Hess, Philip J" <[EMAIL PROTECTED]> wrote: > Today I started looking into the issue of how to store additional > version info that could be used to populate a Mac app bundle's > Info.plist file. Unfortunately, it appears as though any additional > data added to the .lpi file in the <VersionInfo> section gets deleted > the next time it's saved. Shouldn't the Laz IDE roundtrip data it > doesn't know about in the .lpi rather than deleting it? By deleting > it, isn't that kind of defeating the purpose of using XML for > the .lpi? The purpose of XML for the .lpi is human readability (debugging, searching, diffs), this includes automatic clean up. The used xml reader/writer does not understand the full xml syntax. Almost all xml files of the IDE are automatically cleaned up. If you want to add information extend the projectopts.pas or add a new xml file. > Also, if the value you enter in the Product Version box isn't in the > expected format (major.minor.micro.build), this prevents Laz from > compiling and doesn't give any error. Apparently windres chokes on > anything else but doesn't communicate this to the IDE. What about > having the IDE proof Product Version? Yes. But I'm not a windows developer, so I will leave the solution to other people. Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
<<winmail.dat>>
