Install Extensions Into Your Profile Directory

Reader Byron Jones writes,

With Bug 162960 fixed, you can install extensions into your user profile directory. however for this to work, the xpi needs to be modified in the following way :

  • download and extract the xpi
  • edit install.js
  • replace getFolder("Chrome"); with getFolder("Profile", "chrome");
  • replace registerChrome(.. | DELAYED_CHROME, .. with registerChrome(.. | PROFILE_CHROME, ..
  • recreate xpi with updated install.js, and install

Remember, xpi files are just zip files. I just renamed extension.xpi to extension.xpi.zip, extracted it, edited the install.js as noted above, then rezipped the files to extension.xpi.zip, then renamed it back to extension.xpi, then opened the file in Mozilla/Phoenix. Simple right? :)

Get your extensions at mozdev.org, or get your Phoenix extensions from the Phoenix Help site.

» posted by pinder on April 04, 2003 at 11:35 AM

Comments

Wow... *this* is a major improvement.
/me immediately hacks all the XPIs he installed.

# posted by Daniel Glazman

This is a kickarse first step and I'm happy to see it. Unfortunately with the frequency I update my nightlies, it's still a pain in the anus to use extentions so I'll need to wait to either a. be able to do this by fiddling something in my profile or b. I don't need to fiddle at all. A simple prompt before install will do if it detects you have write access to the install dir (ie. install globally or locally?)

# posted by Hogarth

Hogarth: the whole point about being able to install extensions to your profile directory is that they *don't* need to be reinstalled when you move to a new nightly.

# posted by clav

that assumes that you're not creating a new profile and that the extension provides the option for profile installation

I will be converting my [http://cdn.mozdev.org] extensions to install locally/globally when I find a source I understand that explains how to do it

I also need a way to make sure that it is a 1.4/1.3 build that the installation is being tried on, since older builds and N7 don't have this ability

# posted by Chris Neale

Ahh wait. I misunderstood the instructions. They're for the extention and not the moz install. Sweet. Linky and maybe multizilla here I come. :)

# posted by Hogarth

Googlebar (latest XPI-rimental.xpi) offers the choice of installing to profile or executable directory. Authors of other extensions should study that one to see how it's done.

# posted by Neil Parks

What about a developing install?
I find nothing as hacking the /chrome/installed-chrome.txt to install the extension at developing stage without a xpi file.

# posted by Daniel

http://linky.mozdev.org also offers a install script that anybody can use. check it out

# posted by Henrik Gemal

Post a Comment

This discussion has been closed.