Commit Graph

155 Commits

Author SHA1 Message Date
Chandragupt Singh
9440749cbe ci: align release.yml trigger with Linux workflows (created → published) (#2275) 2026-05-31 12:14:18 -07:00
Gaurav karmakar
e4443a74ba [IMPROVEMENT] feat(mp4): add FFmpeg/libavformat backend for MP4 demuxing (#2191)
* ci: add Linux and macOS workflows for FFmpeg MP4 build

Adds a cmake_ffmpeg_mp4 job to both build_linux.yml and build_mac.yml
that configures CCExtractor with -DWITH_FFMPEG=ON -DWITH_OCR=ON
-DWITH_HARDSUBX=ON and builds it, so the FFmpeg-based MP4 demuxer
path is exercised on every PR. Linux job pulls the full set of
ffmpeg/tesseract/leptonica dev packages (including libavdevice-dev);
macOS job installs the corresponding Homebrew bottles.

* build: wire FFmpeg libs into ccx_rust link order

Add the compile-time option to build CCExtractor's MP4 demuxer on top
of libavformat: set -DENABLE_FFMPEG_MP4 and pull libswresample as a
required dependency alongside libavformat/libavutil/libavcodec/
libavfilter/libswscale when -DWITH_FFMPEG=ON.

Link-order handling. Corrosion places ccx_rust at the end of the
ccextractor link line. On Linux (GNU ld), ccx_rust contains rsmpeg
which references FFmpeg symbols like swr_get_out_samples, so the
FFmpeg shared libs must appear after ccx_rust. Collect them into a
separate EXTRA_FFMPEG_LIBS variable and attach them as
INTERFACE_LINK_LIBRARIES on the ccx_rust target so CMake emits them
right after ccx_rust. Make ccx's own link dependencies PRIVATE so
the same libs don't propagate earlier and get deduplicated against
the INTERFACE copy.

Force bridge symbols to be pulled from libccx. GNU ld only pulls
object files from a static archive when they resolve currently-needed
symbols. Bridge functions in libccx.a (ccx_mp4_process_nal_sample,
ccx_mp4_process_cc_packet, etc.) aren't needed until libccx_rust.a
is processed, but libccx.a precedes it on the command line. Use
-Wl,--undefined=<symbol> on ccextractor for each bridge entry
point so the linker pulls them early — same pattern already used
for decode_vbi/do_cb/store_hdcc.

Rust crate wiring. Add the optional rsmpeg dependency guarded behind
the enable_mp4_ffmpeg feature, with platform-specific feature flags
(link_system_ffmpeg on Linux + macOS, link_vcpkg_ffmpeg on Windows,
all using the ffmpeg7 bindings). Extend bindgen's wrapper.h to
expose the bridge headers so Rust can call back into ccx from
mp4_rust_bridge.c.

* feat(mp4): FFmpeg MP4 demuxer with GPAC-parity caption extraction

Alternative MP4 demuxing backend built on rsmpeg (Rust FFmpeg bindings)
that matches GPAC's caption output on every sample reviewed. Activated
via -DWITH_FFMPEG=ON at compile time; default build keeps the GPAC
path untouched.

Architecture
  - src/rust/src/demuxer/mp4.rs: opens the MP4 with rsmpeg, classifies
    tracks (AVC, HEVC, c608, c708, tx3g), and drives packet dispatch.
  - src/rust/src/mp4_ffmpeg_exports.rs: #[no_mangle] entry points
    (ccxr_processmp4, ccxr_dumpchapters) called from ccextractor.c.
  - src/lib_ccx/mp4_rust_bridge.c/.h: thin C shim around do_NAL,
    process608, process_cc_data, ccdp_find_data, store_hdcc, and
    encode_sub so the Rust side can feed decoded payloads into
    CCExtractor's existing CEA-608/708 pipeline.

Caption parity
GPAC-equivalent output on all six samples from the Apr 18 review:

  - 132d7df7e993.mov  108 290 B   byte-identical
  - 1974a299f050.mov  127 828 B   byte-identical
  - 99e5eaafdc55.mov  164 099 B   byte-identical
  - 8849331ddae9.mp4   48 485 B   identical size, content, caption
                                  count; uniform ~2 ms timing shift
  - b2771c84c2a3.mp4    2 607 B   byte-identical
  - 5df914ce773d.mp4    1 164 B   byte-identical

SEI-embedded CEA-608 in H.264 video
The last caption finishing on the final sample was never encoded
because the interleaved av_read_frame loop exited without an
equivalent of GPAC's per-track encode_sub. Drain sub.got_output at
EOF. Intentionally avoid calling process_hdcc there: the last IDR's
slice_header already flushed the HD-CC buffer, and re-running
process_hdcc re-emits partial post-IDR caption state as trailing
garbage.

c608 payload handling
libavformat delivers c608/c708 samples in two shapes:
  1) atom-wrapped raw 608 pairs — [u32 length][4cc cdat|cdt2|ccdp]
     [payload]. Strip the 8-byte header to match GPAC's process_clcp.
  2) bare cc_data triplets — [cc_info][b1][b2]. Detect via len % 3 == 0
     and (payload[0] & 0xF8) == 0xF8. For c608 tracks, extract each
     field-1/field-2 pair from the triplet, set dec_ctx->current_field
     so process608 picks the right decoder context, and call
     process608 directly. Routing through do_cb would hit its
     CCX_H264 guard (set by interleaved H.264 packets) and suppress
     the cb_field increments process608 relies on for
     caption-boundary timing, which merged short captions into their
     successors. For c708, keep ccdp_find_data + process_cc_data.

Bridge design
Single unified entry point ccx_mp4_process_nal_sample(..., int
is_hevc, ...) replaces the separate AVC/HEVC helpers — their NAL
iteration was ~90% identical. Uses utility.h's RB16/RB32 macros
instead of hand-rolled byte-swap helpers. Handles HEVC's
end-of-sample cc_data flush inline.

Supported and unsupported tracks are documented in the mp4.rs
module header. Known limitation: dvdsub/bitmap subtitles in MP4
are not decoded (neither GPAC nor this backend handles them).

* chore(rust): fix clippy 1.95 warnings blocking CI

The format_rust CI job runs `cargo clippy --lib -- -D warnings` and
rust-1.95.0 promoted a handful of lints that hadn't been tripped on
master before this branch went through CI. Address all six:

collapsible_match (4 sites):
  - src/demuxer/demux.rs: fold the nested `if matches!(...)` inside
    the `Some(false) =>` arm into a match guard on the arm itself.
  - src/encoder/common.rs: three header-write arms (Ccd, Scc, Raw)
    each had a nested `if write_raw(...) == -1 { return -1; }`.
    Collapse each into a match guard; the body now just logs and
    returns.

unnecessary_cast (2 sites):
  - src/libccxr_exports/demuxer.rs: drop `as i64` from
    demux_ctx.get_filesize() — it already returns i64.
  - src/parser.rs: drop `as u64` from `t as u64` when writing to
    UTC_REFVALUE — t is already u64.

Also two lints in the new MP4 demuxer file from this branch:
  - if_same_then_else at src/demuxer/mp4.rs:198 — the FOURCC_TX3G
    and AV_CODEC_ID_MOV_TEXT arms both produced TrackType::Tx3g;
    same for FOURCC_C608 and AV_CODEC_ID_EIA_608 → TrackType::Cea608.
    Fold each pair into a single `||` branch.
  - manual_is_multiple_of at src/demuxer/mp4.rs:399 —
    `packet_count % 100 == 0` → `packet_count.is_multiple_of(100)`.

No behavior change. Caption parity against GPAC on all six mentor
samples verified post-fix.

---------

