libs-webkitcef is a GNUstep WebKit-compatible framework backed by the
Chromium Embedded Framework (CEF). It provides a WebView Objective-C API for
loading web pages, navigating browser history, and evaluating JavaScript from
GNUstep applications.
The repository also includes a small WebBrowser demo application that uses the
framework.
This is a test browser running on Linux using GNUstep...
WebKit/- GNUstep framework sources, public headers, CEF integration, and helper scripts.Applications/WebBrowser/- sample GNUstep application usingWebView.WebKit/Documentation/- detailed notes about the build, CEF integration, linker fixes, and application setup.WebKit/bin/download_cef.sh- fetches and builds the CEF sample project used by this framework.WebKit/bin/install_cef_libs.sh- installs built CEF libraries into/usr/local/lib.
- A palette for Gorm so that this can be wired into a
.gorm(or other model) file for easy re-use.
- GNUstep development environment with
gnustep-make - Objective-C and Objective-C++ compiler support
git,python3,cmake, andmake- CEF libraries for runtime browser functionality
The framework can compile without CEF libraries by using local stubs, but the actual browser runtime requires CEF to be downloaded and built.
Set GNUSTEP_MAKEFILES if it is not already available in your environment:
export GNUSTEP_MAKEFILES="$(gnustep-config --variable=GNUSTEP_MAKEFILES)"Build the framework and demo application:
makeBuild only the framework:
cd WebKit
makeBuild only the demo application:
cd Applications/WebBrowser
makeInstall the framework with the normal GNUstep make target:
cd WebKit
make installDownload and build CEF from the WebKit directory:
cd WebKit
./bin/download_cef.shThe build system looks for CEF under:
WebKit/cef_build/cef-project
After CEF is available, rebuild the framework:
cd WebKit
make clean
makeIf applications cannot locate the CEF shared libraries at runtime, source the environment helper before running them:
source WebKit/webkit-env.shAlternatively, install the built CEF libraries into /usr/local/lib:
cd WebKit
./bin/install_cef_libs.shImport the public header and add a WebView to an AppKit view hierarchy:
#import <WebKit/WebView.h>
WebView *webView = [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)];
[windowContentView addSubview:webView];
[webView loadURL:@"https://www.gnu.org"];The public API includes:
loadURL:loadRequest:loadHTMLString:baseURL:reloadstopLoadinggoBack/goForwardcanGoBack/canGoForwardstringByEvaluatingJavaScriptFromString:evaluateJavaScript:completionHandler:mainFrameURLmainFrameTitle
Start with these files for more detail:
WebKit/Documentation/QUICK_START.mdWebKit/Documentation/CEF_INTEGRATION_GUIDE.mdWebKit/Documentation/BUILD_CEF_OPTIONAL.mdWebKit/Documentation/BUILD_APPLICATIONS.mdWebKit/Documentation/LINKER_ERROR_QUICK_FIX.md
If make reports that GNUSTEP_MAKEFILES is missing, install or initialize
GNUstep make support and export the value from gnustep-config.
If the framework builds but the demo application fails to link or run, verify
that CEF was built and that the CEF Release directory is available through the
framework rpath, LD_LIBRARY_PATH, or /usr/local/lib.
If CEF headers or libraries are not present, the framework build falls back to stub compilation. This is useful for validating the Objective-C API but does not provide an embedded browser at runtime.
Source files in this repository are licensed under the GNU General Public License, version 3 or later. See the notices in individual source files for details.