![]() |
DFM-Datei binär?
Hallo allerseits,
ich habe hier eine dfm-Datei welche wohl Binär abgespeichert wird. Mein Delphi kann die Datei ganz normal lesen, aber auf einem anderen Computer kommt immer die Fehlermeldung "Invalid stream format". Weiß jemand wie ich die Datei (ohne alles neu zu machen) ins Textformat umwandeln kann? Ich hab zwar schon maximovs ![]() Hat irgendjemand eine Idee? Greetz alcaeus |
Re: DFM-Datei binär?
In Delphi gibt es irgendwo eine Option, wo man auswählen kann, als was gespeichert werden soll.
Du kannst aber auch ganz einfach die Datei in deinem Delphi öffnen, dann mir Rechts auf das entspechende Formular klicken, "Als Text anzeigen" auswählen und diesen Text dann mit 'nem Editor als Textdatei (allerdings mit .dfm) abspeichern und dann beide Dateien austauschen :zwinker: (später speicher Delphi die Datei als das ab, als was sie geöffnet wurde) |
Re: DFM-Datei binär?
Zitat:
Gruß Nico |
Re: DFM-Datei binär?
Zitat:
Danke euch allen Greetz alcaeus |
Re: DFM-Datei binär?
Zitat:
"Neuere" Delphi Versionen sollten aber immer noch das binäre Format der "älteren" Delphi Versionen lesen können. Für dieses Problem gibt es das Tool DFMCleaner in der JVCL (jvcl\devtools\DFMCleaner) dc.txt DFMCleaner is a tool to remove unsupported properties from DFMs. If you save a dfm file in one version of Delphi and want to use it in an earlier version, chances are there are some unsupported properties in it, generating an error when the form is opened in Delphi. What's even worse, if the dfm is part of a design-time package, Delphi will install the package without errors but when you try to access the form at design-time (f ex if the form is used by a property editor), Delphi generates an AV instead. Command-line: dc.exe <options> <filemask> <filemask> where <options> can be: -i - replace in-line (output overwrites input). If not given, output uses input's filename but with a "txt" extension -s - recurse into sub-folders -f<filename> - read skiplist from <filename>, REQUIRED. Do not preceed filename with spaces! <filemask> can be a filename or a filemask with wildcards. Also supports relative paths (like ..\source\*.dfm and source\*.dfm). Filemasks that contain spaces must be enclosed in single or double quotes The output file is only written if it is different from the input. Input DFM's can be in either text or binary format but the output is always written in text format. The skiplist has the following format: Each row contains the name of a property to remove, preceeded by it's classname or a "*". A "*" means "any class". Examples: *.DesignSize - remove all DesignSize properties TPageControl.TabIndex - remove TabIndex for TPageControl Note that the tool cannot derive inheritance from the dfm, so all affected classes must be named explicitly, i.e if you want to remove TabIndex for TPageControl and all descendants, you must name them on one row each: TPageControl.TabIndex TJvPageControl.TabIndex TPageControlEx.TabIndex etc... The skiplist file doesn't have to be sorted: it is sorted internally. |
Re: DFM-Datei binär?
Zitat:
könntest du die datei mal anhängen. Mich würde nämlich mal interessieren warum die binär inkompatibel sind. Bzw. ob das historisch bedingt ist, denn zum konvertieren benutze ich ja auch nur die aktuellen standard delphi streamin-routinen. Oder, wenn sensible daten, dann vielleicht die ersten 100 bytes. |
Re: DFM-Datei binär?
Was hat es denn für Vorteile die Dfm Datei binär und nicht als Text zu speichern?
MfG Pr0g |
Re: DFM-Datei binär?
und dann wäre da auch noch JConvert aus dem JVCL Packet (jvcl\devtools\JConvert)
readme.txt JConvert is a command-line tool to convert dfm files between text and binary format. It differs from Borland's tool in two ways: 1. It doesn't create a new file unless the dfm was actually converted from one format to the other. This is essential when working with VCS systems like CVS because you only have to commit the files that were actually translated. If you convert a lot of dfm's this can save you some bandwidth and the need to commit files that appears to have changed but in reality hasn't 2. You can use the -c switch to check how many files would have been converted This is great when you want to know if all your dfm's are in the right format without actually change them |
Re: DFM-Datei binär?
Zitat:
|
Re: DFM-Datei binär?
Zitat:
Ab Delphi 5 (glaube ich) hatte man die Möglichkeit zwischen Binär- und Text-Format zu wählen. Delphi 1 z.B. konnte nur binär speichern. Daher können auch die aktuellen Versionen noch mit den binären Format umgehen. (Sonst könnte man ja kein "altes Projekt" mehr öffnen.) Intern im Speicher arbeitet Delphi mit dem Binärformat. Der Vorteil wäre dann eine kürzere Ladezeit, da Delphi das Textformat nicht in das binäre umwandel muß (, der aber so klein ist, das er nicht ins Gewicht fällt). Wenn Du ein Versionsverwaltungssystem einsetzt, würde ich Dir auf jeden Fall raten *.dfm Dateien als Text zu speichern, da es nur dann sinnvoll ist Delta Informationen zu bilden und ein Diff bzw. Merge eines Branches möglich wird. Ich hoffe das beantwortet Deine Frage und verwirrt dich nicht zu sehr ;-) |
Re: DFM-Datei binär?
Ja, ich denke das meine Frage damit beantwortet ist. Hätte also keine wirklichen Vorteile für mich.
|
Re: DFM-Datei binär?
Zitat:
Greetz alcaeus |
Re: DFM-Datei binär?
OK. Ist auch erstmal egal.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:32 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz