从 VS2008 中的 Smart Cab 项目中排除 setup.dll

发布于 2024-09-18 08:57:28 字数 1021 浏览 7 评论 0原文

我已向在 CE5 和 WM6 上运行的安装程序添加了一些自定义操作。这个安装程序运行良好并且构建良好。然而,有一点令人烦恼。 setup.dll 已部署到设备,并且该文件不是必需的。

我读过几个关于创建 setup.dll 文件的网站、MSDN 甚至移动 SDK。它们都规定了相同的步骤。

  1. 创建您的 C++ dll 项目。
  2. 确保 输出称为 setup.dll。
  3. 在您的 cab 项目上,单击 CE 安装 DLL,浏览应用程序文件夹,添加输出并选择您的安装项目。 (您无法选择本地目录,它始终是目标计算机上的目录)

现在这确实可以工作并生成自定义 cab 安装程序。然而,正如前面提到的,setup.dll 被复制到应用程序文件夹中,即使安装后不需要它(甚至卸载也不需要),

我尝试通过在其属性中将排除设置为 true 来排除 setup.dll。所有这一切都不包括文件a all,因此缺少作为setup.dll 构建的cab 文件。

因此,我找到的唯一解决方案是手动将 cab .inf 文件从

[DefaultInstall]
CEShortcuts=Shortcuts
AddReg=RegKeys
CopyFiles=Files.Common1,Files.Common2,Files.Common3,Files.Common4
CESetupDLL="Setup.dll"

其中

[DefaultInstall]
CEShortcuts=Shortcuts
AddReg=RegKeys
CopyFiles=Files.Common1,Files.Common2,Files.Common3
CESetupDLL="Setup.dll"

Files.Common4 指向计算机本地的 setup.dll 文件更改。进行此更改意味着它用于构建 cab 文件,但不会复制该文件。

无论如何,是否可以在 Visual Studio 中进行此更改,或者总是手动编辑 .inf 文件并使用 cabwiz.exe 手动构建 cab 文件?

I have added some custom actions to our installer which is run on CE5 and WM6. This installer works fine and builds fine. There is however one annoyance. The setup.dll is deployed to the device and this file is not necessary.

I've read several websites on creating a setup.dll file, MSDN and even the mobile SDK. They all state the same set of steps.

  1. Create your C++ dll project.
  2. Ensure
    the output is called setup.dll.
  3. On your cab project click on CE Setup DLL, browse, application folder, add output and select your setup project. (You cannot select a local directory, its always a directory on the target machine)

Now this does work and produce a custom cab installer. However as mentioned the setup.dll is copied across into the application folder, even though it is not required after installation (not even for the uninstall)

I tried to exclude the setup.dll by setting exclude to true in its properties. All this does is not include the file a all so the cab files to build as the setup.dll is missing.

As such the only solution i have arrived at is manually changing the cab .inf the file from

[DefaultInstall]
CEShortcuts=Shortcuts
AddReg=RegKeys
CopyFiles=Files.Common1,Files.Common2,Files.Common3,Files.Common4
CESetupDLL="Setup.dll"

to

[DefaultInstall]
CEShortcuts=Shortcuts
AddReg=RegKeys
CopyFiles=Files.Common1,Files.Common2,Files.Common3
CESetupDLL="Setup.dll"

Where Files.Common4 pointed to the setup.dll file locally on the machine. Doing this change means it is used to build the cab file, but the file is not copied across.

Is there anyway of doing this change in visual studio, or is it always going to be a manual edit of the .inf file and the a manual build of the cab file with cabwiz.exe?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷心人i 2024-09-25 08:57:28

我有点困惑。您已经创建了 setup.dll 安装程序扩展,并将其包含在 CAB 中,但您不希望它出现在设备上?为了在 CAB 提取期间执行您的自定义操作,DLL 必须位于 CAB 中并提取到设备上。

如果您不想在设备上使用它,只需从 CopyFiles 中省略它并从 INF 中删除 CESetupDLL 条目即可。显然,这样做意味着它定义的任何自定义操作都无法运行。

需要明确的是,您引用的此 DLL 用于安装和/或卸载期间的自定义设备上操作。它不会提供任何桌面功能。

I'm a bit confused. You've created a setup.dll installer extension, and included it in the CAB, but you don't want it on the device? In order for your custom actions to execute during the CAB extraction, the DLL has to be in the CAB and extracted on the device.

If you don't want it on the device, simply omit it from the CopyFiles and delete the CESetupDLL entry from the INF. Obviously doing this then means whatever custom actions it defines cannot run.

To be clear, this DLL that you're referencing is for custom on-device actions during install and/or uninstall. It will not provide any desktop functionality.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文