如何在Delphi 2007中安装类或单元组件? [英] How to install classes or units like components in Delphi 2007?

查看:205
本文介绍了如何在Delphi 2007中安装类或单元组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Delphi 2007中编写一个包含一个组件和几个类的包。我想安装类和组件。



更准确地说:安装组件时,单元以某种方式注册,使其不会必须将其路径添加到项目中的搜索路径。我也想用一些不包含组件的额外的单元来实现:如果我可以以某种方式注册包的根,我已经完成了。这是可能的吗?



编辑:在一句话中,目标是:
如果有人安装我的包,则不需要添加到单位的路径该包被添加到Delphi的库路径(所以这不需要手动完成)。

解决方案

当我创建一个简单的组件包,我通常将单位输出目录包选项设置为$(BDSCOMMONDIR)\Dcp,而不是向库路径添加路径 - 它更简单。您可以下载我的 ksTools包作为示例 - 它是纯源代码包具有详细的安装说明


I'm writing a package in Delphi 2007 containing a component and several classes. I want to "install" the classes as well as the components.

To be more precise: when a component is installed, the unit is somehow registered such that it is not necessary to add its path to the search path in the project. I would also like to do this with a few extra units that do not contain components: if I can somehow register the root of the package, I'm done. Is this possible?

EDIT: In one sentence the objective is: If somebody installs my package, it is not necessary to add the path to the units in the package is added to the library path of Delphi (so this does not have to be done by hand).

解决方案

When I create a simple component package, I usually set "Unit Output Directory" package option to $(BDSCOMMONDIR)\Dcp instead of adding paths to Library paths - it is more simple. You can download my ksTools package as an example - it is pure source code package with detailed installation instructions

这篇关于如何在Delphi 2007中安装类或单元组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