Packaging the omni.ja

Discussion about official Mozilla Firefox builds
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Packaging the omni.ja

Post by RobertJ »

.
I made a tweak in the omni.ja file contents. How do I repackage it using the terminal on OSX?

Thanks

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: Packaging the omni.ja

Post by RobertJ »

.
More info.

  1. I removed the omni.ja file from the application
  2. Unzipped it by changing "ja" to "zip" and double clicking.
  3. I then rezipped the resulting omni directory without making any changes.
  4. I used the terminal with the command zip -r omni.zip omni
  5. Changed the resulting omni.zip to omni.ja
  6. Placed the "new" omni.ja file into the application
  7. Double clicked and FF crashed.
  8. Placed the "original" omni.ja into the application
  9. Double clicked and all was fine.

Must be something wrong with the way I'm repackaging.

Suggestions?

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
Ver Greeneyes
Posts: 1030
Joined: June 28th, 2008, 4:57 am

Re: Packaging the omni.ja

Post by Ver Greeneyes »

So this doesn't answer your question, but Don't Unpack and Repack omni.ja[r] (check the comments section).
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: Packaging the omni.ja

Post by RobertJ »

Ver Greeneyes wrote:So this doesn't answer your question, but Don't Unpack and Repack omni.ja[r] (check the comments section).

Thanks. I would still like to know how the directory omni is packaged. Obviously it is not as simple as zipping it and renaming the suffix. I now there are other ways for certain things. This has now become one of those "puzzle" questions where you want to know simply to know.

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
phuzi0n
Posts: 517
Joined: June 23rd, 2010, 5:48 pm

Re: Packaging the omni.ja

Post by phuzi0n »

Found this:

5. Save the file and repack omni.jar. Again, be a careful while you repack. Do not repack “omni” folder, but repack everything inside that folder. Compress it as zip, and then rename omni.zip as omni.jar
Joker1337
Posts: 64
Joined: July 15th, 2012, 2:04 pm

Re: Packaging the omni.ja

Post by Joker1337 »

Try:
- rename omni.ja to omni.zip
- open with (in my case) WinZip, inside Application folder
- unzip files which you want to modified
- copy and overwrite modified files back to omni.zip
- rename omni.zip to omni.ja

This method works for me without crashes...
mozian
Posts: 156
Joined: April 30th, 2011, 11:30 pm
Location: HK

Re: Packaging the omni.ja

Post by mozian »

1 unzip /path/to/omni.ja -d omni
2 modified files
3 cd omni
4 zip -qr9XD omni.ja *
User avatar
the-edmeister
Posts: 32249
Joined: February 25th, 2003, 12:51 am
Location: Chicago, IL, USA

Re: Packaging the omni.ja

Post by the-edmeister »

Back in the days of Firefox 4, I made the mistake of using compression when closing the omni.ja file after doing some mods. Firefox didn't like that.




.
A mind is a terrible thing to waste. Mine has wandered off and I'm out looking for it.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: Packaging the omni.ja

Post by RobertJ »

.
Thanks all. Memorial Day Family thing going on. Will try this Monday and post.


.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: Packaging the omni.ja

Post by RobertJ »

phuzi0n wrote:Found this:

5. Save the file and repack omni.jar. Again, be a careful while you repack. Do not repack “omni” folder, but repack everything inside that folder. Compress it as zip, and then rename omni.zip as omni.jar


That worked perfectly. Embarrassingly I knew that but haven't done in such a long time forgot. :oops:


.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
denishowe
Posts: 2
Joined: June 19th, 2008, 2:13 am

Re: Packaging the omni.ja

Post by denishowe »

Has anyone done this successfully recently? Whenever I rezip omni.ja, Firefox won't start.

FF Dev Edition 63
MacOS High Sierra 10.13.6
UnZip 6.00 of 20 April 2009, by Info-ZIP.
Zip 3.0 (July 5th 2008), by Info-ZIP.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Packaging the omni.ja

Post by morat »

@denishowe

Did you deoptimize the omni.ja file? And remember to purge the caches when you start up the application.

deoptimize omni.ja
http://forums.mozillazine.org/viewtopic ... &t=2752877

Caching
http://developer.mozilla.org/en/Extensi ... _4#Caching

Here is an alternative to hacking the omni.ja file in some cases.

Firefox Quantum compatible userChrome.js
http://github.com/Sporif/firefox-quantum-userchromejs
johnp_
Posts: 154
Joined: March 7th, 2011, 11:22 am

Re: Packaging the omni.ja

Post by johnp_ »

Per this MDN entry you need to use `zip -qr9XD omni.ja *`.
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Packaging the omni.ja

Post by therube »

(qr9XD might be the "Mozilla" way, but I wouldn't think it would matter if you simply "zip omni.ja * -r".
Hmm. And they're actually using -9, compressing, rather then -0, storing. I guess they know ;-).)

I think you're going to have to copy/paste the link:

Code: Select all

https://developer.mozilla.org/en-US/docs/Mozilla/About_omni.ja_(formerly_omni.jar)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Packaging the omni.ja

Post by morat »

I successfully hacked the page title in the troubleshooting information aboutSupport.dtd file.

If I skip the deoptimize step, then the browser fails to start correctly.

Firefox Portable 62.0.2
Windows 7 SP1 32-bit
Post Reply