Just like how IA now creates *.mia.txt files to better help developers track changes to their scripts, I'm trying to build a tool that can create *.dfm.txt files so that I can better track changes to my dialogs.
I was guessing that Delphi's Classes.ObjectBinaryToText() would be able to handle this for me. But I'm finding that's not the case. Any clues or hacks that might help me?
Thanks!
Troy
How to convert DFM to Text?
Re: How to convert DFM to Text?
wolbrink wrote:Delphi's Classes.ObjectBinaryToText()
I just noticed it's actually: ObjectResourceToText().
I'm glad I can track my dfm changes in version control now!
--Troy
neillans wrote:One question for you guys ....
How would you feel if InstallAware natively supported TXT DFM's and allowed saving scripts as XML files (natively) ?
TXT DFM's would be great. One less process I must run after editing dialogs.
Saving scripts as XML files natively? While that might be better than the current binary format for the *.mia file, I still like the *.mia.txt file because it closely reflects the script editor in which I'm used to working. I can imagine the XML file wouldn't be quite as intuitive to look at as the *.mia.txt file.
--Troy
How to convert DFM to Text?
I support having a serializable format for the .dfm files. It would make version control so much easier. Having a .txt or .xml representation of all InstallAware script files would be a big help.
It doesn't really matter which format is used, as long as I can compare changes using a tool like WinMerge or BeyondCompare.
It doesn't really matter which format is used, as long as I can compare changes using a tool like WinMerge or BeyondCompare.
-
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
-
- Posts: 20
- Joined: Tue Nov 25, 2008 8:54 pm
- Location: N. California
neillans wrote:How would you feel if InstallAware natively supported TXT DFM's and allowed saving scripts as XML files (natively) ?
Changing from a TXT export to an XML export does not necessarily address a key limitation: the current text export of MIA scripts omits parameters for several commands (e.g. CALL DLL, MESSAGEBOX, etc). So comparing two versions of an MIA script's TXT files using a diff tool may not reveal several key differences. People seem to think they can store the TXT file in their source code repository and be able to track script changes over time, but this only works to an extent.
To address this limitation, and provide other advantages, I suggest the following:
1) Have the text exports contain full parameters for each command, in an easy-to-read, one-line format. If possible, a generalized export format (e.g. a list of field values, listed sequentially after the main command name, delimited by a semicolon) would be available even for plug-in commands. A future specification for plugins would call for an optional, one-line text format, so text exports of never-before-seen plug-in commands would be more readable than if they relied on the generalized export format.
2) Save TXT exports of both Script and Dialog files upon every save (presently happens only when saving MIA files)
3) If it makes sense to do so, abandon DFM and MIA files: replace both with corresponding XML files, which the InstallAware IDE and command line builder would use instead of the old files. These would be easier to programatically inspect (or edit) than the current files. Ideally, the XML schemas and basic XSLT's (for reporting purposes) would be made publicly available. And (ideally) there would be no need for GUIDs.
4) Combine the dialog rules file (MIAF) and diaglog definition file (DFM) into a single XML file; when exporting this file to text, include the rules at the end, in their own section.
Regards,
- Michael Litwak
-
- Posts: 20
- Joined: Tue Nov 25, 2008 8:54 pm
- Location: N. California
When I have encountered runtime errors with InstallAware installers, I have wished that I had the means to validate my InstallAware project files. It would be a great boon to be able to verify that InstallAware project files were not corrupt in any way.
If all the project files -- including .MIA, .MIAF, .DFM, .MPR and any others -- were XML files (with publicly-available detailed schemas), then validation would be a snap. The XML's would simply be validated against the corresponding schema file.
- M
If all the project files -- including .MIA, .MIAF, .DFM, .MPR and any others -- were XML files (with publicly-available detailed schemas), then validation would be a snap. The XML's would simply be validated against the corresponding schema file.
- M
Fix this ASAP please
MikeOnline wrote:3) If it makes sense to do so, abandon DFM and MIA files: replace both with corresponding XML files, which the InstallAware IDE and command line builder would use instead of the old files. These would be easier to programatically inspect (or edit) than the current files.
...but a .dfm file (as text) is really easy to read and understand for humans.
And as I recall from my Delphi days, it is not too hard to stream in a .dfm file either so you can deal with it programmatically. (XML? Easy to programatically inspect..? Really? Are we discussing about the same messed-up standard?)
But anyway: I was very surprised and disappointed when I realized IA's .dfm files were binary. That is so... 1995. Delphi fixed that in D2 as I recall. I've been very careful saving all my .dfms as text ever since. (for extremely obvious reasons!)
Re: How to convert DFM to Text?
Hello,
Among many different project files just the DFM file is binary, which makes more difficult to work with revisions, as former posts claim.
Is there any progress or plan on the roadmap to eliminate this obstacle and render all project related files to a text file ?
Regards,
Tommy
Among many different project files just the DFM file is binary, which makes more difficult to work with revisions, as former posts claim.
Is there any progress or plan on the roadmap to eliminate this obstacle and render all project related files to a text file ?
Regards,
Tommy
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: How to convert DFM to Text?
Unfortunaly, this is not currently in our plans.
Regards
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 54 guests