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!
Plugin to extract 7-Zip 4.10 files
74 posts
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
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
Originally posted by Afrow UKBummer. 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? 😉
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.
You can use nsExec::ExecToLog to stream the 7z output directly to the installation progress window.
-Stu
-Stu
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
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
Update:
I'm a making a plugin for decompressing 7z files (~60KB DLL), but I need to know if theres one already...
🙂
I'm a making a plugin for decompressing 7z files (~60KB DLL), but I need to know if theres one already...
🙂
Joel! Just go ahead and make it.
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.
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.
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.
SetOutPath $INSTDIR\OCR\FRE\Bin
; increase size
AddSize 85000
; use precompressed 7zip fre file
SetCompress off
DetailPrint "Extracting FineReader Engine..."
File /a "Misc\frebin.7z"
SetCompress auto
DetailPrint "Installing FineReader Engine..."
nsis7z::Extract "frebin.7z"
Delete "$INSTDIR\OCR\FRE\Bin\frebin.7z" 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.
Any Update on this plugin?
why should it ?
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.
Owen.
write to the author pls
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.
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.
Nsis7z (based on 7z 4.64) binary distribution.
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.
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?
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?
does this plugin handle passwords? does it report if an archive is protected by password?
Hi,
I've just found your plugin and its great.
Question: Does it respect the SetOverWrite value?
I've just found your plugin and its great.
Question: Does it respect the SetOverWrite value?
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 🙂
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.
Originally posted by qwertymodoSure, go for it - the more the btter. Thanks a lot.
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.
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.
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.
Thanks a lot for this. 🙂
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.
Is there any documentation about nsis7z.dll returned error ?
I mean
- file to extract not found
- error during extraction
- etc...
maybe someone here knows...
I mean
- file to extract not found
- error during extraction
- etc...
maybe someone here knows...
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.
hi guys, this plugin can extract rar files too???