简体   繁体   English

WiX 工具集中的 ARM64 支持用于为 Surface Pro X 构建吗?

[英]ARM64 support in WiX Toolset for building for Surface Pro X?

With Microsoft's release of the Surface Pro X, I am looking to create an MSI setup installer for ARM systems.随着 Microsoft 发布 Surface Pro X,我希望为 ARM 系统创建一个 MSI 安装程序。 I have been looking around and it appears that WiX Toolset v3 does not have support for ARM setup projects.我一直在环顾四周,似乎WiX的工具集V3具备ARM安装项目的支持。 However, it looks like WiX v4 does have support as documented here .但是,看起来 WiX v4 确实有此处记录的支持。

I installed WiX Toolset v4 by using the installer found here on the offical WiX site.我使用在官方 WiX 站点上找到的安装程序安装了 WiX 工具集 v4。 However, despite me having the WiX Toolset Visual Studio 2017 Extension installed, Visual Studio 2017 still does not give me the option to select a WiX Toolset v4 Setup Project.然而,尽管我安装了WiX 工具集 Visual Studio 2017 扩展,Visual Studio 2017 仍然没有给我选择 WiX 工具集 v4 安装项目的选项。 I only have the option for v3:我只有 v3 的选项: 没有 wix v4 选项

I did verify through the Visual Studio Installer that I do have the WiX v4 Schemas installed:我确实通过 Visual Studio 安装程序验证了我确实安装了 WiX v4 架构: 安装了 Visual Studio 的 WiX v4 架构

I know that the v4 option is available as documented through other's Visual Studio setup.我知道v4选项可以通过其他人的 Visual Studio 设置记录使用。 For example, Nick Nolan's answer to this question on StackOverflow links to a screenshot where you can see he has both v3 and v4 options listed under the " New Project " dialog box explorer.例如,Nick Nolan 在 StackOverflow 上对这个问题的回答链接到一个屏幕截图,您可以在其中看到他在“新项目”对话框资源管理器下列出了v3v4选项。

How do I add WiX Toolset v4 support to Visual Studio 2017?如何将 WiX 工具集 v4 支持添加到 Visual Studio 2017? In other words, how do I add the v4 option under " WiX Toolset " in the " New Project " explorer window as shown here ?换句话说,我怎么添加v4在“新建项目”资源管理器窗口下的“维克斯工具箱”选项,如图所示这里

According to Christopher Painter , it appears that WiX v4 was actually removed from the Visual Studio Extension: 根据 Christopher Painter 的说法,似乎 WiX v4 实际上已从 Visual Studio 扩展中删除:

WiX 4.0 is years away to be honest.老实说,WiX 4.0 还需要几年的时间。 I wouldn't worry about it at all right now.我现在根本不会担心。 In fact the WiX v4 templates were recently removed from Votive (Visual Studio Extension) so that should give you an idea how far out it is.事实上,WiX v4 模板最近已从 Votive(Visual Studio 扩展)中删除,因此您应该可以了解它离我们有多远。

After further investigation, this is confirmed by the commit history of the Visual Studio Extension.经过进一步调查,Visual Studio 扩展的提交历史记录证实了这一点。 The commit #886a974 removes the v4 option. 提交 #886a974删除了 v4 选项。

I will see if I can re-enable it to see if I can create a setup *.MSI for ARM systems.我会看看我是否可以重新启用它,看看我是否可以为 ARM 系统创建一个设置*.MSI


Edit 1 - 2/24/2020编辑 1 - 2/24/2020

If you install a previous version of the WiX extension, you will be able to gain access to the v4 option again without having to re-compile the entire extension.如果您安装以前版本的 WiX 扩展,您将能够再次访问v4选项,而无需重新编译整个扩展。 The most recent version to have the v4 option enabled is v0.9.28.58839 .启用v4选项的最新版本是v0.9.28.58839 But, before you install this, make sure you uninstall any existing extension you may have installed.但是,在安装之前,请确保卸载您可能已安装的任何现有扩展。

Once this old extension has been installed, you will have to install the v4 build tools located here .安装此扩展后,您必须安装位于此处的 v4 构建工具。 The only thing left to do is to open up Visual Studio and create a new WiX v4 project.剩下要做的就是打开 Visual Studio 并创建一个新的 WiX v4 项目。

Now , I was playing around with WiX v4 and even though the Platform field in the <Package .../> tag allows the value arm , it will not compile successfully.现在,我在玩 WiX v4,即使<Package .../>标记中的Platform字段允许值arm ,它也不会成功编译。 I kept getting the following error:我不断收到以下错误:

ICE39: PID_TEMPLATE value in Summary Information Stream is not valid. ICE39:摘要信息流中的 PID_TEMPLATE 值无效。 It must be of the form "Platform,Platform,...;LangID,LangID,...".它必须是“平台,平台,...;LangID,LangID,...”的形式。

( I made sure to set the InstallerVersion to 500 as described here . ) 我确保按照此处所述将InstallerVersion设置为 500。

I am chalking this up to WiX v4 not having ARM support completely implemented yet and I think it might stay that way for awhile.我将此归结为 WiX v4 尚未完全实现 ARM 支持,我认为它可能会保持这种状态一段时间。 In the mean time, just compile your installers as x86 as Windows for ARM has x86 emulation built right in.同时,只需将安装程序编译为x86因为 Windows for ARM 内置了 x86 仿真。

