加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

如何分析用Delphi构建的exe文件大小?

发布时间:2020-12-15 09:30:41 所属栏目:大数据 来源:网络整理
导读:我想有一份报告清楚地解释为什么用Delphi构建的exe具有特定的大小. 例如这样的事情: filename: Project1.dpr - total size 100MB Details: - unit1.dcu - 20MB - unit2.dcu - 60MB - libraries.dcu - 20MB 我想有这样的报告来理解为什么我刚刚构建的exe是12
我想有一份报告清楚地解释为什么用Delphi构建的exe具有特定的大小.

例如这样的事情:

filename: Project1.dpr - total size 100MB
   Details:
    - unit1.dcu - 20MB
    - unit2.dcu - 60MB
    - libraries.dcu - 20MB

我想有这样的报告来理解为什么我刚刚构建的exe是120MB的大小.它使用来自另一个应用程序的许多文件,当构建时为90MB.我只添加了两个单元(并删除了很多),大小从90改为120 MB.我期待更小的尺寸(考虑到许多移除的单位).

是否有一些工具已经做到这一点或有没有办法从IDE研究这个问题?

解决方法

I would like to have a report that explains clearly why an exe built with Delphi has a specific size.

Ville Krumlinde编写了一个工具,通过解析链接器创建的映射文件来报告exe文件中的单元大小:DelphiUnitSizes.

enter image description here

设置项目选项|链接|将文件映射到公共或详细,并完整构建exe.使用DelphiUnitSizes打开生成的映射文件.

另一个类似的工具是Eric Grange的MapFileStats.

can i use EurekaLog without debuginfo?

从EurekaLog documentation开始:

“Debug Information” (Linker page,new Delphi)/”Include TD32 debug info” (old Delphi)/”Full debug information” (C++ Builder) – this option embeds debug information for external debugger in TD32 format into your application. You may need this option if you use “Run”/”Attach to process” and Delphi can not find debug information. Also,EurekaLog uses TD32 info to complete missing information in C++ Builder. Note,that size of your Delphi application can increase 5-10 times by enabling this option (C++ Builder writes information in separate .tds file),unless you enable “Place debug information in separate TDS file” option.

“Map file” – by enabling this option you tell the Delphi’s linker to create a separate .map file along with your executable. Map file contains human-readable representation of debug information. Different settings for this option controls the detalization level of output. Usually,there is no need to change it to anything,which differs from “Off” or “Detailed”. The map-file is used by various tools as primary source of debug information. For example,EurekaLog automatically turns this option on and uses map-file to create a debug information in its own format and then injects it into application. That is why you rarely need to change this option manually.

这意味着映射文件以某种方式注入到exe文件中,而将完整的调试信息包含在exe中是可选的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读