From 9bad5a60eac32c67701d11260fa10b8517332171 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 24 May 2024 20:42:16 +0530 Subject: [PATCH] fix(windows): revert to old workflow and vcxproj --- .github/workflows/build_windows.yml | 49 +++++++++++++++++------------ windows/ccextractor.vcxproj | 8 ++--- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 3ecbf1c8b..36179c19b 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -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: @@ -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/setup-msbuild@v1.3.1 + 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 @@ -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/setup-msbuild@v1.3.1 + 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 @@ -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 diff --git a/windows/ccextractor.vcxproj b/windows/ccextractor.vcxproj index d2190f3c2..1f74856ea 100644 --- a/windows/ccextractor.vcxproj +++ b/windows/ccextractor.vcxproj @@ -192,17 +192,17 @@ {0F0063C4-BCBC-4379-A6D5-84A5669C940A} ccextractor Win32Proj - 10.0.19041.0 + 10.0.22621.0 Application - v142 + v143 Application - v142 + v143 @@ -270,7 +270,7 @@ call pre-build.bat - call rust.bat + call rust.bat "--profile=release-with-debug"