On Sun, 3 Jun 2007 17:52:24 -0400
"Hess, Philip J" <[EMAIL PROTECTED]> wrote:

> 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.

Sorry, maybe I made myself not clear: 
You are right, that it would be *possible* to keep some user created
data. But the lpi file should not use these abilities, because
- Lazarus uses an optimized xml reader/writer, that is not
capable of all xml things. So the only guaranteed working xml is
created by the laz_xmlcfg unit.
- The clean up is used to keep the lpi file short and free of waste,
so you can be sure, every single token has a meaning. For example if a
path name changed the old values will automatically vanish. This way
I'm still using some 6 years old .lpi files.
- The lpi file content should be completely editable via the IDE.
Users do not need to understand the lpi format.
- the lpi file content can be exported (publish project). Eventually
maybe to a non xml format.

 
> 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.

No. All options must be visible and editable under all platforms. Think
about cross compiling or a non mac developer that must review/fix the
mac port. Just give a hint, that these option are only valid for the
Mac platform.


> 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.

A grid is a good idea. But IMHO it should be stored in the lpi as any
other project data via the TXMLConfig, not as raw xml.

 
> 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.

Maybe some values like title can be shared between platforms. So the
Info.plist will be created from many values. Storing the Info.plist as
raw xml will make it harder to do that.

 
> 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?


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to