Jump to content

A.M. Hoornweg

Members
  • Content Count

    446
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by A.M. Hoornweg

  1. A.M. Hoornweg

    Recompile Delphi RIO RTL/VCL?

    Hello, that's pretty much how I do it using Delphi XE. I copy all RTL/VCL units into a temporary subdirectory, then reference all these units in a small dummy console program (having the RTTI directives mentioned in the link above) and then perform a full build of this dummy project. The resulting bunch of DCUS can then be used instead of the regular RTL/VCL (just set a project's search path to the directory containing the dcus) and it will produce vastly smaller executables. Unfortunately, in newer Delphi versions these RTTI settings can no longer be specified per-project, they must be set per-unit, requiring a manual change of every unit and that's many hundreds of them. I was hoping there would be a way around that.
  2. A.M. Hoornweg

    Shellexecute cmd.exe with spaces

    ... unless you need to use pipes, environment variables or want to capture the output of a command line program into a file. Then cmd.exe is a real life saver for which there is no real alternative as far as I'm aware. I had precisely that case last week. In an installation routine (inno Setup) I needed to figure out if a set of Microsoft IIS components was installed correctly before allowing the user to continue the installation of my ISAPI webservice. The following one-liner gives that information sorted in a text file. cmd.exe /s /c dism /online /Get-Features /Format:table /English | sort >%tmp%\dismfeatures.txt (Note that on 64-bit systems, this particular example requires calling the 64-bit version of cmd.exe; The 32-bit version of cmd.exe will call the 32-bit version of dism.exe which is totally non-functional on 64-bit operating systems. Google "Wow64DisableWow64FsRedirection" for more info).
×