ZipDLL plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library)
 
(→‎Using the header file: Force codepage)
 
(26 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{PageAuthor|codesquid}}
== Links ==
== Links ==
[[Image:Zip.gif]] [http://filezilla.sourceforge.net/misc/ZipDLL.zip ZipDLL 1.2.2a] (379,271 bytes)
<attach>ZipDLL.zip</attach>
 
[[Image:Zip.gif]] [http://filezilla.sourceforge.net/misc/ZipDLL.zip ZipDLL.zip] (370 KB) [original version with syntax error in ZipDLL.nsh:357]
 
To use ZipDLL:
# Extract '''ZipDLL.dll''' to directory '''Plugins''' in your NSIS installation
# Extract '''ZipDLL.nsh''' to directory '''Include''' in your NSIS installation


== Description ==
== Description ==
'''Version:''' 1.2.2a.
This plugin provides basic zip file extraction ability for NSIS scripts.
This plugin provides basic zip file extraction ability for NSIS scripts.


Line 10: Line 20:


=== Using the header file ===
=== Using the header file ===
To use the dll, include "ZipDLL.nsh" after including the language files. To extract files from a zip file, use the following macro:
To use the dll, include "ZipDLL.nsh" after including the language files.  
 
<highlight-nsis>!include /CHARSET=CP1252 zipdll.nsh</highlight-nsis>
 
To extract files from a zip file, use the following macro:


<highlight-nsis>!insertmacro ZIPDLL_EXTRACT SOURCE DESTINATION FILE</highlight-nsis>
<highlight-nsis>!insertmacro ZIPDLL_EXTRACT SOURCE DESTINATION FILE</highlight-nsis>
Line 59: Line 73:


=== Legal Stuff ===
=== Legal Stuff ===
This NSIS plugin is licensed under the GPL, please read the file ZipArchive\glp.txt for details.
This NSIS plugin is licensed under the GPL, please read the file ZipArchive\gpl.txt for details.


ZipDLL uses the ZipArchive library from [http://www.artpol-software.com/index_zip.html http://www.artpol-software.com/index_zip.html]. Please read the file ZipArchive\license.txt for details.
ZipDLL uses the ZipArchive library from [http://www.artpol-software.com/index_zip.html http://www.artpol-software.com/index_zip.html]. Please read the file ZipArchive\license.txt for details.
Line 66: Line 80:
Since ZipArchive is licensed under the GPL, it may only be used with programs with a GPL compatible license, the same applies to this DLL. You can, however obtain a commercial license (free of charge for freeware and most shareware programs) for ZipArchive. Please read ZipArchive\license.txt for details. Permission is granted to use ZipDLL together with proprietary software when you've obtained a license for ZipArchive.
Since ZipArchive is licensed under the GPL, it may only be used with programs with a GPL compatible license, the same applies to this DLL. You can, however obtain a commercial license (free of charge for freeware and most shareware programs) for ZipArchive. Please read ZipArchive\license.txt for details. Permission is granted to use ZipDLL together with proprietary software when you've obtained a license for ZipArchive.


Page author: codesquid
[[Category:Plugins]]
[[Category:Compression]]

Latest revision as of 15:29, 4 January 2022

Author: codesquid (talk, contrib)


Links

ZipDLL.zip (370 KB)

Zip.gif ZipDLL.zip (370 KB) [original version with syntax error in ZipDLL.nsh:357]

To use ZipDLL:

  1. Extract ZipDLL.dll to directory Plugins in your NSIS installation
  2. Extract ZipDLL.nsh to directory Include in your NSIS installation

Description

Version: 1.2.2a.

This plugin provides basic zip file extraction ability for NSIS scripts.

Excerpt from the readme

What is this?

ZipDLL is a extension DLL for NSIS. It can unzip files from zip files. It is especially useful in combination with NSISdl so that you don't have to download large files uncompressed.

Using the header file

To use the dll, include "ZipDLL.nsh" after including the language files.

!include /CHARSET=CP1252 zipdll.nsh

To extract files from a zip file, use the following macro:

!insertmacro ZIPDLL_EXTRACT SOURCE DESTINATION FILE
Parameters
Zip file, destination directory, file to extract.
Description
Extract the specified file in the archive to the destination directory. If file is <ALL>, all files in the archive will be extracted.

On Success, the string "success" is on top of the stack, else an error message.

If using the macro, the status messages during extraction uses the current installer language. (Only if ZipDLL supports that language. Default language is English)

Example

!insertmacro ZIPDLL_EXTRACT "c:\test.zip" "c:\output" "<ALL>"

Using exported functions from ZipDLL.dll

ZipDLL::extractall SOURCE DESTINATION
Parameters
Zip file, destination directory.
Description
Extracts all files in the archive to the destination directory.
ZipDLL::extractfile SOURCE DESTINATION FILE
Parameters
Zip file, destination directory, file to extract.
Description
Extracts the specified file in the archive to the destination directory.

Example

ZipDLL::extractall "c:\test.zip" "c:\output"

Supported languages

ZipDLL.nsh contains the following additional languages:

  • Arabic
  • Chinese Simplified
  • Chinese Traditional
  • Croatian
  • Danish
  • French
  • German
  • Hungarian
  • Korean
  • Lithuanian
  • Polish
  • Portuguese (Brazil)
  • Russian
  • Spanish

To add your language, simply modify ZipDLL.nsh, should be really easy. Please send the modified ZipDLL.nsh to tim.kosse@gmx.de so that other people can benefit from it, too.

Legal Stuff

This NSIS plugin is licensed under the GPL, please read the file ZipArchive\gpl.txt for details.

ZipDLL uses the ZipArchive library from http://www.artpol-software.com/index_zip.html. Please read the file ZipArchive\license.txt for details.

Alternative license for use with proprietary software

Since ZipArchive is licensed under the GPL, it may only be used with programs with a GPL compatible license, the same applies to this DLL. You can, however obtain a commercial license (free of charge for freeware and most shareware programs) for ZipArchive. Please read ZipArchive\license.txt for details. Permission is granted to use ZipDLL together with proprietary software when you've obtained a license for ZipArchive.