Edit 2 - 5/27/2020编辑 2 - 2020 年 5 月 27 日

ARM Support Finally Added to WiX v3 Toolset ARM 支持最终添加到 WiX v3 工具集

Support for ARM (32-bit) and ARM64 (64-bit) looks to have just been added into WiX v3 as noted by issue #6137 and PR #503 .问题 #6137PR #503所述,对 ARM(32 位)和 ARM64(64 位)的支持似乎刚刚添加到 WiX v3 中。 As noted in the issue, you have to install WiX v3.14.0.3910 .如问题中所述,您必须安装WiX v3.14.0.3910 If you have any opened Visual Studio projects, make sure they are all closed.如果您有任何打开的 Visual Studio 项目,请确保它们都已关闭。 In addition, once you install WiX v3.14, make sure to click the " Update Available " button to get any newer updates too.此外,安装 WiX v3.14 后,请务必单击“更新可用”按钮以获取任何更新的更新。

Now, the build configuration still won't allow you to choose arm or arm64 .现在,构建配置仍然不允许您选择armarm64 You have to manually add the platform configuration(s) to your *.wixproj file.您必须手动将平台配置添加到*.wixproj文件中。 For some reason, " Windows for ARM " on Surface Pro X will throw an error at your installer if you build it for arm (ie 32-bit arm) and won't for arm64 .出于某种原因,Surface Pro X 上的“ Windows for ARM ”将在您的安装程序中抛出错误,如果您为arm (即 32 位 arm)构建它而不会为arm64构建它。 Therefore, here is the arm64 build configuration I added to my *.wixproj file:因此,这是我添加到*.wixproj文件中的arm64构建配置:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|arm64' ">
    <DefineConstants>Debug</DefineConstants>
    <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
    <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|arm64' ">
    <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
    <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>

Now, a few notes before I conclude.现在,在我结束之前做一些笔记。 There doesn't seem to be a working ProgramFilesArm64Folder or ProgramFilesArmFolder global constant like how there is for x64 and x86 builds (eg ProgramFiles64Folder and ProgramFilesFolder respectively).似乎没有一个有效的ProgramFilesArm64FolderProgramFilesArmFolder全局常量,比如x64x86构建(例如分别是ProgramFiles64FolderProgramFilesFolder )。 As a result, you will have to manually define this like so:因此,您必须像这样手动定义:

<Directory Id="ProgramFilesArm64Folder" Name="Program Files (Arm)">
    <Directory Id="INSTALLFOLDER" Name="!(loc.ProductNameFolder)" />
</Directory>

(Where !(loc.ProductNameFolder) is a locale constant defined in my WiX Localization File and defines the name of the install folder for my program.) (其中!(loc.ProductNameFolder)是在我的 WiX 本地化文件中定义的区域设置常量,并为我的程序定义安装文件夹的名称。)

On Surface Pro X, the new ARM64 program files folder is named " Program Files (Arm) ".在 Surface Pro X 上,新的ARM64程序文件文件夹名为“ Program Files (Arm) ”。

Lastly, in your <Project /> definition, make sure to set the InstallerVersion to 500 .最后,在您的<Project />定义中,确保将InstallerVersion设置为500 Platform can be left as $(var.Platform) or you can type arm64 manually. Platform可以保留为$(var.Platform)或者您可以手动输入arm64 For both Platform inputs, intellisense will underline it, but this can be ignored.对于两个Platform输入,intellisense 都会给它加下划线,但这可以忽略。

After all of this, you should now be able to create ARM64 MSI installers for Surface Pro X machines!完成所有这些之后,您现在应该能够为 Surface Pro X 机器创建 ARM64 MSI 安装程序!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WiX Toolset是否与Windows 10兼容 - Is WiX Toolset Compatible with Windows 10 使用 VS 2017 中的 cl.exe 编译 arm 或 arm64 程序时缺少 mspdbcore.dll - Missing mspdbcore.dll when compiling arm or arm64 programs with cl.exe from VS 2017 构建ios vwith Cordova工具集时出错 - Error building ios vwith cordova toolset 在 Windows x64 上为 Java 构建 OpenCV 与 ZA8CA3D2D9D43242B15AZECE01140 - Building OpenCV for Java on Windows x64 with Cmake Windows 7 Pro x64,Visual Studio 2017 x64,SSIS / SSAS / SSRS x64,SSDT x64,SQL Server 2014 x64-兼容性问题? - Windows 7 Pro x64, Visual Studio 2017 x64, SSIS/SSAS/SSRS x64, SSDT x64, SQL Server 2014 x64 - compatibility issues? WiX 工具集:在 VS2017 中创建一个简单的 WiX 项目中断:未找到“CreateProjectReferenceDefineConstants”任务 - WiX Toolset: Creating a simple WiX project breaks in VS2017: The "CreateProjectReferenceDefineConstants" task was not found Wix 工具集不会在所有 vs2017 IDE 中安装目标 - Wix toolset doesn't install targets in all vs2017 IDEs 为什么在新的 Surface Pro 上的 VS 2017 中没有发布功能 - Why is the ability to publish not available in VS 2017 on new surface pro 必须安装 WiX 工具集 v3.11(或更新版本)构建工具才能构建此项目 - The WiX Toolset v3.11 (or newer) build tools must be installed to build this project 在Visual Studio 2017中使用64位Visual C ++工具集 - Use the 64-bit Visual C++ Toolset in Visual Studio 2017
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM