我正在寻找一般建议。我创建了一个 Visual Studio 2010 项目,该项目输出一个在 XP 和 Vista 计算机上使用的 ocx 文件。它所依赖的DLL已经在我们的Win7机器上更新了。我只需要使用完全相同的代码和更新的 .lib 文件重建 Win7。我创建了第二个项目配置 (ReleaseW7),它与原始项目配置 (Release) 的唯一不同之处在于它指向新的 .lib。
所以现在我有 2 个文件都名为 xx.ocx。除了查看每个文件所在的文件夹名称(或查看每个文件的创建时间)之外,无法确定哪个是哪个。我想过使用不同的文件版本号,但据我所知(我对此相对较新,所以我肯定是错的),这将需要两个单独的项目,每个项目都有一个稍微修改过的资源(.rc)文件,而不是在同一个项目中简单地有两个配置。如果没有更多的话,这似乎是对硬盘空间的浪费。这也感觉像是使用文件版本号的“错误”方式
是否有更干净或更“标准”的方式来处理这个问题?我真正想要的是让安装 ocx 并支持最终用户的人员能够确定他们正在使用正确的文件。
I'm looking for general advice. I created a Visual Studio 2010 project that outputs an ocx file that is used on XP and Vista machines. The DLL on which it depends has been updated on our Win7 machines. I simply needed to rebuild for Win7 using the exact same code with an updated .lib file. I created a second project configuration (ReleaseW7) and it only differs from the original project config (Release) in that it points to the new .lib.
So now I have 2 files both named xx.ocx. Besides looking at the name of the folder each file resides in (or looking at the creation time of each) there is no way to determine which is which. I thought of using different file version numbers but as far as I can tell (and I'm relatively new to this so I could certainly be wrong) that would require two separate projects each with a slightly modified resource (.rc) file, instead of simply having two configurations within the same project. If nothing more, that seems like a waste of hard drive space. It also feels like the "wrong" way of using file version numbers
Is there a cleaner or more "standard" way of handling this? All I really want is a way for the folks who install the ocx and support the end user to know for certain that they are working with the correct file.
发布评论
评论(1)
长话短说,我决定使用不同的版本号。我能够为资源编译器设置预处理器定义,并使用它来处理 .rc 文件中不同版本的 VS_VERSION_INFO。
如果有人感兴趣,这是我找到的资源:
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/605275c0-3001-45d2-b6c1-652326ca5340/
Long story short, I decided to use different version numbers. I was able to setup a preprocessor definition for the resource compiler and use that to handle different versions of VS_VERSION_INFO in my .rc file.
In case anyone is interested, this is the resource I found:
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/605275c0-3001-45d2-b6c1-652326ca5340/