Creating oldschool addons with jpm (plus addonbuilder rant)

There was an online tool once. It was called Add-on Builder (if I haven’t mistaken) and lived somewhere under the menu among others. It produced a template of an addon according to settings, generated proper install.rdf, GUIDs, names, versions, directory structure, you name it. A few click and you’re have a fine addon template.

That new 60 mb jpm doesn’t even know how to fill install.rdf properly. Versions is all over the place, I have to do everything manually. Lucky it knows GUIDs at least! And it generates only new instant-load complicated format addons. Any way to do a old way simple stuff with that program or I have to create the whole structure manually?

BTW, Persona is a bad idea, like other similar services. I was forced to use it instead of just using my dev account or creating new.

jpm is more a tool to use for the SDK than anything. I guess it could create the data folder for you, but beyond that, there is no structure, just index.js and it does create that. I’m not sure what you mean about versions other than you have to update the version in package.json yourself.

Thanks for the reply. From searching docs (which is always tricky with Mozilla) I’ve found that jpm has superseded another command-line tool, cfx. Online AddonBuilder was just a frontend for cfx as I understood from documentation, so really no way for replacing it now unless doing everything manually according to documentation (half of which are outdated).

About versions, It always picked reasonable minimum and maximum supported versions (based on current) so I should not be searching for them myself.

See no reason why old straightforward technology should be replaced by more complicated. Old structure was static, not javascript-based, which reduces the possibility of errors and avoids extra dynamic errors. Was need for restartless install so bad indeed?

Why the possibility of creating old style template automatically was removed?

I’m not sure what you mean by template. There is no need for a file structure at all in addons.

‘jpm init’ really doesn’t seem that complicated to me. I mean it’s a single command. It asks a few basic questions. Then you write your addon, and you’re done.

Probably you’re right, creating manifest/chrome/prefs/jars isn’t that complicated. It still was a nice shortcut, though.

jpm xpi does a lot of that work for you. Have you looked into how jpm works?

My impression was that it just packages the addon into zip (xpi). Am I wrong?

Yes you are wrong. https://github.com/arenlor/workaccounter is an addon I created using jpm. As are https://sourceforge.net/p/isittwisyet/code/ci/master/tree/ and https://sourceforge.net/p/npgpltoolbar/code/ci/master/tree/

You can see how package.json works from looking at those, with documentation at https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/package_json

If you have any questions on it I’d be happy to help you. The two SF addons have the xpi created by jpm on the site to download, https://addons.mozilla.org/en-US/firefox/addon/work-accounter/ is where you can get the one hosted on github so you can see that it creates the install.rdf and all that goodness for you.

Have you read this?

I was a huge fan of addon builder too. I loved how it would keep a revision history. After it went down I switched to github and this addon called “GitHub Extension Installer”. Which allowed installing straight from the repo. I submitted a PR so we can install straight from edited files (without having to commit) so Github + this addon works just like addon builder now :slight_smile: https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/

Then I should pay closer attention at jpm xpi, thanks, arenlor.
Will miss builder anyway.