From 3e784a2764c752b330a309450f2cc5b9be57a0da Mon Sep 17 00:00:00 2001 From: Gregory Book Date: Wed, 15 May 2024 12:32:10 -0400 Subject: [PATCH] bit7z --- build-rpm.sh | 4 +- src/bit7z/.github/FUNDING.yml | 7 + .../.github/ISSUE_TEMPLATE/bug_report.yml | 182 ++ src/bit7z/.github/ISSUE_TEMPLATE/config.yml | 1 + .../ISSUE_TEMPLATE/feature_request.yml | 28 + src/bit7z/.github/PULL_REQUEST_TEMPLATE.md | 27 + src/bit7z/.github/workflows/ctest.yml | 138 + src/bit7z/.gitignore | 63 + src/bit7z/CMakeLists.txt | 248 ++ src/bit7z/CODE_OF_CONDUCT.md | 76 + src/bit7z/LICENSE | 373 +++ src/bit7z/README.md | 379 +++ src/bit7z/appveyor.yml | 207 ++ src/bit7z/cmake/BuildOptions.cmake | 115 + src/bit7z/cmake/CompilerOptions.cmake | 129 + src/bit7z/cmake/Dependencies.cmake | 40 + src/bit7z/cmake/FilesystemDetect.cmake | 39 + src/bit7z/cmake/OutputOptions.cmake | 53 + src/bit7z/cmake/Sanitizers.cmake | 54 + src/bit7z/cmake/TargetArchDetect.cmake | 48 + src/bit7z/docs/CMakeLists.txt | 60 + src/bit7z/docs/Doxyfile.in | 2635 +++++++++++++++++ src/bit7z/include/bit7z/bit7z.hpp | 23 + src/bit7z/include/bit7z/bit7zlibrary.hpp | 101 + .../bit7z/bitabstractarchivecreator.hpp | 305 ++ .../bit7z/bitabstractarchivehandler.hpp | 249 ++ .../bit7z/bitabstractarchiveopener.hpp | 59 + src/bit7z/include/bit7z/bitarchiveeditor.hpp | 171 ++ src/bit7z/include/bit7z/bitarchiveitem.hpp | 104 + .../include/bit7z/bitarchiveiteminfo.hpp | 54 + .../include/bit7z/bitarchiveitemoffset.hpp | 53 + src/bit7z/include/bit7z/bitarchivereader.hpp | 214 ++ src/bit7z/include/bit7z/bitarchivewriter.hpp | 72 + .../include/bit7z/bitcompressionlevel.hpp | 30 + .../include/bit7z/bitcompressionmethod.hpp | 30 + src/bit7z/include/bit7z/bitcompressor.hpp | 116 + src/bit7z/include/bit7z/bitdefines.hpp | 121 + src/bit7z/include/bit7z/biterror.hpp | 81 + src/bit7z/include/bit7z/bitexception.hpp | 103 + src/bit7z/include/bit7z/bitextractor.hpp | 284 ++ src/bit7z/include/bit7z/bitfilecompressor.hpp | 135 + src/bit7z/include/bit7z/bitfileextractor.hpp | 23 + src/bit7z/include/bit7z/bitformat.hpp | 248 ++ src/bit7z/include/bit7z/bitfs.hpp | 43 + src/bit7z/include/bit7z/bitgenericitem.hpp | 66 + src/bit7z/include/bit7z/bitinputarchive.hpp | 404 +++ src/bit7z/include/bit7z/bititemsvector.hpp | 172 ++ src/bit7z/include/bit7z/bitmemcompressor.hpp | 27 + src/bit7z/include/bit7z/bitmemextractor.hpp | 24 + src/bit7z/include/bit7z/bitoutputarchive.hpp | 332 +++ src/bit7z/include/bit7z/bitpropvariant.hpp | 461 +++ .../include/bit7z/bitstreamcompressor.hpp | 28 + .../include/bit7z/bitstreamextractor.hpp | 24 + src/bit7z/include/bit7z/bittypes.hpp | 125 + src/bit7z/include/bit7z/bitwindows.hpp | 150 + src/bit7z/src/bit7zlibrary.cpp | 112 + src/bit7z/src/bitabstractarchivecreator.cpp | 327 ++ src/bit7z/src/bitabstractarchivehandler.cpp | 99 + src/bit7z/src/bitabstractarchiveopener.cpp | 28 + src/bit7z/src/bitarchiveeditor.cpp | 204 ++ src/bit7z/src/bitarchiveitem.cpp | 126 + src/bit7z/src/bitarchiveiteminfo.cpp | 33 + src/bit7z/src/bitarchiveitemoffset.cpp | 43 + src/bit7z/src/bitarchivereader.cpp | 129 + src/bit7z/src/bitarchivewriter.cpp | 42 + src/bit7z/src/biterror.cpp | 27 + src/bit7z/src/bitexception.cpp | 122 + src/bit7z/src/bitfilecompressor.cpp | 91 + src/bit7z/src/bitformat.cpp | 126 + src/bit7z/src/bitinputarchive.cpp | 423 +++ src/bit7z/src/bititemsvector.cpp | 117 + src/bit7z/src/bitoutputarchive.cpp | 378 +++ src/bit7z/src/bitpropvariant.cpp | 548 ++++ src/bit7z/src/bittypes.cpp | 31 + src/bit7z/src/internal/archiveproperties.hpp | 70 + .../src/internal/bufferextractcallback.cpp | 82 + .../src/internal/bufferextractcallback.hpp | 48 + src/bit7z/src/internal/bufferitem.cpp | 70 + src/bit7z/src/internal/bufferitem.hpp | 52 + src/bit7z/src/internal/bufferutil.cpp | 46 + src/bit7z/src/internal/bufferutil.hpp | 26 + src/bit7z/src/internal/callback.cpp | 19 + src/bit7z/src/internal/callback.hpp | 53 + src/bit7z/src/internal/cbufferinstream.cpp | 84 + src/bit7z/src/internal/cbufferinstream.hpp | 53 + src/bit7z/src/internal/cbufferoutstream.cpp | 90 + src/bit7z/src/internal/cbufferoutstream.hpp | 55 + src/bit7z/src/internal/cfileinstream.cpp | 41 + src/bit7z/src/internal/cfileinstream.hpp | 35 + src/bit7z/src/internal/cfileoutstream.cpp | 59 + src/bit7z/src/internal/cfileoutstream.hpp | 41 + .../src/internal/cfixedbufferoutstream.cpp | 111 + .../src/internal/cfixedbufferoutstream.hpp | 54 + .../src/internal/cmultivolumeinstream.cpp | 129 + .../src/internal/cmultivolumeinstream.hpp | 56 + .../src/internal/cmultivolumeoutstream.cpp | 154 + .../src/internal/cmultivolumeoutstream.hpp | 76 + src/bit7z/src/internal/com.hpp | 52 + src/bit7z/src/internal/cstdinstream.cpp | 62 + src/bit7z/src/internal/cstdinstream.hpp | 54 + src/bit7z/src/internal/cstdoutstream.cpp | 90 + src/bit7z/src/internal/cstdoutstream.hpp | 56 + src/bit7z/src/internal/csymlinkinstream.cpp | 37 + src/bit7z/src/internal/csymlinkinstream.hpp | 49 + src/bit7z/src/internal/cvolumeinstream.cpp | 30 + src/bit7z/src/internal/cvolumeinstream.hpp | 33 + src/bit7z/src/internal/cvolumeoutstream.cpp | 70 + src/bit7z/src/internal/cvolumeoutstream.hpp | 42 + src/bit7z/src/internal/dateutil.cpp | 70 + src/bit7z/src/internal/dateutil.hpp | 36 + src/bit7z/src/internal/extractcallback.cpp | 142 + src/bit7z/src/internal/extractcallback.hpp | 117 + .../src/internal/failuresourcecategory.cpp | 105 + .../src/internal/failuresourcecategory.hpp | 35 + .../src/internal/fileextractcallback.cpp | 151 + .../src/internal/fileextractcallback.hpp | 59 + .../internal/fixedbufferextractcallback.cpp | 55 + .../internal/fixedbufferextractcallback.hpp | 44 + src/bit7z/src/internal/formatdetect.cpp | 488 +++ src/bit7z/src/internal/formatdetect.hpp | 32 + src/bit7z/src/internal/fs.hpp | 40 + src/bit7z/src/internal/fsindexer.cpp | 79 + src/bit7z/src/internal/fsindexer.hpp | 49 + src/bit7z/src/internal/fsitem.cpp | 184 ++ src/bit7z/src/internal/fsitem.hpp | 73 + src/bit7z/src/internal/fsutil.cpp | 393 +++ src/bit7z/src/internal/fsutil.hpp | 89 + src/bit7z/src/internal/genericinputitem.cpp | 56 + src/bit7z/src/internal/genericinputitem.hpp | 44 + src/bit7z/src/internal/guiddef.hpp | 99 + src/bit7z/src/internal/guids.cpp | 86 + src/bit7z/src/internal/guids.hpp | 51 + src/bit7z/src/internal/hresultcategory.cpp | 166 ++ src/bit7z/src/internal/hresultcategory.hpp | 37 + src/bit7z/src/internal/internalcategory.cpp | 106 + src/bit7z/src/internal/internalcategory.hpp | 32 + src/bit7z/src/internal/macros.hpp | 34 + src/bit7z/src/internal/opencallback.cpp | 116 + src/bit7z/src/internal/opencallback.hpp | 75 + src/bit7z/src/internal/operationcategory.cpp | 83 + src/bit7z/src/internal/operationcategory.hpp | 32 + src/bit7z/src/internal/operationresult.cpp | 22 + src/bit7z/src/internal/operationresult.hpp | 50 + src/bit7z/src/internal/processeditem.cpp | 125 + src/bit7z/src/internal/processeditem.hpp | 68 + src/bit7z/src/internal/renameditem.cpp | 74 + src/bit7z/src/internal/renameditem.hpp | 54 + src/bit7z/src/internal/stdinputitem.cpp | 73 + src/bit7z/src/internal/stdinputitem.hpp | 50 + .../src/internal/streamextractcallback.cpp | 57 + .../src/internal/streamextractcallback.hpp | 47 + src/bit7z/src/internal/streamutil.hpp | 38 + src/bit7z/src/internal/stringutil.cpp | 115 + src/bit7z/src/internal/stringutil.hpp | 79 + src/bit7z/src/internal/updatecallback.cpp | 147 + src/bit7z/src/internal/updatecallback.hpp | 79 + src/bit7z/src/internal/util.hpp | 156 + src/bit7z/src/internal/windows.cpp | 129 + src/bit7z/src/internal/windows.hpp | 191 ++ src/bit7z/tests/CMakeLists.txt | 163 + src/bit7z/tests/cmake/Catch2.cmake | 19 + src/bit7z/tests/res/encoding.manifest | 9 + src/bit7z/tests/res/encoding.rc | 2 + src/bit7z/tests/res/encodingLegacy.manifest | 9 + src/bit7z/tests/res/encodingLegacy.rc | 2 + src/bit7z/tests/src/main.cpp | 64 + src/bit7z/tests/src/test_bit7zlibrary.cpp | 61 + .../src/test_bitabstractarchivecreator.cpp | 550 ++++ src/bit7z/tests/src/test_bitarchiveeditor.cpp | 19 + src/bit7z/tests/src/test_bitarchivereader.cpp | 983 ++++++ src/bit7z/tests/src/test_bitarchivewriter.cpp | 26 + src/bit7z/tests/src/test_biterror.cpp | 98 + src/bit7z/tests/src/test_bitexception.cpp | 261 ++ .../tests/src/test_bitfilecompressor.cpp | 27 + src/bit7z/tests/src/test_bitfileextractor.cpp | 26 + src/bit7z/tests/src/test_bititemsvector.cpp | 1984 +++++++++++++ src/bit7z/tests/src/test_bitmemcompressor.cpp | 26 + src/bit7z/tests/src/test_bitmemextractor.cpp | 26 + src/bit7z/tests/src/test_bitpropvariant.cpp | 778 +++++ .../tests/src/test_bitstreamcompressor.cpp | 26 + .../tests/src/test_bitstreamextractor.cpp | 26 + src/bit7z/tests/src/test_cbufferinstream.cpp | 356 +++ src/bit7z/tests/src/test_dateutil.cpp | 66 + src/bit7z/tests/src/test_formatdetect.cpp | 297 ++ src/bit7z/tests/src/test_fsutil.cpp | 289 ++ src/bit7z/tests/src/test_stringutil.cpp | 92 + src/bit7z/tests/src/test_util.cpp | 454 +++ src/bit7z/tests/src/test_windows.cpp | 175 ++ src/bit7z/tests/src/utils/archive.cpp | 39 + src/bit7z/tests/src/utils/archive.hpp | 48 + src/bit7z/tests/src/utils/compiler.hpp | 103 + src/bit7z/tests/src/utils/filesystem.cpp | 163 + src/bit7z/tests/src/utils/filesystem.hpp | 157 + src/bit7z/tests/src/utils/flags.hpp | 45 + src/bit7z/tests/src/utils/format.hpp | 50 + src/bit7z/tests/src/utils/shared_lib.hpp | 44 + 196 files changed, 26796 insertions(+), 2 deletions(-) create mode 100755 src/bit7z/.github/FUNDING.yml create mode 100755 src/bit7z/.github/ISSUE_TEMPLATE/bug_report.yml create mode 100755 src/bit7z/.github/ISSUE_TEMPLATE/config.yml create mode 100755 src/bit7z/.github/ISSUE_TEMPLATE/feature_request.yml create mode 100755 src/bit7z/.github/PULL_REQUEST_TEMPLATE.md create mode 100755 src/bit7z/.github/workflows/ctest.yml create mode 100755 src/bit7z/.gitignore create mode 100755 src/bit7z/CMakeLists.txt create mode 100755 src/bit7z/CODE_OF_CONDUCT.md create mode 100755 src/bit7z/LICENSE create mode 100755 src/bit7z/README.md create mode 100755 src/bit7z/appveyor.yml create mode 100755 src/bit7z/cmake/BuildOptions.cmake create mode 100755 src/bit7z/cmake/CompilerOptions.cmake create mode 100755 src/bit7z/cmake/Dependencies.cmake create mode 100755 src/bit7z/cmake/FilesystemDetect.cmake create mode 100755 src/bit7z/cmake/OutputOptions.cmake create mode 100755 src/bit7z/cmake/Sanitizers.cmake create mode 100755 src/bit7z/cmake/TargetArchDetect.cmake create mode 100755 src/bit7z/docs/CMakeLists.txt create mode 100755 src/bit7z/docs/Doxyfile.in create mode 100755 src/bit7z/include/bit7z/bit7z.hpp create mode 100755 src/bit7z/include/bit7z/bit7zlibrary.hpp create mode 100755 src/bit7z/include/bit7z/bitabstractarchivecreator.hpp create mode 100755 src/bit7z/include/bit7z/bitabstractarchivehandler.hpp create mode 100755 src/bit7z/include/bit7z/bitabstractarchiveopener.hpp create mode 100755 src/bit7z/include/bit7z/bitarchiveeditor.hpp create mode 100755 src/bit7z/include/bit7z/bitarchiveitem.hpp create mode 100755 src/bit7z/include/bit7z/bitarchiveiteminfo.hpp create mode 100755 src/bit7z/include/bit7z/bitarchiveitemoffset.hpp create mode 100755 src/bit7z/include/bit7z/bitarchivereader.hpp create mode 100755 src/bit7z/include/bit7z/bitarchivewriter.hpp create mode 100755 src/bit7z/include/bit7z/bitcompressionlevel.hpp create mode 100755 src/bit7z/include/bit7z/bitcompressionmethod.hpp create mode 100755 src/bit7z/include/bit7z/bitcompressor.hpp create mode 100755 src/bit7z/include/bit7z/bitdefines.hpp create mode 100755 src/bit7z/include/bit7z/biterror.hpp create mode 100755 src/bit7z/include/bit7z/bitexception.hpp create mode 100755 src/bit7z/include/bit7z/bitextractor.hpp create mode 100755 src/bit7z/include/bit7z/bitfilecompressor.hpp create mode 100755 src/bit7z/include/bit7z/bitfileextractor.hpp create mode 100755 src/bit7z/include/bit7z/bitformat.hpp create mode 100755 src/bit7z/include/bit7z/bitfs.hpp create mode 100755 src/bit7z/include/bit7z/bitgenericitem.hpp create mode 100755 src/bit7z/include/bit7z/bitinputarchive.hpp create mode 100755 src/bit7z/include/bit7z/bititemsvector.hpp create mode 100755 src/bit7z/include/bit7z/bitmemcompressor.hpp create mode 100755 src/bit7z/include/bit7z/bitmemextractor.hpp create mode 100755 src/bit7z/include/bit7z/bitoutputarchive.hpp create mode 100755 src/bit7z/include/bit7z/bitpropvariant.hpp create mode 100755 src/bit7z/include/bit7z/bitstreamcompressor.hpp create mode 100755 src/bit7z/include/bit7z/bitstreamextractor.hpp create mode 100755 src/bit7z/include/bit7z/bittypes.hpp create mode 100755 src/bit7z/include/bit7z/bitwindows.hpp create mode 100755 src/bit7z/src/bit7zlibrary.cpp create mode 100755 src/bit7z/src/bitabstractarchivecreator.cpp create mode 100755 src/bit7z/src/bitabstractarchivehandler.cpp create mode 100755 src/bit7z/src/bitabstractarchiveopener.cpp create mode 100755 src/bit7z/src/bitarchiveeditor.cpp create mode 100755 src/bit7z/src/bitarchiveitem.cpp create mode 100755 src/bit7z/src/bitarchiveiteminfo.cpp create mode 100755 src/bit7z/src/bitarchiveitemoffset.cpp create mode 100755 src/bit7z/src/bitarchivereader.cpp create mode 100755 src/bit7z/src/bitarchivewriter.cpp create mode 100755 src/bit7z/src/biterror.cpp create mode 100755 src/bit7z/src/bitexception.cpp create mode 100755 src/bit7z/src/bitfilecompressor.cpp create mode 100755 src/bit7z/src/bitformat.cpp create mode 100755 src/bit7z/src/bitinputarchive.cpp create mode 100755 src/bit7z/src/bititemsvector.cpp create mode 100755 src/bit7z/src/bitoutputarchive.cpp create mode 100755 src/bit7z/src/bitpropvariant.cpp create mode 100755 src/bit7z/src/bittypes.cpp create mode 100755 src/bit7z/src/internal/archiveproperties.hpp create mode 100755 src/bit7z/src/internal/bufferextractcallback.cpp create mode 100755 src/bit7z/src/internal/bufferextractcallback.hpp create mode 100755 src/bit7z/src/internal/bufferitem.cpp create mode 100755 src/bit7z/src/internal/bufferitem.hpp create mode 100755 src/bit7z/src/internal/bufferutil.cpp create mode 100755 src/bit7z/src/internal/bufferutil.hpp create mode 100755 src/bit7z/src/internal/callback.cpp create mode 100755 src/bit7z/src/internal/callback.hpp create mode 100755 src/bit7z/src/internal/cbufferinstream.cpp create mode 100755 src/bit7z/src/internal/cbufferinstream.hpp create mode 100755 src/bit7z/src/internal/cbufferoutstream.cpp create mode 100755 src/bit7z/src/internal/cbufferoutstream.hpp create mode 100755 src/bit7z/src/internal/cfileinstream.cpp create mode 100755 src/bit7z/src/internal/cfileinstream.hpp create mode 100755 src/bit7z/src/internal/cfileoutstream.cpp create mode 100755 src/bit7z/src/internal/cfileoutstream.hpp create mode 100755 src/bit7z/src/internal/cfixedbufferoutstream.cpp create mode 100755 src/bit7z/src/internal/cfixedbufferoutstream.hpp create mode 100755 src/bit7z/src/internal/cmultivolumeinstream.cpp create mode 100755 src/bit7z/src/internal/cmultivolumeinstream.hpp create mode 100755 src/bit7z/src/internal/cmultivolumeoutstream.cpp create mode 100755 src/bit7z/src/internal/cmultivolumeoutstream.hpp create mode 100755 src/bit7z/src/internal/com.hpp create mode 100755 src/bit7z/src/internal/cstdinstream.cpp create mode 100755 src/bit7z/src/internal/cstdinstream.hpp create mode 100755 src/bit7z/src/internal/cstdoutstream.cpp create mode 100755 src/bit7z/src/internal/cstdoutstream.hpp create mode 100755 src/bit7z/src/internal/csymlinkinstream.cpp create mode 100755 src/bit7z/src/internal/csymlinkinstream.hpp create mode 100755 src/bit7z/src/internal/cvolumeinstream.cpp create mode 100755 src/bit7z/src/internal/cvolumeinstream.hpp create mode 100755 src/bit7z/src/internal/cvolumeoutstream.cpp create mode 100755 src/bit7z/src/internal/cvolumeoutstream.hpp create mode 100755 src/bit7z/src/internal/dateutil.cpp create mode 100755 src/bit7z/src/internal/dateutil.hpp create mode 100755 src/bit7z/src/internal/extractcallback.cpp create mode 100755 src/bit7z/src/internal/extractcallback.hpp create mode 100755 src/bit7z/src/internal/failuresourcecategory.cpp create mode 100755 src/bit7z/src/internal/failuresourcecategory.hpp create mode 100755 src/bit7z/src/internal/fileextractcallback.cpp create mode 100755 src/bit7z/src/internal/fileextractcallback.hpp create mode 100755 src/bit7z/src/internal/fixedbufferextractcallback.cpp create mode 100755 src/bit7z/src/internal/fixedbufferextractcallback.hpp create mode 100755 src/bit7z/src/internal/formatdetect.cpp create mode 100755 src/bit7z/src/internal/formatdetect.hpp create mode 100755 src/bit7z/src/internal/fs.hpp create mode 100755 src/bit7z/src/internal/fsindexer.cpp create mode 100755 src/bit7z/src/internal/fsindexer.hpp create mode 100755 src/bit7z/src/internal/fsitem.cpp create mode 100755 src/bit7z/src/internal/fsitem.hpp create mode 100755 src/bit7z/src/internal/fsutil.cpp create mode 100755 src/bit7z/src/internal/fsutil.hpp create mode 100755 src/bit7z/src/internal/genericinputitem.cpp create mode 100755 src/bit7z/src/internal/genericinputitem.hpp create mode 100755 src/bit7z/src/internal/guiddef.hpp create mode 100755 src/bit7z/src/internal/guids.cpp create mode 100755 src/bit7z/src/internal/guids.hpp create mode 100755 src/bit7z/src/internal/hresultcategory.cpp create mode 100755 src/bit7z/src/internal/hresultcategory.hpp create mode 100755 src/bit7z/src/internal/internalcategory.cpp create mode 100755 src/bit7z/src/internal/internalcategory.hpp create mode 100755 src/bit7z/src/internal/macros.hpp create mode 100755 src/bit7z/src/internal/opencallback.cpp create mode 100755 src/bit7z/src/internal/opencallback.hpp create mode 100755 src/bit7z/src/internal/operationcategory.cpp create mode 100755 src/bit7z/src/internal/operationcategory.hpp create mode 100755 src/bit7z/src/internal/operationresult.cpp create mode 100755 src/bit7z/src/internal/operationresult.hpp create mode 100755 src/bit7z/src/internal/processeditem.cpp create mode 100755 src/bit7z/src/internal/processeditem.hpp create mode 100755 src/bit7z/src/internal/renameditem.cpp create mode 100755 src/bit7z/src/internal/renameditem.hpp create mode 100755 src/bit7z/src/internal/stdinputitem.cpp create mode 100755 src/bit7z/src/internal/stdinputitem.hpp create mode 100755 src/bit7z/src/internal/streamextractcallback.cpp create mode 100755 src/bit7z/src/internal/streamextractcallback.hpp create mode 100755 src/bit7z/src/internal/streamutil.hpp create mode 100755 src/bit7z/src/internal/stringutil.cpp create mode 100755 src/bit7z/src/internal/stringutil.hpp create mode 100755 src/bit7z/src/internal/updatecallback.cpp create mode 100755 src/bit7z/src/internal/updatecallback.hpp create mode 100755 src/bit7z/src/internal/util.hpp create mode 100755 src/bit7z/src/internal/windows.cpp create mode 100755 src/bit7z/src/internal/windows.hpp create mode 100755 src/bit7z/tests/CMakeLists.txt create mode 100755 src/bit7z/tests/cmake/Catch2.cmake create mode 100755 src/bit7z/tests/res/encoding.manifest create mode 100755 src/bit7z/tests/res/encoding.rc create mode 100755 src/bit7z/tests/res/encodingLegacy.manifest create mode 100755 src/bit7z/tests/res/encodingLegacy.rc create mode 100755 src/bit7z/tests/src/main.cpp create mode 100755 src/bit7z/tests/src/test_bit7zlibrary.cpp create mode 100755 src/bit7z/tests/src/test_bitabstractarchivecreator.cpp create mode 100755 src/bit7z/tests/src/test_bitarchiveeditor.cpp create mode 100755 src/bit7z/tests/src/test_bitarchivereader.cpp create mode 100755 src/bit7z/tests/src/test_bitarchivewriter.cpp create mode 100755 src/bit7z/tests/src/test_biterror.cpp create mode 100755 src/bit7z/tests/src/test_bitexception.cpp create mode 100755 src/bit7z/tests/src/test_bitfilecompressor.cpp create mode 100755 src/bit7z/tests/src/test_bitfileextractor.cpp create mode 100755 src/bit7z/tests/src/test_bititemsvector.cpp create mode 100755 src/bit7z/tests/src/test_bitmemcompressor.cpp create mode 100755 src/bit7z/tests/src/test_bitmemextractor.cpp create mode 100755 src/bit7z/tests/src/test_bitpropvariant.cpp create mode 100755 src/bit7z/tests/src/test_bitstreamcompressor.cpp create mode 100755 src/bit7z/tests/src/test_bitstreamextractor.cpp create mode 100755 src/bit7z/tests/src/test_cbufferinstream.cpp create mode 100755 src/bit7z/tests/src/test_dateutil.cpp create mode 100755 src/bit7z/tests/src/test_formatdetect.cpp create mode 100755 src/bit7z/tests/src/test_fsutil.cpp create mode 100755 src/bit7z/tests/src/test_stringutil.cpp create mode 100755 src/bit7z/tests/src/test_util.cpp create mode 100755 src/bit7z/tests/src/test_windows.cpp create mode 100755 src/bit7z/tests/src/utils/archive.cpp create mode 100755 src/bit7z/tests/src/utils/archive.hpp create mode 100755 src/bit7z/tests/src/utils/compiler.hpp create mode 100755 src/bit7z/tests/src/utils/filesystem.cpp create mode 100755 src/bit7z/tests/src/utils/filesystem.hpp create mode 100755 src/bit7z/tests/src/utils/flags.hpp create mode 100755 src/bit7z/tests/src/utils/format.hpp create mode 100755 src/bit7z/tests/src/utils/shared_lib.hpp diff --git a/build-rpm.sh b/build-rpm.sh index 317314e9..4290d96a 100755 --- a/build-rpm.sh +++ b/build-rpm.sh @@ -44,8 +44,8 @@ make -j 16 echo -e "\n ----- Building bit7z -----\n" echo -e "\n ----- Created path $BUILDDIR/bit7z -----\n" mkdir -p $BUILDDIR/bit7z -echo -e "\n ----- Running cmake -DBIT7Z_AUTO_FORMAT:BOOL=ON -DBIT7Z_USE_LEGACY_IUNKNOWN=ON -DBIT7Z_GENERATE_PIC=ON -DCMAKE_CXX_FLAGS:STRING=-fPIC -DCMAKE_C_FLAGS:STRING=-fPIC -S $BIT7ZDIR -B $BUILDDIR/bit7z -----\n" -cmake -DBIT7Z_AUTO_FORMAT:BOOL=ON -DBIT7Z_USE_LEGACY_IUNKNOWN=ON -DBIT7Z_GENERATE_PIC=ON -DCMAKE_CXX_FLAGS:STRING=-fPIC -DCMAKE_C_FLAGS:STRING=-fPIC -S $BIT7ZDIR -B $BUILDDIR/bit7z +echo -e "\n ----- Running cmake -DBIT7Z_AUTO_FORMAT:BOOL=ON -DBIT7Z_USE_LEGACY_IUNKNOWN=ON -DBIT7Z_GENERATE_PIC=ON -DCMAKE_CXX_FLAGS:STRING=-fPIC -DCMAKE_C_FLAGS:STRING=-fPIC -S $SRCDIR/bit7z -B $BUILDDIR/bit7z -----\n" +cmake -DBIT7Z_AUTO_FORMAT:BOOL=ON -DBIT7Z_USE_LEGACY_IUNKNOWN=ON -DBIT7Z_GENERATE_PIC=ON -DCMAKE_CXX_FLAGS:STRING=-fPIC -DCMAKE_C_FLAGS:STRING=-fPIC -S $SRCDIR/bit7z -B $BUILDDIR/bit7z echo -e "\n ----- chdir to $BUILDDIR/bit7z -----\n" cd $BUILDDIR/bit7z echo -e "\n ----- Running cmake --build . --config Release -----\n" diff --git a/src/bit7z/.github/FUNDING.yml b/src/bit7z/.github/FUNDING.yml new file mode 100755 index 00000000..a8e2aed7 --- /dev/null +++ b/src/bit7z/.github/FUNDING.yml @@ -0,0 +1,7 @@ +# These are supported funding model platforms + +github: rikyoz +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: rikyoz +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel diff --git a/src/bit7z/.github/ISSUE_TEMPLATE/bug_report.yml b/src/bit7z/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100755 index 00000000..e7367496 --- /dev/null +++ b/src/bit7z/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,182 @@ +name: Bug Report +description: Create a bug report to help us improve bit7z +title: "[Bug]: " +labels: [🐞 bug] +assignees: + - rikyoz +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: dropdown + id: version + attributes: + label: bit7z version + multiple: true + options: + - 4.0.x + - 3.2.x + - 3.1.x + - 3.0.x + - 2.1 + - 2.0 + validations: + required: true + - type: dropdown + id: compilation_options + attributes: + label: Compilation options + multiple: true + options: + - BIT7Z_7ZIP_VERSION + - BIT7Z_ANALYZE_CODE + - BIT7Z_AUTO_FORMAT + - BIT7Z_AUTO_PREFIX_LONG_PATHS + - BIT7Z_BUILD_TESTS + - BIT7Z_BUILD_DOCS + - BIT7Z_CUSTOM_7ZIP_PATH + - BIT7Z_DISABLE_ZIP_ASCII_PWD_CHECK + - BIT7Z_GENERATE_PIC + - BIT7Z_LINK_LIBCPP + - BIT7Z_PATH_SANITIZATION + - BIT7Z_REGEX_MATCHING + - BIT7Z_STATIC_RUNTIME + - BIT7Z_TESTS_FILESYSTEM + - BIT7Z_TESTS_NO_SANITIZERS + - BIT7Z_TESTS_USE_SYSTEM_7ZIP + - BIT7Z_USE_LEGACY_IUNKNOWN + - BIT7Z_USE_NATIVE_STRING + - BIT7Z_USE_STD_BYTE + - BIT7Z_USE_SYSTEM_CODEPAGE + - BIT7Z_VS_LIBNAME_OUTDIR_STYLE + validations: + required: false + - type: dropdown + id: sevenzip + attributes: + label: 7-zip version + multiple: true + options: + - v23.01 + - v22.01 + - v22.00 + - v21.07 + - v21.06 + - v19.00 + - v18.06 + - v18.05 + - v18.01 + - v16.04 + - v16.03 + - v16.02 + validations: + required: true + - type: dropdown + id: sevenzip_shared_lib + attributes: + label: 7-zip shared library used + multiple: true + options: + - 7z.dll / 7z.so + - 7za.dll / 7za.so + - 7zra.dll / 7zra.so + - 7zxa.dll / 7zxa.so + - 7zxr.dll / 7zxr.so + validations: + required: true + - type: dropdown + id: compiler + attributes: + label: Compilers + multiple: true + options: + - MSVC + - MinGW + - GCC + - Clang + validations: + required: true + - type: input + id: compiler_version + attributes: + label: Compiler versions + description: What compiler versions are you using? + placeholder: ex. GCC 7, MSVC 2022, Clang 12, ... + validations: + required: false + - type: dropdown + id: architecture + attributes: + label: Architecture + multiple: true + options: + - x86_64 + - x86 + - arm + - arm64 + validations: + required: true + - type: dropdown + id: operating_system + attributes: + label: Operating system + multiple: true + options: + - Windows + - Linux + - macOS + - Android + validations: + required: true + - type: input + id: os_version + attributes: + label: Operating system versions + description: Which operating system versions are you targeting? + placeholder: ex. Windows 11, Ubuntu 22.04, macOS Monterey, ... + validations: + required: false + - type: textarea + id: description + attributes: + label: Bug description + description: A clear and concise description of what the bug is. + placeholder: Describe the bug... + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: false + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: A clear and concise description of what you expected to happen. + placeholder: Describe the expected behavior + validations: + required: false + - type: textarea + id: logs + attributes: + label: Relevant compilation output + description: Please copy and paste any relevant log output of the compilation. + render: shell + validations: + required: false + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + options: + - label: By submitting this issue, I agree to follow bit7z's [Code of Conduct](https://github.com/rikyoz/bit7z/blob/master/CODE_OF_CONDUCT.md) + required: true diff --git a/src/bit7z/.github/ISSUE_TEMPLATE/config.yml b/src/bit7z/.github/ISSUE_TEMPLATE/config.yml new file mode 100755 index 00000000..0086358d --- /dev/null +++ b/src/bit7z/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/src/bit7z/.github/ISSUE_TEMPLATE/feature_request.yml b/src/bit7z/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100755 index 00000000..2fbdc824 --- /dev/null +++ b/src/bit7z/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,28 @@ +name: Feature Request +description: Suggest an idea for this project +title: "[Feature Request]: " +labels: [✔️ enhancement] +assignees: + - rikyoz +body: + - type: textarea + id: description + attributes: + label: Feature description + description: A clear and detailed description of the functionality you want to be implemented in bit7z. + validations: + required: true + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Add any other context, such as a possible API and/or code examples for the new feature to be implemented. + validations: + required: false + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + options: + - label: By submitting this issue, I agree to follow bit7z's [Code of Conduct](https://github.com/rikyoz/bit7z/blob/master/CODE_OF_CONDUCT.md) + required: true diff --git a/src/bit7z/.github/PULL_REQUEST_TEMPLATE.md b/src/bit7z/.github/PULL_REQUEST_TEMPLATE.md new file mode 100755 index 00000000..7be8703f --- /dev/null +++ b/src/bit7z/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,27 @@ + + +## Description + + +## Motivation and Context + + + +## How Has This Been Tested? + + + + +## Types of changes + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to change) + +## Checklist: + + +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. + \ No newline at end of file diff --git a/src/bit7z/.github/workflows/ctest.yml b/src/bit7z/.github/workflows/ctest.yml new file mode 100755 index 00000000..191cefb2 --- /dev/null +++ b/src/bit7z/.github/workflows/ctest.yml @@ -0,0 +1,138 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: Test bit7z on multiple configurations +on: [pull_request, push] + +jobs: + build: + runs-on: ${{ matrix.os }} + if: | + github.event_name == 'pull_request' + || contains(github.event.head_commit.message, '[test]') + || startsWith(github.ref, 'refs/tags/v') + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: false + + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + build_type: [Debug, Release] + c_compiler: [gcc, clang, cl] + bit7z_auto_format: [OFF, ON] + bit7z_regex_matching: [OFF, ON] + bit7z_link_libcpp: [OFF, ON] + bit7z_use_native_string: [OFF, ON] + bit7z_auto_prefix_long_paths: [OFF, ON] + bit7z_use_system_codepage: [OFF, ON] + bit7z_path_sanitization: [OFF, ON] + include: + - os: windows-latest + c_compiler: cl + cpp_compiler: cl + use_system_7zip: ON + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + use_system_7zip: OFF + - os: ubuntu-latest + c_compiler: clang + cpp_compiler: clang++ + use_system_7zip: OFF + - os: macos-latest + c_compiler: clang + cpp_compiler: clang++ + use_system_7zip: OFF + exclude: + - os: windows-latest + c_compiler: gcc + - os: windows-latest + c_compiler: clang + - os: windows-latest + bit7z_link_libcpp: ON + - os: ubuntu-latest + c_compiler: cl + - os: ubuntu-latest + c_compiler: gcc + bit7z_link_libcpp: ON + - os: ubuntu-latest + bit7z_use_native_string: ON + - os: ubuntu-latest + bit7z_auto_prefix_long_paths: ON + - os: ubuntu-latest + bit7z_use_system_codepage: ON + - os: ubuntu-latest + bit7z_path_sanitization: ON + - os: macos-latest + c_compiler: cl + - os: macos-latest + c_compiler: gcc + - os: macos-latest + bit7z_use_native_string: ON + - os: macos-latest + bit7z_auto_prefix_long_paths: ON + - os: macos-latest + bit7z_use_system_codepage: ON + - os: macos-latest + bit7z_path_sanitization: ON + + steps: + - uses: actions/checkout@v3 + + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -DBIT7Z_BUILD_TESTS=ON + -DBIT7Z_ENABLE_SANITIZERS=ON + -DBIT7Z_TESTS_USE_SYSTEM_7ZIP=${{ matrix.use_system_7zip }} + -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} + -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} + -DBIT7Z_USE_NATIVE_STRING=${{ matrix.bit7z_use_native_string }} + -DBIT7Z_LINK_LIBCPP=${{ matrix.bit7z_link_libcpp }} + -DBIT7Z_AUTO_PREFIX_LONG_PATHS=${{ matrix.bit7z_auto_prefix_long_paths }} + -DBIT7Z_USE_SYSTEM_CODEPAGE=${{ matrix.bit7z_use_system_codepage }} + -DBIT7Z_PATH_SANITIZATION=${{ matrix.bit7z_path_sanitization }} + -S ${{ github.workspace }} + + - name: Build bit7z + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --parallel + + - name: Build 7z.so for tests (Ubuntu) + shell: bash + if: matrix.os == 'ubuntu-latest' + run: | + git clone --depth 1 https://github.com/rikyoz/7-Zip ${{ github.workspace }}/../7-zip + cd ${{ github.workspace }}/../7-zip/CPP/7zip/Bundles/Format7zF/ + make -j -f ../../cmpl_gcc.mak + cp b/g/7z.so ${{ github.workspace }}/bin/x64/7z.so + + - name: Build 7z.so for tests (macOS) + shell: bash + if: matrix.os == 'macos-latest' + run: | + git clone --depth 1 https://github.com/rikyoz/7-Zip ${{ github.workspace }}/../7-zip + cd ${{ github.workspace }}/../7-zip/CPP/7zip/Bundles/Format7zF/ + make -j -f ../../cmpl_mac_x64.mak + cp b/m_x64/7z.so ${{ github.workspace }}/bin/x64/7z.so + + - name: Test bit7z + working-directory: ${{ steps.strings.outputs.build-output-dir }} + # Disabling alloc_dealloc_mismatch for address sanitizer until https://github.com/llvm/llvm-project/issues/52771 is fixed + env: + ASAN_OPTIONS: alloc_dealloc_mismatch=0 + # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest --build-target bit7z-tests --build-config ${{ matrix.build_type }} --output-on-failure diff --git a/src/bit7z/.gitignore b/src/bit7z/.gitignore new file mode 100755 index 00000000..54794830 --- /dev/null +++ b/src/bit7z/.gitignore @@ -0,0 +1,63 @@ +*.3-pre1 +*.TMP +*.a +*.autosave +*.cd +*.code-workspace +*.cppcheck +*.ctu-info +*.db +*.filters +*.ini +*.kdbx +*.lastcodeanalysissucceeded +*.lib +*.opendb +*.opensdf +*.pdb +*.pro.user +*.pro\.user*-pre1 +*.regx +*.ruleset +*.sdf +*.suo +*.suppress +*.txt.user +*.vcxproj +*.vcxproj.user + +*-cppcheck-*/ +.idea/ +.vs/ +.vscode/ +bin/ +build/ +cmake-*/ +docker/ +docs/html/ +docs/md/ +docs/rst/ +docs/wiki/ +docs/xml/ +gh-pages/ +lib/ +out/ +pack/ +third_party/ +x64/ + +.mailmap +.qmake.stash +CMakeSettings.json +bit7z.sln +roadmap.txt + +# PVS-Studio files and directories +*.PVS-Studio.i +*.cfg +*.dfo +.PVS-Studio/ +pvs-studio-analyzer.stacktrace.txt + +# Test data +tests/data/ diff --git a/src/bit7z/CMakeLists.txt b/src/bit7z/CMakeLists.txt new file mode 100755 index 00000000..0127820e --- /dev/null +++ b/src/bit7z/CMakeLists.txt @@ -0,0 +1,248 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +cmake_minimum_required( VERSION 3.11 ) + +project( bit7z + VERSION 4.0.6 + DESCRIPTION "A C++ static library offering a clean and simple interface to the 7-zip/p7zip shared libraries" + HOMEPAGE_URL "https://github.com/rikyoz/bit7z/" ) +set( CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON" ) + +cmake_policy( SET CMP0022 NEW ) +if( POLICY CMP0076 ) + cmake_policy( SET CMP0076 NEW ) +endif() + +# public headers +set( PUBLIC_HEADERS + include/bit7z/bit7z.hpp + include/bit7z/bit7zlibrary.hpp + include/bit7z/bitabstractarchivecreator.hpp + include/bit7z/bitabstractarchivehandler.hpp + include/bit7z/bitabstractarchiveopener.hpp + include/bit7z/bitarchiveeditor.hpp + include/bit7z/bitarchiveitem.hpp + include/bit7z/bitarchiveiteminfo.hpp + include/bit7z/bitarchiveitemoffset.hpp + include/bit7z/bitarchivereader.hpp + include/bit7z/bitarchivewriter.hpp + include/bit7z/bitcompressionlevel.hpp + include/bit7z/bitcompressionmethod.hpp + include/bit7z/bitcompressor.hpp + include/bit7z/bitdefines.hpp + include/bit7z/biterror.hpp + include/bit7z/bitexception.hpp + include/bit7z/bitextractor.hpp + include/bit7z/bitfilecompressor.hpp + include/bit7z/bitfileextractor.hpp + include/bit7z/bitformat.hpp + include/bit7z/bitfs.hpp + include/bit7z/bitgenericitem.hpp + include/bit7z/bitinputarchive.hpp + include/bit7z/bititemsvector.hpp + include/bit7z/bitmemcompressor.hpp + include/bit7z/bitmemextractor.hpp + include/bit7z/bitoutputarchive.hpp + include/bit7z/bitpropvariant.hpp + include/bit7z/bitstreamcompressor.hpp + include/bit7z/bitstreamextractor.hpp + include/bit7z/bittypes.hpp + include/bit7z/bitwindows.hpp ) + +# header files +set( HEADERS + src/internal/archiveproperties.hpp + src/internal/bufferextractcallback.hpp + src/internal/bufferitem.hpp + src/internal/bufferutil.hpp + src/internal/callback.hpp + src/internal/cbufferinstream.hpp + src/internal/cbufferoutstream.hpp + src/internal/cfileinstream.hpp + src/internal/cfileoutstream.hpp + src/internal/cfixedbufferoutstream.hpp + src/internal/cmultivolumeinstream.hpp + src/internal/cmultivolumeoutstream.hpp + src/internal/com.hpp + src/internal/cstdinstream.hpp + src/internal/cstdoutstream.hpp + src/internal/csymlinkinstream.hpp + src/internal/cvolumeinstream.hpp + src/internal/cvolumeoutstream.hpp + src/internal/dateutil.hpp + src/internal/extractcallback.hpp + src/internal/failuresourcecategory.hpp + src/internal/fileextractcallback.hpp + src/internal/fixedbufferextractcallback.hpp + src/internal/formatdetect.hpp + src/internal/fsindexer.hpp + src/internal/fsitem.hpp + src/internal/fsutil.hpp + src/internal/fs.hpp + src/internal/genericinputitem.hpp + src/internal/guiddef.hpp + src/internal/guids.hpp + src/internal/hresultcategory.hpp + src/internal/internalcategory.hpp + src/internal/macros.hpp + src/internal/opencallback.hpp + src/internal/operationcategory.hpp + src/internal/operationresult.hpp + src/internal/processeditem.hpp + src/internal/renameditem.hpp + src/internal/stdinputitem.hpp + src/internal/streamextractcallback.hpp + src/internal/streamutil.hpp + src/internal/stringutil.hpp + src/internal/updatecallback.hpp + src/internal/util.hpp + src/internal/windows.hpp ) + +# source files +set( SOURCES + src/bit7zlibrary.cpp + src/bitabstractarchivecreator.cpp + src/bitabstractarchivehandler.cpp + src/bitabstractarchiveopener.cpp + src/bitarchiveeditor.cpp + src/bitarchiveitem.cpp + src/bitarchiveiteminfo.cpp + src/bitarchiveitemoffset.cpp + src/bitarchivereader.cpp + src/bitarchivewriter.cpp + src/biterror.cpp + src/bitexception.cpp + src/bitfilecompressor.cpp + src/bitformat.cpp + src/bitinputarchive.cpp + src/bititemsvector.cpp + src/bitoutputarchive.cpp + src/bitpropvariant.cpp + src/bittypes.cpp + src/internal/bufferextractcallback.cpp + src/internal/bufferitem.cpp + src/internal/bufferutil.cpp + src/internal/callback.cpp + src/internal/cbufferinstream.cpp + src/internal/cbufferoutstream.cpp + src/internal/cfileinstream.cpp + src/internal/cfileoutstream.cpp + src/internal/cfixedbufferoutstream.cpp + src/internal/cmultivolumeinstream.cpp + src/internal/cmultivolumeoutstream.cpp + src/internal/cstdinstream.cpp + src/internal/cstdoutstream.cpp + src/internal/csymlinkinstream.cpp + src/internal/cvolumeinstream.cpp + src/internal/cvolumeoutstream.cpp + src/internal/dateutil.cpp + src/internal/extractcallback.cpp + src/internal/failuresourcecategory.cpp + src/internal/fileextractcallback.cpp + src/internal/fixedbufferextractcallback.cpp + src/internal/formatdetect.cpp + src/internal/fsindexer.cpp + src/internal/fsitem.cpp + src/internal/fsutil.cpp + src/internal/genericinputitem.cpp + src/internal/guids.cpp + src/internal/hresultcategory.cpp + src/internal/internalcategory.cpp + src/internal/opencallback.cpp + src/internal/operationcategory.cpp + src/internal/operationresult.cpp + src/internal/processeditem.cpp + src/internal/renameditem.cpp + src/internal/stdinputitem.cpp + src/internal/streamextractcallback.cpp + src/internal/stringutil.cpp + src/internal/updatecallback.cpp + src/internal/windows.cpp ) + +# library output file name options +include( cmake/OutputOptions.cmake ) + +# detecting if the std::filesystem is available and usable +include( cmake/FilesystemDetect.cmake ) + +# printing library and compiler information (useful for debugging) +message( STATUS "Target Version: ${CMAKE_PROJECT_VERSION}" ) +message( STATUS "Compiler ID: ${CMAKE_CXX_COMPILER_ID}" ) +message( STATUS "Compiler Version: ${CMAKE_CXX_COMPILER_VERSION}" ) +message( STATUS "Architecture: ${BIT7Z_TARGET_ARCH_NAME}" ) +message( STATUS "Build Type: ${CMAKE_BUILD_TYPE}" ) +message( STATUS "Language Standard for bit7z: C++${CMAKE_CXX_STANDARD}" ) + +# library target options +set( LIB_TARGET bit7z${ARCH_POSTFIX} ) +add_library( ${LIB_TARGET} STATIC ) +target_sources( ${LIB_TARGET} + PUBLIC ${PUBLIC_HEADERS} + PRIVATE ${HEADERS} ${SOURCES} ) + +# additional target without the architecture suffix in the name +if( NOT "${ARCH_POSTFIX}" STREQUAL "" ) + add_library( bit7z ALIAS ${LIB_TARGET} ) +endif() + +# bit7z build options +include( cmake/BuildOptions.cmake ) + +# compiler-specific options +include( cmake/CompilerOptions.cmake ) + +# dependencies +include( cmake/Dependencies.cmake ) + +# 7-zip source code +target_link_libraries( ${LIB_TARGET} PRIVATE 7-zip ) + +# filesystem library (needed if std::filesystem is not available) +if( ghc_filesystem_ADDED ) + target_link_libraries( ${LIB_TARGET} PRIVATE ghc_filesystem ) +endif() + +# public includes +target_include_directories( ${LIB_TARGET} PUBLIC "$" + "$" ) + +# private includes +target_include_directories( ${LIB_TARGET} PRIVATE "${PROJECT_SOURCE_DIR}/include/bit7z" + "${PROJECT_SOURCE_DIR}/src" ) + +# 7-zip compilation definitions +target_compile_definitions( ${LIB_TARGET} PRIVATE UNICODE _UNICODE ) +if( WIN32 ) + target_compile_definitions( ${LIB_TARGET} PRIVATE _WINDOWS ) + target_link_libraries( ${LIB_TARGET} PUBLIC oleaut32 ) +endif() + +if( MINGW ) + target_link_libraries( ${LIB_TARGET} PUBLIC uuid ) +endif() + +if( UNIX ) + target_compile_definitions( ${LIB_TARGET} PRIVATE _LARGEFILE64_SOURCE _LARGEFILE_SOURCE _REENTRANT + EXTERNAL_CODECS ENV_UNIX BREAK_HANDLER USE_WIN_FILE ) + target_compile_definitions( ${LIB_TARGET} PUBLIC _TIME_BITS=64 ) + if ( ( NOT ANDROID ) OR ( ANDROID_PLATFORM GREATER_EQUAL 24 ) ) + target_compile_definitions( ${LIB_TARGET} PUBLIC _FILE_OFFSET_BITS=64 ) + endif() + target_link_libraries( ${LIB_TARGET} PUBLIC ${CMAKE_DL_LIBS} ) +endif() + +# sanitizers +include( cmake/Sanitizers.cmake ) + +# tests +if( BIT7Z_BUILD_TESTS ) + enable_testing() + add_subdirectory( tests ) +endif() + +# docs +if( BIT7Z_BUILD_DOCS ) + add_subdirectory( docs ) +endif() \ No newline at end of file diff --git a/src/bit7z/CODE_OF_CONDUCT.md b/src/bit7z/CODE_OF_CONDUCT.md new file mode 100755 index 00000000..0b02c554 --- /dev/null +++ b/src/bit7z/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at rik20@live.it. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/src/bit7z/LICENSE b/src/bit7z/LICENSE new file mode 100755 index 00000000..ee6256cd --- /dev/null +++ b/src/bit7z/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/src/bit7z/README.md b/src/bit7z/README.md new file mode 100755 index 00000000..d5554a11 --- /dev/null +++ b/src/bit7z/README.md @@ -0,0 +1,379 @@ +

