NSIS 7z Extract Plugin.
(c) brainsucker (Nik Medved), 2009.
Uses 7-Zip source code, (C) 1999-2009 Igor Pavlov.

For original documentation see the "nsis7z.txt".

General Notes:
Supported file types: 7-Zip only
Restrictions: no password-protected archive support,
              no multivolume archive support

Changelog:
2014.07.27 (Y.M.D)
   Changes and recompilation by PPeti66x:
   1.) Visual Studio 2008 to 2003 and 6.0 backport. The compiled file now 
       should be compatible with Win95/98/ME and NT4 systems.
       VS2008 project file was removed, because it was not updated.
   2.) Added LZMA2 support. (This caused binary size increase by 4KB.)
   3.) .\CPP\7zip\Bundles\Nsis7z\nsis7z.cpp
       In ExtractWithCallback mode the totalSize and completedSize values in 
       bytes are now converted to negative value in kilobytes if totalSize 
       value exceeds the 0x7FFFFFFF limit for the positive longint values. 
       So in the NSIS script the negative values of $R8 and $R9 variables now 
       means values in kilobytes - the display size limit now is 2TB instead 
       of 2GB. Bellow is the modified CallbackTest function to get the valid 
       amount of extracted/total data.
============== code ==============
Function CallbackTest
  Pop $R8
  Pop $R9
  StrCpy $R7 "bytes"
  IntCmp $R9 0 NoOvrFlw 0 NoOvrFlw
    IntOp $R9 $R9 & 0x7FFFFFFF
    IntOp $R8 $R8 & 0x7FFFFFFF
    StrCpy $R7 "kilobytes"
NoOvrFlw:
  SetDetailsPrint textonly
  DetailPrint "Installing $R8 / $R9 $R7..."
  SetDetailsPrint both
FunctionEnd
============ end code ============

2011.04.15
   Changes and recompilation by Marek Mizanin.
   Because I need Unicode version of this plug-in I took the last 
   7z sources - 7z921.tar.bz2 and make following changes so I was able to 
   build it:
     - char replaced with TCHAR
     - added g_pluginExtra = extra; into funcname(HWND hwndParent, int string_size, \
     - added _T before "strings"
     - updated Nsis7z.vcproj, changed default to Unicode
     - files in NsisPluginSample changed to 2.46 Unicode NSIS
     - added modified WorkDir.cpp from 7z sources
     - comment out //#include "../../Compress/LZMA_Alone/LzmaBenchCon.h"
     - fixed void DoInitialize()
     - updated int DoExtract(LPTSTR archive, LPTSTR dir, bool overwrite, 
       bool expath, ExtractProgressHandler epc)
     - updated License.txt from 7z921.tar.bz2
     - added _release_ANSI and _release_unicode directory with builded nsis7z.dll

2010.05.11
   Bugfix release by "fedotawa":
   1.) Plugin breaks non ANSI file pathname encoding (for example it switches 
       from cyrillic 1251 to 866, this causes shortcut creation into inproper 
       places)
   2.) uses v4.65 7Zip library

2009.01.09
   Complete code rewrite and using v4.64 7Zip library, by "brainsucker"
   First public release.

2005.05.11
   Initial version by "brainsucker", not released.


Required packages for compilation:
   1.) 7zip 9.22 source code (e.g. 7z922.tar.bz2)
   2.) nsis7z source code (e.g. nsis7z_922_Win9x.zip)
   3.) for Visual Studio 6 only: Windows Server 2003 february Platform SDK
          specify SDK directories at top of directories lists:
          Tools / Options / Directories
            - Include files
            - Library files

Installation:
   1. extract 7zip source code
   2. extract nsis7z_922_Win9x source code to the same path (overwrite existing files)

Compilation:
   VS2003: Open the .\CPP\7zip\Bundles\Nsis7z\Nsis7z_VS2003.vcproj 
           select the configuration (Release for ANSI, ReleaseU for Unicode) 
           and compile it. Output file: .\Release\nsis7z_VS2003.dll or
           .\ReleaseU\nsis7zU_VS2003.dll
   VS6SP6: Open the .\CPP\7zip\Bundles\Nsis7z\Nsis7z_VS60.vcproj 
           select the configuration (Release for ANSI, ReleaseU for Unicode) 
           and compile it. Output file: Output file: .\Release\nsis7z_VS60.dll
           or .\ReleaseU\nsis7zU_VS60.dll
