Porting nzbFox - uses Add-On SDK Topic is solved

Add-ons for Pale Moon and other UXP Applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
casualfred
Newbie
Newbie
Posts: 4
Joined: 2021-08-01, 04:54

Porting nzbFox - uses Add-On SDK

Unread post by casualfred » 2021-08-01, 05:25

Greeting all!

Because of Pale Moon's change in what extensions it accepts, I thought I'd try my hand at porting one extension that I use all the time (that I consider necessary) - nzbFox. This is included in the Classic Add-Ons Archive at https://ca-archive.us.to/storage/548/548918/nzbfox-1.4.5-fx.xpi, and has worked perfectly well in Pale Moon. It is released under MPL-2.0.

So, I updated the install.rdf file and package.json files as needed, and I created all new icons. I packaged it up, and it can be found at https://svn.archaeopteryxarchive.linkpc.net/nzbMoon/releases/nzbMoon-1.4.5.xpi (hosted in my Subversion repository). The updated add-on installs and works well in Pale Moon 29.3.0.

When I tried to submit it through Pale Moon's phoebus add-on portal, it gave me the following message: "Unable to comply: Jetpack (Add-on SDK) style extensions are not supported". I guess my question is this - what would you all recommend as a path forward? I am NOT an expert with add-ons, but I am trying.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10544
Joined: 2012-10-09, 19:37
Location: The Seriphia Galaxy

Re: Porting nzbFox - uses Add-On SDK

Unread post by New Tobin Paradigm » 2021-08-01, 10:12

Do not try the patience of wizards, for they are subtle and quick to anger.
Image

vannilla
Board Warrior
Board Warrior
Posts: 1785
Joined: 2018-05-05, 13:29

Re: Porting nzbFox - uses Add-On SDK

Unread post by vannilla » 2021-08-01, 11:49

Unfortunately you will have to rewrite it completely to use the traditional toolkit components in place of Jetpack.

User avatar
casualfred
Newbie
Newbie
Posts: 4
Joined: 2021-08-01, 04:54

Re: Porting nzbFox - uses Add-On SDK

Unread post by casualfred » 2021-08-01, 20:01

Alright, that is unfortunate then. Thanks for the replies - I missed that poll in my searches (I didn't realize Jetpack and the Add-On SDK were the same thing).

So, my primary goal here is to have a working extension (already achieved), and the secondary goal is to share it with others on the main PM add-ons page (if not terribly difficult).

Question 1:
Can I just copy the relevant parts of the SDK to my extension so it doesn't have the external dependency? "If it ain't broke, don't fix it" (and it ain't broke - it works fine). I see that it has 12 references to "sdk/..." something or other in the lib/main.js file and 24 references to "sdk/..." in the lib/chrome-mod.js file. There are a few other references in other files in the "lib" folder. I am not trying to blaspheme here; I'm trying to get the job done.

Question 2:
How can one tell by looking at the file structure of the extension what is and is not based on Jetpack/Add-On SDK (besides hunting for references in *.js files). For example, will a Jetpack-based extension always have a package.json file?

User avatar
casualfred
Newbie
Newbie
Posts: 4
Joined: 2021-08-01, 04:54

Re: Porting nzbFox - uses Add-On SDK

Unread post by casualfred » 2021-08-02, 20:50

Hey, after perusing the forum randomly for a while, I think I answered my own questions (and understand why you're saying what you're saying):

Question 1: Ignore it. Probably a dumb question.

Question 2: Yes, all Jetpack extensions have a package.json file.

So, for the from-scratch rewrite, I might try to replicate the basic functions first, and the less-needed functions later in XUL. I'll see what I can do.

A suggestion though: on the add-on submission portal, it might be helpful if you can include a blurb that Jetpack/Add-On SDK based extensions will not be accepted because the SDK support in Pale Moon will eventually be dropped. Also, for newbies like me, you might mention how you can tell your extension is based on Jetpack/Add-On SDK (if it has a package.json file in the root). Something like that would've been helpful for me I think.

vannilla
Board Warrior
Board Warrior
Posts: 1785
Joined: 2018-05-05, 13:29

Re: Porting nzbFox - uses Add-On SDK

Unread post by vannilla » 2021-08-02, 21:03

Just for completeness, about question 1: all the stuff imported under the "sdk/" namespace is brought by the platform (in this case the web browser), so no, you can't just "copy the relevant parts". Those components must live within the program you are extending.
Of course, if you have enough knowledge of the whole system and know what you are doing, you can hack something together, but at this point it takes less effort to simply rewrite the thing (not to mention it would be more robust overall, for the benefit of everyone.)

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10544
Joined: 2012-10-09, 19:37
Location: The Seriphia Galaxy

Re: Porting nzbFox - uses Add-On SDK

Unread post by New Tobin Paradigm » 2021-08-02, 21:29

I am not going to list everything you are NOT allowed to do on the site. The Error Message you got originally is explicit.

There is an additional reason to exclude jetpack.. Because you are not actually building that jetpack extension but modifying it in-place. In-place modifications of jetpack extensions would be considered half-assed and I am sick to death of people doing things only half-assed. Do it right or don't do it at all.

As the poll stated this is only a restriction on the Add-ons Site. For an indefinite period of time (true definition of indefinite not the usage which means forever) you can still use and even develop jetpack extensions but you will have to provide your own proper infrastructure which also includes Update services. Additionally, http://developer.palemoon.org/addons/ also mentions its deprecated status.
Do not try the patience of wizards, for they are subtle and quick to anger.
Image

User avatar
casualfred
Newbie
Newbie
Posts: 4
Joined: 2021-08-01, 04:54

Re: Porting nzbFox - uses Add-On SDK

Unread post by casualfred » 2021-08-02, 22:19

I am not going to list everything you are NOT allowed to do on the site. The Error Message you got originally is explicit.
Alright, I hear you. It would be helpful to somehow communicate what is allowed for submission on the add-on submission portal before someone goes through the trouble of creating an extension that won't be accepted (getting surprised by a rejection message). Maybe include a link to that forum poll on the submission page? That would've been helpful for me (and prevented my opening this topic).

I'm sure we can agree that more communication up front is better, right?

Oh well, just my two cents from the perspective of a newbie. Thanks for the additional info about Jetpack!

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10544
Joined: 2012-10-09, 19:37
Location: The Seriphia Galaxy

Re: Porting nzbFox - uses Add-On SDK

Unread post by New Tobin Paradigm » 2021-08-03, 02:12

You could have searched the forum or asked. You could have also read http://developer.palemoon.org/addons/ as I indicated earlier which directly tells you Jetpack is depercated. As for WHAT you can submit? Extensions (toolkit or bootstrap) and themes with more types coming soon...
Do not try the patience of wizards, for they are subtle and quick to anger.
Image

Post Reply