bit7z

+ +

A C++ static library offering a clean and simple interface to the 7-zip shared libraries

+ + +

+ Supported Features • + Getting Started • + Download • + Requirements • + Building & Using • + Donate • + License +

+ + +
+ GitHub releaseC++14WindowsLinuxmacOSx86, x64, arm, arm64donatedocsBuild status +
+ MSVC 2015+GCC 4.9+Clang 3.6+CodeFactor GradeLicense +
+ +## ⚡️ Introduction + +**bit7z** is a _cross-platform_ C++ static library that allows the _compression/extraction of archive files_ through a _clean_ and _simple_ wrapper interface to the dynamic libraries from the [7-zip](https://www.7-zip.org/ "7-zip Project Homepage") project.
+It supports compression and extraction to and from the filesystem or the memory, reading archives metadata, updating existing ones, creating multi-volume archives, operation progress callbacks, and many other functionalities. + +## 🎯 Supported Features + ++ **Compression** using the following archive formats: **7z**, XZ, **BZIP2**, **GZIP**, TAR, **ZIP**, and WIM. ++ **Extraction** of many archive formats: **7z**, AR, ARJ, **BZIP2**, CAB, CHM, CPIO, CramFS, DEB, DMG, EXT, FAT, GPT, **GZIP**, HFS, HXS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, **RAR**, **RAR5**, RPM, SquashFS, TAR, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR, XZ, Z, and **ZIP**. ++ **Reading metadata** of archives and their content. ++ **Testing** archives for errors. ++ **Updating** existing file archives with new files. ++ **Renaming**, **updating**, or **deleting** old items in existing file archives. ++ **Compression and extraction _to and from_ memory** and **C++ standard streams**. ++ Compression using **custom path aliases** for the items in the output archives. ++ **Selective extraction** of only specified files/folders **using wildcards** and **regular expressions**. ++ Creation of **encrypted archives** (strong AES-256 encryption; only for 7z and ZIP formats). ++ **Archive header encryption** (only for 7z format). ++ Possibility to choose the **compression level** (if supported by the archive format), the **compression method** ([supported methods](https://github.com/rikyoz/bit7z/wiki/Advanced-Usage#compression-methods "Wiki page on bit7z's supported compression methods")), the **dictionary size**, and the **word size**. ++ **Automatic input archive format detection**. ++ **Solid archives** (only for 7z). ++ **Multi-volume archives**. ++ **Operation callbacks** for obtaining real-time information about ongoing operations. ++ **Canceling** or **pausing** the current operation. + +### Notes + +The presence or not of some of the above features depends on the particular shared library used along with bit7z.
+For example, 7z.dll should support all these features, 7za.dll should work only with the 7z file format, and 7zxa.dll can only extract 7z files. For more information about the 7-zip DLLs, please check this [wiki page](https://github.com/rikyoz/bit7z/wiki/7z-DLLs). + +In the end, some other features (e.g., _automatic format detection_ and _selective extraction using regular expressions_) are disabled by default, and macro definitions must be used during compilation to have them available ([wiki](https://github.com/rikyoz/bit7z/wiki/Building-the-library)). + +## 🔥 Getting Started (Library Usage) + +Below are a few examples that show how to use some of the main features of bit7z. + +### 📂 Extracting Files from an Archive + +```cpp +#include + +try { // bit7z classes can throw BitException objects + using namespace bit7z; + + Bit7zLibrary lib{ "7za.dll" }; + BitFileExtractor extractor{ lib, BitFormat::SevenZip }; + + // Extracting a simple archive + extractor.extract( "path/to/archive.7z", "out/dir/" ); + + // Extracting a specific file inside an archive + extractor.extractMatching( "path/to/archive.7z", "file.pdf", "out/dir/" ); + + // Extracting the first file of an archive to a buffer + std::vector< byte_t > buffer; + extractor.extract( "path/to/archive.7z", buffer ); + + // Extracting an encrypted archive + extractor.setPassword( "password" ); + extractor.extract( "path/to/another/archive.7z", "out/dir/" ); +} catch ( const bit7z::BitException& ex ) { /* Do something with ex.what()...*/ } +``` + +Alternatively, if you only need to work on a single archive: + +```cpp +#include + +try { // bit7z classes can throw BitException objects + using namespace bit7z; + + Bit7zLibrary lib{ "7z.dll" }; + + // Opening the archive + BitArchiveReader archive{ lib, "path/to/archive.gz", BitFormat::GZip }; + + // Testing the archive + archive.test(); + + // Extracting the archive + archive.extractTo( "out/dir/" ); +} catch ( const bit7z::BitException& ex ) { /* Do something with ex.what()...*/ } +``` + +### 💼 Compressing Files into an Archive + +```cpp +#include + +try { // bit7z classes can throw BitException objects + using namespace bit7z; + + Bit7zLibrary lib{ "7z.dll" }; + BitFileCompressor compressor{ lib, BitFormat::Zip }; + + std::vector< std::string > files = { "path/to/file1.jpg", "path/to/file2.pdf" }; + + // Creating a simple zip archive + compressor.compress( files, "output_archive.zip" ); + + // Creating a zip archive with a custom directory structure + std::map< std::string, std::string > files_map = { + { "path/to/file1.jpg", "alias/path/file1.jpg" }, + { "path/to/file2.pdf", "alias/path/file2.pdf" } + }; + compressor.compress( files_map, "output_archive2.zip" ); + + // Compressing a directory + compressor.compressDirectory( "dir/path/", "dir_archive.zip" ); + + // Creating an encrypted zip archive of two files + compressor.setPassword( "password" ); + compressor.compressFiles( files, "protected_archive.zip" ); + + // Updating an existing zip archive + compressor.setUpdateMode( UpdateMode::Append ); + compressor.compressFiles( files, "existing_archive.zip" ); + + // Compressing a single file into a buffer + std::vector< bit7z::byte_t > buffer; + BitFileCompressor compressor2{ lib, BitFormat::BZip2 }; + compressor2.compressFile( files[0], buffer ); +} catch ( const bit7z::BitException& ex ) { /* Do something with ex.what()...*/ } +``` + +Alternatively, if you only need to work on a single archive: + +```cpp +#include + +try { // bit7z classes can throw BitException objects + using namespace bit7z; + + Bit7zLibrary lib{ "7z.dll" }; + BitArchiveWriter archive{ lib, BitFormat::SevenZip }; + + // Adding the items to be compressed (no compression is performed here) + archive.addFile( "path/to/file.txt" ); + archive.addDirectory( "path/to/dir/" ); + + // Compressing the added items to the output archive + archive.compressTo( "output.7z" ); +} catch ( const bit7z::BitException& ex ) { /* Do something with ex.what()...*/ } +``` + +### 📑 Reading Archive Metadata + +```cpp +#include + +try { // bit7z classes can throw BitException objects + using namespace bit7z; + + Bit7zLibrary lib{ "7za.dll" }; + BitArchiveReader arc{ lib, "archive.7z", BitFormat::SevenZip }; + + // Printing archive metadata + std::cout << "Archive properties\n"; + std::cout << " Items count: " << arc.itemsCount() << '\n'; + std::cout << " Folders count: " << arc.foldersCount() << '\n'; + std::cout << " Files count: " << arc.filesCount() << '\n'; + std::cout << " Size: " << arc.size() <<'\n'; + std::cout << " Packed size: " << arc.packSize() << "\n\n"; + + // Printing the metadata of the archived items + std::cout << "Archived items"; + for ( const auto& item : arc ) { + std::cout << '\n'; + std::cout << " Item index: " << item.index() << '\n'; + std::cout << " Name: " << item.name() << '\n'; + std::cout << " Extension: " << item.extension() << '\n'; + std::cout << " Path: " << item.path() << '\n'; + std::cout << " IsDir: " << item.isDir() << '\n'; + std::cout << " Size: " << item.size() << '\n'; + std::cout << " Packed size: " << item.packSize() << '\n'; + std::cout << " CRC: " << std::hex << item.crc() << std::dec << '\n'; + } + std::cout.flush(); +} catch ( const bit7z::BitException& ex ) { /* Do something with ex.what()...*/ } +``` + +A complete _**API reference**_ is available in the [wiki](https://github.com/rikyoz/bit7z/wiki/) section. + +### 🚀 Upgrading from bit7z v3 to v4 + +The newest bit7z v4 introduced some significant breaking changes to the library's API. + +
+ Expand for more details! + ++ By default, the project now follows the [UTF-8 Everywhere Manifesto](http://utf8everywhere.org/): + + The default string type is `std::string` (instead of `std::wstring`), so users can use the library in cross-platform projects more easily (v4 introduced Linux/macOS support too). + + Input `std::string`s will be considered as UTF-8 encoded. + + You can still achieve the old behavior on Windows using the `-DBIT7Z_USE_NATIVE_STRING` CMake option. ++ The old `BitExtractor` class is now called `BitFileExtractor`. + + Now `BitExtractor` is just the name of a template class for all the extraction classes. ++ The old `BitCompressor` class is now called `BitFileCompressor`. + + Now `BitCompressor` is just the name of a template class for all the compression classes. ++ The `ProgressCallback` now must return a `bool` value indicating whether the current operation can continue (`true`) or not (`false`). ++ The project structure changed: + + Public API headers moved from `include/` to the `include/bit7z/` folder, so `#include` directives now need to prepend `bit7z/` to the included header name (e.g., `#include `). + + Even though it is a bit verbose, it is a typical structure for C and C++ libraries, and it makes explicit which third-party library a header file belongs to. + + By default, the output folder of bit7z is now `lib//`; if the CMake generator is multi-config (e.g., Visual Studio generators), the default output folder is `lib///`. + + Optionally, you can force using the "Visual Studio style" output path by enabling the `BIT7Z_VS_LIBNAME_OUTDIR_STYLE` CMake option. + + Third-party dependencies are no longer handled using git submodules but are automatically downloaded using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) when configuring/using the library via CMake. + +
+ +## 💾 Download + +
+GitHub Latest Release +
+ +GitHub All Releases +
+ +Each released package contains: + ++ A _pre-compiled version_ of bit7z (both in _debug_ and _release_ mode); ++ The _public API headers_ needed to use the library in your program; + +Packages are available for both _x86_ and _x64_ architectures. + +You can also clone/download this repository and build the library yourself (please, read the [wiki](https://github.com/rikyoz/bit7z/wiki/Building-the-library)). + +## 🧰 Requirements + ++ **Operating System:** Windows, Linux, macOS, Android[^1]. ++ **Architecture:** x86, x86_64, arm, arm64. ++ **Language Standard:** C++11 (for using the library), C++14 (for building the library). ++ **Compiler:** MSVC 2015 or later[^2], MinGW v6.4 or later, GCC v4.9 or later, Clang 3.6 or later. ++ **Shared Library:** a 7-zip `.dll` library on Windows, a 7-zip/p7zip `.so` library on Unix[^3]. + +[^1]: On Windows, you should link your program _also_ with _oleaut32_ (e.g., `-lbit7z -loleaut32`).
On Linux and macOS, you should link your program _also_ with _dl_ (e.g., `-lbit7z -ldl`).
If you are using the library via CMake, these dependencies will be linked automatically to your project. + +[^2]: MSVC 2010 was supported until v2.x, MSVC 2012/2013 until v3.x. + +[^3]: bit7z doesn't ship with the 7-zip shared libraries. You can build them from the source code available at [7-zip.org](http://www.7-zip.org/). + +## ⚙️ Building and Using bit7z + +For building the library: + +```bash +cd +mkdir build && cd build +cmake ../ -DCMAKE_BUILD_TYPE=Release +cmake --build . -j --config Release +``` + +A more detailed guide on how to build this library is available [here](https://github.com/rikyoz/bit7z/wiki/Building-the-library). + +You can also directly integrate the library into your project via CMake: + ++ Download bit7z and copy it into a sub-directory of your project (e.g., `third_party`), or add it as a git submodule of your repository. ++ Then, use the command `add_subdirectory()` in your `CMakeLists.txt` to include bit7z. ++ Finally, link the `bit7z` library using the `target_link_libraries()` command. + +For example: + +```cmake +add_subdirectory( ${CMAKE_SOURCE_DIR}/third_party/bit7z ) +target_link_libraries( ${YOUR_TARGET} PRIVATE bit7z ) +``` + +The library is highly customizable: for a detailed list of the available build options, please refer to the [wiki](https://github.com/rikyoz/bit7z/wiki/Building-the-library). + +### 📑 7-zip Version + +While configuring bit7z via CMake, it automatically downloads the latest version of 7-zip currently supported by the library. + +Optionally, you can specify a different version of 7-zip via the CMake option `BIT7Z_7ZIP_VERSION` (e.g., `-DBIT7Z_7ZIP_VERSION="22.01"`). + +Alternatively, you can specify a custom path containing the 7-zip source code via the option `BIT7Z_CUSTOM_7ZIP_PATH`. + +Please note that, in general, it is best to use the same version of 7-zip of the shared libraries that you will use at runtime. + +#### Using 7-zip v23.01 on Linux and macOS + +
+ Expand for more details! + +_On Linux and macOS_, 7-zip v23.01 introduced breaking changes to the IUnknown interface. If you build bit7z for such a version of 7-zip (the default), it will not support using the shared libraries from previous versions of 7-zip (or from p7zip). Conversely, bit7z made for earlier versions of 7-zip or for p7zip is incompatible with the shared libraries from 7-zip v23.01 and later. + +You can build the shared libraries of 7-zip v23.01 in a backward-compatible mode by defining the macro `Z7_USE_VIRTUAL_DESTRUCTOR_IN_IUNKNOWN`. If this is your case, you can build bit7z for v23.01 using the option `BIT7Z_USE_LEGACY_IUNKNOWN` (in this case, bit7z will be compatible also with previous versions of 7-zip/p7zip). + +
+ +### 🌐 String Encoding + +By default, bit7z follows the [UTF-8 Everywhere Manifesto](http://utf8everywhere.org/) to simplify the use of the library within cross-platform projects. +In short, this means that: + ++ The default path string type is `std::string`. ++ Input `std::string`s are considered as UTF-8 encoded; output `std::string`s are UTF-8 encoded. + +
+ Expand for more details and for other string encoding options! + +On POSIX systems, `std::string`s are usually already UTF-8 encoded, and no configuration is needed. + +The situation is a bit more complex on Windows since, by default, Windows treats `std::string`s as encoded using the system code page, which may not necessarily be UTF-8, like, for example, [Windows-1252](https://en.wikipedia.org/wiki/Windows-1252). + +If your program deals exclusively with ASCII-only strings, you should be fine with the default bit7z settings (as ASCII characters are also UTF-8). + +However, if you need to handle non-ASCII/Unicode characters, as it is likely, you have the following options: + ++ Enforcing using the UTF-8 code page for your whole application, as explained by Microsoft [here](https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page): + + _**Recommended**_, but supported only since Windows 10 1903 and later. ++ Manually ensuring the encoding of the `std::string`s passed to bit7z: + + You can use some string encoding library or C++11's UTF-8 string literals for input strings. + + User-input strings (e.g., the password of an archive) can be handled as explained [here](https://nullprogram.com/blog/2020/05/04/); in short: read the input as an UTF-16 wide string (e.g., via `ReadConsoleW`), and convert it to UTF-8 (bit7z provides a utility function for this, `bit7z::to_tstring`). + + You can correctly print the UTF-8 output strings from bit7z (e.g., the path/name metadata of a file in an archive) to the console by calling [`SetConsoleOutputCP(CP_UTF8)`](https://learn.microsoft.com/en-us/windows/console/setconsoleoutputcp) before. ++ Configuring bit7z to use UTF-16 encoded wide strings (i.e., `std::wstring`) by enabling the `BIT7Z_USE_NATIVE_STRING` option via CMake. + + If your program is Windows-only, or you already use wide strings on Windows, this might be the best choice since it will avoid any internal string conversions (7-zip always uses wide strings). + + This option makes developing cross-platform applications slightly inconvenient since you'll still have to use `std::string` on POSIX systems. + + The library provides a type alias `bit7z::tstring` and a macro function `BIT7Z_STRING` for defining wide string variables and literals on Windows and narrow ones on other platforms. + + You must programmatically set the standard input and output encoding to UTF-16 to correctly read and print Unicode characters: + + ```cpp + #include //for _O_U16TEXT + #include //for _setmode + + _setmode(_fileno(stdout), _O_U16TEXT); // setting the stdout encoding to UTF16 + _setmode(_fileno(stdin), _O_U16TEXT); // setting the stdin encoding to UTF16 + ``` + ++ Configuring bit7z to use the system code page encoding for `std::string` by enabling the `BIT7Z_USE_SYSTEM_CODEPAGE` option via CMake. + + _Not recommended_: using this option, your program will be limited in the set of characters it can pass to and read from bit7z. + +
+ +## ☕️ Donate + +If you have found this project helpful, please consider supporting me with a small donation so that I can keep improving it! +Thank you! :pray: + +
+Sponsor me on GitHubBuy Me a Coffee at ko-fi.comDonations +
+ +## 📜 License + +This project is licensed under the terms of the [Mozilla Public License v2.0](https://www.mozilla.org/en-US/MPL/2.0/).
+For more details, please check: + ++ The [LICENSE](./LICENSE) file. ++ [Mozilla's MPL-2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) + +Older versions (v3.x and earlier) of bit7z were released under the [GNU General Public License v2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html). + +
+
+Copyright © 2014 - 2023 Riccardo Ostani (@rikyoz) +
+
diff --git a/src/bit7z/appveyor.yml b/src/bit7z/appveyor.yml new file mode 100755 index 00000000..6df6cfcb --- /dev/null +++ b/src/bit7z/appveyor.yml @@ -0,0 +1,207 @@ +skip_non_tags: true +clone_depth: 1 + +image: + - Visual Studio 2015 + - Visual Studio 2017 + - Visual Studio 2019 + - Visual Studio 2022 + - Ubuntu + +environment: + bit7z_version: $(APPVEYOR_REPO_TAG_NAME) + APPVEYOR_YML_DISABLE_PS_LINUX: true + + matrix: + - compiler: msvc + arch: x86 + flags: -DBIT7Z_STATIC_RUNTIME=OFF -DBIT7Z_VS_LIBNAME_OUTDIR_STYLE=ON + + - compiler: msvc + arch: x64 + flags: -DBIT7Z_STATIC_RUNTIME=OFF -DBIT7Z_VS_LIBNAME_OUTDIR_STYLE=ON + + - compiler: msvc_mt + arch: x86 + flags: -DBIT7Z_STATIC_RUNTIME=ON -DBIT7Z_VS_LIBNAME_OUTDIR_STYLE=ON + + - compiler: msvc_mt + arch: x64 + flags: -DBIT7Z_STATIC_RUNTIME=ON -DBIT7Z_VS_LIBNAME_OUTDIR_STYLE=ON + + - compiler: mingw + arch: x86 + flags: + PATH: C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;$(PATH) + + - compiler: mingw + arch: x64 + flags: + PATH: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;$(PATH) + + - compiler: gcc + arch: x86 + flags: -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 + CC: /usr/bin/gcc-9 + CXX: /usr/bin/g++-9 + + - compiler: gcc + arch: x64 + CC: /usr/bin/gcc-9 + CXX: /usr/bin/g++-9 + + - compiler: clang + arch: x86 + flags: -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 + CC: /usr/bin/clang + CXX: /usr/bin/clang++ + + - compiler: clang + arch: x64 + CC: /usr/bin/clang + CXX: /usr/bin/clang++ + +matrix: + exclude: + # Excluding GCC and Clang on Windows images, and MSVC on Ubuntu image. + # Also, we compile MinGW binaries only on Visual Studio 2022 image. + - image: Visual Studio 2015 + compiler: mingw + - image: Visual Studio 2015 + compiler: gcc + - image: Visual Studio 2015 + compiler: clang + - image: Visual Studio 2017 + compiler: mingw + - image: Visual Studio 2017 + compiler: gcc + - image: Visual Studio 2017 + compiler: clang + - image: Visual Studio 2019 + compiler: mingw + - image: Visual Studio 2019 + compiler: gcc + - image: Visual Studio 2019 + compiler: clang + - image: Visual Studio 2022 + compiler: gcc + - image: Visual Studio 2022 + compiler: clang + - image: Ubuntu + compiler: msvc + - image: Ubuntu + compiler: msvc_mt + - image: Ubuntu + compiler: mingw + +for: +- + matrix: + only: + - image: Ubuntu + + init: |- + if [ "${compiler}" = "gcc" ]; + then + compiler_tag=gcc$(${CXX} --version | grep ^g++ | sed 's/^.* //g')_${arch} + else + compiler_tag=clang$(${CXX} --version | head -n 1 | sed -e 's/.* version \([0-9.]*\).*/\1/')_${arch} + fi + if [ "${arch}" = "x86" ]; + then + sudo apt-get update; + sudo apt-get install -y g++-9-multilib; + fi + + before_build: + - git submodule update --init --recursive + - mkdir build + - cd build + + build_script: + - cmake .. -G "Ninja" $flags -DCMAKE_BUILD_TYPE=Release + - cmake --build . -j --config Release + - cmake .. -G "Ninja" $flags -DCMAKE_BUILD_TYPE=Debug + - cmake --build . -j --config Debug + + after_build: + - cd .. + - mkdir -p pkg/bit7z/ + - mkdir -p pkg/bit7z/include/ + - cp -r lib pkg/bit7z + - cp -r include pkg/bit7z/include/ + - cp README.md pkg/bit7z/ + - cp LICENSE pkg/bit7z/ + - echo $bit7z_version $compiler_tag > "pkg/bit7z/BUILD.txt" + - cd pkg + - 7z a -t7z bit7z-$bit7z_version-$compiler_tag.7z * + +- + matrix: + only: + - image: Visual Studio 2015 + - image: Visual Studio 2017 + - image: Visual Studio 2019 + - image: Visual Studio 2022 + + init: + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2022" if NOT "%compiler%"=="mingw" ( + call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch:x86=amd64_x86% + ) + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch:x86=amd64_x86% + ) + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %arch:x86=amd64_x86% + ) + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" if NOT "%compiler%"=="mingw" ( + call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch:x86=amd64_x86% + ) + - if "%compiler%"=="mingw" ( + for /f %%i in ('g++ -dumpversion') do set "compiler_tag=mingw%%i_%arch%" + ) else ( + set "compiler_tag=%APPVEYOR_BUILD_WORKER_IMAGE:Visual Studio =msvc%%compiler:msvc=%_%arch%" + ) + + before_build: + - git submodule update --init --recursive + - mkdir build + - cd build + + build_script: + - cmake .. -G "Ninja" %flags% -DCMAKE_BUILD_TYPE=Release + - cmake --build . -j --config Release + - cmake .. -G "Ninja" %flags% -DCMAKE_BUILD_TYPE=Debug + - cmake --build . -j --config Debug + + after_build: + - cd .. + - mkdir "pkg/bit7z/lib/" + - mkdir "pkg/bit7z/include/bit7z/" + - ps: Copy-Item -Path lib\* -Destination pkg\bit7z\lib\ -Recurse + - copy include\bit7z\bit*.hpp pkg\bit7z\include\bit7z\ + - copy README.md pkg\bit7z\ + - copy LICENSE pkg\bit7z\ + - echo %bit7z_version% %compiler_tag% > "pkg/bit7z/BUILD.txt" + - cd pkg + - 7z a "bit7z-%bit7z_version%-%compiler_tag%.7z" * + +artifacts: + - path: pkg\*.7z + name: binary + +test: off + +deploy: + provider: GitHub + release: Bit7z $(APPVEYOR_REPO_TAG_NAME) + tag: $(APPVEYOR_REPO_TAG_NAME) + description: 'Binaries of Bit7z %bit7z_version%' + auth_token: + secure: 5b0wRmYrS2S5MEu+5rslOkBY//wJ+ShwhxNeOhxaAaMjTYRbSDqe4cme0CukKSgp + artifact: /.*\.7z/ + draft: true + prerelease: false + on: + # branch: master + APPVEYOR_REPO_TAG: true diff --git a/src/bit7z/cmake/BuildOptions.cmake b/src/bit7z/cmake/BuildOptions.cmake new file mode 100755 index 00000000..6a12febc --- /dev/null +++ b/src/bit7z/cmake/BuildOptions.cmake @@ -0,0 +1,115 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +# bit7z build options + +option( BIT7Z_AUTO_FORMAT "Enable or disable auto format detection" ) +message( STATUS "Auto format detection: ${BIT7Z_AUTO_FORMAT}" ) +if( BIT7Z_AUTO_FORMAT ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_AUTO_FORMAT ) +endif() + +option( BIT7Z_REGEX_MATCHING "Enable or disable regex matching of archived files" ) +message( STATUS "Regex matching extraction: ${BIT7Z_REGEX_MATCHING}" ) +if( BIT7Z_REGEX_MATCHING ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_REGEX_MATCHING ) +endif() + +option( BIT7Z_USE_STD_BYTE "Enable or disable using type safe byte type (like std::byte) for buffers" ) +message( STATUS "Use std::byte: ${BIT7Z_USE_STD_BYTE}" ) +if( BIT7Z_USE_STD_BYTE ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_USE_STD_BYTE ) +endif() + +option( BIT7Z_USE_NATIVE_STRING "Enable or disable using the OS native string type + (e.g., std::wstring on Windows, std::string elsewhere)" ) +message( STATUS "Use native string: ${BIT7Z_USE_NATIVE_STRING}" ) +if( BIT7Z_USE_NATIVE_STRING ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_USE_NATIVE_STRING ) +endif() + +option( BIT7Z_GENERATE_PIC "Enable or disable generating Position Independent Code" ) +message( STATUS "Generate Position Independent Code: ${BIT7Z_GENERATE_PIC}" ) +if( BIT7Z_GENERATE_PIC ) + set_property( TARGET ${TARGET_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON ) +endif() + +option( BIT7Z_DISABLE_ZIP_ASCII_PWD_CHECK "Disable checking if password is ASCII when compressing using Zip format" ) +message( STATUS "Disable Zip ASCII password check: ${BIT7Z_DISABLE_ZIP_ASCII_PWD_CHECK}" ) +if( BIT7Z_DISABLE_ZIP_ASCII_PWD_CHECK ) + target_compile_definitions( ${LIB_TARGET} PRIVATE BIT7Z_DISABLE_ZIP_ASCII_PWD_CHECK ) +endif() + +option( BIT7Z_DISABLE_USE_STD_FILESYSTEM "Disable using the standard filesystem library (always use ghc::filesystem)" ) +message( STATUS "Disable using std::filesystem: ${BIT7Z_DISABLE_USE_STD_FILESYSTEM}" ) +if( BIT7Z_DISABLE_USE_STD_FILESYSTEM ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_DISABLE_USE_STD_FILESYSTEM ) +endif() + +set( BIT7Z_CUSTOM_7ZIP_PATH "" CACHE STRING "A custom path to the 7-zip source code" ) +if( NOT BIT7Z_CUSTOM_7ZIP_PATH STREQUAL "" ) + if( NOT EXISTS ${BIT7Z_CUSTOM_7ZIP_PATH}/CPP AND NOT EXISTS ${BIT7Z_CUSTOM_7ZIP_PATH}/DOC/readme.txt ) + message( FATAL_ERROR "Invalid or not existing custom path to 7-zip" ) + else() + message( STATUS "7-zip custom path: ${BIT7Z_CUSTOM_7ZIP_PATH}" ) + add_library( 7-zip INTERFACE IMPORTED ) + target_include_directories( 7-zip INTERFACE "${BIT7Z_CUSTOM_7ZIP_PATH}/CPP/" ) + + file( READ ${BIT7Z_CUSTOM_7ZIP_PATH}/DOC/readme.txt 7ZIP_README ) + if ( "${7ZIP_README}" MATCHES "^7-Zip ([0-9.]+)" ) + set( BIT7Z_7ZIP_VERSION "${CMAKE_MATCH_1}" ) + message( STATUS "Detected 7-zip version: ${BIT7Z_7ZIP_VERSION}" ) + endif() + endif() +else() + set( BIT7Z_7ZIP_VERSION "23.01" CACHE STRING "The version of 7-zip to be used by bit7z" ) + message( STATUS "7-zip version: ${BIT7Z_7ZIP_VERSION}" ) +endif() + +option( BIT7Z_BUILD_TESTS "Enable or disable building the testing executable" ) +message( STATUS "Build tests: ${BIT7Z_BUILD_TESTS}" ) + +option( BIT7Z_BUILD_DOCS "Enable or disable building the documentation" ) +message( STATUS "Build docs: ${BIT7Z_BUILD_DOCS}" ) + +if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) + option( BIT7Z_LINK_LIBCPP "Enable or disable linking to libc++" ) + message( STATUS "Link to libc++: ${BIT7Z_LINK_LIBCPP}" ) + if( BIT7Z_LINK_LIBCPP ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" ) + set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi" ) + endif() +endif() + +if( WIN32 ) + option( BIT7Z_AUTO_PREFIX_LONG_PATHS "Enable or disable automatically prepend paths with Windows long path prefix" ) + message( STATUS "Auto prefix long paths: ${BIT7Z_AUTO_PREFIX_LONG_PATHS}" ) + if( BIT7Z_AUTO_PREFIX_LONG_PATHS ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_AUTO_PREFIX_LONG_PATHS ) + endif() + + option( BIT7Z_USE_SYSTEM_CODEPAGE "Enable or disable using the default Windows codepage for string conversions" ) + message( STATUS "Use the default codepage: ${BIT7Z_USE_SYSTEM_CODEPAGE}") + if( BIT7Z_USE_SYSTEM_CODEPAGE ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_USE_SYSTEM_CODEPAGE ) + endif() + + option( BIT7Z_PATH_SANITIZATION "Enable or disable path sanitization when extracting archives \ +containing files with invalid Windows names" ) + message( STATUS "Path sanitization: ${BIT7Z_PATH_SANITIZATION}" ) + if( BIT7Z_PATH_SANITIZATION ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_PATH_SANITIZATION ) + endif() +else() + if( BIT7Z_7ZIP_VERSION VERSION_LESS "23.01" ) + set( BIT7Z_USE_LEGACY_IUNKNOWN ON ) + else() + option( BIT7Z_USE_LEGACY_IUNKNOWN "Enable or disable building using the legacy version of IUnknown" ) + endif() + + message( STATUS "Use legacy IUnknown: ${BIT7Z_USE_LEGACY_IUNKNOWN}" ) + if( BIT7Z_USE_LEGACY_IUNKNOWN ) + target_compile_definitions( ${LIB_TARGET} PUBLIC BIT7Z_USE_LEGACY_IUNKNOWN ) + endif() +endif() \ No newline at end of file diff --git a/src/bit7z/cmake/CompilerOptions.cmake b/src/bit7z/cmake/CompilerOptions.cmake new file mode 100755 index 00000000..1cdb84fd --- /dev/null +++ b/src/bit7z/cmake/CompilerOptions.cmake @@ -0,0 +1,129 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +# compiler-specific options + +if( MSVC ) + # setting a pdb file name for debug builds (otherwise it is not generated!) + set_target_properties( ${LIB_TARGET} PROPERTIES COMPILE_PDB_NAME_DEBUG ${LIB_TARGET}${CMAKE_DEBUG_POSTFIX} ) + + # release builds should be optimized (e.g., for size) + target_compile_options( ${LIB_TARGET} PRIVATE "$<$,$>:/Os>" ) + target_compile_options( ${LIB_TARGET} PRIVATE "$<$,$>:/Oi>" ) + target_compile_options( ${LIB_TARGET} PRIVATE "$<$,$>:/GS>" ) + target_compile_options( ${LIB_TARGET} PRIVATE "$<$,$>:/Gy>" ) + + option( BIT7Z_ANALYZE_CODE "Enable or disable code analysis" ) + message( STATUS "Code analysis: ${BIT7Z_ANALYZE_CODE}" ) + if( BIT7Z_ANALYZE_CODE ) + target_compile_options( ${LIB_TARGET} PRIVATE "$<$,$>:/analyze>" ) + endif() + + target_compile_options( ${LIB_TARGET} PRIVATE /EHsc ) + + # remove CMake default warning level + string( REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" ) + string( REGEX REPLACE "/GR" "/GR-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" ) + + # warning flags (as suggested in https://lefticus.gitbooks.io/cpp-best-practices/) + target_compile_options( ${LIB_TARGET} PRIVATE /W4 /w14640 /w14242 /w14254 /w14263 /w14265 /w14287 /we4289 /w14296 + /w14311 /w14545 /w14546 /w14547 /w14549 /w14555 /w14619 /w14640 /w14826 /w14905 /w14906 + /w14928 ) + + # C++ standard conformance options of MSVC + target_compile_options( ${LIB_TARGET} PRIVATE /fp:precise /Zc:wchar_t /Zc:rvalueCast /Zc:inline + /Zc:forScope /Zc:strictStrings /Zc:throwingNew /Zc:referenceBinding ) + + if( CMAKE_GENERATOR MATCHES "Visual Studio" ) + target_compile_options( ${LIB_TARGET} PRIVATE /MP$ENV{NUMBER_OF_PROCESSORS} ) + endif() + + # linker flags + set( CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /nologo" ) + + # options only for specific MSVC versions + if( MSVC_VERSION GREATER_EQUAL 1914 ) # MSVC >= 15.7 (VS 2017) + target_compile_options( ${LIB_TARGET} PRIVATE /Zc:__cplusplus ) + endif() + if( MSVC_VERSION GREATER_EQUAL 1910 ) # MSVC >= 15.0 (VS 2017) + # treating warnings as errors + target_compile_options( ${LIB_TARGET} PRIVATE /WX ) + else() # MSVC < 15.0 (i.e., <= VS 2015) + # ignoring C4127 warning + target_compile_options( ${LIB_TARGET} PRIVATE /wd4127 ) + endif() + + # static runtime option + option( BIT7Z_STATIC_RUNTIME "Enable or disable using /MT MSVC flag" ) + message( STATUS "Static runtime: ${BIT7Z_STATIC_RUNTIME}" ) + if( BIT7Z_STATIC_RUNTIME ) + set( CompilerFlags + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_RELEASE + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_RELEASE ) + foreach( CompilerFlag ${CompilerFlags} ) + string( REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}" ) + set( ${CompilerFlag} "${${CompilerFlag}}" CACHE STRING "msvc compiler flags" FORCE ) + message( STATUS "MSVC flags: ${CompilerFlag}:${${CompilerFlag}}" ) + endforeach() + endif() +else() + target_compile_options( ${LIB_TARGET} PRIVATE -Wall -Wextra -Werror -Wconversion -Wsign-conversion ) +endif() + +# Extra warning flags for Clang +if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) + if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.6 ) + target_compile_options( ${LIB_TARGET} PRIVATE -Wno-inconsistent-missing-override ) + endif() + if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.8 ) + target_compile_options( ${LIB_TARGET} PRIVATE -Wdouble-promotion ) + endif() + if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0 ) + target_compile_options( ${LIB_TARGET} PRIVATE -Wno-missing-braces -Wmissing-field-initializers ) + endif() +endif() + +if( APPLE ) + set( CMAKE_CXX_ARCHIVE_CREATE " Scr " ) + set( CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c " ) +endif() + +# Extra warning flags for GCC +if( CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) + target_compile_options( ${LIB_TARGET} PRIVATE -Wshadow -Wcast-align -Wunused + -Woverloaded-virtual -Wformat=2 -Wdouble-promotion -Wlogical-op ) + if( NOT MINGW AND BIT7Z_USE_VIRTUAL_DESTRUCTOR_IN_IUNKNOWN ) + target_compile_options( ${LIB_TARGET} PRIVATE -Wnon-virtual-dtor ) + endif() + if( MINGW ) + # Some versions of MinGW might complain that the library is too big when linking to it. + # Using -Wa,-mbig-obj fixes the linking error. + # (https://digitalkarabela.com/mingw-w64-how-to-fix-file-too-big-too-many-sections/). + target_compile_options( ${LIB_TARGET} PUBLIC -Wa,-mbig-obj ) + target_compile_options( ${LIB_TARGET} PRIVATE -Wno-error=non-virtual-dtor ) + if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0 ) + target_compile_options( ${LIB_TARGET} PRIVATE -Wno-cast-function-type ) + endif() + endif() + if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 ) + target_compile_options( ${LIB_TARGET} PRIVATE + -Wno-missing-field-initializers + -Wno-shadow + -Wno-unused-parameter ) + endif() + if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0 ) + target_compile_options( ${LIB_TARGET} PRIVATE + # GCC 6.0+ complains on 7-zip macros using misleading indentation, + # disabling the warning to make it compile. + -Wno-misleading-indentation + # Extra warning flags for GCC 6.0+ + -Wduplicated-cond -Wnull-dereference ) + endif() + if( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0 ) + # Extra warning flags for GCC 7.0+ + target_compile_options( ${LIB_TARGET} PRIVATE -Wduplicated-branches -Wrestrict ) + endif() +endif() \ No newline at end of file diff --git a/src/bit7z/cmake/Dependencies.cmake b/src/bit7z/cmake/Dependencies.cmake new file mode 100755 index 00000000..7fd8b764 --- /dev/null +++ b/src/bit7z/cmake/Dependencies.cmake @@ -0,0 +1,40 @@ +# Downloading the CPM.cmake package manager +set( CPM_DOWNLOAD_VERSION 0.38.6 ) +set( CPM_DOWNLOAD_HASH 11c3fa5f1ba14f15d31c2fb63dbc8628ee133d81c8d764caad9a8db9e0bacb07 ) +set( CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake" ) +if( NOT ( EXISTS ${CPM_DOWNLOAD_LOCATION} ) ) + message( STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}" ) + file( DOWNLOAD + https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake + ${CPM_DOWNLOAD_LOCATION} + SHOW_PROGRESS + EXPECTED_HASH SHA256=${CPM_DOWNLOAD_HASH} + ) +endif() +include( ${CPM_DOWNLOAD_LOCATION} ) + +if( BIT7Z_CUSTOM_7ZIP_PATH STREQUAL "" ) + # 7-zip source code + CPMAddPackage( NAME 7-zip + GITHUB_REPOSITORY "rikyoz/7-Zip" + VERSION ${BIT7Z_7ZIP_VERSION} + DOWNLOAD_ONLY YES ) + if( 7-zip_ADDED ) + message( STATUS "7-zip source code available at ${7-zip_SOURCE_DIR}" ) + add_library( 7-zip INTERFACE IMPORTED ) + target_include_directories( 7-zip INTERFACE "${7-zip_SOURCE_DIR}/CPP/" ) + endif() +endif() + +# ghc::filesystem library +if( NOT USE_STANDARD_FILESYSTEM OR NOT STANDARD_FILESYSTEM_COMPILES OR BIT7Z_BUILD_TESTS ) + CPMAddPackage( NAME ghc_filesystem + GITHUB_REPOSITORY rikyoz/filesystem + GIT_TAG c0dcd0b090da7dffc74b124a6f164f54dbbb5ccb + DOWNLOAD_ONLY YES ) + if( ghc_filesystem_ADDED ) + message( STATUS "ghc::filesystem source code available at ${ghc_filesystem_SOURCE_DIR}" ) + add_library( ghc_filesystem INTERFACE IMPORTED ) + target_include_directories( ghc_filesystem SYSTEM INTERFACE ${ghc_filesystem_SOURCE_DIR}/include ) + endif() +endif() diff --git a/src/bit7z/cmake/FilesystemDetect.cmake b/src/bit7z/cmake/FilesystemDetect.cmake new file mode 100755 index 00000000..409c0709 --- /dev/null +++ b/src/bit7z/cmake/FilesystemDetect.cmake @@ -0,0 +1,39 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +# checking if compiler supports the standard filesystem library + +if( MINGW OR BIT7Z_DISABLE_USE_STD_FILESYSTEM ) + # Some versions of MinGW have a buggy std::filesystem that doesn't correctly handle paths with unicode characters, + # so we are always using the ghc::filesystem library. + set( USE_STANDARD_FILESYSTEM OFF ) +else() + set( CMAKE_CXX_STANDARD 17 ) + include( CheckIncludeFileCXX ) + check_include_file_cxx( "filesystem" USE_STANDARD_FILESYSTEM ) +endif() + +if( USE_STANDARD_FILESYSTEM ) + include( CheckCXXSourceCompiles ) + string( CONFIGURE [[ + #include + #include + + int main() { + auto cwd = std::filesystem::current_path(); + printf("%s", cwd.c_str()); + return EXIT_SUCCESS; + } + ]] code @ONLY ) + check_cxx_source_compiles( "${code}" STANDARD_FILESYSTEM_COMPILES ) +endif() + +if( NOT USE_STANDARD_FILESYSTEM OR NOT STANDARD_FILESYSTEM_COMPILES ) + # if standard filesystem lib is not supported, revert to C++14 standard and use the ghc::filesystem library + set( CMAKE_CXX_STANDARD 14 ) + message( STATUS "Standard filesystem: NO (using ghc::filesystem)" ) +else() + message( STATUS "Standard filesystem: YES" ) +endif() +set( CMAKE_CXX_STANDARD_REQUIRED ON ) \ No newline at end of file diff --git a/src/bit7z/cmake/OutputOptions.cmake b/src/bit7z/cmake/OutputOptions.cmake new file mode 100755 index 00000000..8b4b741c --- /dev/null +++ b/src/bit7z/cmake/OutputOptions.cmake @@ -0,0 +1,53 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +if( CMAKE_CONFIGURATION_TYPES ) # enable only debug/release configurations for generated VS project file + set( CMAKE_CONFIGURATION_TYPES Debug Release ) + set( CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING + "Reset the configurations to what we need" FORCE ) +endif() + +if( NOT CMAKE_BUILD_TYPE ) # by default, use release build + set( CMAKE_BUILD_TYPE "Release" ) +endif() + +option( BIT7Z_VS_LIBNAME_OUTDIR_STYLE + "Force using Visual Studio output library name and directory structure convention" ) + +get_property( BIT7Z_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG ) + +include( cmake/TargetArchDetect.cmake ) + +# architecture-specific options +if( BIT7Z_TARGET_ARCH_IS_64_BIT ) + if( WIN32 ) + add_definitions( -DWIN64 ) + endif() + if( NOT BIT7Z_GENERATOR_IS_MULTI_CONFIG AND NOT BIT7Z_VS_LIBNAME_OUTDIR_STYLE ) + set( ARCH_POSTFIX 64 ) + endif() +endif() + +# Note: 7-zip supports only x86, x64, arm, and arm64 +set( ARCH_DIR ${BIT7Z_TARGET_ARCH_NAME} ) + +if( NOT BIT7Z_GENERATOR_IS_MULTI_CONFIG AND BIT7Z_VS_LIBNAME_OUTDIR_STYLE ) + # forcing output directory to ${BIT7Z_DIR}/lib/${ARCH_DIR}/${CMAKE_BUILD_TYPE} (e.g. ./lib/x64/Release) + set( LIB_OUTPUT_DIR lib/${ARCH_DIR}/${CMAKE_BUILD_TYPE}/ ) + set( BIN_OUTPUT_DIR bin/${ARCH_DIR}/${CMAKE_BUILD_TYPE}/ ) +else() + # forcing output directory to ${BIT7Z_DIR}/lib/${ARCH_DIR}/ (e.g. ./lib/x64/) + # Note: Visual Studio will append ${CMAKE_BUILD_TYPE} to ${OUTPUT_DIR}. + set( LIB_OUTPUT_DIR lib/${ARCH_DIR}/ ) + set( BIN_OUTPUT_DIR bin/${ARCH_DIR}/ ) +endif() + +# Note: not applied in generated Visual Studio project files (e.g., .vcxproj) +set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/${LIB_OUTPUT_DIR}" ) +set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/${LIB_OUTPUT_DIR}" ) +set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/${BIN_OUTPUT_DIR}" ) + +if( NOT BIT7Z_GENERATOR_IS_MULTI_CONFIG AND NOT BIT7Z_VS_LIBNAME_OUTDIR_STYLE ) + set( CMAKE_DEBUG_POSTFIX "_d" ) # debug library file name should end with "_d" (e.g. bit7z_d.lib) +endif() \ No newline at end of file diff --git a/src/bit7z/cmake/Sanitizers.cmake b/src/bit7z/cmake/Sanitizers.cmake new file mode 100755 index 00000000..7e3c1feb --- /dev/null +++ b/src/bit7z/cmake/Sanitizers.cmake @@ -0,0 +1,54 @@ +macro( add_sanitizer name ) + set( CMAKE_REQUIRED_FLAGS "-fsanitize=${name}" ) + check_cxx_compiler_flag( -fsanitize=${name} COMPILER_SUPPORTS_SANITIZE_${name} ) + if( COMPILER_SUPPORTS_SANITIZE_${name} ) + message( STATUS "Supported sanitizer: ${name}" ) + set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=${name}" ) + else() + message( STATUS "Unsupported sanitizer: ${name}" ) + endif() + unset( CMAKE_REQUIRED_FLAGS ) +endmacro() + +option( BIT7Z_ENABLE_SANITIZERS "Enable or disable compiling with sanitizers" ) +message( STATUS "Enable sanitizers: ${BIT7Z_ENABLE_SANITIZERS}" ) +if ( BIT7Z_ENABLE_SANITIZERS ) + if( MSVC ) + set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /RTCsu /analyze /guard:cf" ) + elseif( NOT WIN32 ) # GCC/Clang on Linux/macOS (i.e., not MinGW) + set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer" ) + + if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "6.0.0" ) + set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -static-libsan" ) + endif() + + # Use the highest stack protection level supported by the target toolchain. + include( CheckCXXCompilerFlag ) + check_cxx_compiler_flag( -fstack-protector-strong COMPILER_SUPPORT_STRONG_STACK_PROTECTOR ) + check_cxx_compiler_flag( -fstack-protector COMPILER_SUPPORT_STACK_PROTECTOR ) + if( COMPILER_SUPPORT_STRONG_STACK_PROTECTOR ) + set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-strong" ) + elseif( COMPILER_SUPPORT_STACK_PROTECTOR ) + set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector" ) + endif() + + # For some reasons, the address sanitizer gives a CHECK failed error on versions of Clang before the 3.9 + # Also, on old versions of GCC the sanitizer give some false positives. + if( ( NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "5.0" ) OR + ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "3.9.0" ) ) + add_sanitizer( address ) + check_cxx_compiler_flag( -fsanitize-address-use-after-scope COMPILER_SUPPORT_SANITIZE_USE_AFTER_SCOPE ) + if( COMPILER_SUPPORT_SANITIZE_USE_AFTER_SCOPE ) + set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize-address-use-after-scope" ) + endif() + endif() + + add_sanitizer( float-divide-by-zero ) + add_sanitizer( implicit-conversion ) + add_sanitizer( integer ) + add_sanitizer( leak ) + add_sanitizer( local-bounds ) + add_sanitizer( nullability ) + add_sanitizer( undefined ) + endif() +endif() \ No newline at end of file diff --git a/src/bit7z/cmake/TargetArchDetect.cmake b/src/bit7z/cmake/TargetArchDetect.cmake new file mode 100755 index 00000000..439acfb5 --- /dev/null +++ b/src/bit7z/cmake/TargetArchDetect.cmake @@ -0,0 +1,48 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) + set( BIT7Z_TARGET_ARCH_IS_64_BIT ON ) +else() + set( BIT7Z_TARGET_ARCH_IS_64_BIT OFF ) +endif() + +string( CONFIGURE [[ + #if defined( __arm__ ) || defined( _M_ARM ) + # error CMAKE_TARGET_ARCH_arm + #elif defined( __aarch64__ ) || defined( _M_ARM64 ) || defined(_M_ARM64EC) + # error CMAKE_TARGET_ARCH_arm64 + #elif defined( __i386__ ) || defined( _M_IX86 ) + # error CMAKE_TARGET_ARCH_x86 + #elif defined( __x86_64__ ) || defined( _M_X64 ) + # error CMAKE_TARGET_ARCH_x64 + #else + # error CMAKE_TARGET_ARCH_unknown + #endif +]] architecture_check_code @ONLY ) + +file( WRITE "${CMAKE_BINARY_DIR}/arch_check.cpp" "${architecture_check_code}" ) +try_run( + run_result_unused + compile_result_unused + "${CMAKE_BINARY_DIR}" + "${CMAKE_BINARY_DIR}/arch_check.cpp" + COMPILE_OUTPUT_VARIABLE DETECTED_ARCH +) +string( REGEX MATCH "CMAKE_TARGET_ARCH_([a-zA-Z0-9_]+)" DETECTED_ARCH "${DETECTED_ARCH}" ) +string( REPLACE "CMAKE_TARGET_ARCH_" "" DETECTED_ARCH "${DETECTED_ARCH}" ) +set( BIT7Z_TARGET_ARCH_NAME "${DETECTED_ARCH}" ) + +if( "${BIT7Z_TARGET_ARCH_NAME}" STREQUAL "" ) + # If for some reason architecture detection failed, revert to using CMAKE_SYSTEM_PROCESSOR (not reliable on Windows) + if ( CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)" OR CMAKE_GENERATOR_PLATFORM MATCHES "ARM64" ) + set( BIT7Z_TARGET_ARCH_NAME "arm64" ) + elseif( CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR CMAKE_GENERATOR_PLATFORM MATCHES "ARM" ) + set( BIT7Z_TARGET_ARCH_NAME "arm" ) + elseif( BIT7Z_TARGET_ARCH_IS_64_BIT ) + set( BIT7Z_TARGET_ARCH_NAME "x64" ) + else() + set( BIT7Z_TARGET_ARCH_NAME "x86" ) + endif() +endif() \ No newline at end of file diff --git a/src/bit7z/docs/CMakeLists.txt b/src/bit7z/docs/CMakeLists.txt new file mode 100755 index 00000000..9fd07b17 --- /dev/null +++ b/src/bit7z/docs/CMakeLists.txt @@ -0,0 +1,60 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + +find_package( Doxygen REQUIRED dot ) + +if( DOXYGEN_FOUND ) + if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) + endif() + + set( EXTRA_PATH ${CMAKE_CURRENT_BINARY_DIR}/extra ) + set( DOXYGEN_AWESOME_PATH ${CMAKE_CURRENT_BINARY_DIR}/doxygen-awesome-css ) + set( CPPREFERENCE_PATH ${CMAKE_CURRENT_BINARY_DIR}/cppreference ) + + # Dependencies needed to build the documentation + set(FETCHCONTENT_QUIET FALSE) + FetchContent_Declare( + doxygen-extra + GIT_REPOSITORY https://gist.github.com/db15772ef4daa2259c2aaff11c64441a.git + GIT_TAG 0ee904a82c7fab446934200ad53667621ad9082a + GIT_PROGRESS ON + GIT_SHALLOW ON + SOURCE_DIR ${EXTRA_PATH} + ) + FetchContent_Declare( + doxygen-awesome + GIT_REPOSITORY https://github.com/jothepro/doxygen-awesome-css + GIT_TAG main + GIT_PROGRESS ON + GIT_SHALLOW ON + SOURCE_DIR ${DOXYGEN_AWESOME_PATH} + ) + FetchContent_Declare( + doxygen-cppreference + URL https://upload.cppreference.com/mwiki/images/f/f8/cppreference-doxygen-web.tag.xml + DOWNLOAD_NO_EXTRACT ON + DOWNLOAD_DIR ${CPPREFERENCE_PATH} + ) + FetchContent_MakeAvailable( doxygen-extra doxygen-awesome doxygen-cppreference ) + + file(READ ${CMAKE_SOURCE_DIR}/README.md HOME_MD) + string(REGEX REPLACE "

([^<]+)<\\/h1>" "# \\1" HOME_MD "${HOME_MD}") + string(REGEX REPLACE "\n(.+)\n" "" HOME_MD "${HOME_MD}") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/Home.md "${HOME_MD}") + + # set input and output files + set( DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ) + set( DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ) + configure_file( ${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY ) + + add_custom_target( bit7z-docs ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Home.md + VERBATIM ) +else() + message( "Doxygen need to be installed to generate the doxygen documentation" ) +endif() \ No newline at end of file diff --git a/src/bit7z/docs/Doxyfile.in b/src/bit7z/docs/Doxyfile.in new file mode 100755 index 00000000..6ef17e31 --- /dev/null +++ b/src/bit7z/docs/Doxyfile.in @@ -0,0 +1,2635 @@ +# Doxyfile 1.9.5 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). +# +# Note: +# +# Use doxygen to compare the used configuration file with the template +# configuration file: +# doxygen -x [configFile] +# Use doxygen to compare the used configuration file with the template +# configuration file without replacing the environment variables: +# doxygen -x_noenv [configFile] + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = bit7z + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @PROJECT_VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = A C++ library for interfacing with the 7-zip shared libs. + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = @CMAKE_SOURCE_DIR@/docs + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 +# sub-directories (in 2 levels) under the output directory of each output format +# and will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to +# control the number of sub-directories. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# Controls the number of sub-directories that will be created when +# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every +# level increment doubles the number of directories, resulting in 4096 +# directories at level 8 which is the default and also the maximum value. The +# sub-directories are organized in 2 levels, the first level always has a fixed +# numer of 16 directories. +# Minimum value: 0, maximum value: 8, default value: 8. +# This tag requires that the tag CREATE_SUBDIRS is set to YES. + +# CREATE_SUBDIRS_LEVEL = 8 + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, +# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English +# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, +# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with +# English messages), Korean, Korean-en (Korean with English messages), Latvian, +# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, +# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, +# Swedish, Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = YES + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = YES + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@ + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/include + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:^^" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) + +ALIASES = "rst=\verbatim embed:rst" \ + endrst=\endverbatim + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which effectively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = YES + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = YES + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = YES + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = NO + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = extra/DoxygenLayout.xml + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete +# function parameter documentation. If set to NO, doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +# WARN_IF_INCOMPLETE_DOC = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# Possible values are: NO, YES and FAIL_ON_WARNINGS. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# See also: WARN_LINE_FORMAT +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# In the $text part of the WARN_FORMAT command it is possible that a reference +# to a more specific place is given. To make it easier to jump to this place +# (outside of doxygen) the user can define a custom "cut" / "paste" string. +# Example: +# WARN_LINE_FORMAT = "'vi $file +$line'" +# See also: WARN_FORMAT +# The default value is: at line $line of file $file. + +# WARN_LINE_FORMAT = "at line $line of file $file" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = @CMAKE_SOURCE_DIR@/include \ + @CMAKE_CURRENT_BINARY_DIR@/Home.md + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, +# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C +# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = bit*.hpp + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = @CMAKE_SOURCE_DIR@/lib \ + @CMAKE_SOURCE_DIR@/src \ + @CMAKE_SOURCE_DIR@/third_party \ + @CMAKE_SOURCE_DIR@/include/bit7z/bitwindows.hpp \ + @CMAKE_SOURCE_DIR@/include/bit7z/bitguids.hpp + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# ANamespace::AClass, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = std + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = Home.md + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = @EXTRA_PATH@/header.html + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = @DOXYGEN_AWESOME_PATH@/doxygen-awesome.css \ + @DOXYGEN_AWESOME_PATH@/doxygen-custom/custom.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = @DOXYGEN_AWESOME_PATH@/doxygen-awesome-darkmode-toggle.js \ + @DOXYGEN_AWESOME_PATH@/doxygen-awesome-fragment-copy-button.js \ + @DOXYGEN_AWESOME_PATH@/doxygen-awesome-paragraph-link.js \ + @DOXYGEN_AWESOME_PATH@/doxygen-awesome-interactive-toc.js + +# Fixes Doxygen Awesome light theme bug: https://github.com/jothepro/doxygen-awesome-css/issues/97 + +HTML_COLORSTYLE = LIGHT + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a color-wheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 209 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use gray-scales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 255 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 113 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = YES + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag determines the URL of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +# DOCSET_FEEDURL = + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline the HTML help workshop was already many years +# in maintenance mode). You can download the HTML help workshop from the web +# archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the main .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine tune the look of the index (see "Fine-tuning the output"). As an +# example, the default style sheet generated by doxygen has an example that +# shows how to put an image at the root of the tree instead of the PROJECT_NAME. +# Since the tree basically has the same information as the tab index, you could +# consider setting DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 360 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +# OBFUSCATE_EMAILS = YES + +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2 and MathJax_3. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +# MATHJAX_VERSION = MathJax_2 + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# (see: +# http://docs.mathjax.org/en/latest/web/components/output.html). +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. The default value is: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see +# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# MATHJAX_EXTENSIONS = ams +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /