Old 19th February 2011, 21:40   #41
parasoul
Senior Member
 
Join Date: Aug 2007
Posts: 117
Is it possible to implement handling of password-protected archives?

This would be a much more convenient solution than using Dcrypt to protect some valuable files.
parasoul is offline   Reply With Quote
Old 28th June 2011, 01:47   #42
pizzaM4N
Junior Member
 
Join Date: Nov 2009
Posts: 3
is it possible to implement an option for unpacking lzma2 compressed .7z files? If you try to unpack lzma2 files with this plugin, all the unpacked files have a size of 0KB.
pizzaM4N is offline   Reply With Quote
Old 28th June 2011, 05:09   #43
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
As a makeshift solution you could turn your lzma2 file into a self-extracting exe. You can then use:

ExecWait '"Path\YourExe.exe" x -o"$INSTDIR" -y' $0
${If} $0 != "0"
MessageBox MB_OK "File extraction failed"
${EndIf}

You can distribute 7x sfx exes for free for commercial apps as well, as the creator mentions here: http://sourceforge.net/projects/seve.../topic/3361543
MSG is offline   Reply With Quote
Old 28th June 2011, 07:42   #44
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,347
Quote:
Originally Posted by parasoul View Post
Is it possible to implement handling of password-protected archives?

This would be a much more convenient solution than using Dcrypt to protect some valuable files.
the plugin does not support that and the author doesn't bother to make any comments on his plans. the best (and probably easiest) would be the option to supply any of the available commandline arguments. personally i'm looking for the -p, -i and -e switches to be supported.

Last edited by Yathosho; 28th June 2011 at 09:36.
Yathosho is offline   Reply With Quote
Old 12th April 2013, 18:03   #45
extremecarver
Junior Member
 
Join Date: Apr 2013
Posts: 21
Well, I've tried out the new 921 based plugin, but it cannot extract lzma2 (it just outputs 0bit files)?

Anything I'm doing wrong?
Anyone got a solution right now, to internally unpack lzma2 - it's nearly two years later compared to the last post?
extremecarver is offline   Reply With Quote
Old 14th April 2013, 20:27   #46
extremecarver
Junior Member
 
Join Date: Apr 2013
Posts: 21
Quote:
Originally Posted by MSG View Post
As a makeshift solution you could turn your lzma2 file into a self-extracting exe. You can then use:

ExecWait '"Path\YourExe.exe" x -o"$INSTDIR" -y' $0
${If} $0 != "0"
MessageBox MB_OK "File extraction failed"
${EndIf}

You can distribute 7x sfx exes for free for commercial apps as well, as the creator mentions here: http://sourceforge.net/projects/seve.../topic/3361543
Just make sure, that if you use it, you know there is a 2-4GB limit here too. SFX created by 7-zip over 4GB don't open "This is not a valid Win32.."...
I just lost about a full day of work, not knowing this. Because I adapted lots of code to the SFX to implement them, only to find out in real use, that it won't work...

So lzma2 for Nsis - yeah, but really not useful. Cause if you have a big amount of data, you cannot use sfx. And for small amounts, lzma packed with 7zip (and not stupidly slow Nsis) works okay enough. Still native lzma2 support - or at least using the plugin would be really great...
extremecarver is offline   Reply With Quote
Old 20th July 2014, 18:22   #47
PPeti66x
Junior Member
 
Join Date: Jul 2014
Posts: 15
I made some changes in nsis7z plugin:

1.) Visual Studio 2008 to 2003 and 6.0 backport.
The compiled file now should be compatible with Win95/98/ME and NT4 systems. (VS6 version successfully tested on Windows 98SE)

2.) .\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.

Source(only difference) + VS2003/VS6 binaries:

<<attachment removed>>

Last edited by PPeti66x; 20th July 2014 at 19:52.
PPeti66x is offline   Reply With Quote
Old 21st July 2014, 08:12   #48
extremecarver
Junior Member
 
Join Date: Apr 2013
Posts: 21
Edit - first understood wrong...

1. will have to try regarding 2TB limit. Great.. I will have to try out understanding again what it means. Can I know create a nsis .exe that is say 8GB big?

