How to change VCL code?

后端 未结 4 1306
时光说笑
时光说笑 2021-01-13 10:38

I need (to make some quick and dirty tests) to modify the code of Variants and SysUtils.

What I need to do to \"compile\" the changes?

4条回答
  •  伪装坚强ぢ
    2021-01-13 11:20

    If you really wish to recompile the RTL you can do so (Make a backup first!). Versions of Delphi prior to Delphi 2010 had a makefile in the source folder that could be run from the command line to rebuild the rtl/vcl. I don't know for sure (I'm still using D2009) but from what I've heard this file is no longer present in newer versions. Hopefully there is an alternative. Otherwise you would wind up wasting a lot of time trying to guess that the compiler settings for each unit.


    If you wish to "patch" a bug in the rtl for your project only you can copy the unit you want to modify into your project's folder and make your change. If the unit your modifying is used throughout the RTL/VCL you may find yourself copying quite a few dependent units into your project folder in order for it to compile.

    If this significantly slows down the compile time for your project you can always do your initial compile then remove the "patched" units, leaving behind the compiled dcus.

提交回复
热议问题