Co-authored-by: GAURAV KARMAKAR <gaurav02081@users.noreply.github.com>
2026-04-19 10:54:45 -07:00
dependabot[bot]
600cc5f96d chore(deps): bump softprops/action-gh-release from 2 to 3 (#2265)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 11:01:53 -07:00
Chandragupt Singh
edee69726a chore: remove redundant Homebrew bump workflow (#2262) 2026-04-12 09:41:02 -07:00
dependabot[bot]
74e3842ed0 chore(deps): bump microsoft/setup-msbuild from 2.0.0 to 3.0.0 (#2224)
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v2.0.0...v3.0.0)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-24 17:16:41 -07:00
Carlos Fernandez Sanz
52b5385c2a ci: add dual build artifacts for Windows (min-rust vs migrations) (#2208)
Add $(ExtraDefines) to PreprocessorDefinitions in all 4 configurations
of the vcxproj. This allows passing /p:ExtraDefines=DISABLE_RUST from
the MSBuild command line to use C code paths for switchable modules.

The Windows CI now produces two Release artifacts per architecture:
- "CCExtractor Windows x64 Release build" — min Rust (DISABLE_RUST)
- "CCExtractor Windows x64 Release build (with migrations)" — max Rust

The migrations build uses /t:Rebuild to do a clean rebuild without
DISABLE_RUST after the min-rust build completes.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 08:48:02 -07:00
Carlos Fernandez Sanz
92389cff84 ci: add dual build artifacts to compare C vs Rust code paths (#2207)
* fix: flush pending EIT sections in EPG_free() before freeing buffers

* ci: add dual build artifacts to compare C vs Rust code paths

Add -min-rust flag to linux/build that passes -DDISABLE_RUST to gcc,
causing switchable modules (DTVCC, demuxer, AVC, networking, hex utils)
to use their C implementations instead of Rust. The Rust library still
compiles since many modules are Rust-only.

The Linux CI now produces two artifacts:
- "CCExtractor Linux build" — min Rust (C paths where available)
- "CCExtractor Linux build (with migrations)" — max Rust

Both should produce identical output on the sample platform. If they
diverge, it means a Rust port introduced a behavioral difference.

The sample platform will need a corresponding update to recognize and
test the new "with migrations" artifact.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Varadraj75 <agrawalvaradraj2007@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:47:59 -07:00
Carlos Fernandez Sanz
6281a481d0 chore: update PR template to set clearer expectations (#2203)
Require repro instructions and samples, discourage AI-generated PRs
for theoretical issues, clarify changelog and C code policies.
2026-03-14 12:58:41 -07:00
dependabot[bot]
d0c73362ed chore(deps): bump docker/build-push-action from 6 to 7 (#2181)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-08 13:28:04 -07:00
dependabot[bot]
80ed678f98 chore(deps): bump docker/setup-buildx-action from 3 to 4 (#2178)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-07 23:16:15 -08:00
dependabot[bot]
738d482ea7 chore(deps): bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-27 18:02:42 +00:00
Carlos Fernandez Sanz
2dc5cf3223 Improve CI caching, fix Linux deps, fix WinGet fork-user
* Improve CI caching and fix Linux build dependencies

- release.yml: Replace manual vcpkg clone + binary cache with
  lukka/run-vcpkg@v11 and installed-packages caching (matching
  build_windows.yml), add Cargo registry caching
- build_linux.yml: Add FFmpeg dev packages to build_autoconf, cmake,
  and build_rust jobs — libgpac on newer Ubuntu requires FFmpeg 6.x
  libraries at link time

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix WinGet publish: add fork-user to point to CCExtractor org fork

The winget-releaser action defaults to creating branches on the token
owner's fork (cfsmp3/winget-pkgs), which doesn't exist. The actual
fork is at CCExtractor/winget-pkgs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 19:20:48 -08:00
Carlos Fernandez
e17617fa53 Fix publish workflows: wait for release build to finish
The Chocolatey and WinGet publish workflows triggered on
release: [released], which fires simultaneously with the release
build. Since MSIs take ~45 minutes to build, the publish workflows
failed with 404 errors.

Switch both to workflow_run trigger so they wait for the "Upload
releases" workflow to complete before attempting to publish.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 17:07:59 -08:00
Carlos Fernandez
a10106e2dc Add notes that sample-platform depends on artifact names
The CCExtractor/sample-platform test runner does exact string matching
on artifact names to find builds for testing. If these names are changed
without updating Artifact_names in sample-platform, CI tests silently
stop running.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:13:09 -08:00
Carlos Fernandez
d3a12f0d9a Fix outdir: use trailing slash for x64, empty string for Win32
upload-artifact rejects '.' in paths. Use "x64/" and "" instead so
paths resolve to ./windows/x64/Release-Full and ./windows/Release-Full.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:49:33 -08:00
Carlos Fernandez
2b6012a19b Fix output directory paths for Win32 builds
MSBuild places Win32 output in windows/Release-Full/ (no platform
prefix), while x64 goes to windows/x64/Release-Full/. Use matrix
outdir variable to reference the correct output location.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:43:19 -08:00
Carlos Fernandez
23f5980d96 Fix GPAC path for x86 builds on 64-bit CI hosts
On 64-bit Windows, choco install gpac --forcex86 installs to
C:\Program Files (x86)\GPAC, not C:\Program Files\GPAC.

- Add configurable GpacDir MSBuild property (defaults to C:\Program Files\GPAC)
- Replace all hardcoded GPAC paths with $(GpacDir)
- Pass correct GpacDir from CI matrix for x86 builds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 14:25:23 -08:00
Carlos Fernandez
1aa9762f19 Add 32-bit (x86) Windows build support
Re-introduce Win32 platform configurations to support 32-bit Windows,
which was dropped in 2023. This enables CCExtractor to run on 32-bit
Windows 10 systems.

Changes:
- Add Win32 (x86) platform to VS solution and project configs
- Make vcpkg triplet conditional (x86-windows-static for Win32)
- Update rust.bat to support i686-pc-windows-msvc via RUST_TARGET env var
- Add preprocessor conditional in installer.wxs for ProgramFilesFolder
- Convert CI build workflow to matrix strategy (x64 + x86)
- Update release workflow to produce both x64 and x86 installers

Closes #2116

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 09:35:11 -08:00
Chandragupt Singh
05c68349d5 Merge branch 'master' into feat/snap-distribution-support 2026-01-23 15:26:59 +05:30
Carlos Fernandez
259e881483 fix(ci): add missing FFmpeg dependencies to hardsubx .deb packages
Add libavdevice, libswresample, and libavfilter dependencies for
the hardsubx variant on both Ubuntu 24.04 and Debian 13 workflows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 20:11:10 -08:00
Carlos Fernandez
197069d3b8 ci: add Debian 13 (Trixie) .deb build workflow
Creates .deb packages for Debian 13 using a Docker container.
- Builds GPAC from source (abi-16.4 tag)
- Creates basic and hardsubx variants
- Uses Debian 13's library versions:
  - libtesseract5, libleptonica6
  - libavcodec61, libavformat61, libavutil59, libswscale8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 20:02:16 -08:00
Carlos Fernandez
7a810d736d fix(ci): add libcurl3t64-gnutls dependency to .deb package
CCExtractor is linked against libcurl-gnutls which requires this
runtime dependency on Ubuntu 24.04.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 19:55:09 -08:00
Carlos Fernandez
1413c948c4 fix(ci): correct leptonica package name for Ubuntu 24.04
Ubuntu 24.04 uses liblept5, not libleptonica6 (which is Ubuntu 25.04).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 19:39:42 -08:00
Carlos Fernandez
bb5385913b fix(ci): use apt install to handle .deb dependencies in test step
apt install automatically resolves and installs dependencies,
unlike dpkg -i which fails if dependencies are missing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 19:13:41 -08:00
Carlos Fernandez
a1871abf04 fix(ci): switch .deb build to Ubuntu 24.04
- Use ubuntu-24.04 runner instead of ubuntu-22.04
- Update dependencies to match Ubuntu 24.04 library versions
  (libtesseract5, libleptonica6, libavcodec60, etc.)
- Update GPAC cache key for new Ubuntu version

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 19:08:09 -08:00
Carlos Fernandez
20b3773bb9 fix(ci): correct version and add missing dependencies in .deb workflow
- Update CMakeLists.txt version from 0.89 to 0.96 to match lib_ccx.h
- Extract version from lib_ccx.h instead of CMakeLists.txt for accuracy
- Add missing runtime dependencies: libtesseract, libleptonica
- Add FFmpeg dependencies for hardsubx variant

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 19:02:48 -08:00
Carlos Fernandez
8786b4cf75 fix(ci): correct LICENSE filename to LICENSE.txt 2026-01-18 18:08:04 -08:00
Carlos Fernandez
8632ecda5b ci: add workflow to build .deb packages
Add GitHub Actions workflow to build Debian packages (.deb) for Linux.

Features:
- Builds GPAC from source (abi-16.4 tag) since libgpac-dev is not
  available in newer Debian/Ubuntu releases
- Creates two variants: basic (with OCR) and hardsubx (with FFmpeg)
- Bundles GPAC library with the package using patchelf for rpath
- Includes proper Debian package structure with control, postinst, postrm
- Runs on releases, manual trigger, or workflow file changes
- Uploads packages as artifacts and attaches to releases

This provides an unofficial .deb package for users who prefer that
format over AppImage or snap.

Relates to #1610

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 18:00:45 -08:00
Carlos Fernandez
df90009f73 ci: add CMakeLists.txt to workflow path filters
Build workflows were not triggering on CMakeLists.txt changes.
Added **CMakeLists.txt and **.cmake patterns to path filters for:
- build_linux.yml
- build_mac.yml
- build_windows.yml
- build_docker.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 17:23:34 -08:00
Chandragupt
504877b928 ci(snap): remove temporary push trigger 2026-01-08 06:08:29 +05:30
Chandragupt
64ee63a560 ci(snap): enable push trigger for snap workflow (temporary) 2026-01-08 06:08:00 +05:30
Chandragupt
270c603bd2 ci(snap): add GitHub Actions workflow for Snapcraft-based builds 2026-01-08 06:06:13 +05:30
dependabot[bot]
6d356b4458 chore(deps): bump dawidd6/action-homebrew-bump-formula from 4 to 7 (#1989)
Bumps [dawidd6/action-homebrew-bump-formula](https://github.com/dawidd6/action-homebrew-bump-formula) from 4 to 7.
- [Release notes](https://github.com/dawidd6/action-homebrew-bump-formula/releases)
- [Commits](https://github.com/dawidd6/action-homebrew-bump-formula/compare/v4...v7)

---
updated-dependencies:
- dependency-name: dawidd6/action-homebrew-bump-formula
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 01:24:47 +01:00
Carlos Fernandez
bce0c92fdd ci: Add Homebrew formula auto-bump workflow
Automatically creates a PR to homebrew-core when a new release
is published, updating the ccextractor formula to the new version.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 00:08:40 +01:00
Carlos Fernandez
200eb1750a fix(ci): Fix Windows CI cargo build cache path
- Fix cargo build cache path: rust.bat sets CARGO_TARGET_DIR to the
  windows/ directory, which results in artifacts at
  windows/x86_64-pc-windows-msvc/, not windows/target/
- Remove redundant CARGO_TARGET_DIR from build steps since rust.bat
  overrides it anyway

Note: vcpkg.json builtin-baseline intentionally not changed to avoid
breaking transitive dependencies (libxml2 etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 12:44:18 +01:00
Carlos Fernandez
e9519c4a67 fix(ci): Remove broken Chocolatey caching for GPAC
The Chocolatey cache only stored package metadata, not the actual
installed SDK files at C:\Program Files\GPAC\sdk\include. This caused
build failures when the cache hit but GPAC headers weren't available.

GPAC install is fast (~30s) so caching isn't worth the complexity.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 09:31:11 +01:00
Carlos Fernandez
546c776e57 ci(windows): Optimize Windows build workflow for faster CI
Major optimizations to reduce Windows build time from ~45 min to ~10 min:

1. **Single consolidated job** - Previously two parallel jobs (Release/Debug)
   duplicated the entire 34-minute vcpkg install. Now builds both
   configurations sequentially in one job, sharing all cached dependencies.

2. **lukka/run-vcpkg action** - Replaces manual git clone + bootstrap with
   the official vcpkg action that has built-in caching and better handling.

3. **Cache vcpkg installed packages** - Separately cache the installed/
   directory with hash-based keys for faster cache hits.

4. **Cargo caching** - Add caching for Rust registry and build artifacts,
   similar to the Linux build workflow.

5. **Chocolatey caching** - Cache gpac package to skip download on hits.

6. **Conditional installs** - Skip vcpkg install and choco install when
   cache is available.

7. **Updated Rust toolchain action** - Replace deprecated actions-rs/toolchain
   with dtolnay/rust-toolchain.

Expected improvements:
- Cold build: ~20 minutes (down from ~45 min)
- Warm build (cache hit): ~5-10 minutes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 02:03:35 +01:00
Carlos Fernandez
a1ed940c8b fix(build): Use -arch x64 flag for WiX build instead of Package attribute
The Platform attribute is not valid in WiX v4+. Instead, specify the
target architecture at build time using the -arch x64 flag.

Changes:
- Remove invalid Platform="x64" attribute from Package element
- Add -arch x64 to wix build command in release workflow
- Keep ProgramFiles64Folder for explicit 64-bit installation path

This ensures the MSI is built as a proper 64-bit package that installs
to "Program Files" instead of "Program Files (x86)".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:03:04 +01:00
Carlos Fernandez
353a37010d ci: Add winget and Chocolatey packaging workflows
Add automated package publishing for Windows package managers:

## Winget
- Initial manifest files for CCExtractor.CCExtractor
- Workflow to auto-submit PRs to microsoft/winget-pkgs on release

## Chocolatey
- Package files (nuspec, install/uninstall scripts)
- Workflow to build and push packages on release

## Setup Required
- WINGET_TOKEN secret (GitHub PAT with public_repo scope)
- CHOCOLATEY_API_KEY secret (from chocolatey.org account)

Closes #1308

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 18:19:11 +01:00
Carlos Fernandez
7284430fc6 fix(build): Preserve FFmpeg libs with -system-libs -hardsubx
The -system-libs mode was overwriting BLD_LINKER and losing the FFmpeg
libraries that -hardsubx adds. This fix preserves the FFmpeg libraries
when both flags are used together.

Also add permissions: contents: write to the workflow to allow
uploading assets to releases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:49:51 +01:00
Carlos Fernandez
68d0d4094e ci(linux): Add workflow for system-libs builds
Add a new GitHub Actions workflow that builds CCExtractor using the
-system-libs flag, creating binaries that dynamically link against
system libraries instead of bundling dependencies.

This is useful for:
- Linux distribution packaging (Debian, Ubuntu, Fedora, etc.)
- Homebrew/Linuxbrew packaging
- Users who prefer smaller binaries with system library updates

Two variants are built:
- basic: Standard OCR-enabled build
- hardsubx: Build with HardSubX (burned-in subtitle extraction)

The workflow runs on releases and can be manually triggered.

Related to #1907

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:38:41 +01:00
Carlos Fernandez
20448bfeb2 fix(windows): Bundle tessdata for OCR support out of the box
The Windows release was missing Tesseract OCR runtime dependencies
(tessdata files) needed for the HardSubx feature to work. Users had
to manually install Tesseract OCR and set TESSDATA_PREFIX.

Changes:
- Add get_executable_directory() to ocr.c that returns the directory
  containing the executable (works on Windows, Linux, and macOS)
- Update probe_tessdata_location() to search for tessdata in the
  executable directory, enabling bundled tessdata to be found
- Update release workflow to download eng.traineddata and osd.traineddata
  from tesseract-ocr/tessdata_fast during release builds
- Update WiX installer to include tessdata directory with the
  traineddata files

Now the Windows release includes tessdata files, and CCExtractor will
automatically find them in the installation directory without requiring
users to install Tesseract separately or set environment variables.

Fixes #1578

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 13:05:46 +01:00
Carlos Fernandez
07cc78c2f1 feat(release): Add version numbers to release asset filenames 2025-12-25 16:36:18 +01:00
Carlos Fernandez
c6e27ca809 fix(release): Support 3-part version numbers (e.g., v0.96.1)
Update the version extraction logic in the release workflow to properly
handle 3-part semantic versions like v0.96.1 in addition to existing
2-part versions like v0.96.

MSI installers require 4-part versions (major.minor.build.revision):
- v0.96 → 0.96.0.0 (unchanged behavior)
- v0.96.1 → 0.96.1.0 (new support)
- v0.96.1.2 → 0.96.1.2 (passthrough)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 12:56:13 +01:00
Carlos Fernandez
1950f096b6 fix(workflow): Extract only numeric version for MSI
MSI version numbers must be numeric (major.minor.build format).
Strip everything after the first dash from tag names to get valid
version numbers (e.g., v1.08-test becomes 1.08).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 20:05:20 +01:00
Carlos Fernandez
4a51ad114e fix(installer): Use custom UI without license dialog
Instead of trying to override WixUI_InstallDir, create a custom UI
based on it but without the LicenseAgreementDlg. This is the proper
way to remove dialogs from WiX UI sets.

- Add CustomUI.wxs with dialog flow: Welcome -> InstallDir -> VerifyReady
- Update installer.wxs to use CustomInstallDirUI instead of WixUI_InstallDir
- Update workflow to build both .wxs files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:25:35 +01:00
Carlos Fernandez
f5a9018ef0 fix(release): Upgrade WiX from v4.0.0-preview.0 to v6.0.2 stable
The WiX build was failing due to several WiX v4 to v6 migration issues.

Workflow changes:
- Uninstall existing WiX before installing v6.0.2 (force clean install)
- WiX version: 4.0.0-preview.0 -> 6.0.2
- Extension: WixToolset.UI.wixext/4.0.0-preview.0 -> WixToolset.UI.wixext/6.0.2
- Fixed extension command syntax: "extension -g add" -> "extension add -g"

installer.wxs changes (WiX v6 migration):
- Added ui namespace: xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"
- Replaced custom inline UI with standard <ui:WixUI Id="WixUI_InstallDir">
  (fixes WIX0094 error for WixUIValidatePath custom action)
- Changed Directory to StandardDirectory for DesktopFolder (fixes WIX5437)

See: https://github.com/orgs/wixtoolset/discussions/6516
     https://github.com/wixtoolset/issues/issues/6998

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 07:14:18 +01:00
Carlos Fernandez
e01720c05e fix: Use WiX extension by name instead of hardcoded path
The WiX v4 extension path was hardcoded and didn't match the actual
installed location. WiX v4 allows referencing globally installed
extensions by name directly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 23:35:10 +01:00
Carlos Fernandez
f80b1f26ca fix(ci): Add -Force to Expand-Archive for Flutter GUI
The installer directory already has files from the copy step, so
Expand-Archive needs -Force to overwrite/merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:43:07 +01:00
Carlos Fernandez
f9ebfd2a32 fix(ci): Add vcpkg setup and fix permissions in release workflow
- Add permissions: contents: write for upload-release-assets
- Add vcpkg environment variables and setup steps from build_windows.yml
- Add gpac installation
- Add vcpkg clone, bootstrap, and dependency installation
- Add VCPKG_ROOT env var to build step
- Change runner to windows-2022 to match build workflow
- Add msbuild-architecture: x64
- Remove redundant llvm/clang setup (pre-installed on runner)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 21:53:40 +01:00