Dproj changed or not changed? Normalize it!

I guess it is since Delphi 10 Seattle that dproj files are changed on disk even if no change was done to the project settings inside the IDE. This is a real PITA with version control systems.

Actually there are no changes to the content – it is just reordered somewhat randomly. The only consistency is that the order changes with every save operation. The reason seems to be the use of dictionaries for some entries inside the IDE.

As this bothered me a lot recently I wrote an IDE plugin that orders the dproj file in a consistent way. It is called DprojNormalizer and can be downloaded here:  DprojNormalizer

DprojNormalizer has no settings or options. It does its job while it is installed and active. If you don’t want that you have to disable or uninstall it.

If you find cases where the dproj file unexpectedly changes, please give me a note and I will see if it can be handled as well.

About Uwe Raabe

Addicted to Pascal/Delphi since the late 70's
This entry was posted in Uncategorized. Bookmark the permalink.

17 Responses to Dproj changed or not changed? Normalize it!

  1. Agustin Ortu says:

    Many thanks for this!

  2. Is it possible to do the same for Dfm-files?

    • Uwe Raabe says:

      As DFM files are not XML files, the current algorithm is not suitable for that. In addition DFM files are written by the streaming system and resemble the internal object structure. I am not that keen to fiddle around with this as it might break something.
      Do you have an example where a DFM changes where it should not? And I mean within the same Delphi version.

      • Paul TOTH says:

        in a DFM they are 2 kinds of false updates

        1) the “Explicit” position of controls

        2) the imageList Data header… I guess that there’s a timestamp in the Bitmap header.

        • Uwe Raabe says:

          The TImageList data is written by a Windows API routine. I’m not sure if the format is documented somewhere. There might be not much one can do about that.

        • vor0nwe says:

          Andreas Hausladen’s DDevExtensions plugin already contains an option “Do not store the Explicit* properties”.

          As for the imagelist, that is indeed down to Windows.

      • Yes I also guess that it is a harder task. But fix dproj is great!

      • markrandalsill says:

        I have an example of a DFM change where it should not. Certain controls such as TComboBox stream ItemHeight flipping between 0 and 15. It too is an issue with a windows control, but certainly drives devs nuts on source control check-in. Many don’t, but I often take the time to undo those type changes with source compare tool.

  3. Ian Krigsman says:

    This behaviour has really bugged me too. Many thanks.

  4. Taz Higgins says:

    Fantastic, this has been very annoying.

  5. obones says:

    Would it be possible to get the sources for this? This way we can compile it for the various versions we have here at work.

    • Uwe Raabe says:

      I’m sorry, but it contains some commercially licensed parts that I can only distribute in a compiled product.

      I already had plans do provide it for older versions in a reasonable time frame. Which versions are you interested in?

  6. Pingback: DprojNormalizer for XE7 and XE8 | The Art of Delphi Programming

  7. Pingback: Embarcadero MVP Uwe Raabe has released a DprojNormalizer IDE plugin for RAD Stud… – HengeDK

  8. ERAY HANOGLU says:

    Is this an open source project? If so, can i get the sources?

Comments are closed.