【问题标题】:Wix doesn't insert var.publishDir into wxs fileWix 不会将 var.publishDir 插入到 wxs 文件中
【发布时间】:2017-03-03 10:05:58
【问题描述】:

我正在使用 WiX 工具为我的应用程序创建安装程序

一个步骤包括获取一个目录,其中包含所有程序文件。这里是我用来收集文件的命令:

heat dir "C:\myDir" -dr INSTALLFOLDER -ke -srd -cg WebComponents -var var.publishDir -gg -out WebSiteContent.wxs 

我得到了 WebSiteContent.wxs,但不幸的是,var.publishDir 被评估为“C:\”,所以我最终得到了一个包含错误文件路径的 .wxs 文件

在 .wxs 文件中,我希望路径如下所示:

$(var.publishDir).\relative\path\to\the\program\file

相反,这就是我得到的:

C:\relative\path\to\the\program\file

【问题讨论】:

    标签: wix windows-installer installation wix3.5


    【解决方案1】:

    您需要通过在 Wixproj 中定义 DefineConstants 来传递它。

    <PropertyGroup>
       <DefineConstants>
           $(DefineConstants);publishDir=$(publishDir)
       </DefineConstants>
    </PropertyGroup>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多