Old 4th December 2004, 21:53   #1
Mad Doggie
Junior Member
 
Join Date: Sep 2003
Location: Roswell, GA
Posts: 38
Plugin to extract 7-Zip 4.10 files

Is there a plug-in that can decompress archives created by 7-zip v4.12? I would like to use 7Zip to decrease the size of my downloadable components.

Cheers!
Mad Doggie is offline   Reply With Quote
Old 5th December 2004, 11:01   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
You'll have to use 7-Zip's command-line 7z.exe program to decompress 7z files.

You should compress it into your installer, and place it in a folder (e.g. $PLUGINSDIR) on run-time then execute it with nsExec::Exec.

-Stu
Afrow UK is offline   Reply With Quote
Old 8th December 2004, 04:49   #3
Mad Doggie
Junior Member
 
Join Date: Sep 2003
Location: Roswell, GA
Posts: 38
Quote:
Originally posted by Afrow UK
You'll have to use 7-Zip's command-line 7z.exe program to decompress 7z files. You should compress it into your installer, and place it in a folder (e.g. $PLUGINSDIR) on run-time then execute it with nsExec::Exec.
Bummer. Thanks for the info - I was hoping I could use a native NSIS plug-in and get the same feedback as ZipDLL does. Oh well, I guess nothing on the horizon on this front?
Mad Doggie is offline   Reply With Quote
Old 8th December 2004, 12:05   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,433
You can use nsExec::ExecToLog to stream the 7z output directly to the installation progress window.

-Stu
Afrow UK is offline   Reply With Quote
Old 30th May 2005, 20:40   #5
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
7zip went final 7.20.

I would appreciate a plugin using 7zip for archiving like
"nsexec::7zip '"c:\temp\*.txt" /switch'
or another built-in solution...

WinRAR also uses a newer 7zxa.dll instead an bigger exe 7za.exe

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 17th June 2005, 19:28   #6
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Update:

I'm a making a plugin for decompressing 7z files (~60KB DLL), but I need to know if theres one already...



* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 21st June 2005, 22:15   #7
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
Joel! Just go ahead and make it.
saivert is offline   Reply With Quote
Old 3rd July 2005, 16:24   #8
PerditionC
Junior Member
 
Join Date: Jan 2003
Posts: 27
If one doesn't really need the 7z format and just wants to use the LZMA compression method, then there is also the ExtractDLLEx or untgz plugins.
PerditionC is offline   Reply With Quote
Old 4th July 2005, 20:50   #9
brainsucker
Senior Member
 
brainsucker's Avatar
 
Join Date: Sep 2002
Location: Minsk, Belarus
Posts: 190
Send a message via ICQ to brainsucker
Some time ago I wrote a simple plugin for uncompressing 7z files with progress reporting. It was based on the console sfx with changed console interface to some kind of nsis wrapper. It was big enough (144 kb), but due to size (32 mb to 27 mb from nsis lzma to 7z file) and time (i've used archive as merge module, which never changes) economy, that really doesn't matter for me.
However I've lost one of my hdd's some weeks ago, so at present time I have no source code of that plugin, just compiled dll.

PHP Code:
SetOutPath $INSTDIR\OCR\FRE\Bin
increase size
AddSize 85000
; use precompressed 7zip fre file
SetCompress off
DetailPrint 
"Extracting FineReader Engine..."
File /"Misc\frebin.7z"
SetCompress auto
DetailPrint 
"Installing FineReader Engine..."
nsis7z::Extract "frebin.7z"
Delete "$INSTDIR\OCR\FRE\Bin\frebin.7z" 
Attached Files
File Type: zip nsis7z.zip (74.9 KB, 1379 views)
brainsucker is offline   Reply With Quote
Old 5th July 2005, 13:59   #10
saivert
Banned
 
saivert's Avatar
 
Join Date: Jan 2001
Location: Norway
Posts: 927
Since the source code for the 7-zip project is open-source there shouldn't be hard to implement this. I might have a crack at it sometime as well. But I don't know about the time. I wrote my own version of unzip plug-in for NSIS one time (based on source code for NSIS' Zip2EXE) and if 7-zip has some easy to use interface it will be doable.
saivert is offline   Reply With Quote
Old 7th February 2006, 19:30   #11
oborstad
Junior Member
 
Join Date: Jan 2006
Location: A Game company in Edmonton
Posts: 11
Any Update on this plugin?
oborstad is offline   Reply With Quote
Old 7th February 2006, 19:39   #12
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
why should it ?

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 7th February 2006, 21:19   #13
oborstad
Junior Member
 
Join Date: Jan 2006
Location: A Game company in Edmonton
Posts: 11
Ah, Sorry... I mean if there was an updated copy of this plugin with the updated 7-zip files. This plugin's 7zip files aren't up to date, and the source code's not provided (ala 7zip licence). So I just wanted to ask if there was any update on the status of the plugin.

Owen.
oborstad is offline   Reply With Quote
Old 13th February 2006, 05:13   #14
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
write to the author pls

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 9th January 2009, 14:58   #15
brainsucker
Senior Member
 
brainsucker's Avatar
 
Join Date: Sep 2002
Location: Minsk, Belarus
Posts: 190
Send a message via ICQ to brainsucker
Nsis7z plugin updated

Hello everyone

I've spent some time to rewrite (due to lost source code) Nsis7z plugin using the latest 7z (4.64), this time the source code is available, so no one should have problems using/distributing it.

This plugin allows our company to create merge-modules (as 7z archives) with prepacked files used in every release, saving some space (due to better compression ratio) and time (60mb 7z archive compiles to NSIS setup in several seconds, compare that with the time required to pack 250mb of original files).

This post - complete distribution with source, next - stripped with plugin and example only.

Best regards, Nik.
Attached Files
File Type: zip nsis7z_source_1.zip (109.3 KB, 1564 views)
brainsucker is offline   Reply With Quote
Old 9th January 2009, 14:59   #16
brainsucker
Senior Member
 
brainsucker's Avatar
 
Join Date: Sep 2002
Location: Minsk, Belarus
Posts: 190
Send a message via ICQ to brainsucker
Nsis7z (based on 7z 4.64) binary distribution.
Attached Files
File Type: zip nsis7z_plugin_1.zip (89.2 KB, 2678 views)
brainsucker is offline   Reply With Quote
Old 17th January 2009, 01:34   #17
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
Can it extract to a different directory and without paths? To do the equivalent of this command: 7za.exe e "downloadedfileusingnsisdl.7z" -o"$INSTDIR\some\path" -y eliminating the middle-man.
redxii is offline   Reply With Quote
Old 18th January 2009, 10:13   #18
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,351
first of all, thanks for this great plugin.. i was looking for this for ages!

i was wondering, if it would be easy to add support to create 7z files (or make it a seperate plugin).

about decompression, i'm looking for a way to create a similiar dialog like the inbuild "unpacking data" at the launch of (huge) installers. i guess i could use a banner plugin, but can i display the unpacking status in there? i guess the 7z would have to support this in a way?
Yathosho is offline   Reply With Quote
Old 28th January 2009, 13:29   #19
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,351
does this plugin handle passwords? does it report if an archive is protected by password?
Yathosho is offline   Reply With Quote
Old 26th March 2009, 12:05   #20
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Hi,

I've just found your plugin and its great.
Question: Does it respect the SetOverWrite value?

Last edited by dbach; 26th March 2009 at 12:21.
dbach is offline   Reply With Quote
Old 27th March 2009, 10:20   #21
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Quote:
Originally posted by dbach Question: Does it respect the SetOverWrite value?
To answer myself () no, it doesnt.

Bug:
- Files not ending with .7z are not extracted (e.g. rename product.7z -> product.001, try extraction)

Featurewish:
- Nsis7z should respect SetOverwrite

Thanks
dbach is offline   Reply With Quote
Old 8th April 2009, 04:51   #22
qwertymodo
Junior Member
 
Join Date: Sep 2008
Posts: 26
Send a message via Yahoo to qwertymodo
I actually wrote something along these lines myself awhile back, just a header that uses 7za.exe... It can extract and create archives of any type supported by 7-zip, as well as practically all of the command-line functionality of 7za.exe (except test archive). If anyone is interested I'd be happy to post the header.
qwertymodo is offline   Reply With Quote
Old 8th April 2009, 07:15   #23
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Quote:
Originally posted by qwertymodo
I actually wrote something along these lines myself awhile back, just a header that uses 7za.exe... It can extract and create archives of any type supported by 7-zip, as well as practically all of the command-line functionality of 7za.exe (except test archive). If anyone is interested I'd be happy to post the header.
Sure, go for it - the more the btter. Thanks a lot.
dbach is offline   Reply With Quote
Old 8th April 2009, 20:52   #24
qwertymodo
Junior Member
 
Join Date: Sep 2008
Posts: 26
Send a message via Yahoo to qwertymodo
Ok I will. I just got into testing it more thoroughly than just what I needed when I first wrote it and there were a few weird bugs... I think I have them tracked down, so I'll post it soon.
qwertymodo is offline   Reply With Quote
Old 9th April 2009, 01:33   #25
qwertymodo
Junior Member
 
Join Date: Sep 2008
Posts: 26
Send a message via Yahoo to qwertymodo
Here's my header. I am fairly certain that it works properly, but I wouldn't be surprised if some weirdness exists still. Sorry for the lack of documentation, the basic function calls are outlined in the comment at the top of the file. You'll need 7za.exe in the NSIS plugins directory to use it.
Attached Files
File Type: nsh 7zarchive.nsh (3.7 KB, 835 views)
qwertymodo is offline   Reply With Quote
Old 9th April 2009, 07:24   #26
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Thanks a lot for this.
dbach is offline   Reply With Quote
Old 9th April 2009, 17:11   #27
qwertymodo
Junior Member
 
Join Date: Sep 2008
Posts: 26
Send a message via Yahoo to qwertymodo
Something that I should have mentioned was that "other parameters" can be ANY 7-zip flags (should be at least...), so read the 7-zip documentation for things that you can put into other parameters. Basically whatever you put there just gets appended to the end of the command-line call, so if it works in a command-line call it should work there.
qwertymodo is offline   Reply With Quote
Old 28th October 2009, 17:18   #28
webtubbies
Junior Member
 
Join Date: Sep 2009
Posts: 15
Is there any documentation about nsis7z.dll returned error ?
I mean
- file to extract not found
- error during extraction
- etc...

maybe someone here knows...
webtubbies is offline   Reply With Quote
Old 19th November 2009, 13:49   #29
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,351
i'm really glad this plugin exists, because i prefer this over using an external program. however, this would even be better if there was a way to use (some of the) switches 7zr.exe offers. personally i'm looking for a way to extract a specific file from an archive only, right now i have to use 7zr/7za to do the task.
Yathosho is offline   Reply With Quote
Old 3rd January 2010, 15:48   #30
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
hi guys, this plugin can extract rar files too???
thanatos83 is offline   Reply With Quote
Old 4th January 2010, 00:26   #31
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Quote:
Originally posted by thanatos83
hi guys, this plugin can extract rar files too???
Hi thanatos83, you need to read a little further
Since the plugin reads files from 7zip, let's got its site, quote from there:
Quote:
Supported formats:

* Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR
* Unpacking only: ARJ, CAB, CHM, CPIO, DEB, DMG, HFS, ISO, LZH, LZMA, MSI, NSIS, RAR, RPM, UDF, WIM, XAR and Z.
How about that


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 11th May 2010, 08:12   #32
fedotawa
Junior Member
 
Join Date: May 2010
Posts: 1
Plugin breaks non ANSI file pathname encoding (for example it switches from cyrillic 1251 to 866, this causes shortcut creation into inproper places).

Here's a fix.
Attached Files
File Type: zip nsis7z_plugin_1.zip (92.4 KB, 9866 views)
File Type: zip nsis7z_source_1.zip (109.4 KB, 4014 views)
fedotawa is offline   Reply With Quote
Old 1st September 2010, 00:53   #33
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
Hi...

I need a help please with this plugin... I read the wiki about the usage of this plugin, like this:

Unpack you merge module as 7z archive to somewere on users harddrive, set target dir for archive contents with SetOutPath, and call plugin.

My question is:

when this say merge module it is referred to standalone file 7za.exe???
thanatos83 is offline   Reply With Quote
Old 1st September 2010, 05:53   #34
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
I think that line is trying to say "unpack your 7z archive using the File command, then use SetOutPath to set the extraction output directory and call the plugin."
MSG is offline   Reply With Quote
Old 1st September 2010, 10:15   #35
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
OK ,so i saw that example but before from command script File you can see SetCompress off. But i think about the file command, it compress that 7z into setup.exe (so SetCompress off is not working?)

This plugin first copy 7z into harddrive and then extracts the contents???

I was searching for a long time a plugin that allow me to extract contents froms some 7z files with an animated bar but only i need to extract it from fixed media like DVD. So I need to make a little setup.exe...

thanks.

P.D.

Sorry admin about duplicate post, please delete one...
thanatos83 is offline   Reply With Quote
Old 1st September 2010, 10:16   #36
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
OK ,so i saw that example but before from command script File you can see SetCompress off. But i think about the file command, it compress that 7z into setup.exe (so SetCompress off is not working?)

This plugin first copy 7z into harddrive and then extracts the contents???

I was searching for a long time a plugin that allow me to extract contents froms some 7z files with an animated bar but only i need to extract it from fixed media like DVD. So I need to make a little setup.exe...

thanks.
thanatos83 is offline   Reply With Quote
Old 1st September 2010, 11:22   #37
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by thanatos83 View Post
OK ,so i saw that example but before from command script File you can see SetCompress off. But i think about the file command, it compress that 7z into setup.exe (so SetCompress off is not working?)
No, the command only makes NSIS turn off compression. Of course it still stores the file in the installer, otherwise it wouldn't be able to extract the file when the File command is called during installation. Turning off compression only helps by making the installer compilation go faster.

Quote:
Originally Posted by thanatos83 View Post
This plugin first copy 7z into harddrive and then extracts the contents???
Please don't use ??? like that, it makes you sound like you're shouting.

And no. You first have to copy the 7z to the harddrive using the File command (it's actually called extracting, not copying, because you need to extract it from the installer exe.) Or you can use a 7z file from a CD, or a downloaded one, of course.
MSG is offline   Reply With Quote
Old 1st September 2010, 13:17   #38
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
thanks MSG and sorry for "???"

I have some files in 7z format file, so my project takes about 8GB...so i need a plugin that allow me to extract these files from fixed media, like DVD...

If i use de 7z standalone file for use command line, this work for me but progress bar not moving and not showing the information progress like "10% - file.xx".
thanatos83 is offline   Reply With Quote
Old 1st September 2010, 13:58   #39
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Indeed, the standalone 7z is not designed for NSIS, so it will not output information to the NSIS log by itself. You can try using nsExec::ExecToLog, but if I recall correctly it doesn't work here because 7z doesn't just print information, it updates it as well (like the percentage counter). And that doesn't work with ExecToLog, as far as I know.

But have you tried the 7z plugin? It should be able to unpack a 7z archive just fine.
MSG is offline   Reply With Quote
Old 1st September 2010, 19:19   #40
thanatos83
Junior Member
 
Join Date: Dec 2009
Posts: 29
Hi ...

Yes MSG, worked fine if i use 7za.exe...
thanatos83 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