在 Wix 中从 MSI 生成 EXE [英] Generating an EXE from MSI in Wix

查看:34
本文介绍了在 Wix 中从 MSI 生成 EXE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Wix 安装程序中从 MSI 生成 EXE 文件,我添加了一个新项目(Bootstrapper),但我可以指定我的 MSI 文件的路径

<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/><链><!-- TODO:定义链接的包列表.--><MsiPackage SourceFile="WixSetup.msi"/></链></捆绑包>

你能帮忙吗?

提前致谢

阿卜杜勒萨拉姆

解决方案

将您的 msi 的 wixproj 引用添加到您的引导程序应用程序.

您现在可以像这样引用 msi 文件

<MsiPackage SourceFile="$(var.WixProjName.TargetPath)"/>

这将根据您的构建模式自动指向调试位置或发布位置.

您可以在构建时在输出中看到传递给candle.exe 的定义明确的变量列表.你会看到一堆像-dWixProjName.Property=Value"这样的定义,然后你可以在你的bundle xml中使用这些值,就像这样 $(var.WixProjName.Property) 它将在编译之前被值替换.

当您在此处引用另一个项目时,您可以看到已定义属性的列表:http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html

I'm tring to generate EXE file from MSI in Wix installer, I added a new project (Bootstrapper) but I can specifying the path of my MSI file

<Bundle Name="Bootstrapper" Version="1.0.0.0" Manufacturer="" UpgradeCode="e45fdbb6-192c-46f7-b4db-d04af69edada">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    <Chain>
        <!-- TODO: Define the list of chained packages. -->
         <MsiPackage SourceFile="WixSetup.msi" /> 
    </Chain>
</Bundle>

Can you help ?

Thanks in advance

Abdulsalam

解决方案

Add a reference of your msi's wixproj to your bootstrapper application.

You can now reference the msi file like this

<MsiPackage SourceFile="$(var.WixProjName.TargetPath)" />

This will automatically point to the debug location or release location depending on your build mode.

You can see a list of well-defined vars passed to candle.exe in the output when building. You'll see a bunch of defines like "-dWixProjName.Property=Value" and then you can use those values in your bundle xml like so $(var.WixProjName.Property) which will get replaced by the Value before compiling.

You can see a list of the defined properties when you reference another project here: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html

这篇关于在 Wix 中从 MSI 生成 EXE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