mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-09-23 15:24:41 +00:00
[FIX] Update Windows build (#1540)
* fix: update windows ci * fix: update docs for compilation * fix: build runtime library
This commit is contained in:
16
.github/workflows/build_windows.yml
vendored
16
.github/workflows/build_windows.yml
vendored
@@ -1,5 +1,9 @@
|
||||
name: Build CCExtractor on Windows
|
||||
|
||||
env:
|
||||
RUSTFLAGS: -Ctarget-feature=+crt-static
|
||||
VCPKG_DEFAULT_TRIPLET: x64-windows-static
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
@@ -40,14 +44,13 @@ jobs:
|
||||
cache-version: "1"
|
||||
ignore-reserve-cache-error: true
|
||||
- name: Install dependencies
|
||||
run: cd vcpkg && vcpkg integrate install && vcpkg install libpng --triplet x64-windows-static-md
|
||||
run: cd vcpkg && vcpkg integrate install && vcpkg install libpng --triplet x64-windows-static
|
||||
- name: build Release
|
||||
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_DEFAULT_TRIPLET: x64-windows-static-md
|
||||
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
|
||||
run: msbuild ccextractor.sln /p:Configuration=Release /p:Platform=x64
|
||||
working-directory: ./windows
|
||||
@@ -83,14 +86,13 @@ jobs:
|
||||
cache-version: "1"
|
||||
ignore-reserve-cache-error: true
|
||||
- name: Install dependencies
|
||||
run: cd vcpkg && vcpkg integrate install && vcpkg install libpng --triplet x64-windows-static-md
|
||||
run: cd vcpkg && vcpkg integrate install && vcpkg install libpng --triplet x64-windows-static
|
||||
- name: build Debug
|
||||
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_DEFAULT_TRIPLET: x64-windows-static-md
|
||||
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
|
||||
run: msbuild ccextractor.sln /p:Configuration=Debug /p:Platform=x64
|
||||
working-directory: ./windows
|
||||
@@ -127,14 +129,13 @@ jobs:
|
||||
cache-version: "1"
|
||||
ignore-reserve-cache-error: true
|
||||
- name: Install dependencies
|
||||
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static-md
|
||||
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_DEFAULT_TRIPLET: x64-windows-static-md
|
||||
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
|
||||
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64
|
||||
working-directory: ./windows
|
||||
@@ -164,7 +165,7 @@ jobs:
|
||||
cache-version: "1"
|
||||
ignore-reserve-cache-error: true
|
||||
- name: Install dependencies
|
||||
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static-md
|
||||
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
@@ -177,7 +178,6 @@ jobs:
|
||||
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
|
||||
CARGO_TARGET_DIR: "..\\..\\windows"
|
||||
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
|
||||
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
|
||||
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
|
||||
run: msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=x64
|
||||
working-directory: ./windows
|
||||
|
||||
@@ -200,19 +200,20 @@ Other dependencies are required through vcpkg, so you can follow below steps:
|
||||
```
|
||||
3. Set Environment Variable for Vcpkg triplet, you can choose between x86 or x64 based on your system.
|
||||
```
|
||||
setx VCPKG_DEFAULT_TRIPLET "x64-windows-static-md"
|
||||
setx VCPKG_DEFAULT_TRIPLET "x64-windows-static"
|
||||
setx RUSTFLAGS "-Ctarget-feature=+crt-static"
|
||||
```
|
||||
4. Install dependencies from vcpkg
|
||||
|
||||
In this step we are using `x64-windows-static-md` triplet, but you will have to use the triplet you set in Step 3
|
||||
In this step we are using `x64-windows-static` triplet, but you will have to use the triplet you set in Step 3
|
||||
|
||||
if building Debug-Full, Release-Full (HardSubx)
|
||||
```
|
||||
vcpkg install ffmpeg leptonica tesseract --triplet x64-windows-static-md
|
||||
vcpkg install ffmpeg leptonica tesseract --triplet x64-windows-static
|
||||
```
|
||||
otherwise if you have Debug, Release
|
||||
```
|
||||
vcpkg install libpng --triplet x64-windows-static-md
|
||||
vcpkg install libpng --triplet x64-windows-static
|
||||
```
|
||||
|
||||
Note: Following screenshots and steps are based on Visual Studio 2017, but they should be more or less same for other versions.
|
||||
|
||||
@@ -23,15 +23,16 @@ Note:If you installed ffmpeg on non-standard location, please change/update your
|
||||
```
|
||||
3. Set Environment Variable for Vcpkg triplet, you can choose between x86 or x64 based on your system.
|
||||
```
|
||||
setx VCPKG_DEFAULT_TRIPLET "x64-windows-static-md"
|
||||
setx VCPKG_DEFAULT_TRIPLET "x64-windows-static"
|
||||
setx RUSTFLAGS "-Ctarget-feature=+crt-static"
|
||||
```
|
||||
4. Install ffmpeg from vcpkg
|
||||
|
||||
|
||||
In this step we are using `x64-windows-static-md` triplet, but you will have to use the triplet you set in Step 3
|
||||
In this step we are using `x64-windows-static` triplet, but you will have to use the triplet you set in Step 3
|
||||
|
||||
```
|
||||
vcpkg install ffmpeg --triplet x64-windows-static-md
|
||||
vcpkg install ffmpeg --triplet x64-windows-static
|
||||
```
|
||||
|
||||
## How to compile ccextractor
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
<PreprocessorDefinitions>
|
||||
WIN32;FT2_BUILD_LIBRARY;GPAC_DISABLE_VTT;GPAC_DISABLE_OD_DUMP;_DEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;GPAC_DISABLE_REMOTERY;GPAC_DISABLE_ZLIB;GPAC_HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@@ -576,7 +576,7 @@
|
||||
<PreprocessorDefinitions>
|
||||
SEGMENT_BY_FILE_TIME;ENABLE_HARDSUBX;FT2_BUILD_LIBRARY;GPAC_DISABLE_VTT;GPAC_DISABLE_OD_DUMP;ENABLE_OCR;WIN32;_DEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;GPAC_DISABLE_REMOTERY;GPAC_DISABLE_ZLIB;GPAC_HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@@ -655,7 +655,7 @@
|
||||
..\src\thirdparty\freetype\include;..\src;..\src\thirdparty\win_spec_incld;..\src\lib_ccx;..\src\thirdparty\lib_hash;..\src\lib_ccx\zvbi;..\src\thirdparty\protobuf-c;..\src\thirdparty\gpacmp4;..\src\thirdparty\win_iconv;..\src\thirdparty\;..\src;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>
|
||||
ENABLE_HARDSUBX;FT2_BUILD_LIBRARY;GPAC_DISABLE_VTT;GPAC_DISABLE_OD_DUMP;VERSION_FILE_PRESENT;ENABLE_OCR;WIN32;NDEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;GPAC_DISABLE_REMOTERY;GPAC_DISABLE_ZLIB;GPAC_HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@@ -728,7 +728,7 @@
|
||||
..\src\thirdparty\freetype\include;..\src;../src/thirdparty/protobuf-c;../src/thirdparty/win_spec_incld;../src/lib_ccx;../src/thirdparty/lib_hash;../src/thirdparty/gpacmp4;../src/lib_ccx/zvbi;../src/thirdparty;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include\libpng16;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>
|
||||
VERSION_FILE_PRESENT;FT2_BUILD_LIBRARY;GPAC_DISABLE_VTT;GPAC_DISABLE_OD_DUMP;WIN32;NDEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;GPAC_DISABLE_REMOTERY;GPAC_DISABLE_ZLIB;GPAC_HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
||||
Reference in New Issue
Block a user