The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

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

    Join 4,183 other subscribers

Delphi XE3/XE4: removing empty .VLB files; XE5 update 2 and special offers are out. #codingindelphi

Posted by jpluimers on 2013/12/19

Even when not using Visual Live Binding, Delphi generates empty .VLB files in both Delphi XE3 (virtually always) and Delphi XE4 (most of the time).

Visual Live Binding is one way of binding data to UI in FireMonkey and can also be used in VCL, but does not have to (Alister Christie made a nice video ▶ Delphi Training Tutorial #77 – Visual Live Bindings – YouTube about it).

Empty VLB files, and a batch file to delete them

The “empty” VLB files are almost empty, as they are exactly 3 bytes long and contain the byte sequence EF BB BF which is the Unicode BOM (byte order mark) for the UTF-8 encoding.

So technically they are not empty, but practically they are as there is no content.

The “empty” VLB files clutter your disk and version control information, so I have written a small batch file that – together with an empty VLB file – can clean up a directory tree of those empty VLB files.

You can get those files from the Delphi Scripts directory in my BeSharp.net open source repository.

Usage is a snap: just specify the target root directory.

C:\Users\developer\Versioned\BeSharpNet\Native\Delphi>Scripts\delete-empty-VLB-files.bat .
emptyVLB=C:\Users\developer\Versioned\BeSharpNet\Native\Delphi\Scripts\Empty.vlb
delete "C:\Users\developer\Versioned\BeSharpNet\Native\Delphi\Apps\TicTacToe\TicTacToeFireMonkeyMobile\TicTacToe_FireMonkeyMobileFormUnit.vlb"

–jeroen

PS: So far it looks like Delphi XE5 doesn’t generate empty VLB files any more (:

Speaking of which: Embarcadero recently Delphi XE5 Update 2 with C++Builder for iOS and lots of bugfixes.

They also run an end-of-year special: http://www.embarcadero.com/radoffer

I will detail more on that later, but one of the nice parts is that it includes a free PDF copy of the current CodingInDelphi book by Nick Hodges.

It is the finest recent Delphi book and complements all the Delphi books released so far. So be sure to get the book now by upgrading to Delphi XE5, otherwise you have to wait for the LeanPub version of CodingInDelphi.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: