delphi-“can't be installed because it is not a design
来源:互联网 发布:韩信替代关羽 知乎 编辑:程序博客网 时间:2024/04/26 08:55
from :http://blog.163.com/liushui19860112@126/blog/static/1323730462013859473810
今天装个控件包,遇到“can’t be installed because it is not a design time package”,遇到各种问题,最好不要一个一个的分别编译重建,他们有相互依赖关系。最好projects->compile/build all projects,如果没有成功,最好要clean或者删除bpl文件。然后分别安装时遇到“can’t be installed because it is not a design time package”,找到解决方法:根本不需要管他。
设计期包引用了运行期包, Delphi 的包技术是基于 unit 的,实际上build with runtime package 时,是在连接期,将对程序引用到的单元的连接变成对运行包的外部引用。
这样来说吧,我们要编写一个在 IDE 中可以安装使用的组件,需要有一个 TMyComp 组件的实现,然后有一个 Register 函数将组件注册到 IDE 控件面板。
如果这个组件的属性需要编辑器,或者组件本身有编辑器,还需要写一些编辑器的代码。这些在 IDE 中用来编辑组件及其属性的代码,对应用程序来说是没有意义的注册组件,编辑器的 Register 函数对应用程序也是没有意义的,而且这些编辑器是依赖于 IDE 的 ToolsAPI、DesnIntf 等 OTA 单元。
如果和 TMyComp 的代码放在一个 pas 中编译的时候,应用程序就还需要间接引用到 IDE 的这些 OTA 单元,而事实上这样处理是不适当的。
所以开发组件包的作者,就引入了运行期包和设计期包两个概念,将那些应用程序需要编译到 exe 中的源代码放在组件实现的 pas 单元中,比如dclCnPack_D7.dpk的内容,里头包括的 unit,都是应用程序中用不到的,只在IDE 里头使用。
这些 pas 都包含在运行期包的 dpk 文件中。运行期包在工程选项中,是设置为Runtime only 模式。只能用于运行期,不能进行安装。当然,对于单个组件,可能觉得分开写这两个单元太麻烦。但对于大型的组
件包,这样分开设计就很明了了。
1、如果先安装 CnPack.dpk 会提示以下错误:
Error:
Package c:\program files\Borland\delphi6\Projects\Bpl\CnPack_D6.bpl
can’t be installed because it is not a design time package.
2、如果直接安装 dclCnPack 就不会有这个问题。
因为 dclCnPack 引用了 CnPack.dpk,IDE 会自动先去编译后者
(CnPack.dpk),再来安装前者(dclCnpack.dpk)。
前面也提到了,运行期包的工程中设置了 Runtime only,不允许做为设计期包
安装,而设计期包的工程选项中设置了 Design only,不允许作为运行期包使用,
这样就强制对两个包的用途区分开了。
- delphi-“can't be installed because it is not a design
- weechat : can not be installed because plugin "perl" is not loaded
- Can not delete a master page "This item cannot be deleted because it is still referenced by other pa
- The Simulator can't be launched because it is already in use.
- Xcode The Simulator can't be launched because it is already in use .
- The Simulator can't be launched because it is already in use.
- Xcode The Simulator can't be launched because it is already in use .
- ios The Simulator can't be launched because it is already in use.
- can’t be accessed because the working copys format is not supported
- Hololens错误提示:can't be loaded because it was not built with the right version or build target.
- 解决Sheet can not be presented because the view is not in a window这样的问题
- the app xxx.app could not be added to your iTunes library because it is not a valid app
- Dephi中安装"dpk"包文件时弹出".. because it is not a design time package"的对话框.
- svn: E155019: Can't upgrade as it is not a pre-1.7 work解决办法
- ubuntu(firefox):How to fix "this addon could not be installed because it has not be vireified"
- The problem of “Can’t exit design mode because control ‘ShockwaveFlash1’ cannot be created.”
- Database diagram support objects cannot be installed because this database does not have a valid owner.
- Database diagram support objects cannot be installed because this database does not have a valid own
- 成功开发iPhone软件的10个步骤
- xmpp协议使用iptool抓包工具分析
- 软件测试的层次
- POJ 3126 Prime Path SPFA
- 让两个Div并排显示
- delphi-“can't be installed because it is not a design
- 线程属性
- Eclipse和MyEclipse自定义透视图perspective,自定义新建菜单
- [Bzoj1115][POI2009]石子游戏Kam
- 5.13安卓学习
- 每CPU变量
- 如何使用Git上传项目代码到github
- 敬各位码农之开客书
- weblogic unable to get file lock问题