Commit 4a837e50 authored by Callum Prentice's avatar Callum Prentice
Browse files

README.md edited online with Bitbucket

parent b1734477
## Dullahan
# Dullahan
#### What is it?
## What is it?
A headless browser SDK that uses the [Chromium Embedded Framework](https://en.wikipedia.org/wiki/Chromium_Embedded_Framework) (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events and interact with web based features like JavaScript or cookies.
###### **Important note**:
#### **Important note**:
This is __very__ much an alpha release / first code drop. I have high hopes this will develop into something useful but there is still a lot of work to do first.
#### What could I use it for?
## What could I use it for?
It might be useful in a number of situations - for example:
* Anywhere you want to render web content in a graphics application - e.g. help pages in an OpenGL based game
......@@ -20,7 +20,7 @@ It might be useful in a number of situations - for example:
* Web page capture to an image or a PDF file
* Lots more I haven't thought of yet
#### What is CEF?
## What is CEF?
From the [CEF Wiki](https://en.wikipedia.org/wiki/Chromium_Embedded_Framework) page: The Chromium Embedded Framework (CEF) is an open source framework for embedding a web browser engine based on the Chromium core.
......@@ -28,23 +28,23 @@ An essential site to visit when developing a CEF based application is the [CEF f
Building CEF locally is quite a task so Adobe kindly host builds for all supported platforms [here](http://cefbuilds.com).
#### Which version of CEF does Dullahan use?
## Which version of CEF does Dullahan use?
Dullahan been developed against the [CEF 3.2704](https://cefbuilds.com) build of CEF but with some small tweaks to take account of CEF interface changes etc. it should work with slightly older or more recent versions too.
#### What are the origins of this project?
## What are the origins of this project?
Historically, the first incarnation was [LLCEFLib](https://bitbucket.org/lindenlab/3p-llceflib) - a [Linden Lab](http://lindenlab.com) internal library to render web content content inside [Second Life](http://secondlife.com). LLCEFLib had to support the outdated 32bit macOS version as well as many Second Life specific features so things became very disjointed and messy. This effort is an attempt to unburden the API from those requirements and provide a Windows only version that is much more generic and hopefully useful in other applications.
#### Is Windows, 32bit the only support platform?
## Is Windows, 32bit the only support platform?
For the moment yes. The 32bit version for macOS is no longer supported by CEF. One day, there will be a 64bit Windows version as well and ideally, at that point, the 64bit macOs version will be added too. No plans for a Linux version but if you'd like to help, please let me know.
#### Which version of the C++ runtime library does it use?
## Which version of the C++ runtime library does it use?
For historical reasons, both it and the version of CEF in this repository are built with the C++ runtime library set to `Multi-threaded DLL` / `Multi-threaded Debug DLL`.
#### How do I build Dullahan?
## How do I build Dullahan?
* Download or clone the source code here
* Build or grab the version of CEF you want to use (See below)
......@@ -53,19 +53,19 @@ For historical reasons, both it and the version of CEF in this repository are bu
* Select the Release or Debug configuration and build the solution in the normal fashion.
* If all goes well, you can set one of the example applications as the startup project and try it.
#### Binary distribution of example applications
## Binary distribution of example applications
If you would like to try the Dullahan example applications without having to build them, thee is a zipped binary distribution in the `bin` folder. It contains all the CEF/Chromium runtime files as well as the example executables.
#### Which files do I need in my own project?
## Which files do I need in my own project?
The main benefit of using Dullahan vs raw CEF is that you simply include the `dullahan.h` header file in your application and link against the `dullahan.lib` library along with two small CEF ones. Then, copy over the various CEF/Chromium runtime files along side your application - see the post-build step for the examples in Visual Studio for a list - and you are ready to go.
#### How do I use it?
## How do I use it?
The short answer is look at the code in the `examples` folder and `dullahan.h`. Generally speaking, you create an instance of the library, call `init()` and either (a) regularly call the `update()` function in your own message loop or the `run()` function if you don't have a message loop and want to use CEFs (e.g. a console application to save a web page as a bitmap). You can hook up a callback to be notified when the contents of the page changes and get access to the raw pixels. You can synthesize mouse and keyboard events and send them into the page. Finally, when you want to exit, make sure the `onRequestExit` callback is hooked up and call the `requestExit()` method. When the library and CEF have cleaned everything up, your callback will be triggered and you can call `shutdown()` before exiting normally.
#### Grabbing CEF
## Grabbing CEF
* Make sure [CMake](https://cmake.org/) is installed on your system
* Grab a Windows 32-bit build of CEF from [http://cefbuilds.com](http://cefbuilds.com)
......@@ -85,7 +85,7 @@ If this step failed then you will have to inspect the batch file. Generally spea
Another option is to build the whole thing from scratch. This is necessary if you want to make changes to the Chromium code or perhaps turn on the proprietary media codecs support which is not available in the [CEF Builds](http://cefbuilds.com) versions. For more information on how to do this, look online or inspect the `tools/build_cef.bat` batch file.
#### What is left to do before the first real release?
## What is left to do before the first real release?
* Consider using CMake to generate the Dullahan project files
* Add support for 64bit windows, macOS and Linux versions
......@@ -97,10 +97,10 @@ Another option is to build the whole thing from scratch. This is necessary if yo
* Add support for different pages on each side of the Web Cube example
* Lots and lots more... please help if you can.
#### What is `dullahan_src_hash.hpp`
## What is `dullahan_src_hash.hpp`
In an effort to come up with a way to uniquely identify a version, I experimented with taking an MD5 hash of all the source code and using part of that in the version number string. A Pre-Build in the Visual Studio Project file step does this and writes out `dullahan_src_hash.hpp`. The hash in this header file is then combined with the CEF version, the Chrome version it represents as well as a Dullahan version into a single string that uniquely identifies the build. I'm still not sure this is a good idea but I'll leave in there until someone explains to me how stupid it is.
#### Why the name?
## Why the name?
[Seemed appropriate](https://www.google.com/search?q=dullahan)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment