支持nativemessaging的Edge Extension打包(UWP app) [英] Packging of Edge Extension which support nativemessaging(UWP app)
问题描述
我开发了一个扩展,该扩展使用本地消息传递与后端uwp应用程序进行通信.如何包装?
I developed an extension which uses native messaging to communicate with backend uwp application. How can I package it?
当我安装软件包时,它也会同时安装边缘扩展,它是软件包的一部分.
When I install the package, will it install the edge extension as well which is a part of the package.
推荐答案
我已通过以下步骤成功构建了具有边缘扩展名的软件包. 希望对您有帮助〜
I have successfully built a package with the edge extension by the following steps. Hope this will help you~
在C \ EdgeExtension \ Appx中按以下结构构建项目:
1. fullTrustProcess
如果存在fullTrustProcess,则该exe文件应包含在TrustedProcess文件夹中,并在AppxManifest.xml中进行配置.
Build the project as following structure in C\EdgeExtension\Appx:
1. fullTrustProcess
If there is fullTrustProcess, the exe should be included in TrustedProcess folder, with configuration in AppxManifest.xml.
<desktop:Extension Category="windows.fullTrustProcess" Executable="TrustedProcess\MyTrustedProcess.exe" />
如果没有fullTrustProcess,请忽略并删除TrustedProcess文件夹.
2.扩展名
Edge扩展的JS文件包含在Extension文件夹中,其配置如下:
3. UWP文件
-资产
-AppxManifest.xml
-EdgeNativeMessage.dll
-EdgeNativeMessage.exe
-EdgeNativeMessage.winmd
-resources.pri
4.使用命令打包
If there is no fullTrustProcess, ignore and delete the TrustedProcess folder.
2. Extension
JS files of Edge extension are included in Extension folder, configured as following:
3. UWP files
- Assets
- AppxManifest.xml
- EdgeNativeMessage.dll
- EdgeNativeMessage.exe
- EdgeNativeMessage.winmd
- resources.pri
4. Package with command
C:\Program Files (x86)\Windows Kits\10\bin\x86\makeappx.exe pack /h SHA256 /d C\EdgeExtension\Appx /p C\EdgeExtension\EdgeNativeMessage.appx
5.对appx签名
C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe sign /fd SHA256 /a /f C:\EdgeExtension\MyKey.pfx /p "password" C\EdgeExtension\EdgeNativeMessage.appx
- 安装扩展程序
- 安装MyKey.pfx
- 双击MyEdgeExtension.appx,然后单击安装"以安装扩展.
- 安装MyKey.pfx
- Install Extension
- install the MyKey.pfx
- double click MyEdgeExtension.appx, then click install to install the extension.
- install the MyKey.pfx
- 启动Edge broser
- 单击...->扩展,
系统将注册该appx,需要等待几秒钟,该扩展名才会显示在扩展名列表中.
- 检查注册表
EdgeNativeMessage将添加到两个路径.
- launch Edge broser
- click ...-> Extensions,
System will register the appx, it needs several seconds before the extension shows in the extension list. - check registry
The EdgeNativeMessage will add to the two path.
Computer\HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\Extensions
Computer\HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\ExtensionsStore\datastore\Config
这篇关于支持nativemessaging的Edge Extension打包(UWP app)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!