Fix/windows cmake zlib only
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: Createzlib_staticlibrary on Windows with proper include directories -
.github/workflows/build_windows.yml: Newbuild_cmakejob 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=ONremoved) 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:
- CMake configuration with vcpkg toolchain
- Build of ccextractor target with zlib static library
- Binary execution (
--versionflag) - 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.
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:
- ccextractor --hardsubx 1a0302f7fd..., Last passed: Never
All tests passing on the master branch were passed completely.
Check the result page for more info.
@Yashbhu Please take a look at the comments from github, they make sense.