Convenient list to decide what to put in your version control system: Delphi File Extensions – Delphi Programming.
–jeroen
Posted by jpluimers on 2014/12/10
Convenient list to decide what to put in your version control system: Delphi File Extensions – Delphi Programming.
–jeroen
Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/11/13
Steve Maughan posted a great question on G+ last week:
The resulting thread is full of people answering with their favorite JVCL and JCL gems.
Recommended reading!
–jeroen
via JCL & JVCL – What are the Real Gems in these Tool Sets I’ve just installed JCL….
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 1 Comment »
Posted by jpluimers on 2014/11/13
A while ago, I wrote a via PowerShell script to show the component packages (BPL) files for all installed Delphi (actually: BDS) versions (now at List-Delphi-Installed-Packages.ps1) for a couple of reasons:
Note that in the mean time (I queued this blog entry somewhere in 2013) the script has moved to BitBucket, I’ve written more scripts (like Dependencies.bat which is documented in Dependencies.md and Run-Dependend-rsvars-From-Path.bat), all modified all scripts to support all BDS versions I had access to, and a write nice conference paper on Build Automation for Delphi that references the scripts.
Since none of the machines were using pre BDS installations, I could limit the script to BDS 1.0 and up.
The very first (1.0) version of BDS (also known as the Gailileo IDE foundation) was in fact not a Delphi version, but C# Builder 1.0. All Delphi versions since then are based on BDS. The script is based on the BDS registry keys I researched and wrote about in Files in your Delphi settings directory; How to relocate the Favourites on your Welcome page.
Since registry access can be very much flow based, the pipeline architecture of PowerShell is a good fit.
So I wrote a PowerShell script (:
Note Thomas Mueller has written a batch file around the same set of registry keys; the thread there also has some insight in the HKLM versus HKCU keys.
I will explain my script step by step, and start with the most important one: Set-StrictMode -Version Latest. Read the rest of this entry »
Posted in CommandLine, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, PowerShell, Software Development | Leave a Comment »
Posted by jpluimers on 2014/11/06
The last couple of weeks I taught two sessions at both ITDevCon 2014 in Milano, Italy and EKON 2014 in Köln, Germany.
The EKON materials are slightly more up to date and elaborate (sessions there were 75 minutes), so below are all the links.
Notes:
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 1 Comment »
Posted by jpluimers on 2014/11/05
Vin Colgin posted on G+:

The kind of text that the Delphi IDE often removes in a .dpr file.
FastMM4 and lines in the *.dpr
I’ve got an old problem, in which the IDE will take the lines required out of the “uses” clause in the *.dpr. Something I’m sure we’re all aware of, but is there a solution to keep it from doing it?
The comments indicate the problem is less severe in more recent Delphi versions:
Daniela Osterhagen Actually it has become much better. The IDE doesn’t meddle as much with the DPR files as it used to.
One option for solving this issue is adding a new unit as the first entry that permanently stays there and moving the ifdef to that unit.
That’s what I did a long time ago and even put on-line, and even put it on-line at CodePlex as FastMM4BootstrapUnit.pas (now moved to bitbucket as FastMM4BootstrapUnit.pas). Too bad CodePlex and BitBucket are not indexed on Google, so I commented this:
I’m using a FastMM4BootstrapUnit for that at the top of my DPR; it looks like this […]
It will eventually end up at my BeSharp.net repository any way.Let me know if you need it there soon, and I can probably get something published after the Entwickler Konferenz next week.
So various people are now using this:
- Vin Colgin: very nice. Thanks for the tip!
- Warren Postma: This works fine for me in xe6 and up.
- Bruce McGee: Nice. May I steal this? And by “steal”, I mean giving credit in the code comments.
Since I could use this unit during my EKON 2014 talk about Delphi Unit Testing, I expedited the publication:
And explained the usage in this Unit testing session session materials.
Note: this file isn’t indexed either (as BitBucket doesn’t allow it), but since the repository will be git based in the foreseeable future anyway, I can then move it to GitHub which does allow Google to crawl the master branch.
–jeroen
via FastMM4 and lines in the *.dpr I’ve got an old problem, in which the IDE….
Posted in Delphi, 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, Development, Software Development | 5 Comments »
Posted by jpluimers on 2014/10/23
not 100% accurate any more (now that the compiler gets more and more LLVM), but still accurate for most of the x86/x64 parts: Barry Kelly explaining how the Delphi compiler is built.
Some more of his posts.
–jeroen
via: Newbie question: What is the importance for a compiler to be able to compile itself? – Google Groups.
Posted in Delphi, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 2 Comments »
Posted by jpluimers on 2014/10/22
It is always nice to see one of the compiler engineers write down how something was implemented.
In this case, Barry Kelly explains in comp.compilers on Implementing Closures in Delphi 2009. The post is about 4.5 years old, but still very relevant.
About 9 months earlier, he participated in a Reddit thread about a similar topic. Worth reading too!
–jeroen
Posted in Delphi, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | 5 Comments »
Posted by jpluimers on 2014/10/07
Calling Randomize too often can make your Random numbers even less random.
Sometimes having the Randomize call in a unit initialization section is not practical.
Hence this little method that I think I first wrote back in the Turbo Pascal days:
procedure RandomizeIfNeeded();
begin
if RandSeed = 0 then
Randomize();
end;
–jeroen
Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Pascal, Software Development, Turbo Pascal | 7 Comments »
Posted by jpluimers on 2014/08/19
Since this did not make it to DelphiFeeds yet: I’ve seen the function PaletteFromDIBColorTable in Graphics.pas go back as far at least until Delphi 2006, and references on the web as far back as Delphi 4.
So: this bug is old, but as it is a security one, make sure you patch soon.
For Delphi XE6, download 29913 BMP Buffer Overflow hotfix – Delphi, C++Builder, RAD Studio XE6.
For older Delphi versions, read this piece that was adapted from the EDN article Delphi and C++ Builder VCL Library Buffer Overflow:
For users of prior versions of Delphi and C++Builder: these steps should be followed to modify the VCL source code and add it to your application.
For each application:
- Add the modified Edit Vcl.Graphics.pas or Graphics.pas or Borland.Vcl.Graphics.pas to your project
- For C++Builder: Under Project | Options | Packages | Runtime Packages, set “Link with runtime packages” to false
- Rebuild your application
Once for the native VCL and .NET VCL:
- Note: Variable names and scoping might be slightly different depending on your product version.
- Edit Vcl.Graphics.pas or Graphics.pas or Borland.Vcl.Graphics.pas
- Locate the function PaletteFromDIBColorTable.
- Add the following code just before the line assigning a value to Pal.palNumEntries when the DIBHandle = 0
if ColorCount > 256 then InvalidGraphic{$IFNDEF CLR}@{$ENDIF}SInvalidBitmap;;
–jeroen
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Development, Software Development | Tagged: Buffer Overflow, Delphi, Delphi versions, vcl | 5 Comments »
Posted by jpluimers on 2014/08/12
In the With Statement series:
Lars Fosdal – Code Rants
Debugging today, I found another gotcha.
In this case, both Self and DisconnectedClient has a property named ClientIdentifier.
Note the difference for the mouse-over and the evaluation.
–jeroen
Posted in Appmethod, Borland Pascal, Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Pascal, Software Development, Turbo Pascal, With statement | Leave a Comment »