2. Any chance for basing it on a newer 7z version. I would love to have lzma2 support! (because packing to lzma2 means that you are able to pack using multiple threads....).


Thanks for updating the plugin in any case...
extremecarver is offline   Reply With Quote
Old 22nd July 2014, 14:30   #49
PPeti66x
Junior Member
 
Join Date: Jul 2014
Posts: 15
0. !!! Bugfix !!! See the attachement.
I made a mistake in the nsis7z.cpp file, so above 2GB of uncompressed data zero size was displayed. Now it is corrected.

For admins: Please remove the attached file from my previous post (#47).

1. I do not know, what is the 7zip archive real size limit, but in case if uncompressed amount of data reached/exceeded the 2GB size, the displayed size was wrong (mostly a negative value) in callback mode. Practically this is only a cosmetical change, but may be useful.
Note that the returned value must be correctly processed via NSIS script (only updated part of the original example script):
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



2. Sorry, but I have not enough programming knowledge to do this. My primary target was recompiling the plugin to support the legacy operating systems.

PS: Sorry, my english is bad.
Attached Files
File Type: zip nsis7z_source_2b_VS60_VS2003.zip (171.8 KB, 169 views)
PPeti66x is offline   Reply With Quote
Old 27th July 2014, 21:27   #50
PPeti66x
Junior Member
 
Join Date: Jul 2014
Posts: 15
New version with 7-Zip 9.22 code base - now with LZMA2 support. Unicode version also included (thanks to Marek Mizanin).
Files:
.Release\nsis7z_VS2003.dll - ANSI version, Compiled by Visual Studio 2003 SP1
.Release\nsis7z_VS60.dll - ANSI version, Compiled by Visual Studio 6.0 SP6
.Release\nsis7zU_VS2003.dll - Unicode version, Compiled by Visual Studio 2003 SP1
.Release\nsis7zU_VS60.dll - Unicode version, Compiled by Visual Studio 6.0 SP6

Note: Extensive testing required. I made only same basic tests with nsis7z_VS2003.dll. ANSI versions should work on Win9x/NT4 systems (successfully tested on Win98SE).

Password-protected archives and multivolume archives are still unsupported.
I made some experiments to adding RAR format support and enabling password support, but without success. This experimental project also included with source code, called Nsis7zx_VS2003.vcproj. I hope someone finds a solution.
Attached Files
File Type: zip Nsis7z_922_Win9x.zip (377.4 KB, 232 views)
PPeti66x is offline   Reply With Quote
Old 13th February 2015, 09:49   #51
MaGoth
Junior Member
 
Join Date: Sep 2010
Posts: 16
Hi guys,
Tried to compile a draft version Nsis7z_921, get a bunch of errors.:

PHP Code:
1>------ Построение начатопроектNsis7zКонфигурацияDebug Win32 ------
1>  StdAfx.cpp
1
>  UserInputUtils.cpp
1
>c:\users\александр\desktop\7zip\ui\nsis\userinpututils.cpp(5): fatal error C1083Не удается открыть файл включениеCommon/StdInStream.hNo such file or directory
1
>  OpenCallbackConsole.cpp
1
>c:\users\александр\desktop\7zip\ui\nsis\opencallbackconsole.h(devil): fatal error C1083Не удается открыть файл включениеCommon/StdOutStream.hNo such file or directory
1
>  NSISBreak.cpp
1
>  MainAr.cpp
1
>c:\users\александр\desktop\7zip\ui\nsis\mainar.cpp(7): fatal error C1083Не удается открыть файл включениеWindows/Error.hNo such file or directory
1
>  Main.cpp
1
>c:\users\александр\desktop\7zip\ui\nsis\main.cpp(5): fatal error C1083Не удается открыть файл включениеCommon/MyInitGuid.hNo such file or directory
1
>  ExtractCallbackConsole.cpp
1
>c:\users\александр\desktop\7zip\ui\nsis\extractcallbackconsole.h(devil): fatal error C1083Не удается открыть файл включениеCommon/MyString.hNo such file or directory
1
>  WorkDir.cpp
1
>c1xx fatal error C1083Не удается открыть файл источник: ..\..\UI\Common\WorkDir.cppNo such file or directory
1
>  UpdateProduce.cpp
1
>c1xx fatal error C1083Не удается открыть файл источник: ..\..\UI\Common\UpdateProduce.cppNo such file or directory
1
>  UpdatePair.cpp
1
>c1xx fatal error C1083Не удается открыть файл источник: ..\..\UI\Common\UpdatePair.cppNo such file or directory
1
>  UpdateCallback.cpp
1
>c1xx fatal error C1083Не удается открыть файл источник: ..\..\UI\Common\UpdateCallback.cppNo such file or directory
1
>  UpdateAction.cpp
1
>c1xx fatal error C1083Не удается открыть файл источник: ..\..\UI\Common\UpdateAction.cppNo such file or directory
1
>  Update.cpp
1
>c1xx fatal error C1083Не удается открыть файл источник: ..\..\UI\Common\Update.cppNo such file or directory
1
>  TempFiles.cpp
1
>c1xx fatal error C1083Не удается открыть файл источник: ..\..\UI\Common\TempFiles.cppNo such file or directory
... 
And there are a lot of files ..

Author, why do not you have put most of the source files?
MaGoth is offline   Reply With Quote
Old 24th September 2015, 13:34   #52
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
New version built with 7-Zip 15.07 beta. Includes x86/x64/ANSI/Unicode builds.

http://nsis.sourceforge.net/File:Nsis7z.zip

Stu
Afrow UK is offline   Reply With Quote
Old 25th September 2015, 06:58   #53
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Xi'an, China
Posts: 206
Quote:
Originally Posted by Afrow UK View Post
New version built with 7-Zip 15.07 beta. Includes x86/x64/ANSI/Unicode builds.

http://nsis.sourceforge.net/File:Nsis7z.zip

Stu
Hi Afrow UK.

The new version of the source code compiler error.

VS2012+LZMA SDK 15.07 beta.

Born in: Xi'an, China
Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.), Jia Ke (Pinyin).
Email: jiake@vip.qq.com
QQ: 137729898
jiake is offline   Reply With Quote
Old 25th September 2015, 13:38   #54
Mircea M
Junior Member
 
