Posted by jpluimers on 2016/10/20
I will probably need this in the future as occasionally I still do Delphi work:
Posted in Delphi, Delphi 2006, Delphi 7, Development, Software Development | 1 Comment »
Posted by jpluimers on 2016/10/19
I like repositories to have as much of the information in text format.
Delphi traditionally puts both the MAINICON and the VersionInfo resources in a binary .res file and also updates that file on almost every recompile.
There are quite a few posts explaining how to get them from text, but a version controlled example works best for me, so there is one at https://github.com/jpluimers/atom-table-monitor/blob/master/ATOMScannerConsole
The trick is to:
- put your resources in a text RC file that can be compiled through a resource compiler
- add these to your Delphi project via the project manager, so it generated RcCompile elements which instructs the build process to run the resource compiler first:
Here are the example files:
Read the rest of this entry »
Posted in Delphi, Delphi 10 Seattle, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »
Posted by jpluimers on 2016/10/18
While upgrading a truckload of Delphi stuff for a client, I came across the
IMPLICITBUILDING directive in a few .dpk files that Delphi XE2 sometimes inserts but XE8 doesn’t.
This appears to be a Delphi XE2 specific thing that in younger Delphi versions has been solved properly SolarWind‘s answer on Stack Overflow:
The compiler directives which appear between the $IFDEF IMPLICITBUILDING and $ENDIF are normally passed as parameters by the compiler when explicitly compiling a package. Because these options change based on the configuration (debug / release) and target platform (Win32, Win64, OSX32) it’s problematic to have them statically defined in the package project source. When defined in the project source they will always override the options passed by the compiler. The $IFDEF prevents these options from being used during explicit compilation.
Source: Delphi XE2: What is the purpose of IMPLICITBUILDING directive found in package – Stack Overflow
and comment by Andreas Hausladen:
That seems to be a workaround for the problem that compiling packages with the msbuild script ignored all dproj compiler options because they were read from the dpk file by the compiler.
Some more references (I’ve saved them in the WayBack machine as the forums auto-expire posts):
Posted in Delphi, Delphi XE2, Delphi XE8, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2016/10/12
$(BDS)\source\cpprtl\Source\misc\unmangle.c – it contains the source code for the unmangling mechanism used by TDUMP, the debugger and the linker. (C++Builder and Delphi use the same mangling scheme.)
This has been around as long as BCC itself. However the file was called
um.c instead of
unmangle.c in older versions
Source: Delphi – unmangle names in BPL’s – Stack Overflow both by User Moritz Beutel.
It’s the same mangling used in the TD32/TDS and MAP symbols.
And neede to improve https://github.com/jpluimers/map2dbg (which is my fork of https://github.com/andremussche/map2dbg) which contrary to it’s name also supports TDS/TD32 conversions in tds2pdb. The code is C# and works in virtually any Visual Studio version of 2012 and younger.
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2016/10/06
Allen Bauer (ex Delphi R&D team) wrote the brilliant piece about a year and a half ago. We can still dream, right?
Allen Bauer, May 25, 2015
Current working theory of
Nullable<T> = record
property Value: T read FValue; default;
default directive to “hoist” the operators of “
T“. Currently the
default directive only works for
array properties by “hoisting” the ‘
‘ operator. Marking a non-array property with
default will make the containing type behave as that type.
This, coupled with some intrinsic compiler knowledge of the
Nullable<T> type will make
Nullable<T> work without any addition of keywords or other standard functions or procedures.
Using the “
default” directive on a non-array property will work for any type, except for having the null-propagation semantics.
When considering language features, I try and not only make it work for the intended purpose, but also broaden reach of any supporting feature. In the above scenario, even user-defined operators on “
T” will be properly hoisted and used.
This was part of a very interesting G+discussion at Delphi’s New Feature Desired: Nullable Types and Null Propagation….
It covered topics like these:
Posted in Delphi, Development, Software Development | 5 Comments »