Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Nov 2014, 00:32
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
UExtract-3.6 for (mainly, but not only) Slacko
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 8 [110 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
amigo

Joined: 02 Apr 2007
Posts: 2279

PostPosted: Fri 13 Sep 2013, 13:41    Post subject:  

Most .run files are created using makeself, so you should be able to filter those out. Otherwise, you've probably covered the majority of cases for the drivers...

Thanks for noting both the description and real type of file for the last batch of additions! Have you added rusty-bolt-extraction yet? I haven't found a really dependable way to extract them yet, but I know you can create them with tourque-wrench-wait-50-years...
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8711

PostPosted: Fri 13 Sep 2013, 13:54    Post subject:  

Quote:
Have you added rusty-bolt-extraction yet? I haven't found a really dependable way to extract them yet, but I know you can create them with tourque-wrench-wait-50-years...

The hot spanner was a favourite but a pair of good quality mini mole grips could save the day with some fiddly problems. Of course a good long wd40 hot tub can relieve some situations...

mike
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1101

PostPosted: Fri 13 Sep 2013, 17:05    Post subject:  

Don't have one atm, but cat rusty_bolt_and_nut | tr -d '[:rust:]' | tar xf - should do the job as well. Wink

amigo wrote:
Most .run files are created using makeself, so you should be able to filter those out. Otherwise, you've probably covered the majority of cases for the drivers...

...or maybe pull them out manually?
This one behaves promising and should be safe enough:

Code:
#!/bin/bash

# Manually lists contents of .run installers (tested: amd/nvidia/vbox)

ARCHPATH="$(realpath "$1")"; [ -f "$ARCHPATH" ] || exit 1

for DUMMY in DUMMY; do
  OFFSET=$(grep -a -m1 '^skip=' "$ARCHPATH" | tr -cd '[:digit:]')
  [ $OFFSET ] && { METHOD="-n +$OFFSET"; break; }

  OFFSET=$(grep -a -m1 '^filesizes=' "$ARCHPATH" | tr -cd '[:digit:]')
  [ $OFFSET ] && { METHOD="-c $OFFSET"; break; }

  echo "Unsupported .run installer"; exit 1
done

TYPE=$(tail $METHOD "$ARCHPATH" | file -b -)

case $TYPE in
  *'POSIX tar archive'*)        tail $METHOD "$ARCHPATH" | tar tvf -            || exit 1 ;;
  *'xz compressed data'*)       tail $METHOD "$ARCHPATH" | unxz | tar tvf -     || exit 1 ;;
  *'gzip compressed data'*)     tail $METHOD "$ARCHPATH" | gunzip | tar tvf -   || exit 1 ;;
  *'bzip2 compressed data'*)    tail $METHOD "$ARCHPATH" | bunzip2 | tar tvf -  || exit 1 ;;
  *)                            echo "Compression method unknown, exiting...";     exit 1 ;;
esac

But I wish find and test more types of those .run monstrosities, before including it back into UExtract...

Oh, and I just now found out that 'GNU tar' automagically recognizes compression format, so it would be enough to use only 'tar xf' in most cases...but I think I'll keep stick with piping.

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2279

PostPosted: Sat 14 Sep 2013, 03:03    Post subject:  

Yes, tar guesses the format from the name suffixes, but my earlier tip about using --use-compressor is better since it lets you second-guess tars abilities -like for pets which are really tgz archives.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1101

PostPosted: Tue 17 Sep 2013, 09:12    Post subject:  

Update, version 2.0:

