Cordova:如何部署Windows 10应用程序

问题描述:

我建立了一个 cordova windows 10应用程序。该构建工作正常,我可以通过 Visual Studio 2015 在模拟器上启动我的应用程序。

I built a cordova windows 10 app. The build works fine and I am able to launch my app on the simulator via Visual Studio 2015.

如何我部署这个应用程序为一个企业?
基本上我想要构建一个 appx ,但我真的不知道从哪里开始?
什么是不同的阶段?

How can i deploy this app for an entreprise? Basically I want to build an appx but I really don't know where to start? And what are the different stages?

我开发并分发了许多 cordova应用程序 iOS Android windows 宇宙似乎安静的黑暗...

I developped and distributed many cordova apps on iOS and Android but the windows universe seems quiet dark...

我最近进入了为企业目的部署Cordova的Window 10应用程序的黑暗世界。

I have recently entered the dark world of deploying Cordova-based Window 10 apps for enterprise purposes.

首先,如果要通过Windows Store进行部署,这将有很大的不同。下面我的回答假定你将使用标准的面向公众的Windows Store,但是您也可以下载私人商店通过Windows Store For Business 路线分发Enterpise应用程序,但我没有经验。

Firstly, it makes a big difference if you are going to deploy via Windows Store or not. My answer below assumes you are going to use the standard public-facing Windows Store, but you can also go down the private store via Windows Store For Business route to distribute enterpise apps, however I have no experience of this.

与Android的Google Play商店或适用于iOS的App Store不同,Windows Store可让您部署应用程序而不公开列出它们。您可以限制对拥有直接链接的任何人访问Windows 10应用程序,或限制对受限制的人员列表的访问。第一个选择对我来说是非常好的。

Unlike the Google Play Store for Android or App Store for iOS, Windows Store enables you to deploy apps without publicly listing them. You can restrict access to Windows 10 apps to anyone in possession of the direct link or restrict access to a constrained list of people. The first option was good enough for me.

为了将应用上传到Windows Store,您需要生成一个 .appxupload bundle。

In order to upload the apps to the Windows Store, you need to generate a .appxupload bundle.

要使用Cordova CLI,我使用 cordova构建窗口 - 请求 - --archs =x86 x64 arm--bundle - -WIN 。您还可以通过在Visual Studio中打开 platforms / windows / CordovaApp.sln 并选择Project> Store> Create App Packages ...。

To do so with Cordova CLI I used cordova build windows --release -- --archs="x86 x64 arm" --bundle --win. You can also do this by opening the platforms/windows/CordovaApp.sln in Visual Studio and selecting "Project > Store > Create App Packages...".

上述两种情况都假定您的应用程序已配置了相应应用配置文件的正确包名称和证书。您可以在Windows Store开发人员门户中创建新的应用配置文件: https://developer.microsoft .COM / EN-US /仪表板/概述。将配置文件与Cordova项目关联的最简单方法是通过Visual Studio:项目>商店>关联应用程序与商店...。

Both of the above assume your app is already configured with the correct package name and certificate for the corresponding app profile. You can create a new app profile in the Windows Store developer portal: https://developer.microsoft.com/en-us/dashboard/overview. The easiest way to associate a profile with the your Cordova project is via Visual Studio: "Project > Store > Associate App with the Store...".

然后,您可以在提交过程中提示您通过Windows Store开发人员门户上载您的 .appxupload

You can then upload your .appxupload via the Windows Store developer portal when prompted to do so during the submission process.

为了测试目的,我使用了侧面加载机制,但是这需要在Sideloading或Developer模式下设置设备,因此不适合企业部署。

For testing purposes, I used the Sideloading mechanism, however this requires the device to be set in Sideloading or Developer mode, so is not suitable for enterprise deployment.