Language: 日本語 English
In order to use SevenZip.Compression.Wrapper.NET, 7-zip must be properly installed.
This article explains how to install 7-zip.
Please follow the steps below to install.
1.Download the appropriate 7-zip package for your computer from 7-zip official website.
2. Please install 7-zip.
3. Make sure there is a file named 7z.dll in the folder where 7-zip is installed (e.g. C:\Program Files\7-Zip).
4. Add the folder where 7-zip is installed to your PATH environment variable.
In the following situations, the method shown in 2.1 Standard installation method may not work.
- If you don't want or can't set the
PATHenvironment variable - If you want to use
SevenZip.Compression.Wrapper.NETon multiple architectures (x86andx64) 1
To install manually, follow the steps below.
- Download 7-zip from 7-zip official website.
- Please install 7-zip.
- Make sure there is a file named
7z.dllin the folder where 7-zip is installed (e.g.C:\Program Files\7-Zip). - Please check the folder where
SevenZip.Compression.Wrapper.NETis installed. There should be a file namedPalmtree.SevenZip.Compression.Wrapper.NET.dllin that folder. - Copy
7z.dllto the folder whereSevenZip.Compression.Wrapper.NETis installed.<!--
The installation is now complete. If you do not use 7-zip, you can uninstall it.
If you want to use SevenZip.Compression.Wrapper.NET on multiple architectures, please change the file name as shown below when copying 7z.dll.
- For
7z.dllofx86version 7-zip =>7z.win_x86.dll - For
7z.dllofx64version 7-zip =>7z.win_x64.dll
7-zip for Linux is provided as a single executable file and cannot be used as a library.
Therefore, in order to use 7-zip from SevenZip.Compression.Wrapper.NET, you need to rebuild it using the 7-zip source code.
From now on, we will explain the build procedure assuming that you have a development environment such as gcc on Linux.
Please download the 7-zip source code from the 7-zip download page.
It is best to use ".tar.xz".
For example, to extract to the current directory, run the following command from the shell.
xz -dc 7z2301-src.tar.xz | tar xfv -
Obtain the makefile and copy it to the source file directory.
- Makefile to copy =>
makefile_x64.gccforx64,makefile_x86.gccforx86 - Copy destination => directory on source file
CPP/7zip/Bundles/Format7zF/
Change the current directory to the directory where you copied the makefile, then run make.
The following example is for building the x64 version of the library.
make -f makefile_x64.gcc
Once the build is complete, the 7-zip library lib7z.linux_x64.so (lib7z.linux_x86.so for the x86 version) should be created in the current directory.
Copy the created lib7z.linux_x64.so (or lib7z.linux_x86.so) to the directory where SevenZip.Compression.Wrapper.NET is installed.
Footnotes
-
Even if your computer has
x64architecture, if your application that utilizesSevenZip.Compression.Wrapper.NETis a 32-bit application, you will need 7zip forx86. ↩