如何指定项目特定的包设置? [英] How to Specify Project-Specific Package Settings?

查看:123
本文介绍了如何指定项目特定的包设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Delphi 2010 IDE中指定特定于项目的软件包设置?更改项目选项中的包确实会更改项目组中所有项目的包。

How can I specify project-specific package settings in the Delphi 2010 IDE? Changing the packages in the project options does change the packages for all projects in the project group.

这很烦人,因为我使用需要禁用的包构建我的应用程序为了编译项目组中的BPL。

This is annoying because I build my application with a package that needs to be disabled in order to compile the BPLs in the project group.

推荐答案

正如我在对vcldeveloper的答案中所说的那样(现在已经有些消失了) )我可以确认这种行为。虽然我不知道内在函数,但我可以尝试给出一些解释的提示。

As said in my comment to vcldeveloper's answer (which has somehow vanished now) I can confirm that behaviour. Although I don't know about the intrinsics, I can try to give some hints for an explanation.

当您在项目选项中禁用包时,这将卸载此从IDE中打包(也许还有一些)。如果这些设置对于同一项目组中的每个项目都是唯一的,那么项目的简单切换就必须在IDE中加载/卸载设计时包。除了性能下降,这个可能可以实现。

When you disable a package in the project options, this will unload this package (and perhaps some more) from the IDE. If it were the case that these settings are unique to each project in the same projectgroup, a simple switching of the project would have to load/unload designtime packages in the IDE. Besides the performance drop, this might be possible to implement.

假设我们在一个项目组中有两个项目,每个项目包含一个包含一些组件的表单。 Project1中的Form1使用Package1中的组件和Project2中的Form2以及Package2中的组件。出于某种原因,两个包都是互斥的。鉴于之前解释的(不存在的)行为,在两个项目之间切换将加载/卸载相应的包。

Let's assume we have two projects in a projectgroup each containing a form with some components. Form1 in Project1 uses a component from Package1 and Form2 in Project2 a component from Package2. For some reason both packages are mutually exclusive. Given the (non-existent) behaviour as explained before, switching between both projects will load/unload the corresponding packages.

但是没有人阻碍你从需要Package2的Project2打开Form2仍然选择Project1(这意味着卸载了Package2)。因此,Form2上使用的组件是未知的,并且无法加载表单。

But nobody hinders you to open Form2 from Project2 requiring Package2 while still Project1 is selected (which means Package2 is unloaded). Thus the component used on Form2 is unkown and the form cannot be loaded.

此外,假设在切换到Project2时选择了Project1并且Project1中的Form1处于打开状态。这将卸载Package1 - 使Form1上的组件消失?

Moreover, assume Project1 is selected and Form1 from Project1 is open while you switch to Project2. This would unload Package1 - making the component on Form1 vanish?

有理由保持项目组中所有项目同步所需或排除的包。

There is a reason to keep the packages needed or excluded by all projects in a projectgroup in synch.

您的问题的解决方案可能是使用单独的项目组。

A solution to your problem might be to use separate projectgroups.

这篇关于如何指定项目特定的包设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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