Jump to content

A.M. Hoornweg

Members
  • Content Count

    447
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by A.M. Hoornweg


  1. 1 hour ago, Rollo62 said:
    
    If you want to remove advanced RTTI from RTL/VCL, you have to recompile RTL/VCL, which is what OP wants. 

    I've never considered to remove anything from there, as I think its probably not worth to consider memory space in 21th century.
    Maybe this is another story with mobile devices still.
     

     

    It may not be a problem with single-executable applications, but RTTI overhead really becomes an issue if we're talking about a modular application suite consisting of dozens of DLL's (mostly COM servers).  If each and every one of these DLL's carries the RTTI overhead of much of the RTL and/or VCL, it simply adds up.  Which is totally tragic if the project doesn' even use any of it.  And before you ask, no, runtime packages aren't an option here.   But apart from that,  from an intellectual property point of view we simply think it is undesirable that our competitors could inspect the objects in our compiled executables.  

     

    1 hour ago, Rollo62 said:

     

    7 hours ago, Kryvich said:

    Perhaps this will help:

     

    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. Hello all,

     

    I would like to re-build Delphi's RTL/VCL without RTTI for a certain project in which the compiled size of the DLL's and executables is important.   I'd be very grateful if someone could supply some insight or maybe a script to accomplish it.   I have no problem doing so using Delphi XE but Delphi Rio is giving me a hard time.


  3. On 12/9/2018 at 4:57 PM, David Heffernan said:

    Pointless to ask ShellExecute to create a cmd process to in turn create another process. Create the other process directly. This is the source of all your problems. 

    ... 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). 

×