build(vcpkg): Define FFmpeg as VCPKG feature, disabled by default - #3184
build(vcpkg): Define FFmpeg as VCPKG feature, disabled by default#3184tsunamistate wants to merge 5 commits into
Conversation
PR Summary by QodoMake FFmpeg an optional vcpkg feature (default off)
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can copy the agent prompt from any finding and feed it to your IDE agent |
|
This looks good to me - we should merge 2542 first, then rebase this - if this merges first, FFMPEG enabled cold builds may still be broken on the dead MSYS2 download. We should probably set RTS_BUILD_OPTION_FFMPEG=ON in one GeneralsMD win32-vcpkg CI job, and let's keep it off by default in CMakePresets. In your PR description for the manual testing instructions, I would use: |
|
Updated test instructions to use the command line |
|
Can you set RTS_BUILD_OPTION_FFMPEG=ON in one GeneralsMD win32-vcpkg CI job? |
0afb7a1 to
4d455d9
Compare
|
@bobtista I don't have a lot of experience with GitHub Actions setup, but I added an FFMPEG toggle and one additional job that is a clone of VCPKG release build with FFMPEG enabled. |
ab97809 to
173d5d4
Compare
The workflow input and CMake look right, but it doesn't enable an FFmpeg CI build. The new matrix entry is commented out, and build-generalsmd-win32 does not pass the matrix value into the reusable workflow, so inputs.ffmpeg will still default to false. After #2542 (already approved) merges and this is rebased, I would just add ffmpeg: true to the existing GeneralsMD win32-vcpkg release matrix entry rather than adding a duplicate job, then pass it through under with:: Also a nit: This could also be added to the reusable job name near the top of that file so the Actions job list identifies which build uses FFmpeg eg Just a nice to have, it matches the existing tools/extras pattern and avoids rendering a false value weirdly |
I assumed I would uncomment it after 2542 is merged
Done
Done |
95de54e to
3f5ccd3
Compare
|
| Filename | Overview |
|---|---|
| .github/workflows/ci.yml | Enables FFmpeg for the GeneralsMD win32-vcpkg matrix entry and passes a valid default-false boolean to the reusable workflow; the previously reported conflict markers are gone. |
| .github/workflows/build-toolchain.yml | Adds a typed FFmpeg input and translates it into the corresponding CMake option. |
| CMakeLists.txt | Loads vcpkg feature configuration before project() so manifest features are selected before toolchain initialization. |
| cmake/config-vcpkg.cmake | Defines the default-off FFmpeg build option and conditionally appends the matching vcpkg manifest feature. |
| vcpkg.json | Moves FFmpeg from unconditional dependencies into an optional named feature. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
CI[CI matrix ffmpeg flag] --> Input[Reusable workflow input]
Input --> Option[RTS_BUILD_OPTION_FFMPEG]
Option -->|ON| Feature[VCPKG_MANIFEST_FEATURES: ffmpeg]
Feature --> Dependency[vcpkg installs FFmpeg]
Option -->|OFF| Default[FFmpeg dependency omitted]
Reviews (9): Last reviewed commit: "Review feedback, round 2" | Re-trigger Greptile
3f5ccd3 to
a8a2504
Compare
a8a2504 to
d37e448
Compare
|
Build fail was because I accidentally reverted the baseline commit change made in cc48d39, should be fine now |
|
I like the dedicated cmake/vcpkg.cmake suggestion, and let's leave cmake/config.cmake where it is and keep add_feature_info(FFmpegSupport ...) in config-build.cmake |
Done
Why make a duplicate? It would only cause bugs |
Sorry I don't mean to suggest a duplicate - the current commit is exactly what I meant. The option(...) declaration lives in cmake/vcpkg.cmake, while the existing add_feature_info(...) remains in config-build.cmake to register it with feature_summary(). No further change needed. |
02ef2a0 to
94f3441
Compare
|
@xezon addressed your comments and rebased |
94f3441 to
9548e99
Compare
9548e99 to
85aa961
Compare
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
85aa961 to
4730c34
Compare
Closes #3175
RTS_BUILD_OPTION_FFMPEGfromconfig-build.cmake, defining it in the top-levelCMakeLists.txtbefore theprojectblockTesting:
win32-vcpkgpreset -cmake --preset win32-vcpkg. Note that FFMPEG is NOT built duringvcpkg install.cmake --build --preset win32-vcpkgwin32-vcpkgpreset with FFMPEG support -cmake --preset win32-vcpkg -DRTS_BUILD_OPTION_FFMPEG=ONcmake --build --preset win32-vcpkg. FFMPEG is built during thevcpkg install, FFMPEG DLLs are copied to the build folderBINKW32.DLLfrom the build folder of FFMPEG support build and launch the game to test if cutscenes still workNo LLMs were used during the creation of this PR
RTFM used: