topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 3:09 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to edit .xpi, and with what?  (Read 40267 times)

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
How to edit .xpi, and with what?
« on: March 03, 2007, 07:54 PM »
It was fun to realize that I somehow had managed to change the Firefox extension "IE View Lite" into a "Edit in Frontpage" version. It made me high, and for a while I was thinking silly thoughts about my skills   :P

Now I'm back to the ground, I think. My version of "ViewMyCurrency" stopped working, and an update from the author's site just made it even worse, so I removed it and tried to install an old stable version from Mozilla. It is for 1.5 and below only, but someone wrote "Download and save to desktop. Open xpi and change max version in install rdf to 2.0.0.1. Voila!", and that sounded easy, I said to myself.

"Open xpi"... hmm... with what?

This is what this xpi will lok like, if you open it with Notepad:

Clipboard01.gifHow to edit .xpi, and with what?

- and in Wordpad:

Clipboard02.gifHow to edit .xpi, and with what?

It may look a lot better in CopyWriter, but the right margen tells this is not the right way either, I would say - but then again, who am I to say anything but I don't know:

Clipboard03.gifHow to edit .xpi, and with what?

So, my big question to you is: How to edit a .xpi file?  - and with what?
« Last Edit: March 03, 2007, 07:58 PM by Curt »

dk70

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 269
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #1 on: March 03, 2007, 08:20 PM »
XPI is like a ZIP file and can be opened with Total Commander, 7-Zip etc. May be even XPs build-in unzipper.

Change max version to 2.0.0.* so it allows latest 2.0.0.2 and above. 3 or 10 would also work :)

Latest versions are almost always the best with this - well do check changelog so you know which bugs are in "stable" version http://viewmycurrency.wordpress.com/ Beta, alpha, stable loses meaning with extensions (Firefox...)

This install.rdf trick is not always the same as when author declare "Added: Support for Firefox 2" - often works but depends on extension.

I have used View Currency, was ok but I thought Change was a bit more lightweight https://addons.mozilla.org/firefox/3399/ more manual to operate. Now I dont use any.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #2 on: March 03, 2007, 08:30 PM »
XPI is like a ZIP file and can be opened with Total Commander, 7-Zip etc. May be even XPs build-in unzipper.

Done!  :Thmbsup:

But how do I get the files back into one xpi formatted folder/file for Firefox to open?
 :tellme:

dk70

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 269
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #3 on: March 03, 2007, 08:37 PM »
Just repack it like you would a zip file. If whatever you use insist on zip extension a rename should work. Hmm, depends on packing format? I dont know but in Total Commander build in zipper certainly can do it - and it is a common one. I open xpi file/view file list, click edit for install.rdf - edit away in external editor, ends with saving this temporary file - back to TC it offers to repack into xpi. Done.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #4 on: March 03, 2007, 08:46 PM »
Just repack it like you would a zip file. If whatever you use insist on zip extension a rename should work. Hmm, depends on packing format? I dont know but in Total Commander build in zipper certainly can do it - and it is a common one. I open xpi file/view file list, click edit for install.rdf - edit away in external editor, ends with saving this temporary file - back to TC it offers to repack into xpi. Done.

Repacking it makes Firefox say the installation file is incorrct. The file size is quite different from before unzipping.

I am not going to install Total Commander in order to figure out this little problem. Think I'll give the Change a try instead. But thanks anyway!

dk70

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 269
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #5 on: March 03, 2007, 09:05 PM »
Should you try again later it really should be straightforward http://developer.moz.../Extension_Packaging

What tool you use to zip/unzip? May be not a good idea to use Wordpad, go Notepad or other clean editors.

There is another solution. Disable Firefox ability to check for compatibility. Insert user_pref("extensions.checkCompatibility", false); in user.js which is in main profile folder or go about:config and add it. I dont think it is present right now. If so just change/toggle value to false. To make a new - rightclick, New, Boolean, insert pref name extensions.checkCompatibility doubleclick to toggle value to false or rightclick and select toggle. Restart Firefox and the old stable View Currency will install.

Nighted

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 572
  • Meat Popsicle
    • View Profile
    • Nighted@deviantART
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #6 on: March 03, 2007, 09:18 PM »
Curt, you can also just use the MR Tech Local Install extension. It can change the compatibility of the extension for you.

