Originally shared by Thomas Mueller (dummzeuch)

Originally shared by Thomas Mueller (dummzeuch)

If you are maintaining a library, component or plugin for various Delphi versions you will sooner or later hit a point where it becomes necessary to have different code for some of them. Some examples are: The constants faTemporary and faSymlink are only…
http://blog.dummzeuch.de/2018/12/02/conditional-compilation-for-various-delphi-versions/

Comments

  1. Ondrej Kelle which is already linked from my article.

    ReplyDelete
  2. For missing constants and types I tend to use this:
    {$IF not declared(faTemporary)}
    const
    faTemporary = $00000100;
    faSymLink = $00000400;
    {$ENDIF}

    But I don't know which compiler version introduces this.

    ReplyDelete
  3. Achim Kalwa Delphi 6 already knows about it, but it then requires IFEND to close it.

    ReplyDelete
  4. You should drop support of old Delphi versions and especially when writing open source / free tools.

    ReplyDelete
  5. Uwe Raabe I am sure I must have read that post, because your blog is in my RSS feeds, but I had totally forgotten about it. I added a link to your post.

    ReplyDelete
  6. Stéphane Wierzbicki You are not the first one to suggest this and one of these days I probably will drop Delphi 6, 2005, 2006 and probably some more. Maybe even Delphi 7. It might happen very fast if my installation of one of these versions breaks and I can't be bothered to reinstall it.

    ReplyDelete
  7. Thomas Mueller If I were you (but I'm not indeed 😊) I would drop all versions prior to Unicode or better, only keeping versions starting from Xe.

    ReplyDelete
  8. Stéphane Wierzbicki Indeed, you are not me. I am using Delphi 2007 every day, so dropping support for it would be a rather stupid decision. I'd rather drop support for everything between 2009 and 10.3.

    ReplyDelete

Post a Comment