在非特定库路径中使用Delphi时如何删除重复的资源(RES,DFM)? [英] How to remove duplicate resources (RES, DFM) while using Delphi with non specific Library paths?

查看:105
本文介绍了在非特定库路径中使用Delphi时如何删除重复的资源(RES,DFM)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了先前讨论中收到的建议(库路径应该指向包的源文件吗?
问题是我必须复制RES和DFM文件,并将它们从源代码文件夹复制到已编译文件夹。这根本不是一个优雅的解决方案,因为每次我对控件进行更改(并且经常执行)时,都必须记住将新的资源文件复制到已编译的文件夹中。



必须有一种优雅的方法来解决路径的奥秘!我想要的只是按下编译按钮并编译我的程序。似乎并不复杂。对?好吧,实际上它可以与我之前的设置一起工作(将Delphi指向所有控件的源代码)。我只是将其更改为以好人做事的方式来做。



附录

我仍​​然认为这是错误的方法,因为Delphi的(稀有)文档说,库路径应指向包的源文件。






使用:

Delphi 7,Win 7(32),简单的Delphi设置(单个开发人员

解决方案

尽管其他人在这里提供的答案肯定是正确的(每个人都投票赞成)。 ,做了一些试验后,我决定保留以前的(KISS)设置。它已经工作了多年,它将继续工作。我知道,它以速度(重新编译源代码)来换取稳定性,但是却阻止了路径,库,源,浏览和输出文件夹的疯狂。我只是不必担心设置路径了(第一次安装Delphi时除外,但这可以自动进行),也不必退出当前的DPR Delphi项目并加载DPK库,并在每次对其进行更改时进行编译。 / p>

I followed the advice received in a previous discussion ( Should "Library path" point to the source files of packages? ) and now my Library Path points to folders containing the compiled code (DCU) and NOT to the source code of my controls. The problem is that I have to duplicate the RES and DFM files and copy them from the 'source code' folder to the 'compiled' folder. It is not a elegant solution at all since, every time I change something (and I do often) to my controls I have to remember to copy the new resource files to the compiled folder.

There must be an elegant way to solve the mystery of the paths! All I want is to push the compile button and to have my program compiled. It doesn't seem so complicated. Right? Well, actually it work with my previous setup (point Delphi to source code of all controls). I just changed it to do it the way the 'good people' are doing it.

Addendum
I still think this is the wrong approach since Delphi's (scarce) documentation says that Library path should point to the "source files for the package".


Using:
Delphi 7, Win 7 (32), simple Delphi setup (single developer with no versioning system installed).

解决方案

Though answers provided here by others are definitively good and correct (everybody receives a vote up), after experimenting a bit I decided to keep my previous (KISS) set up. It worked for years and it will work for many more. I know, it trades speed (recompiling the source code) for stability but it keeps the "paths, libraries, source, browsing and output folders" madness at bay. I just don't have to worry about settings paths anymore (except first time when I install Delphi but this can be automated) or to quit current DPR Delphi project and load a DPK library and compile it every time I add changes to it.

这篇关于在非特定库路径中使用Delphi时如何删除重复的资源(RES,DFM)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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