简体   繁体   English

检查是否没有为installshield项目忘记文件

[英]Check that no file is forgotten for the installshield project

we actually build an InstallShield project for our application with the functionality to include files dynamic into a component. 我们实际上为我们的应用程序构建了一个InstallShield项目,该项目具有将动态文件包含到组件中的功能。 All files will be taken which are in a specific place. 所有文件都将被放置在特定位置。

Because of problems, which are not part of this question, we want to change this to components where we add files explicit to custom separated components. 由于存在问题,而这不是该问题的一部分,因此我们希望将其更改为在组件中添加显式文件到自定义分离组件的组件。

The question is, is there a best practice for this? 问题是,这是否有最佳实践? We have the small fear that we easily can forget to add files to the component we new created. 我们担心的是,我们很容易忘记将文件添加到新创建的组件中。 These can be dll files, .config files, pdfs or just xml. 这些可以是dll文件,.config文件,pdf或xml。

(We build the installer every night using TFS.) (我们每晚使用TFS来构建安装程序。)

We found a solution for the problem. 我们找到了解决问题的方法。
What we wanted to solve: 我们要解决的问题:

  1. During the build we want to be informed if files got removed 在构建过程中,我们想知道是否删除了文件
  2. During the build we want to be informed if new files are missing 在构建期间,我们想知道是否缺少新文件

we solved this by two more or less easy things. 我们通过两个或多或少的简单方法解决了这个问题。

1. Information if a file is removed 1.删​​除文件的信息
This is easy sone, we have all files added explicitly, each single file is an own component now, if one file is missing the whole project does not build with the exact error message. 这很容易做到,我们已经明确添加了所有文件,现在每个文件都是一个自己的组件,如果缺少一个文件,则整个项目将不会生成确切的错误消息。

2. Information for missing files 2.丢失文件的信息
For this we wrote a small tool which runs by a prebuild event of the installshield project. 为此,我们编写了一个小工具,该工具由installshield项目的prebuild事件运行。
There it opens the *.ism file as an xml file and searches for the "Files" table. 在那里它将* .ism文件作为xml文件打开,并搜索“文件”表。
Than it takes all files from the drop folder and looks if all files are in there. 然后从放置文件夹中获取所有文件,并查看是否所有文件都在其中。

If there are files missing but we don't expect them, like pdb files or test dlls, we have an additional text file we just called "IgnoreList". 如果缺少文件但我们不希望它们出现,例如pdb文件或测试dll,我们还有一个附加的文本文件,我们称之为“ IgnoreList”。
The tool skips these files by the check. 该工具将通过检查跳过这些文件。

Now we are on a very good state to get informed directly on the next morning if the project was able to build or not, and if not what happened, so we can be sure that in the final target application are files are there :-) 现在我们处于一个非常好的状态,可以在第二天早上直接通知项目是否能够构建,如果没有构建,那么我们可以确保最终目标应用程序中有文件:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM