我们正在使用 installShield 在 Vs 2012 中创建 setup.exe 和 msi 文件。我有一个先决条件 (dfcWinSuiteSetup.exe),我需要先安装它。要安装它,我创建了一个先决条件文件 (.prq) 并指定了第 3 方 exe 路径,但该 exe 对其他文件(一些 jar 文件)有一些依赖性。现在,当我构建解决方案并运行生成的 setup.exe 时,它失败了,因为依赖的 jar 不是 setup.exe 的一部分。 谁能告诉我如何在我的 setup.exe 中包含依赖 jar? 我的 prq 文件是。
<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
<conditions>
<condition Type="16" Comparison="2" Path="[WindowsFolder]\Documentum" FileName="dctm.jar" ReturnValue=""></condition>
</conditions>
<files>
<file LocalFile="<ISProductFolder>\SetupPreRequisites\Redistributables\dfcWinSuiteSetup.exe" URL="" FileSize="0,0"></file>
</files>
<execute file="dfcWinSuiteSetup.exe" cmdline="" cmdlinesilent=""></execute>
<properties Id="{0278E528-E72C-439F-AE2A-BEFCB27EA9A3}" Description="This prerequisite installs the DFC for window setup" AltPrqURL=""></properties>
<behavior Reboot="2"></behavior>
</SetupPrereq>
最佳答案
您可以在 <files>
中添加多个文件.prq 文件中的元素,与添加第一个元素的方式完全相同。
<files>
中列出的所有文件将被嵌入到同一个文件夹中(类似于:ISSetupPrerequisites\{SOME-GUID-...}
)
然后,<execute file="..."/>
让安装程序知道必须为您的先决条件执行哪个文件。
您的 .prq 文件应如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
<conditions>
<condition Type="16" Comparison="2" Path="[WindowsFolder]\Documentum" FileName="dctm.jar" ReturnValue=""></condition>
</conditions>
<files>
<file LocalFile="<ISProductFolder>\SetupPreRequisites\Redistributables\dfcWinSuiteSetup.exe" URL="" FileSize="0,0"></file>
<!-- add your other files here -->
<file LocalFile="PATH/TO/YOUR/JAR/FILE" URL="" [...] />
</files>
<execute file="dfcWinSuiteSetup.exe" cmdline="" cmdlinesilent=""></execute>
<properties Id="{0278E528-E72C-439F-AE2A-BEFCB27EA9A3}" Description="This prerequisite installs the DFC for window setup" AltPrqURL=""></properties>
<behavior Reboot="2"></behavior>
</SetupPrereq>
希望这对您有所帮助。
关于windows-installer - 如何在 installshield 中添加先决条件文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24603888/