Requirements

  • OS: Windows
  • Compiler: MSVC 2012 or greater (MSVC 2010 supported until v2.x).
  • Build Automation: cmake, msbuild or qmake (note: bit7z does not depend on Qt libraries!)
  • Third-party libraries: 7-zip's source code (any version, e.g. v19.00) (git submodule or https://7-zip.org/a/7z1900-src.7z or https://github.com/rikyoz/7-Zip)

Note: the 7-zip's source code must be placed in the path %PROJECT_ROOT%/lib/7zSDK/. If you use the git repository, the source code can be downloaded as a git submodule.

Note 2: you should preferably use the same 7-zip's source code version used to build the DLLs you are going to employ in your software.

The lib folder should look like this:

How to Build

In order to build this library, you can choose one among several methods:

Building from the command line

From the root directory of bit7z you can use one of the following tools:

  • CMake:

    mkdir build
    cd build
    cmake ../ -DCMAKE_BUILD_TYPE=Release
    cmake --build . --config Release
    
  • MSBuild: run msbuild bit7z.vcxproj /p:configuration=release.

  • QMake: run qmake bit7z.pro and then nmake release.

Building from an IDE

You can open and build:

  • the project file CMakeLists.txt in any IDE supporting CMake, or
  • the project file bit7z.vcxproj with Visual Studio, or
  • the project file bit7z.pro with Qt Creator

Note: Automatic format dection of archives can be enabled by using the -DBIT7Z_AUTO_FORMAT compilation flag.

Note 2: Matching extraction using regexes can be enabled by using the -DBIT7Z_REGEX_MATCHING compilation flag.






Add Discussion as Guest

Log in