-
Notifications
You must be signed in to change notification settings - Fork 1
Building a Microsoft Edge package
Nadeem Shabir edited this page Aug 24, 2020
·
3 revisions
Our understanding of how to distribute the extension is a work in progress and will, hopefully, be solved by the eventual inclusion of the extension into the Windows store.
Until then, it appears that the extension will need to be distributed as a Line-of-Business app or a sideloaded LOB app.
To do this, we're using ManifoldJS to do the heavy lifting.
You'll also need to install nvm to ensure we use the correct version of nodejs.
The steps to get a package are:
- Clone the repo and
cd
into it e.g.git clone https://github.com/talis/rl-bookmarking-extension.git && cd rl-bookmarking-extension
nvm use
npm install
$(npm bin)/grunt dist-manifold
-
cd dist
, from here you can change the icons in in theimages/
directory and any different text in the_locales
files if you want to add your own branding. Also you can changejs/allTenants.js
to either your specific institution's information, or you can download https://talis-public.s3-eu-west-1.amazonaws.com/talis.com/customers.json and rename asallTenants.js
, or just leave as is, if you're testing (you can add your institution manually in the options screen). -
$(npm bin)/manifoldjs -m manifest.json -p edgeextension -f edgeextension -l debug -d <Some directory outside of source root to build extension to>
- it's important that this destination directory is outside of the source file tree! You'll get endless recursion and woe be unto you. See https://github.com/pwa-builder/ManifoldJS/issues/280 cd <whatever directory was specified above>
- You'll have a directory with a name like
MSGExtensionName
- this is because the extension's name is translatable and this is what manifold does with it. - Edit MSGExtensionName\edgeextension\manifest\appxmanifest.xml
At this point, it's worth pausing to note that from here the understanding the process, especially as it pertains specific institutions, is far less clear, so the following might change quite a bit as we gain clarity.
- In MSGExtensionName\edgeextension\manifest\appxmanifest.xml, change the
Identity[Name]
andIdentity[Publisher]
attributes, as well as theProperties\PublisherDisplayName
value to the appropriate values as supplied by your enterprise Windows app store, or... possibly via ActiveDirectory values? See: https://github.com/pwa-builder/manifoldjs-edgeextension#validate-appxmanifestxml-and-assets - Build the AppX package with
$(npm bin)/manifoldjs -l debug -p edgeextension package .\MSGextensionName\edgeextension\manifest\
- If you are able to submit applications to your enterprise Windows store, that may be all you need to do. Otherwise, you'll need to sign the package.
- If you have a certificate you can sign the request with, use that, otherwise (for testing purposes) you'll need to use a self-signed certificate.
- You will then need to export the certificate for signing, this will need to be done as an administrator.
- If you're using a self-signed certificate, you'll need to add it (right mouse click on the cert and install it) as a trusted root certificate.
- Use SignTool (available in the Windows 10 SDK) to sign the package with the exported certificate, the command will look something like
'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe' sign /fd SHA256 /a /f C:\{Path\to\exported\cert}.pfx /p {certificate password} C:\{Path\to\extension}\MSGextensionName\edgeextension\package\edgeExtension.appx
- If the package was successfully signed, you should then be able to install it either by double clicking on the
edgeExtension.appx
icon or selecting open from the right mouse context menu. That should bring up an installation wizard.