How to embed CEF3 in my OSX application?

I like to use the Chromium browser instead of the WebKit browser in my OS X project.

  • I uploaded the binaries at https://cefbuilds.com
  • I built using cmake, which creates cef.xcodeproj.
  • As soon as I open it and want to build it. This gives me problems at first, because the virtual bool Execute needs to be redefined. When I solved this error, it goes much further, but crashes with:

    cefsimple /bin/sh: tools/make_more_helpers.sh: /bin/bash: bad interpreter: Operation not permitted make: *** [cefsimple_buildpart_2] Error 126 Command /bin/sh failed with exit code 2 

Can someone explain what I'm doing wrong?

+5
source share
1 answer

In OS X versions 10.7.4 and later, extended attributes are added to executable files (including shell scripts) and processed by the security settings that you define for your account. For example, checking xattr on one of your build scripts might look something like this:

 $ ls -l@ make_more_helpers.sh -rwxr-xr-x@ 1 Hellman staff 3564 Sep 2 07:02 make_more_helpers.sh com.apple.quarantine 23 

When Xcode tries to execute the script (again, depending on your security settings), it will consider the extended attributes and determine whether to allow this execution. If it finds that the creator of the script has not been approved, you will receive an error message, for example:

 make_more_helpers.sh: /bin/bash: bad interpreter: Operation not permitted 

Fortunately, this is an easy solution, and there are several ways to fix it. One such way would be to bundle scripts that are part of the projects you create with Xcode. You can also open the script in an editor that is allowed to run scripts and save it again, or just recursively scan the assembly directory for files with quarantine attributes and delete the attribute:

 xattr -rd com.apple.quarantine /path/to/build 

After that, you should notice that deleting another ls -l@ on script @ after permissions and com.apple.quarantine should be deleted. Now that you are trying to create your project, the script should be allowed to execute and succeed.

โ†ณ https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/BeforeYouBegin/BeforeYouBegin.html

+2
source

Source: https://habr.com/ru/post/1236009/


All Articles