Skip to content

Updates to project - #23

Open
winterheart wants to merge 15 commits into
stonewell:masterfrom
winterheart:cmake-fixes
Open

Updates to project#23
winterheart wants to merge 15 commits into
stonewell:masterfrom
winterheart:cmake-fixes

Conversation

@winterheart

Copy link
Copy Markdown

Hello.
Here some changes to enhance project.

  • Fix compilation with recent GCC-16, CLang and MSVC.
  • Update CMake project with Cmake's best practices.
  • Add installation steps and export project for easy use as external dependency.
  • GitHub Action CI pipeline.
  • Some fixes to test applications.
  • Incorporate changes from Upgrade to official 7-Zip 25.0 and modernize build system #21: update 7zip SDK support to 25.00, fixes to the code.

celyrin and others added 15 commits August 5, 2025 10:07
- Updated include paths to use the new Common directory structure.
- Replaced MY_UNKNOWN_IMP macros with Z7_COM_UNKNOWN_IMP for consistency.
- Added throw() specifications to COM method declarations for better exception handling.
- Changed unsigned __int64 to UInt64 for property handling across multiple files.
- Introduced a compatibility header (compat.h) to manage version-specific changes and definitions.
- Updated library version to 4.0 with corresponding date and copyright changes.
- Added a minimal stub implementation for C7ZipObjectPtrArray to resolve template dependencies.
- Cleaned up various source files to improve readability and maintainability.
…ements

- Replace p7zip submodule with official 7zip 25.0 source
- Update CMake to auto-detect submodule 7zip source path
- Modernize build instructions for submodule-based workflow
- Fix include paths to use submodule structure
- Update C++ standard requirement to C++14
Set cmake_minimum_required to 3.24 as current CMake-4 not supporting <3.5. Use new features that provides 3.24: CMAKE_COMPILE_WARNING_AS_ERROR, CMAKE_POSITION_INDEPENDENT_CODE, and others. Enforce C++14 standard.

Add various configuration options for convenience:
* LIB7ZIP_ENABLE_TESTING - enables building testing programs
* LIB7ZIP_WARNING_AS_ERROR - enforce CMAKE_COMPILE_WARNING_AS_ERROR

Formatting code and cleanup.
CPP/7zip/Common/FileStreams.h requires additional code from 7zip. Otherwise, compilation will fail with "undefined reference to `vtable for COutFileStream'" and
"undefined reference to `NC::NFile::NIO::CFileBase::Close()'" errors.
Fix -Winconsistent-missing-override compilation failure.
Copying (U)Int64 types definitions from 7zip header.
This allows to use and install lib7zip independently of 7zip sources.
Build only one type of library (STATIC/SHARED) at same time. In order to get both types users should use CMake Presets or MultiConfig generators.
Add CI pipeline for build testing.
Use "%hs" for wprintf() on wstring.
Use "%lld" for wprintf() on UInt64 types.
Convert input TCHAR* parameter into std::string.
lib7zip not ready yet for Windows DLL linking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants