Making a Plugin-only XPI install in Pale Moon

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

Moderators: FranklinDM, Lootyhoof

jb_wisemo
Moonbather
Moonbather
Posts: 56
Joined: 2016-01-27, 02:09

Making a Plugin-only XPI install in Pale Moon

Unread post by jb_wisemo » 2021-05-21, 20:20

:geek: I am maintaining an NPAPI plugin that is distributed in XPI format as per this old MDM article

:arrow: https://web.archive.org/web/20131020091517/https://developer.mozilla.org/en-US/docs/Shipping_a_plugin_as_a_Toolkit_bundle

:thumbdown: However when I install just the XPI, the plugin itself doesn't show up under plugins, only the (mostly empty) XPI wrapper shows up under extensions.

:( Because the corresponding MDM documentation could not be found, there is no "plugintypes.xpt" file, just the install.rdf and the plugin dll .

:?: In addition to the basic question of how to use this kind of XPI file with PM or UXP, there's also the question if UXP has a way to tell the browser what ABI the dll is for.

Here is the current RDF file for a build made earlier this year:

Code: Select all

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
  <Description about="urn:mozilla:install-manifest">
    <em:id>{cbc0c784-9b0c-4dcb-b850-d5fd4dd7417c}</em:id>
    <em:name>WiseMo RSM Guest Plugin</em:name>
    <em:version>18.0.21097.17372</em:version>
    <em:unpack>true</em:unpack>
    <em:description>WiseMo RSM Guest Plugin for Web browsers.</em:description>
    <em:creator>WiseMo A/S</em:creator>

<!-- Firefox, dropped NPAPI after version 52.x ESR -->
    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>1.5</em:minVersion>
        <em:maxVersion>52.*</em:maxVersion> <!-- https://addons.mozilla.org/en-US/firefox/pages/appversions/ -->
      </Description>
    </em:targetApplication>

<!-- Pale Moon, modern GUID, still supports NPAPI -->
    <em:targetApplication>
      <Description>
        <em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id>
        <em:minVersion>1.0</em:minVersion>
        <em:maxVersion>*</em:maxVersion> <!-- https://forums.palemoon.org/viewtopic.php?f=19&t=16785 -->
      </Description>
    </em:targetApplication>

  </Description>
</RDF>

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

Re: Making a Plugin-only XPI install in Pale Moon

Unread post by moonbat » 2021-05-23, 02:01

Fix your Pale Moon min/max versions first, since you are effectively saying that you have tested it on the non existent version 1.0 of Pale Moon (the earliest was 3.5.2, since it began as a rebuild of that version of Firefox) and you guarantee that it will work forever into the future, which is impossible to predict. The current version is 29, so min/max versions should be 29.0 and 29.*.

Also, you can bookmark this backup of Mozilla XUL/XPCOM/NPAPI documentation maintained by user RealityRipple, easier than wading through broken docs on the Internet Archive.
"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

jb_wisemo
Moonbather
Moonbather
Posts: 56
Joined: 2016-01-27, 02:09

Re: Making a Plugin-only XPI install in Pale Moon

Unread post by jb_wisemo » 2021-06-10, 08:29

Nice mirror site for old documentation, but it seems badly made with lots of "internal" links pointing back to the dead Mozilla pages instead of mirrored copies.

:problem: I actually couldn't find the documents I referenced on that site.

:? As for the version range for Pale Moon, it is intended to indicate that this is intended to work with any and all NPAPI compatible Pale moon versions, past, present and future. If there is code in Pale Moon actively enforcing some of your criticisms, please point it out specifically, so I can target that detail for debugging.

:?: I also still have no idea why Pale Moon doesn't install the plugin when installing the XPI file.

New Tobin Paradigm

Re: Making a Plugin-only XPI install in Pale Moon

Unread post by New Tobin Paradigm » 2021-06-10, 09:33

NPAPI Plugins normally can't be shipped as standalone XPI packaged files. That hasn't been a thing since Mozilla 1.8 and the original XPInstall implementation which is LONG GONE. The Extension + Plugin hybrid method only ever employed with the likes of ietab would be your only option so I would look into how THEY did it.

BTW, ietab2 does still seem to work flawlessly with Phoenix-style Browsers on UXP. You just need to work out what you are doing wrong.

Additionally, you do realize that you would have to compile your NPAPI Plugin to match your target os and architecture and I am not likely to allow such a thing on the Add-ons Site at this time. Soon-ish though.

jb_wisemo
Moonbather
Moonbather
Posts: 56
Joined: 2016-01-27, 02:09

Re: Making a Plugin-only XPI install in Pale Moon

Unread post by jb_wisemo » 2021-06-10, 10:24

Further search found the documents, but they said very little not already in the archive.org copies. I did find out though that the .xpt file would be a metadata file from the IDL compilation process.

I will look at the code in ieTab2 for a working example. This XPI doesn't go on the plugin site, it is delivered directly from the few sites that use the plugin.

The way I read the archived documents, the install method I attempt doesn't use the old XPInstall scripted installer interface, providing instead just a plain XPI wrapper around a plugin shared object to be placed in the relevant profile directory. It actually worked for this plugin in Firefox with a Mozilla signature before they killed NPAPI a few years back.

New Tobin Paradigm

Re: Making a Plugin-only XPI install in Pale Moon

Unread post by New Tobin Paradigm » 2021-06-10, 10:49

We don't HAVE a "Plugin Site".

jb_wisemo
Moonbather
Moonbather
Posts: 56
Joined: 2016-01-27, 02:09

Re: Making a Plugin-only XPI install in Pale Moon

Unread post by jb_wisemo » 2021-09-08, 16:51

I expressed that our Plugin will not go on the Pale Moon AddOn site, Extension site, Plugin site or whatever else it may be called in the future. Not that you currently have a site that offers plugin downloads.

My question remains, in that the XPI technique described worked in Firefox versions much more recent than Firefox 1.8. In fact it worked in Firefox versions that required that all XPI files be signed by Firefox (instead of signed by the developer). My OP linked to an archived MDN page explaining how this is supposed to work without XPInstall (but with XPInstall backward compatibility).

I have yet to get around to reinstalling historic PM versions to test which ones install our XPI correctly, but once I do, I hope this will help identify the UXP commit that broke things.

Locked