1

我正在尝试使用Jenkins Wix 工具集插件来构建 msi。我已经在构建机器上安装了 Wix 3.10。

Jenkins 工作从 GitHub 中检查项目,我可以看到它运行良好。有 wxs 文件,但似乎找不到它们。

我已经在构建机器上安装了 Wix 并在 Jenkins 中配置了插件。 在此处输入图像描述

不确定它在这里查看哪个目录,但配置了 Jenkins 插件以通过 Ant 样式文件模式 \*.wxs 获取 wxs 源文件: 在此处输入图像描述

为什么我看到文件(包括 wxs 文件)被添加到 Jenkins 的“工作区”中,但 Wix 仍然无法找到它们?

当 Jenkins 构建运行时,我得到以下输出:

[wix] Enable Debug: true
[wix] Detecting environment variables...
[wix] Found sources: 0
[wix] Initializing tools...
[wix] Environment variables are not automatically added as parameters.
[wix] Environment variables are not automatically added as parameters.
[wix] Compiler found.
[wix] Linker found.
[wix] Starting compile process...
[wix] SEVERE: 0
[wix] Stacktrace follows:
java.lang.ArrayIndexOutOfBoundsException: 0
    at de.berg.systeme.jenkins.wix.Toolset.compile(Toolset.java:142)
    at de.berg.systeme.jenkins.wix.WixToolsetBuilder.perform(WixToolsetBuilder.java:164)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.Build$BuildExecution.build(Build.java:205)
    at hudson.model.Build$BuildExecution.doRun(Build.java:162)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
    at hudson.model.Run.execute(Run.java:1720)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:404)
Build step 'WIX Toolset' changed build result to FAILURE
Build step 'WIX Toolset' marked build as failure
Finished: FAILURE

[wix] 找到来源:0 <--- 索引超出范围的原因

编辑1: 我设法克服了这个例外。原来我的 \*.wxs 的 Ant 样式文件模式不正确。相反,我使用了 **\*.wxs 并找到了该文件。原来还有一个问题。在我的 wxs 文件中,我引用了变量名称,例如“$(var.SolutionDir)”。Wix 抱怨它找不到这个:

error CNDL0150 : Undefined preprocessor variable '$(var.SolutionDir)'.

这是在 .wixproj 文件中定义的,但 Jenkins Wix 插件似乎忽略了这一点......

那么我如何让 Jenkins 插件知道它应该知道还有一个 .wixproj 呢?

4

1 回答 1

0

您在源文件“\*.wxs”中给出的路径不正确。给出 wxs 文件所在位置的正确路径。

于 2016-10-05T15:17:01.910 回答