Change product_version to user_agent_product #297

Merged
deviant merged 1 commit from user_agent_product into master 2021-07-13 05:58:01 -05:00
deviant commented 2021-06-10 12:56:43 -05:00 (Migrated from github.com)

Description

Fixes compilation against CEF 91.1.0 and later. The product_version setting has been renamed to user_agent_product.

(Note: only merge this once you update the officially supported CEF to 91.1.0 (Chromium 91.0.4472.19) or later)

Motivation and Context

Fixes a compilation failure. Here's the CEF commit that caused this.

How Has This Been Tested?

Built as part of OBS 27.0 using CEF 90.6.7 on NixOS (see https://github.com/NixOS/nixpkgs/pull/126505).

OBS starts up and displays the chosen web page when a Browser source is configured.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.
<!--- Please fill out the following template, which will help other contributors review your Pull Request. --> <!--- Make sure you’ve read the contribution guidelines here: https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst --> ### Description <!--- Describe your changes in detail. --> <!--- If this change includes UI elements, please include screenshots. --> Fixes compilation against CEF 91.1.0 and later. The `product_version` setting has been renamed to `user_agent_product`. (Note: only merge this once you update the officially supported CEF to 91.1.0 (Chromium 91.0.4472.19) or later) ### Motivation and Context Fixes a compilation failure. Here's the [CEF commit](https://bitbucket.org/chromiumembedded/cef/commits/02ae4597d8b6c895e46891a7596cf5fa1fe15df8) that caused this. ### How Has This Been Tested? Built as part of OBS 27.0 using CEF 90.6.7 on NixOS (see https://github.com/NixOS/nixpkgs/pull/126505). OBS starts up and displays the chosen web page when a Browser source is configured. ### Types of changes <!--- What types of changes does your PR introduce? Uncomment all that apply --> - Bug fix (non-breaking change which fixes an issue) <!--- - New feature (non-breaking change which adds functionality) --> <!--- - Performance enhancement (non-breaking change which improves efficiency) --> <!--- - Code cleanup (non-breaking change which makes code smaller or more readable) --> - Breaking change (fix or feature that would cause existing functionality to change) <!--- - Documentation (a change to documentation pages) --> ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code has been run through [clang-format](https://github.com/obsproject/obs-studio/blob/master/.clang-format). - [x] I have read the [**contributing** document](https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst). - [x] My code is not on the master branch. - [x] The code has been tested. - [x] All commit messages are properly formatted and commits squashed where appropriate. - [ ] I have included updates to all appropriate documentation.
RytoEX commented 2021-06-10 13:13:07 -05:00 (Migrated from github.com)

This looks like a breaking change that isn't ifdef'd, and for a version of CEF we don't officially support.

This looks like a breaking change that isn't ifdef'd, and for a version of CEF we don't officially support.
deviant commented 2021-06-10 13:14:11 -05:00 (Migrated from github.com)

I'm aware of both, hence you should consider this WIP until you bump the supported version.

I'm aware of both, hence you should consider this WIP until you bump the supported version.
deviant commented 2021-06-10 13:17:26 -05:00 (Migrated from github.com)

(I'm happy to stick it behind an ifdef if you can give me a pointer to the right place to define this, FWIW)

(I'm happy to stick it behind an ifdef if you can give me a pointer to the right place to define this, FWIW)
WizardCM commented 2021-06-15 02:03:03 -05:00 (Migrated from github.com)

Yep, please stick this behind compile conditional as there is no guarantee on when each platform will have the relevant CEF build configured.

#if CHROME_VERSION_BUILD >= 4472
	CefString(&settings.user_agent_product) = prod_ver.str();
#else
	CefString(&settings.product_version) = prod_ver.str();
#endif
Yep, please stick this behind compile conditional as there is no guarantee on when each platform will have the relevant CEF build configured. ```cpp #if CHROME_VERSION_BUILD >= 4472 CefString(&settings.user_agent_product) = prod_ver.str(); #else CefString(&settings.product_version) = prod_ver.str(); #endif ```
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-obsproject/obs-browser!297
No description provided.