philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.01k stars 2.47k forks source link

Building in Firefox - documentation? #2669

Open danjac opened 6 years ago

danjac commented 6 years ago

Is there any documentation on how to build for Firefox?

Tried the following

cake clean && cake build && cake zip

Importing the resulting zip file (vimium.zip) gives the error message "This add-on could not be installed because it appears to be corrupt" (Nightly FF 58).

smblott-github commented 6 years ago

@mrmr1993 will know the answer to your question. But that zip file is intended just for uploading to Mozilla Add-Ons.

mrmr1993 commented 6 years ago

You'll need to sign the add-on at addons.mozilla.org to be able to add it persistently. (You don't need to publish it, you can get it signed instantly without publishing.)

If you're trying to add it just as a one off test, you can load it from the folder using about:debugging. (Click any file in a directory to select the directory; Mozilla's folder selector is a bit wonky.)

Mozilla's documentation is quite good for this, I'd suggest looking there for more details.

danjac commented 6 years ago

about:debugging works for me, thanks for your quick response.

mrmr1993 commented 6 years ago

about:debugging works for me

Note that you will need to repeat this every time you restart firefox; if you need a persistent install, you should follow the other steps.

danjac commented 6 years ago

I've used this feature with other extensions, so not so much an issue. However with vimium (selecting manifest.json) I get this message:

Reading manifest: Error processing content_scripts.0._comment: An unexpected property was found in the WebExtension manifest.

mrmr1993 commented 6 years ago

I get this message

There's a comment in manifest.json (as a reminder to add content scripts to some other files as new ones arise). The comment is arguably more useful that the warning is annoying, so we've suck with it.

I haven't done any testing in Edge in a while, but I believe we (used to?) have to remove it to get Vimium to load at all there.

guns commented 6 years ago

@danjac

I've also been trying to load vimium into Firefox via an xpi and discovered the following post:

https://stackoverflow.com/questions/44537589/how-do-i-install-webextension-that-developed-by-myself-to-firefox-nightly/44629652#44629652

Adding the entry:

  "applications": { "gecko": { "id": "vimium@example.com" } },

to manifest.json therefore eliminates the "This add-on could not be installed because it appears to be corrupt" message.

EDIT:

Oops! Looks like that also breaks the extension. I'll update here after I figure this out.

EDIT 2:

Setting applications.gecko.id to something like an email address works.