我开发了一个扩展,它使用本机消息与后端 uwp 应用程序进行通信。我该如何打包?
当我安装软件包时,它是否也会安装作为软件包一部分的边缘扩展。
我开发了一个扩展,它使用本机消息与后端 uwp 应用程序进行通信。我该如何打包?
当我安装软件包时,它是否也会安装作为软件包一部分的边缘扩展。
我已经通过以下步骤成功构建了一个带有边缘扩展的包。希望对你有帮助~
在 C\EdgeExtension\Appx 中构建项目如下结构:
1. fullTrustProcess
如果有 fullTrustProcess,则 exe 应包含在 TrustedProcess 文件夹中,并在 AppxManifest.xml 中配置。
<desktop:Extension Category="windows.fullTrustProcess" Executable="TrustedProcess\MyTrustedProcess.exe" />
如果没有 fullTrustProcess,则忽略并删除 TrustedProcess 文件夹。
2
、Edge扩展的扩展JS文件包含在Extension文件夹中,配置如下:
3、UWP文件
-Assets -
AppxManifest.xml -
EdgeNativeMessage.dll
-EdgeNativeMessage.exe
-EdgeNativeMessage.winmd
-resources.pri
4、用命令打包
C:\Program Files (x86)\Windows Kits\10\bin\x86\makeappx.exe pack /h SHA256 /d C\EdgeExtension\Appx /p C\EdgeExtension\EdgeNativeMessage.appx5. 签署应用程序
C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe 签名 /fd SHA256 /a /f C:\EdgeExtension\MyKey.pfx /p "密码" C\EdgeExtension\EdgeNativeMessage.appx
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