Join Date: Aug 2014
Posts: 44
Hi,

can I now somehow use some of the 7zip command line options / switches? I would like to know if it possible to extract only part of the contents of the .7z file.

Thanks!
Mircea M is offline   Reply With Quote
Old 28th September 2015, 10:03   #55
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Quote:
Originally Posted by jiake View Post
Hi Afrow UK.

The new version of the source code compiler error.

VS2012+LZMA SDK 15.07 beta.
It would help if you told me what the error was...

Have you extracted the contents to the right folders within the LZMA SDK?

Stu
Afrow UK is offline   Reply With Quote
Old 1st October 2015, 01:36   #56
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Xi'an, China
Posts: 206
Quote:
Originally Posted by Afrow UK View Post
It would help if you told me what the error was...

Have you extracted the contents to the right folders within the LZMA SDK?

Stu
Thank you for your reply!
lzma1507.7z url: http://sourceforge.net/projects/seve...07.7z/download

Here is a compilation log.

HTML Code:
1>------ Build started: Project: Nsis7z, Configuration: Release Unicode Win32 ------
1>  Error.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\Windows\Error.cpp': No such file or directory
1>  PropVariantConversions.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\Windows\PropVariantConversions.cpp': No such file or directory
1>  Time.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\Windows\Time.cpp': No such file or directory
1>  CoderMixer2MT.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\Archive\Common\CoderMixer2MT.cpp': No such file or directory
1>  BranchCoder.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\..\Compress\BranchCoder.cpp': No such file or directory
1>  ExtractCallbackConsole.cpp
1>..\..\UI\NSIS\ExtractCallbackConsole.cpp(25): error C2871: 'NDirectory' : a namespace with this name does not exist
1>  Main.cpp
1>..\..\UI\NSIS\Main.cpp(121): error C2259: 'CExtractCallbackConsole' : cannot instantiate abstract class
1>          due to following members:
1>          'HRESULT IFolderArchiveExtractCallback::PrepareOperation(const wchar_t *,Int32,Int32,const UInt64 *)' : is abstract
1>          c:\users\jeffio\desktop\lzma1507\cpp\7zip\ui\common\IFileExtractCallback.h(56) : see declaration of 'IFolderArchiveExtractCallback::PrepareOperation'
1>          'HRESULT IFolderArchiveExtractCallback::SetOperationResult(Int32,Int32)' : is abstract
1>          c:\users\jeffio\desktop\lzma1507\cpp\7zip\ui\common\IFileExtractCallback.h(56) : see declaration of 'IFolderArchiveExtractCallback::SetOperationResult'
1>          'HRESULT IExtractCallbackUI::BeforeOpen(const wchar_t *,bool)' : is abstract
1>          c:\users\jeffio\desktop\lzma1507\cpp\7zip\ui\common\IFileExtractCallback.h(89) : see declaration of 'IExtractCallbackUI::BeforeOpen'
1>          'HRESULT IExtractCallbackUI::OpenResult(const CCodecs *,const CArchiveLink &,const wchar_t *,HRESULT)' : is abstract
1>          c:\users\jeffio\desktop\lzma1507\cpp\7zip\ui\common\IFileExtractCallback.h(89) : see declaration of 'IExtractCallbackUI::OpenResult'
1>..\..\UI\NSIS\Main.cpp(130): error C2039: 'kCurrentPathnames' : is not a member of 'NExtract::NPathMode'
1>..\..\UI\NSIS\Main.cpp(130): error C2065: 'kCurrentPathnames' : undeclared identifier
1>..\..\UI\NSIS\Main.cpp(130): error C2039: 'kNoPathnames' : is not a member of 'NExtract::NPathMode'
1>..\..\UI\NSIS\Main.cpp(130): error C2065: 'kNoPathnames' : undeclared identifier
1>..\..\UI\NSIS\Main.cpp(132): error C2039: 'kWithoutPrompt' : is not a member of 'NExtract::NOverwriteMode'
1>..\..\UI\NSIS\Main.cpp(132): error C2065: 'kWithoutPrompt' : undeclared identifier
1>..\..\UI\NSIS\Main.cpp(132): error C2039: 'kSkipExisting' : is not a member of 'NExtract::NOverwriteMode'
1>..\..\UI\NSIS\Main.cpp(132): error C2065: 'kSkipExisting' : undeclared identifier
1>..\..\UI\NSIS\Main.cpp(142): error C2660: 'NWildcard::CCensor::AddItem' : function does not take 3 arguments
1>..\..\UI\NSIS\Main.cpp(147): error C3083: 'NDirectory': the symbol to the left of a '::' must be a type
1>..\..\UI\NSIS\Main.cpp(147): error C2039: 'MyGetFullPathName' : is not a member of 'NWindows::NFile'
1>..\..\UI\NSIS\Main.cpp(147): error C3861: 'MyGetFullPathName': identifier not found
1>..\..\UI\NSIS\Main.cpp(150): error C3861: 'DecompressArchives': identifier not found
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Born in: Xi'an, China
Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.), Jia Ke (Pinyin).
Email: jiake@vip.qq.com
QQ: 137729898
jiake is offline   Reply With Quote
Old 3rd October 2015, 20:22   #57
parasoul
Senior Member
 
