Sidecar: like Jetpack, but better

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

Moderators: FranklinDM, Lootyhoof

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Sidecar: like Jetpack, but better

Unread post by vannilla » 2021-05-19, 19:35

Introducing Sidecar, a tool to quickstart development of extensions for UXP-based applications.

You can find it here: https://repo.palemoon.org/vannilla/Sidecar
In particular I ask people to read the README, as it contains some basic informations about this tool that I don't want to repeat: https://repo.palemoon.org/vannilla/Side ... ter/README

Very briefly, it's a tool to autogenerate some files from a single specification.
The rest of this post will be a sort of Q&A to explain what is not in the README.

(Edit, as apparently I have forgotten to specify it in the README: this tool is only for Linux, as I don't have a machine with Windows I can use to develop this tool.)

→ Why this tool?
Extensions require some specific files to work and after writing a few extensions you'll notice immediately that dealing with those files is a chore, especially as they follow the same structure regardless of the extension being worked on.
Sidecar is an attempt at reducing those chores, by automatically generating and updating those files instead of doing everything manually.

→ Why does the topic title say "better than Jetpack"?
Mozilla's Jetpack project was also an attempt at reducing the chores of extension development, so in that regard Sidecar is like Jetpack.
However, it had a lot of inherent problems, both in the required tools and in how Jetpack worked in itself. Because Sidecar is not built like Jetpack, it doesn't have those problems.

→ What are the problems with Jetpack?
Glossing over the design of the jpm tool itself, the workflow forced upon developers by Jetpack, paradoxically, made things more complex than the standard way.
To begin with, it completely changed the structure of the extension's directory tree: this made things unnecessarily difficult, as people now have to learn two different structures for no reason at all.
Then, it made everything dependant on specific tools to perform pretty much anything related to getting the extension to work. The immediate consequence of this choice is that if anything happens to these tools, like it has happened after Firefox deleted all the things not related to WebExtensions, nobody can build or run the Jetpack extension.
A problem that doesn't really involve developers but which is still relevant for extensions, is that Jetpack itself is a set of modules provided by the application itself, built on top of technologies which have their own issues especially related to UI handling. In fact, the Jetpack modules were created also in an attempt to work around those issues. Any other Jetpack issue usually is a consequence of these last two problems.
Finally, at least speaking personally, jpm itself is really poorly done, so on top of those issues you get a terrible user interface too.

→ How does Sidecar avoid those issues?
To begin with, Sidecar generates only traditional extensions (those requiring a restart to be enabled.)
Those extensions use a tried and true model, which is guaranteed to work no matter if the extension deals with UI or not, since it's the original model from the times when extensions were first introduced a century or two ago.
Most importantly, though, Sidecar was designed to keep itself out of the way: the generated files follow the proper structure of a normal extension and it is perfectly fine to edit those files manually and never touch Sidecar ever again.
Sidecar's job is to reduce chores, not to impose a specific workflow!

→ I'm new to extension development; will Sidecar help me develop/learn?
Probably, but I suggest doing things manually at least the first couple of times.

→ I have an already written extension; will Sidecar benefit me?
I don't think so. Sidecar was designed for new extensions and adapting old extensions to it might require a lot of rewriting, making the job to reduce chores a chore in itself!

→ Can I use Sidecar to develop a bootstrapped extension?
With enough effort maybe you can, but I don't recommend doing it, nor is Sidecar going to encourage such an effort.

→ Can I use Sidecar to port this non-overlay extension to the overlay model?
No, you can't.
Last edited by vannilla on 2021-05-19, 20:25, edited 1 time in total.

Michaell
Lunatic
Lunatic
Posts: 282
Joined: 2018-05-26, 18:13

Re: Sidecar: like Jetpack, but better

Unread post by Michaell » 2021-05-19, 20:16

Is this only for Linux? Running "build(.exe)" produces a message that it can't run in 64bit Windows, which is all I have.
Win10home(1709), PM33.0.0-portable as of Feb 1, '24

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Re: Sidecar: like Jetpack, but better

Unread post by vannilla » 2021-05-19, 20:23

Oops, forgot to mention it. Sorry, completely slipped my mind as I was writing the OP.
Yes, it's only for Linux and unless a dedicated Windows developer it'll be that way. I don't have a machine with Windows on which I can develop this thing.
Anyway, if you have Windows 10 you can fire up the WSL, on which it will work just fine, though admittedly the work it takes nullifies the time you save up.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Sidecar: like Jetpack, but better

Unread post by Moonchild » 2021-05-19, 20:57

Considering most users are on Windows, that's a real pity.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: Sidecar: like Jetpack, but better

Unread post by New Tobin Paradigm » 2021-05-20, 00:21

I use a hacked version of the Mozilla build system from esr45 which works pretty well. Works on Windows (when ran from mozillabuild) and the linux (though configure needs stripped down some more so a compile environment and deps are needed even if not used). It can also reference the IDL includes from a UXP build and generate xpcom typelibs and of course has the preprocessor!

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Re: Sidecar: like Jetpack, but better

Unread post by vannilla » 2021-05-20, 06:51

Moonchild wrote:
2021-05-19, 20:57
Considering most users are on Windows, that's a real pity.
Now we have to see how many developers are on Windows ;)
New Tobin Paradigm wrote:
2021-05-20, 00:21
I use a hacked version of the Mozilla build system from esr45 [...]
It's good that it works, but it seems to be more work than what is needed when using Sidecar, so personally I'd still use this thing I wrote even if there is no preprocessor etc. :oops:

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Sidecar: like Jetpack, but better

Unread post by Moonchild » 2021-05-20, 07:27

Maybe I should write a GUI for setting up new extensions.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: Sidecar: like Jetpack, but better

Unread post by moonbat » 2021-05-21, 01:31

Extension Developer that I forked has an extension packaging tool built in (Extension Builder) including an editor for install.rdf, I've updated it to support all UXP applications.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Sidecar: like Jetpack, but better

Unread post by BenFenner » 2021-07-26, 17:00

Moonchild wrote:
2021-05-20, 07:27
Maybe I should write a GUI for setting up new extensions.
That would be interesting...

New Tobin Paradigm

Re: Sidecar: like Jetpack, but better

Unread post by New Tobin Paradigm » 2021-07-26, 17:17

No. No it isn't.

Locked