I’ve a VM with many Delphi versions and want to clean up space from %ProgramData% to install more. I think somewhere in the comments it was mentioned what to delete from %ProgramData% to lessen the disk space used by Delphi installations. […]
The VM is on an SSD, and the GUID directories there total to about 50 gigabytes.So any reminder what I can delete there would be much appreciated (:
Besides saving disk space, another advantage is that you get far less duplicates when indexing your filesystem with Everything: the directories contain copies of all files also present in the final installation (like %ProgramFiles%, etc).
Thanks to Ilya S, below are my notes for cleaning up a machine that has Delphi 2007 and Delphi 2010-XE6 installed.
In these folders, backup delete all subdirectories but the directory OFFLINE. Don’t delete files. Keep the backups in case you need them.
Obtain 29458_firedac_xe4_update_2_for_rad_studio_delphi_c_ent_ult_arch.zip from a registered Delphi XE4 or higher license: http://cc.embarcadero.com/item/29458:
(When not running as Administrator: elevate to Administrator)
Welcome screen: press next
License screen: accept, then press next
Destination selection screen: keep C:\Program Files (x86)\Embarcadero\FireDAC, then press next
Select components screen: keep the selection (Full installation), then press next
Select IDEs screen: choose Delphi 2007 (but not Delphi 2006), then press next
Select Demo Databases screen: keep the settings (do not choose Interbase / Firebird server as then you have to provide the credentials for the server), then press next
Start menu screen: keep Embarcadero FireDAC, then press next
Ready to install screen: press install
After installation: press finish, then read the readme
or later browse to <file:///C:/Program%20Files%20(x86)/Embarcadero/FireDAC/Readme.html>
That’s what actually tells you:
The installer automatically installs FireDAC in the Delphi XE4 and C++ Builder XE4 IDEs. For older versions of the IDEs, you can run the installer with the /SHOWIDE command line parameter.
The actual BPL sometimes is in C:\Users\<username>\AppData\Local\Documents\RAD Studio\5.0\Bpl\AnyDAC_Dcl_D11.bpl
The cause is that the BPL gets loaded from %BDSCOMMONDIR% which on some systems points to
%PUBLIC%\Documents\RAD Studio\5.0
and on others points to
%LOCALAPPDATA%\Documents\RAD Studio\5.0
This seems to be the case on machines where more different Windows users are using Delphi.
The installer does not fully recognize this distinction, so copies the BPL to %LOCALAPPDATA%\Documents\RAD Studio\5.0\Bpl and registers it as being in %PUBLIC%\Documents\RAD Studio\5.0\Bpl.
On these machines there is a difference between the definition of BDSCOMMONDIR in these registry keys:
Since the table there is incomplete (even the Embarcadero documentation is wrong as some shortcuts can turn on and off a mode), here are the relevant shortcuts keys:
Ctrl + O + C
Turns on/offblockcolumn selection mode
Delphi 5 and up
Ctrl + O + K
Turns on/off block selection mode
Delphi 5 and up
Ctrl + O + L
Selects current line (and turns off block selection mode)
Delphi 5 and up
This is especially useful when the block selection is stuck (this happens every now and then: it’s a known bug).
A while ago, I posted [WayBack] the below StackOverflow answer. Recently a friend asked me about command-line parsing in Delphi, so here is the re-run:
Delphi contains a really nice unit called CommandParser with a [WayBack] TCommandParser class that does commandline parsing for you. Since it has [WayBack] virtually no documentation, here are a few things to get started. It works even in Delphi 2007.
TComponent that contains the properties you want to expose as commandline parameters (that is THiddenExecuteSettings in the HiddenExecuteSettingsUnit
a commandline parser controller. In our case THiddenExecuteArguments in theTHiddenExecuteArgumentsUnit (in retrospect not such a good name) that contains an InitCommandLine method that sets up a TCommandParser instance passing it your TComponent
It then executes a couple of [WayBack] AddSwitch calls to setup the parameters with both abbreviated and full commandline switches (like h and help)
ProcessCommandLine method on the TCommandParser instance to process the commandline and fill the properties of your TComponent (in my example, this is done in the ProcessCommandLine method).
Now comes the fun:
TCommandParser has a HelpText method that fully automatically assembles a helptext based upon what you fed it with the AddSwitch methods.
TCommandParser also has a SaveOptions method that allows you to save the current settings of your TComponent into a settings file.
When you have a registered Delphi, you can Ctrl-Click browse both the units and symbols of RTL, VCL, etc. But Delphi will not recompile these units.
Some third party components you cannot Ctrl-Click browse the units or symbols, unless you put the source directory in the Delphi Library Path (which causes them to be compiled each and every time).