ccextractor icon indicating copy to clipboard operation
ccextractor copied to clipboard

Fix/windows cmake zlib only

Open Yashbhu opened this issue 1 month ago • 1 comments

In raising this pull request, I confirm the following (please check boxes):

  • [x] I have read and understood the contributors guide.
  • [x] I have checked that another pull request for this purpose does not exist.
  • [x] I have considered, and confirmed that this submission will be valuable to others.
  • [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • [x] I give this submission freely, and claim no ownership to its content.
  • [x] I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • [ ] I have never used CCExtractor.
  • [x] I have used CCExtractor just a couple of times.
  • [ ] I absolutely love CCExtractor, but have not contributed previously.
  • [ ] I am an active contributor to CCExtractor.

{pull request content here}

This occurs because the bundled zlib sources were being compiled directly into the executable, but the linker was still trying to find an external zlib.lib file.

Solution

  • Build the bundled zlib sources as a static library (zlib_static) on Windows
  • Link the static library to the main executable
  • Other platforms continue using the existing behavior (compile zlib sources directly into executable)
  • Added Windows CMake CI job to validate Windows builds going forward

Changes

  • src/CMakeLists.txt: Create zlib_static library on Windows with proper include directories
  • .github/workflows/build_windows.yml: New build_cmake job for automated Windows CMake testing
  • docs/CHANGES.TXT: Documented the fix

Testing

  • Local testing: Cannot test on Windows locally (developing on macOS)
  • CI validation: Added Windows CMake CI job for automated testing
  • Note: OCR support is disabled in CI (-DWITH_OCR=ON removed) to avoid unrelated vcpkg/GitLab libxml2 infrastructure issues. This PR focuses solely on the zlib fix; OCR functionality can be tested separately.

CI Verification

The Windows CMake CI job validates:

  1. CMake configuration with vcpkg toolchain
  2. Build of ccextractor target with zlib static library
  3. Binary execution (--version flag)
  4. Artifact upload

Related: This PR focuses solely on the Windows zlib fix. macOS-specific fixes (ARM detection and Leptonica includes) have been split into a separate PR as requested by reviewers.


Yashbhu avatar Dec 09 '25 11:12 Yashbhu

CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit b293017...:
Report Name Tests Passed
Broken 13/13
CEA-708 14/14
DVB 7/7
DVD 3/3
DVR-MS 2/2
General 27/27
Hardsubx 1/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 86/86
Teletext 21/21
WTV 13/13
XDS 34/34

Congratulations: Merging this PR would fix the following tests:


All tests passing on the master branch were passed completely.

Check the result page for more info.

ccextractor-bot avatar Dec 09 '25 21:12 ccextractor-bot

@Yashbhu Please take a look at the comments from github, they make sense.

cfsmp3 avatar Dec 15 '25 09:12 cfsmp3