UnTGZ plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
Line 59: Line 59:
please test (see also [[Plugin Tester (or Wrapper)|Plugin Tester]]) your tarballs with it and report to
please test (see also [[Plugin Tester (or Wrapper)|Plugin Tester]]) your tarballs with it and report to
me should any problems occur. Thanks.
me should any problems occur. Thanks.
As of version 1.0.10, untgz plugin supports lzma compressed TAR files (adds about 5KB to plugin size, so can optionally be compiled out).  Create a normal uncompressed tar file (*.tar), then instead of gzipping (or bzipping/compress'ing) use lzma from LZMA SDK (http://www.7zip.org/sdk.html).  E.g.  'lzma e myarchive.tar myarchive.tlz'


[[Category:Plugins]]
[[Category:Plugins]]

Revision as of 00:54, 3 July 2005

Author: PerditionC (talk, contrib)


Links

Download:
Untgz.zip (259 KB)
Zip.gif Untgz.1.0.10.zip (159 KB) (Mirror #1)

Both are the same files with different names.

Description

Version: 1.0.10.

UnTGZ plugin is similar to ExtractDLL and ZipDLL plugins, except it allows one to extract the files from a tarball. Only simple tarballs are supported, those with filenames longer than 100 characters or including special files may not be supported well (please send me information including where to obtain a sample tarball if better support is required for one of these).

Supports TAR files with no compression (*.tar), gzipped [zlib compatible] compression (*.tgz / *.tar.gz), and lzma compression (*.tlz / *.tar.lzma).

Original may be found at http://www.darklogic.org/win32/nsis/plugins/.
For problems, corrections, etc. send email to jeremyd --at-- fdos.org

Usage

untgz::extract [-j] [-d basedir] tarball.tgz
extracts files from tarball.tgz
if -j is specified then ignore paths in tarball (junkpaths)
if -d is specified will extract relative to basedir
untgz::extractV [-j] [-d basedir] tarball.tgz [-i {iList}] [-x {xList}] --
extracts files from tarball.tgz
if -j is specified then ignore paths in tarball (junkpaths)
if -d is specified will extract relative to basedir
if -i is specified will only extract files whose filename matches
if -x is specified will NOT extract files whose filename matches
the -- is required and marks the end of the file lists
untgz::extractFile [-d basedir] tarball.tgz file
extracts just the file specified
path information is ignored, implictly -j is specified (may also be explicit)

Example usage

This is a snippet from AbiWord's NSIS2 script:

	doDictInst:
		; Unzip dictionary into dictionary subdirectory
		untgz::extract "-j" "-d" "$INSTDIR\dictionary" "$TEMP\${DICT_FILENAME}"
 
		; Delete temporary files
		Delete "$TEMP\${DICT_FILENAME}"
 
	Finish:

Notes

Currently tested with NSIS 2.0x

Based on ExDLL/ExDLL.h and Zlib's untgz, all dependencies included, simply extract to your contrib directory and build with MSVC 6 (or later) or copy included untgz.dll to the plugins subdirectory of your NSIS installation. Some parts (such as extraction with paths) not as well tested. See included README.TXT for more details.

Note: 1.0.9 version fixes problems extracting files from some valid tarballs (updated zlib), which while tested, some issues may still exist that I haven't seen; please test (see also Plugin Tester) your tarballs with it and report to me should any problems occur. Thanks.

As of version 1.0.10, untgz plugin supports lzma compressed TAR files (adds about 5KB to plugin size, so can optionally be compiled out). Create a normal uncompressed tar file (*.tar), then instead of gzipping (or bzipping/compress'ing) use lzma from LZMA SDK (http://www.7zip.org/sdk.html). E.g. 'lzma e myarchive.tar myarchive.tlz'