Holger's Thoughts on Delphi

Friday, March 31, 2006

Delphi 2006; dcc32: "--secret-sign" compiler switch

This is amazing! I fiddled around with PGP today. I wanted to sign my secret key and a couple of other keys, but - as always - I had to look up the name of the parameter for my command-line tool. A quick Google search reveiled that it was "--secret-sign". So I selected the text and copied the parameter into the clipboard. Changed back to the command window, pasted and pressed ENTER. Hmm...

This is what I saw on the screen:



C:\Documents and Settings\holger\apps\GnuPG>dcc32 clpbrdhist.dpr --secret-sign
Borland Delphi for Win32 compiler version 18.0
Copyright (c) 1983,2005 Borland Software Corporation (experimental compiler switch help)

Syntax: dcc32 --secret-sign [options] filename [options]
The --secret-sign parameter enables the following options:
-NATIVE64BIT = Build 64-Bit executable (experimental)
-ENABLE-GENERICS = Enable generics (experimental)
-COMPRESS = Compress executable for in-place decompression (experimental)

Use at your own risk!

Wow! What's that? I pasted the parameter to the string that was still there due to the command line history I use quite a lot. At first I could not believe my eyes, but then I simply typed the followingin my source directory:



C:\Documents and Settings\holger\source\clipbrdhist>dcc32 --secret-sign -NATIVE64BIT clpbrdhist.dpr

Then I wondered that it really compiled and yielded an executable. Then, I tried to execute it and had to realize: It did not work! I do not have Win64, nor do I have a 64-Bit processor... the message was:

Fatal error: Cannot execute clpbrdhist.exe -- operation not supported

Well, I guess, somebody of you has to try it on a Win64 system with a decent processor. However, I tried the "-compress" switch and it really decreased the size of the executable quite a bit! And I could not "feel" any performance decrease compared to the non-compressed exe. This is really cool!


The other switch is pretty useless, as I have no idea how the syntax would have to look like in order to use it... Well, maybe somebody way smarter than me will find out :-)

3 Comments:

  • Hey, aren't you a day early?!

    By Anonymous Alan, at 1:02 AM  

  • Dude, that was cruel ... I so wanted a 64 bit compiler to mess with!

    By Anonymous Anonymous, at 7:59 AM  

  • I tried it after the 2nd update. It did not like --secret-sign. I tried the 64 bit compile switch though, and it wanted a directory called ATIVE64BIT. I created the directory and tried again. It created a copy of the .dpr file in the ATIVE64BIT directory. I ran the executable, and it ran. However, that proves nothing. I suspect that since the compiler directive was -NATIVE64BIT, that the compiler interpreted it -N ATIVE64BIT, and I haven't looked up the -N compiler diretive.

    So, best guess, update 2 removed that feature.

    By Anonymous Larry Maturo, at 4:17 AM  

Post a Comment

Links to this post:

Create a Link

<< Home