Basically if you want to edit it yourself you change xpi to zip, make the changes with any text editor, zip again and change back to xpi. Always works for me. If it's not working, maybe something is compressing it with a non-standard zip routine.
I`m a firm believer in the philosophy of a ruling class, especially since I rule.
« Last Edit: March 03, 2007, 09:22 PM by Nighted »

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #7 on: March 03, 2007, 09:46 PM »
Should you try again ...

Well, I did try again, but failed. I installed ZipZag, and was able to open Install.rdf and write "2.0.*" in the end of the file, using CopyWriter, but somehow the change was not saved, or correctly done by me, because the fox gave the same speach as before: "This version is for 1.5 only..".

Is Total Commander using ZipZag as plug-in?

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #8 on: March 03, 2007, 09:56 PM »
Curt, you can also just use the MR Tech Local Install extension.

That MR Tech guy sure will take me some time to learn how to use! I am NOT tech'ed...

But now I have installed it, and then we will see some time in the future what became of all this.
Thanks for answering!
« Last Edit: March 03, 2007, 09:57 PM by Curt »

dk70

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 269
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #9 on: March 03, 2007, 10:14 PM »
You replaced already existing max version number with 2.0.0.* right? Dont change anything else or put it at end of file.

Give me url to that stable oldie and I can do the change in 15 seconds with lovely TC. I dont know ZipZag - TC uses a simple internal zipper, no fancy format.

So now I know ZipZag - I remember trying it out long time ago, may be a bit overkill and payware  :o I really think just about any zip tool including WinRAR can do this but depending on how you unpack and repack settings must fit, preserve directory hierarchy for example.

Firefox is best when you only use what you actually USE. Get rid of Tech guy unless a need has popped up during this ;)

dk70

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 269
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #10 on: March 03, 2007, 10:26 PM »
Here is the latest official, not compatible version 0.38 from Add-on site. I just installed it on 2.0.0.2, after version check was enabled, seems to work. You do the testing.

Because of forum rules I have renamed so file has zip extension. Reverse to original xpi before installing.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #11 on: March 04, 2007, 03:12 AM »
You sure has provided some fine service, dk70  :Thmbsup:

The guys who advocated the re-naming, did so only five weeks ago. Considering that this extension doesn't get updated very often, and no-one seems to be complaining about it, makes me think something else may be wrong; maybe some mismatching between extensions. The old "stable" version you just made for me did not work in my setup. I will have to figure out something else.

Thanks for you efforts!
« Last Edit: March 04, 2007, 03:15 AM by Curt »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #12 on: March 04, 2007, 04:14 AM »
You know you're a geek when you look at the first notepad screenshot and say to yourself "oh, that looks like a zip archive"
- carpe noctem

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #13 on: March 04, 2007, 04:21 AM »
You know you're a geek when you look at the first notepad screenshot and say to yourself "oh, that looks like a zip archive"

Thanks for pointing this out. I now know that I am not a geek...  8)

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #14 on: March 04, 2007, 04:27 AM »
:)

I used to mess around a lot with hexeditors in the DOS days, and I still do. ZIP files start with the "PK" signature (after it's inventor, Phil Katz  :rip: ), and you can usually see some filenames after that :)
- carpe noctem
« Last Edit: March 04, 2007, 04:31 AM by f0dder »

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #15 on: March 04, 2007, 04:39 AM »
I used to mess around a lot with hexeditors in the DOS days,

Ohh, you are that old?  That is my age, too .. 8)

Thanks for the enlightment

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #16 on: March 04, 2007, 04:42 AM »
Generation 1981, so I'm 0x19  8)
- carpe noctem

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,069
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #17 on: March 04, 2007, 07:02 AM »
This webpage may add some useful info and an overview of how it all works:

http://developer.moz.../Extension_Packaging

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #18 on: March 04, 2007, 07:45 AM »
Generation 1981, so I'm 0x19  8)

You hide it well, or did you start out at a very young age?

In my DOS days, the biggest news was a telefax-like machine (with a keyboard) the size of a 50" projector TV, that was placed at the public library, and from which we could play "X and O" (or whatever it was) against a computer located some fifty miles away (and that was the data processing machine closest to our city!). The game would last for maybe an hour. I never understood any of it, but I learned to play "X and O" in DOS...
« Last Edit: March 04, 2007, 08:18 AM by Curt »

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #19 on: March 04, 2007, 07:57 AM »
This webpage may add some useful info and an overview of how it all works:

http://developer.moz.../Extension_Packaging
-Carol Haynes (March 04, 2007, 07:02 AM)
Yes, that is a useful article.
Thank you! - to both dk70 and Carol.

HamsterSoup

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #20 on: March 05, 2007, 02:49 AM »
Hi, you mentioned problems with ViewMyCurrency. If you've tried the latest version on http://hamstersoup.com/viewmycurrency and have a bug report then feel free to leave a comment on my blog. I'll definitely look into it.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #21 on: March 05, 2007, 08:01 AM »
Hi, you mentioned problems with ViewMyCurrency. If you've tried the latest version on http://hamstersoup.com/viewmycurrency and have a bug report then feel free to leave a comment on my blog. I'll definitely look into it.

Indeed a nice touch from this author!  :up:

However, I have no idea as to why the extension stopped working. I installed dozens of new programs before I realized the new misbehaviour from ViewMyCurrency, so I cannot see how to report it as a "bug", when I don't know why, when, or what caused the problem. I can only say it stopped working.

demha

  • Participant
  • Joined in 2007
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #22 on: March 07, 2007, 07:31 PM »
whats all abt .xpi i have no idea abt it can any body tell me what is it ? do u mean editing xp features?

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: How to edit .xpi, and with what?
« Reply #23 on: March 08, 2007, 01:04 AM »
whats all abt .xpi ?

The answer is hidden within the first post:

It was fun to realize that I somehow had managed to change the Firefox extension "IE View Lite" into a "Edit in Frontpage" version. It made me high, and for a while I was thinking silly thoughts about my skills   :P

Now I'm back to the ground, I think. My version of "ViewMyCurrency" stopped working, and an update from the author's site just made it even worse, so I removed it and tried to install an old stable version from Mozilla. It is for 1.5 and below only,...

".xpi" is a fileformat for extensions for the Mozilla Firefox browser.
Sorry, for not making that clear from the beginning - so, Thanks for asking!
« Last Edit: March 08, 2007, 01:06 AM by Curt »