From 1aa9762f19615ce396c4a48d0e85b7716207fcda Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Wed, 18 Feb 2026 09:35:11 -0800 Subject: [PATCH] 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 --- .github/workflows/build_windows.yml | 62 ++++++++---- .github/workflows/release.yml | 42 +++++--- windows/ccextractor.sln | 6 ++ windows/ccextractor.vcxproj | 143 +++++++++++++++++++++++++++- windows/installer.wxs | 4 + windows/rust.bat | 12 ++- 6 files changed, 230 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 03ebf418..2916b1bb 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -2,7 +2,6 @@ name: Build CCExtractor on Windows env: RUSTFLAGS: -Ctarget-feature=+crt-static - VCPKG_DEFAULT_TRIPLET: x64-windows-static VCPKG_COMMIT: ab2977be50c702126336e5088f4836060733c899 on: @@ -30,6 +29,20 @@ on: jobs: build: runs-on: windows-2022 + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + platform: x64 + vcpkg_triplet: x64-windows-static + rust_target: x86_64-pc-windows-msvc + gpac_install: "C:\\Program Files\\GPAC" + - arch: x86 + platform: Win32 + vcpkg_triplet: x86-windows-static + rust_target: i686-pc-windows-msvc + gpac_install: "C:\\Program Files\\GPAC" steps: - name: Check out repository uses: actions/checkout@v6 @@ -41,7 +54,7 @@ jobs: # Install GPAC (fast, ~30s, not worth caching complexity) - name: Install gpac - run: choco install gpac --version 2.4.0 --no-progress + run: choco install gpac --version 2.4.0 --no-progress ${{ matrix.arch == 'x86' && '--forcex86' || '' }} # Use lukka/run-vcpkg for better caching - name: Setup vcpkg @@ -58,13 +71,13 @@ jobs: uses: actions/cache@v5 with: path: ${{ github.workspace }}/vcpkg/installed - key: vcpkg-installed-${{ runner.os }}-${{ env.VCPKG_COMMIT }}-${{ hashFiles('windows/vcpkg.json') }} + key: vcpkg-installed-${{ runner.os }}-${{ matrix.vcpkg_triplet }}-${{ env.VCPKG_COMMIT }}-${{ hashFiles('windows/vcpkg.json') }} restore-keys: | - vcpkg-installed-${{ runner.os }}-${{ env.VCPKG_COMMIT }}- + vcpkg-installed-${{ runner.os }}-${{ matrix.vcpkg_triplet }}-${{ env.VCPKG_COMMIT }}- - name: Install vcpkg dependencies if: steps.vcpkg-installed-cache.outputs.cache-hit != 'true' - run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --x-install-root ${{ github.workspace }}/vcpkg/installed/ + run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --triplet ${{ matrix.vcpkg_triplet }} --x-install-root ${{ github.workspace }}/vcpkg/installed/ working-directory: windows # Cache Rust/Cargo artifacts @@ -79,21 +92,24 @@ jobs: ${{ runner.os }}-cargo-registry- # Cache Cargo build artifacts - rust.bat sets CARGO_TARGET_DIR to windows/ - # which results in artifacts at windows/x86_64-pc-windows-msvc/ - name: Cache Cargo build artifacts uses: actions/cache@v5 with: - path: ${{ github.workspace }}/windows/x86_64-pc-windows-msvc - key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('src/rust/**/*.rs') }} + path: ${{ github.workspace }}/windows/${{ matrix.rust_target }} + key: ${{ runner.os }}-${{ matrix.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('src/rust/**/*.rs') }} restore-keys: | - ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}- - ${{ runner.os }}-cargo-build- + ${{ runner.os }}-${{ matrix.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}- + ${{ runner.os }}-${{ matrix.arch }}-cargo-build- - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.rust_target }} - name: Install Win 10 SDK uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} # Build Release-Full - name: Build Release-Full @@ -102,20 +118,22 @@ jobs: LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config" BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0 VCPKG_ROOT: ${{ github.workspace }}/vcpkg - run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64 + VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }} + run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=${{ matrix.platform }} working-directory: ./windows - name: Display Release version information + if: matrix.arch == 'x64' run: ./ccextractorwinfull.exe --version - working-directory: ./windows/x64/Release-Full + working-directory: ./windows/${{ matrix.platform }}/Release-Full - name: Upload Release artifact uses: actions/upload-artifact@v6 with: - name: CCExtractor Windows Release build + name: CCExtractor Windows ${{ matrix.arch }} Release build path: | - ./windows/x64/Release-Full/ccextractorwinfull.exe - ./windows/x64/Release-Full/*.dll + ./windows/${{ matrix.platform }}/Release-Full/ccextractorwinfull.exe + ./windows/${{ matrix.platform }}/Release-Full/*.dll # Build Debug-Full (reuses cached Cargo artifacts) - name: Build Debug-Full @@ -124,19 +142,21 @@ jobs: LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config" BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0 VCPKG_ROOT: ${{ github.workspace }}/vcpkg - run: msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=x64 + VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }} + run: msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=${{ matrix.platform }} working-directory: ./windows - name: Display Debug version information + if: matrix.arch == 'x64' continue-on-error: true run: ./ccextractorwinfull.exe --version - working-directory: ./windows/x64/Debug-Full + working-directory: ./windows/${{ matrix.platform }}/Debug-Full - name: Upload Debug artifact uses: actions/upload-artifact@v6 with: - name: CCExtractor Windows Debug build + name: CCExtractor Windows ${{ matrix.arch }} Debug build path: | - ./windows/x64/Debug-Full/ccextractorwinfull.exe - ./windows/x64/Debug-Full/ccextractorwinfull.pdb - ./windows/x64/Debug-Full/*.dll + ./windows/${{ matrix.platform }}/Debug-Full/ccextractorwinfull.exe + ./windows/${{ matrix.platform }}/Debug-Full/ccextractorwinfull.pdb + ./windows/${{ matrix.platform }}/Debug-Full/*.dll diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 179195c4..b2812029 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,13 +10,28 @@ permissions: env: RUSTFLAGS: -Ctarget-feature=+crt-static - VCPKG_DEFAULT_TRIPLET: x64-windows-static VCPKG_DEFAULT_BINARY_CACHE: C:\vcpkg\.cache VCPKG_COMMIT: ab2977be50c702126336e5088f4836060733c899 jobs: build_windows: runs-on: windows-2022 + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + platform: x64 + vcpkg_triplet: x64-windows-static + rust_target: x86_64-pc-windows-msvc + wix_arch: x64 + suffix: "" + - arch: x86 + platform: Win32 + vcpkg_triplet: x86-windows-static + rust_target: i686-pc-windows-msvc + wix_arch: x86 + suffix: "_x86" steps: - name: Check out repository uses: actions/checkout@v6 @@ -46,7 +61,7 @@ jobs: with: msbuild-architecture: x64 - name: Install gpac - run: choco install gpac --version 2.4.0 + run: choco install gpac --version 2.4.0 ${{ matrix.arch == 'x86' && '--forcex86' || '' }} - name: Setup vcpkg run: mkdir C:\vcpkg\.cache - name: Cache vcpkg @@ -55,20 +70,22 @@ jobs: with: path: | C:\vcpkg\.cache - key: vcpkg-${{ runner.os }}-${{ env.VCPKG_COMMIT }} + key: vcpkg-${{ runner.os }}-${{ matrix.vcpkg_triplet }}-${{ 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/ + run: ${{ github.workspace }}/vcpkg/vcpkg.exe install --triplet ${{ matrix.vcpkg_triplet }} --x-install-root ${{ github.workspace }}/vcpkg/installed/ working-directory: windows - - uses: actions-rs/toolchain@v1 + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true + targets: ${{ matrix.rust_target }} - name: Install Win 10 SDK uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} - name: build Release-Full env: LIBCLANG_PATH: "C:\\Program Files\\LLVM\\lib" @@ -76,10 +93,11 @@ jobs: CARGO_TARGET_DIR: "..\\..\\windows" BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0 VCPKG_ROOT: ${{ github.workspace }}/vcpkg - run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64 + VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }} + run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=${{ matrix.platform }} working-directory: ./windows - name: Copy files to directory for installer - run: mkdir installer; cp ./x64/Release-Full/ccextractorwinfull.exe ./installer; cp ./x64/Release-Full/*.dll ./installer + run: mkdir installer; cp ./${{ matrix.platform }}/Release-Full/ccextractorwinfull.exe ./installer; cp ./${{ matrix.platform }}/Release-Full/*.dll ./installer working-directory: ./windows - name: Download tessdata for OCR support run: | @@ -106,15 +124,15 @@ jobs: run: Get-ChildItem -Recurse ./installer working-directory: ./windows - name: Create portable zip - run: Compress-Archive -Path ./installer/* -DestinationPath ./CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}_win_portable.zip + run: Compress-Archive -Path ./installer/* -DestinationPath ./CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}${{ matrix.suffix }}_win_portable.zip working-directory: ./windows - name: Build installer - run: wix build -arch x64 -ext WixToolset.UI.wixext -d "AppVersion=${{ steps.get_version.outputs.VERSION }}" -o CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}.msi installer.wxs CustomUI.wxs + run: wix build -arch ${{ matrix.wix_arch }} -ext WixToolset.UI.wixext -d "AppVersion=${{ steps.get_version.outputs.VERSION }}" -o CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}${{ matrix.suffix }}.msi installer.wxs CustomUI.wxs working-directory: ./windows - name: Upload as asset uses: AButler/upload-release-assets@v3.0 with: - files: './windows/CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}.msi;./windows/CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}_win_portable.zip' + files: './windows/CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}${{ matrix.suffix }}.msi;./windows/CCExtractor.${{ steps.get_version.outputs.DISPLAY_VERSION }}${{ matrix.suffix }}_win_portable.zip' repo-token: ${{ secrets.GITHUB_TOKEN }} create_linux_package: runs-on: ubuntu-latest diff --git a/windows/ccextractor.sln b/windows/ccextractor.sln index 301930d7..ceba642b 100644 --- a/windows/ccextractor.sln +++ b/windows/ccextractor.sln @@ -7,12 +7,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ccextractor", "ccextractor. EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug-Full|Win32 = Debug-Full|Win32 Debug-Full|x64 = Debug-Full|x64 + Release-Full|Win32 = Release-Full|Win32 Release-Full|x64 = Release-Full|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Debug-Full|Win32.ActiveCfg = Debug-Full|Win32 + {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Debug-Full|Win32.Build.0 = Debug-Full|Win32 {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Debug-Full|x64.ActiveCfg = Debug-Full|x64 {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Debug-Full|x64.Build.0 = Debug-Full|x64 + {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Release-Full|Win32.ActiveCfg = Release-Full|Win32 + {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Release-Full|Win32.Build.0 = Release-Full|Win32 {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Release-Full|x64.ActiveCfg = Release-Full|x64 {0F0063C4-BCBC-4379-A6D5-84A5669C940A}.Release-Full|x64.Build.0 = Release-Full|x64 EndGlobalSection diff --git a/windows/ccextractor.vcxproj b/windows/ccextractor.vcxproj index 58d88f96..3ed2a082 100644 --- a/windows/ccextractor.vcxproj +++ b/windows/ccextractor.vcxproj @@ -1,10 +1,18 @@  + + Debug-Full + Win32 + Debug-Full x64 + + Release-Full + Win32 + Release-Full x64 @@ -186,14 +194,23 @@ true - x64-windows-static + x64-windows-static + x86-windows-static true + + Application + v143 + Application v143 + + Application + v143 + Application v143 @@ -201,9 +218,15 @@ + + + + + + @@ -211,6 +234,17 @@ <_ProjectFileVersion>12.0.21005.1 + + true + ccextractorwinfull + + $(ProjectDir)\libs\include;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include; + "C:\Program Files\GPAC\sdk\include"; + $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include\zlib;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include\libpng16;$(IncludePath) + + $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\lib; + "C:\Program Files\GPAC\sdk\lib";$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86) + true ccextractorwinfull @@ -222,6 +256,17 @@ $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\lib; "C:\Program Files\GPAC\sdk\lib";$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + + false + ccextractorwinfull + + $(ProjectDir)\libs\include;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include; + "C:\Program Files\GPAC\sdk\include"; + $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include\zlib;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include\libpng16;$(IncludePath) + + $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\lib; + "C:\Program Files\GPAC\sdk\lib";$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86) + false ccextractorwinfull @@ -233,6 +278,54 @@ $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\lib; "C:\Program Files\GPAC\sdk\lib";$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + + + Disabled + + ..\src\thirdparty\freetype\include;..\src;..\src\thirdparty\win_spec_incld;..\src\lib_ccx;..\src\thirdparty\lib_hash;..\src\lib_ccx\zvbi;..\src\thirdparty\win_iconv;..\src\thirdparty\;..\src;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include; + "C:\Program Files\GPAC\sdk\include";%(AdditionalIncludeDirectories) + + 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;%(PreprocessorDefinitions) + Default + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + + ccx_rust.lib;UserEnv.lib;Crypt32.lib;WS2_32.Lib;ntdll.lib;Bcrypt.lib;Mfplat.lib;Mfuuid.lib;Secur32.lib;Strmiids.lib;Ole32.lib;User32.lib;libcrypto.lib;libcurl.lib;avcodec.lib;avformat.lib;avutil.lib;avfilter.lib;swscale.lib;swresample.lib;leptonica-1.85.0.lib;tesseract55.lib;gif.lib;archive.lib;avdevice.lib;bz2.lib;jpeg.lib;libpng16.lib;libsharpyuv.lib;libssl.lib;libwebp.lib;libwebpdecoder.lib;libwebpdemux.lib;libwebpmux.lib;libxml2.lib;lz4.lib;lzma.lib;openjp2.lib;tiff.lib;turbojpeg.lib;zlib.lib;zstd.lib;libgpac.lib;%(AdditionalDependencies) + NotSet + true + Console + + $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\lib; + "C:\Program Files\GPAC\sdk\lib";%(AdditionalLibraryDirectories) + + + call pre-build.bat + set RUST_TARGET=i686-pc-windows-msvc + call rust.bat "--profile=release-with-debug" + + + + xcopy /y "$(ProjectDir)\dll\vcruntime140.dll" "$(OutDir)" + xcopy /y "$(ProjectDir)\dll\vcruntime140_1.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\libgpac.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\OpenSVCDecoder.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\postproc-57.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\swresample-4.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avfilter-9.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\swscale-7.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avdevice-60.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avcodec-60.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avformat-60.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avutil-58.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\libsslMD.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\libcryptoMD.dll" "$(OutDir)" + + Disabled @@ -280,6 +373,54 @@ xcopy /y "C:\Program Files\GPAC\libcryptoMD.dll" "$(OutDir)" + + + Disabled + + ..\src\thirdparty\freetype\include;..\src;..\src\thirdparty\win_spec_incld;..\src\lib_ccx;..\src\thirdparty\lib_hash;..\src\lib_ccx\zvbi;..\src\thirdparty\win_iconv;..\src\thirdparty\;..\src;$(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\include; + "C:\Program Files\GPAC\sdk\include";%(AdditionalIncludeDirectories) + + 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;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + + + ccx_rust.lib;UserEnv.lib;Crypt32.lib;WS2_32.Lib;ntdll.lib;Bcrypt.lib;Mfplat.lib;Mfuuid.lib;Secur32.lib;Strmiids.lib;Ole32.lib;User32.lib;libcrypto.lib;libcurl.lib;avcodec.lib;avformat.lib;avutil.lib;avfilter.lib;swscale.lib;swresample.lib;leptonica-1.85.0.lib;tesseract55.lib;gif.lib;archive.lib;avdevice.lib;bz2.lib;jpeg.lib;libpng16.lib;libsharpyuv.lib;libssl.lib;libwebp.lib;libwebpdecoder.lib;libwebpdemux.lib;libwebpmux.lib;libxml2.lib;lz4.lib;lzma.lib;openjp2.lib;tiff.lib;turbojpeg.lib;zlib.lib;zstd.lib;libgpac.lib;%(AdditionalDependencies) + true + Console + true + true + + $(VCPKG_ROOT)\installed\$(VCPKG_DEFAULT_TRIPLET)\lib; + "C:\Program Files\GPAC\sdk\lib";%(AdditionalLibraryDirectories) + + + call pre-build.bat + set RUST_TARGET=i686-pc-windows-msvc + call rust.bat -r + + + + xcopy /y "$(ProjectDir)\dll\vcruntime140.dll" "$(OutDir)" + xcopy /y "$(ProjectDir)\dll\vcruntime140_1.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\libgpac.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\OpenSVCDecoder.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\postproc-57.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\swresample-4.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avfilter-9.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\swscale-7.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avdevice-60.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avcodec-60.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avformat-60.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\avutil-58.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\libsslMD.dll" "$(OutDir)" + xcopy /y "C:\Program Files\GPAC\libcryptoMD.dll" "$(OutDir)" + + Disabled diff --git a/windows/installer.wxs b/windows/installer.wxs index 8a435fdc..05574861 100644 --- a/windows/installer.wxs +++ b/windows/installer.wxs @@ -39,7 +39,11 @@ KeyPath="yes"/> + + + + diff --git a/windows/rust.bat b/windows/rust.bat index d82e53cf..2def16bc 100644 --- a/windows/rust.bat +++ b/windows/rust.bat @@ -1,15 +1,17 @@ for /f "delims=" %%i in ('cd') do set output=%%i set CARGO_TARGET_DIR=%output% cd ..\src\rust +REM Default to x86_64 if RUST_TARGET is not set +IF "%RUST_TARGET%"=="" set RUST_TARGET=x86_64-pc-windows-msvc REM Allow overriding FFmpeg version via environment variable IF "%FFMPEG_VERSION%"=="" ( - cargo build %1 --features "hardsubx_ocr" --target x86_64-pc-windows-msvc + cargo build %1 --features "hardsubx_ocr" --target %RUST_TARGET% ) ELSE ( - cargo build %1 --features "hardsubx_ocr,%FFMPEG_VERSION%" --target x86_64-pc-windows-msvc + cargo build %1 --features "hardsubx_ocr,%FFMPEG_VERSION%" --target %RUST_TARGET% ) cd ..\..\windows IF "%~1"=="-r" ( -copy x86_64-pc-windows-msvc\release\ccx_rust.lib .\ccx_rust.lib +copy %RUST_TARGET%\release\ccx_rust.lib .\ccx_rust.lib ) ELSE ( -copy x86_64-pc-windows-msvc\release-with-debug\ccx_rust.lib .\ccx_rust.lib -) \ No newline at end of file +copy %RUST_TARGET%\release-with-debug\ccx_rust.lib .\ccx_rust.lib +)