Skip to content

Conversation

@celyrin
Copy link

@celyrin celyrin commented Aug 7, 2025

Summary

  • Replace p7zip submodule with official 7-Zip 25.0 source for better compatibility and long-term maintenance
  • Modernize build system with automatic submodule detection and improved error messages
  • Update data types to use 7-Zip 25.0 standard UInt64 instead of platform-specific unsigned __int64

Changes Made

  1. 7-Zip Source Upgrade
  • Removed p7zip submodule dependency (17.04 fork)
  • Added official 7-Zip 25.0 as git submodule at third_party/7zip/
  • Updated submodule URL to use official 7-Zip repository
  1. Build System Improvements
  • CMake: Auto-detect 7-Zip source from submodule by default
  • CMake: Allow manual override with -DSEVENZIP_SOURCE_DIR for custom paths
  • Documentation: Updated README with submodule-based workflow
  • Error Messages: Improved CMake error messages with clear setup instructions
  • C++ Standard: Updated requirement from C++11 to C++14
  1. Code Consistency Updates
  • Replaced all unsigned __int64 with UInt64 for 7-Zip 25.0 compatibility
  • Updated include paths to use submodule structure
  • Fixed test CMakeLists.txt to properly include 7-Zip headers
  1. Developer Experience
  • Simplified build process - no manual symbolic links required
  • Clear git submodule initialization instructions
  • Backward compatibility maintained for custom 7-Zip source paths

Test Plan

  • Build with CMake using submodule (static library)
  • Build with CMake using submodule (shared library)
  • Verify all test programs compile and link correctly
  • Test custom SEVENZIP_SOURCE_DIR override functionality
  • Validate archive operations with various formats (7z, zip, rar)

Breaking Changes

None - existing code using the library will continue to work without modifications.

Benefits

  • Maintenance: Using official 7-Zip source reduces long-term maintenance burden
  • Compatibility: Better compatibility with latest archive formats and features
  • Build Experience: Simplified setup process for new developers
  • Standards Compliance: Uses modern C++14 and 7-Zip 25.0 conventions

celyrin added 3 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
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.

1 participant