Join Date: Aug 2007
Posts: 117
Any idea when password protected archives will be supported?
parasoul is offline   Reply With Quote
Old 5th October 2015, 06:56   #58
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,347
Quote:
Originally Posted by parasoul View Post
Any idea when password protected archives will be supported?
Would be a nice addition, but it probably makes more sense to support optional parameters in general
Yathosho is offline   Reply With Quote
Old 20th November 2015, 02:42   #59
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Xi'an, China
Posts: 206
7-Zip 15.12 Release (2015-11-19)
http://www.7-zip.org/

Born in: Xi'an, China
Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.), Jia Ke (Pinyin).
Email: jiake@vip.qq.com
QQ: 137729898
jiake is offline   Reply With Quote
Old 20th November 2015, 11:31   #60
aerDNA
Senior Member
 
aerDNA's Avatar
 
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 224
Quote:
Originally Posted by jiake View Post
7-Zip 15.12 Release (2015-11-19)
http://www.7-zip.org/
Also worth mentioning is that v15 no longer includes script decompile feature.

PostEnd:
aerDNA is offline   Reply With Quote
Old 11th March 2016, 13:30   #61
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Build with 7-Zip 15.14:
http://nsis.sourceforge.net/File:Nsis7z.zip

Stu
Afrow UK is offline   Reply With Quote
Old 12th April 2016, 07:30   #62
mstrelex
Junior Member
 
Join Date: Apr 2016
Posts: 1
Folks,

I compressed a folder with 7zip and trying to decompress it using this plugin, executing extractWithDetails, for some reason output does not contain all the files, but only a partial list, any ideas why this could happen ?

Thanks in advance.
mstrelex is offline   Reply With Quote
Old 27th May 2016, 10:35   #63
infingy
Junior Member
 
Join Date: May 2016
Posts: 2
Runtime error 203 during setup

My setup worked fine and no problems occured yet.
But on a specific computer my setup produces a runtime error 203 at 056D2510
The last output is:
"Could not load: C:\Users....\AppData\Local\Temp\nsep11D.tmp\nsis7z.dll"

Can you help me? What is the problem? Can i do something about it?

Thank you very much in advance!
infingy is offline   Reply With Quote
Old 27th May 2016, 14:53   #64
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,559
NSIS version? Windows version? nsis7z version?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 29th May 2016, 00:38   #65
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 847
I had a quick look at the source code, and yep it uses VS2008 and C++. Does the target machine have the VS2008 Runtime Redistributable installed? My hunch is that it does not.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 31st May 2016, 06:31   #66
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
Quote:
Originally Posted by JasonFriday13 View Post
I had a quick look at the source code, and yep it uses VS2008 and C++. Does the target machine have the VS2008 Runtime Redistributable installed? My hunch is that it does not.
Actually it's statically linked so does not depend on it being on the destination machine. You can check this with Dependency Walker.

Stu
Afrow UK is offline   Reply With Quote
Old 2nd June 2016, 06:31   #67
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 847
So that's one possibility dismissed, now I'm interested in what the problem might be.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 2nd June 2016, 08:00   #68
infingy
Junior Member
 
Join Date: May 2016
Posts: 2
I'm sorry i was ill...

the problem was, that there was a security software on the target system that blocked the setup execution.
thanks and sorry for the late reply
infingy is offline   Reply With Quote
Old 2nd September 2016, 18:21   #69
develar
Junior Member
 
Join Date: Jun 2016
Posts: 6
Hi. Sometimes Nsis7z::Extract doesn't extract all files — https://github.com/electron-userland...der/issues/722 and https://github.com/electron-userland...der/issues/645

Do you have any clue why? I am sure that my code is correct — https://github.com/electron-userland...nstall.nsh#L59
develar is offline   Reply With Quote
Old 24th September 2016, 13:24   #70
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
some1 should lift it to current 7z v16. even for autoit it got stuck at v9.x
thats why i use 7zG.exe + 7z.dll for my current nsis projects if needed.
Brummelchen is offline   Reply With Quote
Old 3rd August 2017, 15:53   #71
bparker06
Junior Member
 
Join Date: Aug 2017
Posts: 1
Hi,

In case it is useful to anyone, I have decided to release binaries and source for the 7z plugin I currently use for Windows 98. It is built with vc2005 and 7zip 16.04:

https://github.com/bparker06/nsis7z-vc2005/releases

My development environment is Windows 7 with msys2, so to build inside that you simply type "make". I do not use VC solution files as it is harder for me to maintain when using automated command-line environments across many different toolchain versions.
bparker06 is offline   Reply With Quote
Old Today, 19:32   #72
develar
Junior Member
 
Join Date: Jun 2016
Posts: 6
Does anybody knows how to use this plugin to extract zip archive with xz/lzma compression?
develar is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
7-zip, lzma, plug-in

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump