Skip to content

Commit

Permalink
fix(windows): revert to old workflow and vcxproj
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed May 24, 2024
1 parent 4db3260 commit 9bad5a6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 24 deletions.
49 changes: 29 additions & 20 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build CCExtractor on Windows
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
VCPKG_DEFAULT_TRIPLET: x64-windows-static
VCPKG_DEFAULT_BINARY_CACHE: C:\vcpkg\.cache

on:
workflow_dispatch:
Expand All @@ -22,36 +23,40 @@ on:

jobs:
build_release:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: Install llvm and clang
run: choco install llvm gpac
- 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 }}
- name: Install dependencies
run: vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
- 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: C:\vcpkg
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64
working-directory: ./windows
- name: Display version information
Expand All @@ -64,23 +69,27 @@ jobs:
./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@v4
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: Install llvm and clang
run: choco install llvm gpac
- name: Setup Vcpkg
id: vcpkg
uses: friendlyanon/setup-vcpkg@v1
- name: Setup vcpkg
run: mkdir C:\vcpkg\.cache
- name: Cache vcpkg
id: cache
uses: actions/cache@v3
with:
committish: "2023.08.09"
cache-version: "3"
ignore-reserve-cache-error: true
path: |
C:\vcpkg\.cache
key: vcpkg-${{ runner.os }}
- name: Install dependencies
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
run: vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -93,7 +102,7 @@ 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: C:\vcpkg
run: msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=x64
working-directory: ./windows
- name: Display version information
Expand Down
8 changes: 4 additions & 4 deletions windows/ccextractor.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,17 @@
<ProjectGuid>{0F0063C4-BCBC-4379-A6D5-84A5669C940A}</ProjectGuid>
<RootNamespace>ccextractor</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project=" $(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Full|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Full|x64'"
Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -270,7 +270,7 @@
</Link>
<PreBuildEvent>
<Command>call pre-build.bat
call rust.bat</Command>
call rust.bat "--profile=release-with-debug"</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>
Expand Down

0 comments on commit 9bad5a6

Please sign in to comment.