New extensions:
.dbk (Sony Ericsson Mobile Phone Backup File - not tested, but it's a zip)
.dotx (Word Open XML Document Template - zip)
.eftx (Office 2007 Theme Effect File - zip)
.emerald (Emerald theme - tar.gz)
.emz (Windows Compressed Enhanced Metafile - gz)
.gg (Google Desktop Gadget File - zip)
.ksf (KMPlayer Skin File - zip)
.mct (MSN Messenger, Packaged Wink File -cab)
.nex (Opera's Navigator Extension format - handled by 7z)
.oex (Opera Extension - zip)
.onepkg (Microsoft OneNote Package File - cab)
.potx (PowerPoint Open XML Presentation Template - zip)
.thmx (Office 2007 Theme File - zip)
.wlz (Winamp Language Pack - zip)
.wmz (Compressed Windows Media Player Skin - zip)
.xlam (Excel Open XML Macro-Enabled Add-In - zip)
.xltx (Excel Open XML Spreadsheet Template - zip)
.xsn (InfoPath Form Template File - cab)
.mp3/.wma - extracts album art, if any. So far works only with Slacko's ffmpeg, but not with e.g. Precise's avconv.

.run has been restored (the manual, safe routine)
Tested with:
- amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run
- LinReaper0.87.run
- NVIDIA-Linux-x86-319.49.run
- tremulous-1.1.0-installer.x86.run
- VirtualBox-4.2.18-88780-Linux_x86.run
Won't work with 'binary' .run installers (e.g. mplabx-ide-v1.run)...grr, they should have named it as *.bin IMO.
Also, won't work with WMware-player installers.

.j - removed. My bad, it's a JAR Archiver's format, not related to JAVA's .jar.
I obtained an old JAR Archiver (works in DosBox) and created a test archive, but even 7z can't unpack it...

Other stuff:
- Added menu entry (under Utility) - if launched this way, Xdialog's fileselector will pop-up (only one file at a time can be chosen/extraced).
Actually, I've added it to simplify using UExtract as a right-click option in other file managers, like PCManFM or SpaceFM.
The user himself has to take care of associating appropriate filetypes with UExtract, e.g. in PCManFM:
right-click a file -> Properties -> Open with -> Customize -> Utility -> UExtract
BTW, if you don't want to have it as a default handler (launched by left-click on a file), expand "Open with" list again and choose another (if exists).

- Custom icon; since I can't draw at all, I assembled one using Vovchik's Pikona.

- If present, Gtkdialog's VTE feature will be used, instead of xterm. Slacko >= 5.4 (or >=5.5?) has it.

- /usr/local/apps/UExtract is now 100% self-containable ROX-App.
Drag'n'dropping multiple files onto it is allowed.
/usr/local/bin/uextract is now just a symlink to /usr/local/apps/UExtract/bin/uextract

- Added brief 'Filetypes Info' help page (dedicated to Amigo Wink) - can be viewed by right-clicking the UExtract's ROX-App dir (again, it's /usr/local/apps/UExtract, but it's better to create a shortcut on the pinboard).

First post updated!

Greetings!
Screenshot.jpg
 Description   
 Filesize   102.63 KB
 Viewed   929 Time(s)

Screenshot.jpg


_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 17 Sep 2013, 10:40    Post subject:  

Just could not follow , quit since I think that I never encountered 99% of the file formats mentioned here .

About .bin files :
Older Java archives have .bin extension .
I do several head -nX00 on them to figure out the run part and split them into .sh and .archive and run
j*.archive
on it so it self-extracts .
java .bin might have .pack files that need to
unpack200 *.pack *.jar

-unpack200 is a java binary .
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2279

PostPosted: Tue 17 Sep 2013, 10:52    Post subject:  

Amigo has liked: (dedicated to Amigo Wink)
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3385
Location: Ontario

PostPosted: Sat 21 Sep 2013, 15:43    Post subject:  

I put a modified version of UExtract 2.0 in Right-click-6.7.5 menu utility.
I put a warning window inside if 7z not installed.

http://murga-linux.com/puppy/viewtopic.php?p=726890#726890

_____________________________________________
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1101

PostPosted: Sun 22 Sep 2013, 05:41    Post subject:  

Hey Don, thanks for the info!
BTW, here's the rest of mimetypes, used by UExtract+ROX, that are co-related with 7z. You may want them to be handled by your wrapper as well:
.application_vnd.ms-cab-compressed
.application_x-arj
.application_x-lha
.application_x-ms-dos-executable
.application_x-ole-storage
.application_x-windows-themepack


@Karl: I wish I could stop, but I'm addicted. Rolling Eyes
And, "unfortunately", I found another formats/extensions:
.acp - Alfresco Content Package [zip]
.ani - Windows Animated Cursor. My own, very simple & crude routine - extracts all .cur images from within it.
.disk - Linux Virtual Hard Disk
.dsk - Disk Image; may work or not. Worked for me with HFS formatted 'System70_boot.dsk'
.gtp - GNOME Theme Package File [tar.gz]
.hfs - HFS Disk Image File [hfs]
.hfv - HFS Disk Image [hfs]
.icl - Windows Icon Library File. 7z can nicely handle some of them. If extraction was successful, icons can be found in .rsrc/ICON subdir.
.ip - IconPackager Theme File [zip]. 7z wasn't able to unpack .icl files found inside, dunno why.
.ipk - Itsy Package (derived from .deb.) [tar.gz]
.mmip - MediaMonkey Installation Package [zip]
.mpk - ArcGIS Map Package [zip]
.msp - Windows Installer Patch [cab]
.mzp - MAXScript Zip Package [zip]
.mzz - Microsoft .NET Download Package [cab]
.nfl - Nokia Flash Lite Package [not tested, but it's zip]
.ntfs - NTFS Partition File
.ovp - The Overlay Maker Package File [not tested, zip]
.pat - DiskStation Manager Installation File (Synology) - [tar]
.pigm - Packaged Indigo Renderer Material File [zip]
.pigs - extracts pork chops (oink!)...err...Packaged Indigo Renderer Scene File [zip]
.quiz - Quobject Quiz Package [zip]
.safariextz - Apple Safari Extension Package [xar]
.sam - Samurize Package [zip]
.sle - Sisulizer Package File [not tested, but zip]
.smzip - StepMania Package [zip]
.spk - Synology Package [tar+gz]
.sys - Windows System File [PE32]
.tpkg - KISS '.tpkg' archive [tar.xz] (spotted in Sc0ttman's thread)
.udeb - Debian Package File [deb]
.unitypackage - Unity Package File [tar.gz]
.wgz - S60 Web Runtime Widget Package [zip, not tested]
.wmd - Windows Media Download Package [ditto]
.wsp - SharePoint Solution Package [cab]
.zxp - Extension Manager Package (Adobe) [zip]
.??_ - Microsoft's Compressed ??? File [cab] - bunch of those *.EX_, *.DL_, *.WA_, etc files., which (after decompression) become *.EXE, *.DLL, *.WAV, etc.

.pack (this time for Karl Wink) - so far unofficial/unlisted; requires JRE/JDK to be installed. Had problems extracting some (maybe too old? "Corrupted pack file: magic/ver = CAFED00D/3.0 should be CAFED00D/150.7 OR CAFED00D/160.1") *.pack files, but if I create one, I can extract it.

What else:
- change in 'help page', added "Used tool(s)" column, e.g.:
'.spk - Synology Package [gunzip+tar]' instead of '.spk......[tar+gz]'
- pinstall.sh: ability to create a shortcut on the pinboard (if in use) during install time
- various fixes and improvements

A note about .rar5 format: currently only the latest (un)rar supports it, but I'll leave the chain as is (unrar|rar|7z); hopefully future versions of 7zip will support it as well, though Mr. Pavlov isn't too keen to do it atm: http://sourceforge.net/p/sevenzip/discussion/45797/thread/0500cb75/#9984

First post updated!

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1101

PostPosted: Sat 28 Sep 2013, 09:12    Post subject:  

Ok, this is the last update for now, because I _finally_ got bored with this app. Anyway, time to move on, right? Wink

New extensions/formats:
.avastsounds - Avast! Soundpack File [zip]
.bmz - Portal Bonus Map Zip File [zip]
.capx - Construct Compressed Project File [zip]
.eaz - ArcGIS Explorer Add-in File [zip, not tested]
.esriAddIn - ESRI ArcGIS add-in file [zip]
.flac - Free Lossless Audio Codec File (extracts album art)
.fwp - Microsoft Expression Web Package [cab]
.g3x - RealFlight Content File [zip]
.gnutar - same as .tar
.gps - GOM Player Skin File [zip]
.gszip - GameSalad Marketplace Asset File [zip, not tested]
.gtar - same as .tar
.htmlz - Zipped HTML eBook [zip]
.i5z - IUCLID 5 Import/Export File [zip]
.iar - OpenSimulator Inventory Archive [tar.gz]
.ipcc - iPhone Carrier Bundle [zip]
.lpk - ArcGIS Layer Package [zip]
.mdzip - MagicDraw Project Archive [zip]
.mga - Manga Document [zip, not tested]
.ndr - Nokia PC Suite Install Archive [PE32]
.ngr - Nokia PC Suite Install Archive [PE32]
.nlr - Nokia PC Suite Install Archive [PE32]
.oar - OpenSimulator Archive [tar.gz]
.odc - OpenDocument Chart File [zip]
.odi - OpenDocument Image [zip]
.odm - OpenDocument Master Document [zip]
.oth - OpenDocument HTML Template [zip]
.ova - Open Virtual Appliance [tar]
.pmlz - Zipped Palm Markup Language File [zip]
.pbp - PSP Firmware Update File - my own routine
.rmskin - Rainmeter Skin File [zip]
.stc - StarOffice Calc Spreadsheet Template [zip]
.std - Apache OpenOffice Drawing Template [zip]
.sti - StarOffice Presentation Template [zip]
.sxc - StarOffice Calc Spreadsheet [zip]
.sxd - StarOffice Drawing [zip]
.sxg - Apache OpenOffice Master Document [zip]
.sxi - StarOffice Impress Presentation [zip]
.sxm - StarMath Formula [zip]
.sxw - StarOffice Writer Document [zip]
.tardist - TAR Distribution Archive [tar]
.tg - same as tar.gz
.webz - WEBZ Compressed eBook File [zip]
.wgt - Opera Widget File [zip]
.wmga - Web Manga Document [zip, not tested]

Thumbs*.db - Windows Thumbnail Cache [handled by 7z + my own routine]

.mobi - removed, because of this.

What else:
- got rid of 'dd' dependency - everything's done with 'tail/head' pair now, which is faster, but I also prefer this way personally;
- added calculation of available space before extraction: it's simple/inaccurate 'input file(s) (unextracted) total size' vs. 'free space', but it's better than nothing;
- PATH & LD_LIBRARY_PATH extended to include directory where 'uextract' currently is (by default: /usr/local/apps/UExtract/bin/), so one can put any missing deps (bins/libs) right there as well!;
- if ar/arj/lha/xar is installed, it will be used in the first place (before the default 7z);
- some other fixes, improvements & general polishing.

First post updated!

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2279

PostPosted: Sat 28 Sep 2013, 11:33    Post subject:  

"I _finally_ got bored" -but wait! We the users are now gonna ask you to enable creation of all those filestypes. LOL
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4352
Location: Gatineau (Qc), Canada

PostPosted: Sat 28 Sep 2013, 12:56    Post subject:  

amigo wrote:
"I _finally_ got bored" -but wait! We the users are now gonna ask you to enable creation of all those filestypes. LOL


Indeed, unpacking gets very boring after a while if it's all that you do!
How about "packing"? The same tool can be used in reverse, can it not?
To create archives? Or is 7zip more limited that way?

As it happens, peazip works on my wary 5.5, but I have to "assassinate"
it to close it, it won't close normally. So a good replacement would be
welcome -- at least on some Puppies. Not to mention that the pupzip
Xarchiver can be quite puzzling for the newcomer when it comes to
creating archives.

Finally, FWIW, I tried UExtract on playdayz' lupu 5.25 creator package (a gtar file),
1) it takes forever (the original 445 Mb unpacks to over 1 Gb)
2) it unpacks, but it creates a seemingly unreadable result in a single very big file.

Fortunately, playdayz suggests a command line to do the job.
Ref.: http://www.murga-linux.com/puppy/viewtopic.php?t=67123

The ending of the archive name in playdayz example is a "tgz" wheras I
downloaded a "gtar". What's the difference, please?

In any case, many thanks for your UExtract, and...
"follow your bliss" (to quote Joseph Campbell) ! Smile

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1101

PostPosted: Sat 28 Sep 2013, 14:32    Post subject:  

amigo wrote:
"I _finally_ got bored" -but wait! We the users are now gonna ask you to enable creation of all those filestypes. LOL

Ouch, cruel. Laughing
I'm sure such a task is designated for some coders in one of the circles in Dante's Inferno.

musher0 wrote:
Indeed, unpacking gets very boring after a while if it's all that you do!
How about "packing"? The same tool can be used in reverse, can it not?
To create archives? Or is 7zip more limited that way?

Well, the problems is that in order to unpack given archive format, we usually need just one, hardcoded command (e.g. 'tar xvf archive.tar'), but to create one, we'd have to deal with sometimes dozens of parameters (encryption, encryption method, compression method, compression level, follow symlinks (or not), and so on, and so on) - each archiving/compression tool have a different set of them...and it would be nice to not hardcode those parameters, but give choice to end-users. So, unfortunately, there's no easy way to turn UExtract into UPack. Wink
Personally, I'm using ROX right-click option that "sends" selected dir to File-Roller:
Code:
file-roller -d "$1"

or Amigo's ZipZap (drag'n'drop).
However, I've been thinking about it and I'm not saying "no", I'm just saying "not in the nearest future". Cool

musher0 wrote:
1) it takes forever (the original 445 Mb unpacks to over 1 Gb)
2) it unpacks, but it creates a seemingly unreadable result in a single very big file.
The ending of the archive name in playdayz example is a "tgz" wheras I
downloaded a "gtar". What's the difference, please?

