MozillaZine

How to unpack omni.ja now???

Discuss application theming and theme development.
patrickjdempsey

User avatar
 
Posts: 23731
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted June 23rd, 2015, 2:21 pm

Ugh. So on my main machine I have an older version of WinZip that will unpack omni.ja. It complains about it but it does it anyway. The new version of WinZip flat out refuses to unpack it. Tried the commonly-recommended 7Zip and it refuses to unpack the .js files saying "access denied" and also refuses to actually unpack the archive at all despite churning away at it and showing a progress bar of all of the "work" that it's doing. Or is this like that ridiculous CD burner built into Windows that spends an hour prepping the files and telling you it's burning a CD but it doesn't actually do it until you give it another command? Also, if this format that Mozilla loves so much was even remotely standard then why won't anything open it? Years ago I used IZarc as that was one of the few zippers that would create a JAR or XPI that Firefox would read, but of course it doesn't recognize the new format. Changing the extension to .ZIP actually makes it worse.


Grrr. :evil:
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

patrickjdempsey

User avatar
 
Posts: 23731
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted June 23rd, 2015, 2:29 pm

Aha! Irony of ironies... changing the extension to .ZIP allows Windows 7 to recognize it as an archive format and it opens it up and extracts it with no complaints. What the fudge? Microsoft actually does something better than 3rd-party software???
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

Exalm
 
Posts: 137
Joined: July 28th, 2013, 3:29 pm

Post Posted June 27th, 2015, 2:01 am

On GNU/Linux:
unzip works fine.
mc (Midnight Commander) built-in archive viewer doesn't open it.

AFAIK, they are using some non-standard compression, so zip processing tools don't have to support it. Just as APNG is not standard, so editors/viewers don't have to support it, yet some do that.

Aris

User avatar
 
Posts: 2867
Joined: February 27th, 2011, 10:14 am

Post Posted June 27th, 2015, 8:57 am

I use WinRAR to deal with omni.ja (renamed omni.jar). It gets decompressed without warnings or errors.

patrickjdempsey

User avatar
 
Posts: 23731
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted June 28th, 2015, 1:03 pm

Yeah, linux... it works in there because i think that's what they are using to wrap them. They CLAIM it's standard compression and there have been several bugs filed against this but they claim there's no problem.

Maybe that's what I was using... WinRAR... WinZIP... grrr. Really tired of having to find a whole new different zip utility every few years for absolutely no reason.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted June 29th, 2015, 9:16 am

patrickjdempsey wrote:Yeah, linux... it works in there because i think that's what they are using to wrap them. They CLAIM it's standard compression and there have been several bugs filed against this but they claim there's no problem.
It is technically within the ZIP specs (if you squint hard enough), but it's an extreme edge case. Most ZIP utility authors probably thought that no one remotely sane would use that combination of parameters so never bothered to develop a decode path for that.

Phil

rsx11m
Moderator
 
Posts: 14397
Joined: May 3rd, 2007, 7:40 am
Location: US

Post Posted June 29th, 2015, 1:02 pm

It's called "optimized" :mrgreen:

Yes, unzip unpacks it fine, though occasionally complaining. However, when you make a change or add a file, create a new ZIP/JA file as updating the existing omni.ja with the zip command frequently breaks it (with or without optimization).

I don't know if the config/optimizejars.py script still does what it was doing in earlier versions (got removed some time between the 17.0 and 24.0 cycles), but you could "--optimize" and "--deoptimize" those files.

patrickjdempsey

User avatar
 
Posts: 23731
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted June 29th, 2015, 2:51 pm

The sad part is it's been several years now since they started using it and none of the common ZIP utilities have picked it up.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

Yaron10
 
Posts: 439
Joined: July 5th, 2011, 6:32 am

Post Posted September 4th, 2015, 8:28 pm

Like Aris, I also use WinRar.
Decompressing works like a charm.

I've created 2 files "JA Archive" and "XPI Archive" for directly compressing to JA and XPI with WinRar.
Download here.

Unzip and place the files in the SendTo folder (\<yourusername>\AppData\Roaming\Microsoft\Windows\SendTo).
You don't have to select all items for compressing; just right-click an item -> Send To > JA Archive.exe.
All the files, folders and sub-folders will be compressed.

EDIT:
Aris, you don't need to rename omni.ja to omni.jar. In WinRar Options add "ja" (and "xpi") to the User Extensions.

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted June 16th, 2016, 11:37 am

The following uses info-zip (and bash) that comes with mozilla-build:
Code: Select all
zip -FF omni.ja --out omni.jar && mv omni.jar omni.ja

Phil

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 2 guests