I found some interesting information.
The Delphi tb can generate smaller executables, it is enough for you not
use vcl, in this case all events should be done at hand, such
as in the Masm32, as the keyboard events, mouse, screen drawing,
Buttons and etc. Of course this takes time, but if one wants one
application that is tiny, as a virus for example will not
use in any case visual components and try anyway
reduce the dependency of third parties to the maximum, placing the functions that
accesses a separate Unit instead of adding all Unit.
source: Activedelphi. Response from Johnny-Walker.
In the same post there is another answer, from Rodrigoprado
-Here in the company an ordinary . exe would have 60.7 Mb.
-we optimized it to 30.0
-after this we still have it on 7zip using ultra mode compression, making it drop to 4.5 Mb.
then in the end we would have a.7z file of 4.5 Mb.
01-We use Delphi 7, in Project --- Options on the DEBUGGING page
we cleared all checks ex: degug information, Symbols location,
Reference, Definitions, assertions, use debug dcus. 02-na page LINKER
no group EXE AND DLL OPTION we uncheck generate consolte, include
td32 debug and include remote debug simbols.
ai clicamos ok, let’s shift+f to a build in the new exe, it will
fall to less than half of the package, because in these options is the version of
user there we do not need to include anything debug that we use for
development among other things. that only exist for us who
develops, pro user You don’t need it or just receive the
pure code.