Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto qualip-ocr_bitmap-last_font_tag
  • Loading branch information
jstrot committed Jul 6, 2024
2 parents fc8dfa6 + f12f12b commit 69a115e
Show file tree
Hide file tree
Showing 40 changed files with 1,322 additions and 1,156 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev libtesseract-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: build
run: ./build
working-directory: ./linux
Expand All @@ -38,7 +38,7 @@ jobs:
run: mkdir ./linux/artifacts
- name: Copy release artifact
run: cp ./linux/ccextractor ./linux/artifacts/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: CCExtractor Linux build
path: ./linux/artifacts
Expand All @@ -47,7 +47,7 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: run autogen
run: ./autogen.sh
working-directory: ./linux
Expand All @@ -65,7 +65,7 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: cmake
run: mkdir build && cd build && cmake ../src
- name: build
Expand All @@ -76,7 +76,7 @@ jobs:
cmake_ocr_hardsubx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt update && sudo apt install libgpac-dev libtesseract-dev libavformat-dev libavdevice-dev libswscale-dev yasm
- name: cmake
Expand All @@ -94,9 +94,9 @@ jobs:
steps:
- name: Install dependencies
run: sudo apt update && sudo apt-get install libgpac-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
src/rust/.cargo/registry
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- name: Install dependencies
run: brew install pkg-config autoconf automake libtool tesseract leptonica gpac
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: build
run: ./build.command
working-directory: ./mac
Expand All @@ -38,14 +38,14 @@ jobs:
run: mkdir ./mac/artifacts
- name: Copy release artifact
run: cp ./mac/ccextractor ./mac/artifacts/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: CCExtractor mac build
path: ./mac/artifacts
build_autoconf:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install pkg-config autoconf automake libtool gpac
- name: run autogen
Expand All @@ -63,10 +63,10 @@ jobs:
cmake:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: dependencies
run: brew install gpac
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: cmake
run: mkdir build && cd build && cmake ../src
- name: build
Expand All @@ -77,7 +77,7 @@ jobs:
cmake_ocr_hardsubx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install pkg-config autoconf automake libtool tesseract leptonica gpac ffmpeg
- name: cmake
Expand All @@ -93,9 +93,9 @@ jobs:
build_rust:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
src/rust/.cargo/registry
Expand Down
77 changes: 49 additions & 28 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build CCExtractor on Windows
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
VCPKG_DEFAULT_TRIPLET: x64-windows-static
VCPKG_DEFAULT_BINARY_CACHE: C:\vcpkg\.cache
VCPKG_COMMIT: fba75d09065fcc76a25dcf386b1d00d33f5175af

on:
workflow_dispatch:
Expand All @@ -22,65 +24,83 @@ on:

jobs:
build_release:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
- name: Install llvm and clang
run: choco install llvm gpac
with:
msbuild-architecture: x64
- name: Install gpac
run: choco install gpac --version 2.4.0
- name: Setup vcpkg
run: mkdir C:\vcpkg\.cache
- name: Cache vcpkg
id: cache
uses: actions/cache@v3
with:
path: |
C:\vcpkg\.cache
key: vcpkg-${{ runner.os }}-${{ env.VCPKG_COMMIT }}
- name: Build vcpkg
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.bat
- name: Install dependencies
run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --x-install-root ${{ github.workspace }}/vcpkg/installed/
working-directory: windows
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Win 10 SDK
uses: ilammy/msvc-dev-cmd@v1
- name: Setup Vcpkg
id: vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: "2023.08.09"
cache-version: "3"
ignore-reserve-cache-error: true
- name: Install dependencies
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
- name: build Release-Full
env:
LIBCLANG_PATH: "C:\\Program Files\\LLVM\\lib"
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
CARGO_TARGET_DIR: "..\\..\\windows"
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64
working-directory: ./windows
- name: Display version information
run: ./ccextractorwinfull.exe --version
working-directory: ./windows/x64/Release-Full
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: CCExtractor Windows Release build
path: |
./windows/x64/Release-Full/ccextractorwinfull.exe
./windows/x64/Release-Full/*.dll
build_debug:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
- name: Install llvm and clang
run: choco install llvm gpac
- name: Setup Vcpkg
id: vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: "2023.08.09"
cache-version: "3"
ignore-reserve-cache-error: true
msbuild-architecture: x64
- name: Install gpac
run: choco install gpac --version 2.4.0
- name: Setup vcpkg
run: mkdir C:\vcpkg\.cache
- name: Cache vcpkg
id: cache
uses: actions/cache@v3
with:
path: |
C:\vcpkg\.cache
key: vcpkg-${{ runner.os }}-${{ env.VCPKG_COMMIT }}
- name: Build vcpkg
run: |
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.bat
- name: Install dependencies
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --x-install-root ${{ github.workspace }}/vcpkg/installed/
working-directory: windows
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -93,13 +113,14 @@ jobs:
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
CARGO_TARGET_DIR: "..\\..\\windows"
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
run: msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=x64
working-directory: ./windows
- name: Display version information
continue-on-error: true
run: ./ccextractorwinfull.exe --version
working-directory: ./windows/x64/Debug-Full
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: CCExtractor Windows Debug build
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Format code
run: |
find src/ -type f -not -path "src/thirdparty/*" -not -path "src/lib_ccx/zvbi/*" -name '*.c' -not -path "src/GUI/icon_data.c" | xargs clang-format -i
Expand All @@ -30,9 +30,9 @@ jobs:
run:
working-directory: ./src/rust
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
src/rust/.cargo/registry
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
shell: bash
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3.1
uses: microsoft/setup-msbuild@v2.0.0
- name: Install llvm and clang
uses: egor-tensin/setup-clang@v1
with:
Expand Down Expand Up @@ -62,20 +62,20 @@ jobs:
run: wix build -ext "$HOME\.wix\extensions\WixToolset.UI.wixext\4.0.0-preview.0\tools\WixToolset.UI.wixext.dll" -d "AppVersion=${{ steps.get_version.outputs.VERSION }}.0.0" -o CCExtractor.msi installer.wxs
working-directory: ./windows
- name: Upload as asset
uses: AButler/upload-release-assets@v2.0
uses: AButler/upload-release-assets@v3.0
with:
files: './windows/CCExtractor.msi;./windows/CCExtractor_win_portable.zip'
repo-token: ${{ secrets.GITHUB_TOKEN }}
create_linux_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: ./ccextractor
- name: Create .tar.gz without git and windows folders
run: tar -pczf ./ccextractor_minimal.tar.gz --exclude "ccextractor/windows" --exclude "ccextractor/.git" ccextractor
- name: Upload as asset
uses: AButler/upload-release-assets@v2.0
uses: AButler/upload-release-assets@v3.0
with:
files: './ccextractor_minimal.tar.gz'
repo-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ src/rust/CMakeCache.txt
src/rust/Makefile
src/rust/cmake_install.cmake
src/rust/target/
src/rust/lib_ccxr/target/
windows/ccx_rust.lib
windows/*/debug/*
windows/*/CACHEDIR.TAG
windows/.rustc_info.json
windows/.rustc_info.json
5 changes: 5 additions & 0 deletions docs/CHANGES.TXT
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
0.95 (to be released)
-----------------
- New: Create `lib_ccxr` and `libccxr_exports` (#1621)
- Fix: Unexpected behavior of get_write_interval (#1609)
- Update: Bump rsmpeg to latest version for ffmpeg bindings (#1600)
- New: Add SCC support for CEA-708 decoder (#1595)
- Fix: respect `-stdout` even if multiple CC tracks are present in a Matroska input file (#1453)
- Fix: crash in Rust decoder on ATSC1.0 TS Files (#1407)
- Removed the --with-gui flag for linux/configure and mac/configure (use the Flutter GUI instead)
Expand All @@ -21,6 +25,7 @@
- Fix: Repeated values for enums
- Cleanup: Remove the (unmaintained) Nuklear GUI code
- Cleanup: Reduce the amount of Windows build options in the project file
- Fix: infinite loop in MP4 file type detector.
- Fix: fatal out of memory error extracting from a VOB PS

0.94 (2021-12-14)
Expand Down
8 changes: 4 additions & 4 deletions docs/COMPILATION.MD
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Debian:
sudo apt-get install -y libgpac-dev libglew-dev libglfw3-dev cmake gcc libcurl4-gnutls-dev tesseract-ocr libtesseract-dev libleptonica-dev clang libclang-dev
```

RHEL:
RHEL/Fedora:

```bash
yum install -y glew-devel glfw-devel cmake gcc libcurl-devel tesseract-devel leptonica-devel clang
yum install -y glew-devel glfw-devel cmake gcc libcurl-devel tesseract-devel leptonica-devel clang gpac-devel
```

Arch:
```bash
sudo paru -S glew glfw curl tesseract leptonica cmake gcc clang
sudo paru -S glew glfw curl tesseract leptonica cmake gcc clang gpac
```

Rust 1.54 or above is also required. [Install Rust](https://www.rust-lang.org/tools/install). Check specific compilation methods below, on how to compile without rust.
Expand Down Expand Up @@ -57,7 +57,7 @@ cd ccextractor/linux
./build -without-rust

# compile with debug info
./build -debug # same as ./build_debug
./build -debug # same as ./builddebug

# compile with hardsubx
[Optional] You need to set these environment variables correctly according to your machine,
Expand Down
2 changes: 1 addition & 1 deletion linux/build
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ SRC_FREETYPE="../src/thirdparty/freetype/autofit/autofit.c
../src/thirdparty/freetype/type42/type42.c
../src/thirdparty/freetype/winfonts/winfnt.c"
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC $SRC_FREETYPE"
BLD_LINKER="$BLD_LINKER -lm -zmuldefs -l tesseract -l lept -lpthread -ldl -lgpac"
BLD_LINKER="$BLD_LINKER -lm -zmuldefs -l tesseract -l leptonica -lpthread -ldl -lgpac"

echo "Running pre-build script..."
./pre-build.sh
Expand Down
Loading

0 comments on commit 69a115e

Please sign in to comment.