Oh, .gtar has been added just now in v2.2.
According to FileInfo it's just a plain .tar:
Quote:
The GTAR extension is rarely used for Tar archives. Instead, the .TAR extension is much more commonly used.

But the file I have downloaded has .tgz extension and it is gzipped tar (not plain tar) indeed, so everything's fine and UExtract has no problems with it.

BTW, before v2.2 this extension (.gtar) wasn't included and was being processed by 7z (fallback).
So I suspect that:
1. The downloaded file was really gzipped tar (wrongly named as .gtar) and therefore
2. The resulting big and "unreadable" file was most likely uncompressed tar archive with some weird extension given by 7z...

Thanks &
Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4352
Location: Gatineau (Qc), Canada

PostPosted: Sat 28 Sep 2013, 23:48    Post subject:  

Hello, SFR.

Many thanks for the explanation. No pressure, I was just asking. And as
you mentioned, there are alternatives.

"Coders in Dante's Inferno", eh? Twisted Evil (hehehe) Who knows, the Devil
might even have provided Dante with a Surface... Twisted Evil

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2279

PostPosted: Sun 29 Sep 2013, 02:22    Post subject:  

Some browsers don't properly identify things and hange the name -I used to use Opera a lot and it would often rename things to *.gtar when it was really txz or other.

I wrote ZipZap for my everyday use with linux sources and package archives -mostly to be able to quickly create archives and unpack sources the fastest way possible. It doesn't create rpm or debian archives -although I have written another tool which does.

This whole exercise with Uextract, serves as a good lesson on how to control (or not) yourself when deciding what a program you are writing should do or not. Typically, this thing has wound up doing way more than the original idea encompassed. It is always good to really narrow down the programs' concept and scope as much as possible. You can always expand the concept later, but having it closely defined makes it easier to decide what stay in and what stays out. It also shows how a general re-write after the first couple of versions is usually a Good Thing(tm).
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 8 [110 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1311s ][ Queries: 12 (0.0077s) ][ GZIP on ]