Command-Line Interface for converting Windows Hosted Web Apps locally and remotely
Перейти к файлу
Adalberto Foresti 43c5aa5fea Update README.md 2016-06-22 14:48:32 -07:00
docs Fix relative path to documentation 2015-11-17 11:25:07 -08:00
projects Add build from CLI config 2015-11-13 14:02:29 -08:00
src t # This is a combination of 2 commits. 2016-04-01 12:49:33 -07:00
templates Adding browser device capabilities 2015-11-11 13:21:54 -08:00
tests Added tests 2015-09-23 14:40:07 -07:00
.gitattributes Add gitattributes file to force line endings 2015-11-16 15:46:46 -08:00
.gitignore Changed protocol to first wait for ACK from server on connection, this allows the server to reject clients. 2015-09-25 12:30:56 -07:00
LICENSE Update usage to denote experimental features 2015-12-09 17:11:56 -08:00
README.md Update README.md 2016-06-22 14:48:32 -07:00
main.js Update usage to denote experimental features 2015-12-09 17:11:56 -08:00
package.json t # This is a combination of 2 commits. 2016-04-01 12:49:33 -07:00
tsconfig.json Change compiler new line settings to LF 2015-11-16 15:20:58 -08:00

README.md

hwa-cli

Convert your Chrome app to a Windows hosted app

  1. Install NodeJS and npm
  2. Open a command prompt window to the directory of your choice
  3. Install hwa cli: npm i -g hwa-cli
  4. Convert your Chrome package: hwa convert path/to/chrome/app.crx or hwa convert path/to/chrome/app.zip
  5. Fill out the Windows Store prompts
  6. The generated .appx will appear in the same folder as your Chrome package.

You are now ready to upload your Hosted Web App to the Windows Store. Upload your AppX package by navigating to the "Packages" page in the Submissions section.

Be sure to check out the guide below for more information on migrating your Hosted Web App.

Supported Chrome package formats

The following package formats are supported: .crx, .zip.

How to fill out the Windows Store prompts

During the conversion process, you will be prompted for an Identity Name, Publisher Identity, and Publisher Display Name. To retrieve these values, visit the Dashboard in the Windows Dev Center.

  1. Click on "Create a new app" and reserve your app name.

  2. Next, click on "App identity" in the menu on the left under the "App management" section.

  3. You should see the three values for which you are prompted listed on the page.

  • Identity Name: Package/Identity/Name
  • Publisher Identity: Package/Identity/Publisher
  • Publisher Display Name: Package/Properties/PublisherDisplayName

Guide for migrating your Hosted Web App

Things you should know

Application Content URI Rules

Application Content URI Rules (ACURs) or Content URIs define the scope of your Hosted Web App through a URL allow list in your app package manifest. In order to control the communication to and from remote content, you must define which URLs are included in, and/or excluded from, this list. If a user clicks a URL that is not explicitly included, Windows will open the target path in the default browser. With ACURs, you are also able to grant a URL access to Universal Windows APIs.

At the very minimum, your rules should include your apps start page. The conversion tool will automatically create a set of ACURs for you, based on your start page and its domain. However, if there are any programmatic redirects, whether on the server or on the client, those destinations will need to be added to the allow list.

Note: ACURs only apply to page navigation. Images, JavaScript libraries, and other similar assets are not affected by these restrictions.

Many apps use third-party sites for their login flows, e.g. Facebook and Google. The conversion tool will automatically create a set of ACURs for you, based on the most popular sites. If your method of authentication is not included in that list, and its a redirect flow, you will need to add its path(s) as an ACUR. You can also consider using a web authentication broker.

Flash

Flash is not allowed in Windows 10 apps. You will need to make sure your app experience is not affected by its absence.

For ads, you will need to make sure your ad provider has an HTML5 option. You can check out Bing Ads and Ads in Apps.

YouTube videos should still work, as they now default to HTML5 <video>, so long as you are using the <iframe> embed method. If your app still uses the Flash API, you will need to switch to the aforementioned style of embed.

Image assets

The Chrome web store already requires a 128x128 app icon image in your app package. For Windows 10 apps, you must supply 44x44, 50x50, 150x150, and 600x350 app icon images, at the very minimum. The conversion tool will automatically create these images for you, based on the 128x128 image. For a richer, more polished app experience, we highly recommend creating your own image files. Here are some guidelines for tile and icon assets.

Capabilities

App capabilities must be declared in your package manifest in order to access certain APIs and resources. The conversion tool will automatically enable three popular device capabilities for you: location, microphone, and webcam. With the former, the system will still prompt the user for permission before granting access.

Note: Users are notified of all the capabilities that an app declares. We would recommend removing any capabilities that your app does not need.

File downloads

Traditional file downloads, like you see in the browser, are not currently supported.

Chrome platform APIs

Chrome provides apps with special-purpose APIs that can be run as background script. These are not supported. You can find equivalent functionality, and much more, with the Windows Runtime APIs.

Accessing Windows features

For more information, visit this page.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.