electron-userland/electron-windows-store — dự án mã nguồn mở — đang có 694 sao GitHub. :package: Turn Electron Apps into Windows AppX Packages
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Electron-Windows-Store: A CLI that takes the packaged output of your Electron app, then converts it into an AppX package. This allows you to submit your Electron app to the Windows Store :package:. You can also distribute your app as an .appx without using the Windows Store, allowing users to just double-click your .appx to automatically install it.
To install this command line tool, get it directly from npm:
npm install -g electron-windows-store
Then, configure your PowerShell:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
To turn an Electron app into an AppX package, run:
This tool supports two methods to create AppX packages: Either using manual file copy operations, or using Windows Containers. The first option requires only the Windows 10 SDK, while the second option also requires the Desktop App Converter.
Usage
Before running the Electron-Windows-Store CLI, let's make sure we have all the prerequisites in place. You will need:
Windows 10 with at least the Anniversary Update (if your Windows has been updated before 2018, you're good).
Windows 10 SDK from here
Node 8 or above (to check, run node -v)
Package Your Electron Application
Package the application using electron-packager (or something similar). Make sure to remove node_modules that you don't need in your final application.
From an elevated PowerShell (run it "as Administrator"), run electron-windows-store with the required parameters, passing both the input and output directories, the app's name and version. If you don't pass these parameters, we will simply ask you for them.
-h, --help output usage information
-V, --version output the version number
-c, --container-virtualization Create package using Windows Container virtualization
-b, --windows-build Display Windows Build information
-i, --input-directory <path> Directory containing your application
-o, --output-directory <path> Output directory for the appx
-p, --package-version <version> Version of the app package
-n, --package-name <name> Name of the app package
--package-display-name <displayName> Display name of the package
--package-description <description> Description of the package
--package-background-color <color> Background color for the app icon (example: #464646)
-e, --package-executable <executablePath> Path to the package executable
-a, --assets <assetsPath> Path to the visual assets for the appx
-m, --manifest <manifestPath> Path to a manifest, if you want to be overwritten
-d, --deploy <true|false> Should the app be deployed after creation?
--identity-name <name> Name for identity
--publisher <publisher> Publisher to use (example: CN=developmentca)
--publisher-display-name <publisherDisplayName> Publisher display name to use
--make-pri <true|false> Use makepri.exe (you don't need to unless you know you do)
--windows-kit <windows-kit> Path to the Windows Kit bin folder
--dev-cert <dev-cert> Path to the developer certificate to use
--cert-pass <cert-pass> Password to use when signing the application (only necessary if a p12 certication is used)
--desktop-converter <desktop-converter> Path to the desktop converter tools
--expanded-base-image <base-image> Path to the expanded base image
--makeappx-params <params> Additional parameters for Make-AppXPackage (example: --makeappx-params "/l","/d")
--signtool-params <params> Additional parameters for signtool.exe (example: --makeappx-params "/l","/d")
--create-config-params <params> Additional parameters for makepri.exe "createconfig" (example: --create-config-params "/l","/d")')
--create-pri-params <params> Additional parameters for makepri.exe "new" (example: --create-pri-params "/l","/d")')
--verbose <true|false> Enable debugging (similar to setting a DEBUG=electron-windows-store environment variable)
Programmatic Usage
You can call this package directly. All options correspond to the CLI options and are equally optional. There is one exception: You can provide a finalSay function, which will be executed right before makeappx.exe is being called. This allows you to modify the output folder right before we turn it into a package.
The Desktop App Converter is capable of running an installer and your app during conversion inside a Windows Container. This requires installation of the Desktop App Converter and has more advanced requirements.
:warning: The vast majority of Electron apps should be packaged using "File Copying". Unless you know that you need your appx to be created using a Windows container, use the "File Copying" method described above.
:computer: Ensure that your computer is capable of running containers: You'll need a 64 bit (x64) processor, hardware-assisted virtualization and second Level Address Translation (SLAT). You will also need Windows 10 Enterprise Edition.
:bulb: Before running the CLI for the first time, you will have to setup the "Windows Desktop App Converter". This will take a few minutes, but don't worry - you only have to do this once. Download and the Desktop App Converter from here. You will receive two files: DesktopAppConverter.zip and BaseImage-14316.wim.
Unzip DesktopAppConverter.zip. From an elevated PowerShell (opened with "run as Administrator"., ensure that your systems execution policy allows us to run everything we intended to run by calling Set-ExecutionPolicy bypass.
Then, run the installation of the Desktop App Converter, passing in the location of the Windows .ase Image (downloaded as BaseImage-14316.wim), by calling .\DesktopAppConverter.ps1 -Setup -BaseImage .\BaseImage-14316.wim.
If running the above command prompts you for a reboot, please restart your machine and run the above command again after a successful restart.
Then, run electron-windows-store with the --container-virtualization flag!
What is the CLI Doing?
Once executed, the tool goes to work: It accepts your Electron app as an input. Then, it archives your application as app.zip. Using an installer and a Windows Container, the tool creates an "expanded" AppX package - including the Windows Application Manifest (AppXManifest.xml) as well as the virtual file system and the virtual registry inside your output folder.
Once we have the expanded AppX files, the tool uses the Windows App Packager (MakeAppx.exe) to create a single-file AppX package from those files on disk. Finally, the tool can be used to create a trusted certificate on your computer to sign the new AppX pacakge. With the signed AppX package, the CLI can also automatically install the package on your machine.
Configuration
:bulb: The first time you run this tool, it needs to know some settings. It will ask you only once and store your answers in your profile folder in a .electron-windows-store file. You can also provide these values as a parameter when running the CLI.
You can pair up your Electron app with a little invisible UWP side-kick, enabling your Electron app to call all WinRT APIs. Check out an example over here.
Devices
The compiled AppX package still contains a win32 executable - and will therefore not run on Xbox, HoloLens, or Phones.
Development
electron-windows-store uses Semantic Release to
automate the whole release process. In order to have a PR merged, please ensure that your PR
follows the commit guidelines so that our robots can understand your change. This repository uses
the default conventional-changelog rules.
License
Licensed using the MIT License (MIT); Copyright (c) Felix Rieseberg and Microsoft Corporation. For more information, please see LICENSE.
Đọc thêm về electron-userland/electron-windows-store ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/electron-userland/electron-windows-store là nguồn chính thức.
electron-userland/electron-windows-store có bao nhiêu sao?
electron-userland/electron-windows-store có 694 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/electron-userland/electron-windows-store. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
electron-userland/electron-windows-store có phải mã nguồn mở không?
Có — electron-userland/electron-windows-store phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/electron-userland/electron-windows-store.
electron-userland/electron-windows-store có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho electron-userland/electron-windows-store. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
electron-userland/electron-windows-store là gì?
electron-userland/electron-windows-store (electron-userland/electron-windows-store) là dự án JavaScript trên GitHub. Theo mô tả gốc: :package: Turn Electron Apps into Windows AppX Packages
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về electron-windows-store?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về electron-windows-store.