The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream




    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,627 other followers

Archive for the ‘Development’ Category

Why sometimes you *want* to to have your DFM files stored as binary

Posted by jpluimers on 2016/08/25

Delphi Component/Tool vendors have to support a truckload of Delphi and C++ Builder versions which can be a pain: they have to work around problems in Delphi and C++ Builder versions that have long been abandoned by Borland/CodeGear/Embarcadero/Idera/…

This means that sometimes the Delphi Component/Tool vendors have to work around stuff in a way normal applications vendors would never do.

Recently I learned that sometimes this can be a painful thing: keeping DFM files in binary state.

I’m not kidding about either the DFM file format nor about supporting old versions:

  • Delphi has supported text based DFM files since like Delphi 2 for most of the features (yes, ‘most’ is the crucial word here) and by default stored DFM files in text format since Delphi 5.
  • For the Component/Tool Vendors, even Delphi 7 makes money though usually less than Delphi 2007 or the C++ Builder side of things.

The ‘most’ applies to this nice ARM compiler bug in Delphi 19.0.13856.4978 (for mere mortals, that’s Update 1 for RAD Studio XE5, Delphi XE5 and C++Builder XE5; I wish vendors would list those numbers/products in a central place):

  • [Android] MsBuild (dccAarm) error when compile FireMonkeyMobile projects with fmx forms
  • Project:  Delphi
  • Build #:  19.0.13856.4978

Source: QualityCentral

That’s why TeeChart still has most DFM files stored as binary files (again the ‘most’ word).

For version control and searching this is a pain, so normal application developers (the ones not using Delphi XE5 Update 1 for Android work) should run convert.exe with the -t (target=text) switch on DFM binary files.

Oh: this is fixed in version 19.0.13856.4978 (yes, that’s XE5 Update 2).




Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Kylix, Software Development | Leave a Comment »

Perl: checking if makedepend is available without using File::Which

Posted by jpluimers on 2016/08/25

Long lasting open source projects often use makedepend to amend Makefiles with C header dependencies.

However, makedepend is old, not available on some systems (like Mac OS X or Windows) and can have different behaviour than the C compiler on those systems. The alternative usually is the -M switch on the C compiler.

In practice, either makedepend, or the alternative is available, so when prepping for a build you have to choose which one to use.

Some of those open source projects use Perl as a bootstrapper. I’ll write more about those boots trappers in the future, but first lets go back to the post title:

First detecting the availability of makedepend from Perl without relying on File::Which which isn’t installed by default on systems having Perl so a gated check-in build like this Travis build fails.

The trick I use is Perl backticks (aka qx) to try and execute makedepend merging the output of both stdout and stderr (using 2>&1 which is available on most shells). If there is no output, then the result is undef which means makedepend is not available.



Posted in Software Development, Development, Scripting, Perl | Leave a Comment »

Update to List-Delphi-Installed-Packages.ps1 shows HKCU/HKLM keys and doesn’t truncated fields any more

Posted by jpluimers on 2016/08/24

I’ve posted an update to List-Delphi-Installed-Packages.ps1 that:

  • added HKCU/HKLM registry key values for each BDS version
  • doesn’t truncate fields any more when your console has limited width
  • is now in UTF-8 format so the BitBucket web-interface can show it

For the first two: Phry for helping me to force Format-Table to show more than 10 columns and pointing me how find out how to do this with Out-String so it doesn’t truncate fields; blog post about it will follow.

Now – as I can display more than 10 columns- I can start working in integrating all the other info about various BDS versions.

Source is at

A text dump of the current output is below.


via: If you need to know underlying information on Delphi versions « The Wiert Corner – irregular stream of stuff

Read the rest of this entry »

Posted in Delphi, Development, PowerShell, Scripting, Software Development | Leave a Comment »

List goals/targets in GNU make that contain variables in their definition – Stack Overflow

Posted by jpluimers on 2016/08/24

*nix systems tools often are have write-only maintenance tricks:

alias make-list-target='make -qp | awk -F":" "/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split(\$1,A,/ /);for(i in A)print A[i]}"'

Like usual, I have only a vague idea what the regex expressions do.

via List goals/targets in GNU make that contain variables in their definition – Stack Overflow.

Posted in Software Development, Development, Scripting, bash, Awk | Leave a Comment »

When “git mv” on a directory gives you en error starting with “fatal: bad source”

Posted by jpluimers on 2016/08/23

I use “git mv” a lot because somehow it works a lot better than having git automagically find out about renames.

The problem with “git mv” is that the “fatal: bad source” errors are a catch-all for many causes. Just look at the

Searching for “git mv” directory “fatal: bad source” didn’t get me much further. The one link that did get me towards the right track is version control – Getting Git to follow renamed and edited files – Stack Overflow.

What happened was that I had manually deleted and edited some files as part of a mass script (the repository had a lot of files in it that didn’t belong there compile targets and user specific settings or didn’t adhere to the naming conventions) before executing the “git mv”.

Since “git mv” tries to administer all the files that it thinks originally were in the directory, it complains about those files.

Lesson learned: first “git mv” then perform other changes.


Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »


Get every new post delivered to your Inbox.

Join 1,627 other followers

%d bloggers like this: