Dullahan is an Irish word meaning "headless".
The Irish dullahan (also Gan Ceann, meaning "without a head" in Irish) is a type of unseelie fairy.
The dullahan is a headless rider, usually on a black horse who carries his or her own head under one arm.
The Dullahan project is an attempt to create a .NET headless browser by compiling the Qt and Webkit libraries into an C++/CLI wrapper.
NOTE: This project has been put on hold due to the apparent inability to link a C++/CLI assembly to the statically linked PhantomJS/QT libraries. This seems to be an limitation of the Visual Studio compiler in that the /clr
switch is severely limited as does not support /MTd
(multi-threaded debug) or /MT
(multi-threaded) switches required to be able to statically link the QT libraries. We could dynamically link the QT libraries but this would require that the client machine that hosted the Dullahan app had the QT DLLs installed.
Dullahan is built on top of Open SSL and the Qt Webkit projects. The Qt source files are sourced from PhantomJS rather than Qt - mainly because PhantomJS is a headless browser and it only uses a subset of the Qt source files (which is quite large).
This is a work in progress. The plan is as follows:
- Build Qt/Webkit libraries from PhantomJS (including Open SSL) [DONE]
- Create C++/CLI wrapper core assembly as bridge between Webkit and .NET [ON HOLD: It seems that it is not possible to statically link a C++/CLI assembly to the PhantomJS/QT libraries]
- Create managed code assembly to simplify usage of core assembly.
- Create examples of different usage scenarios (e.g. screen capture, page automation etc.)
- Create nuget package
- Integrate into Visual Studio/IDE (debugger extensions, code generators, project templates etc.)
- Install Microsoft Visual C++ version 2012 (the Express edition should work just fine).
- Install ActivePerl 5 (the free Community Edition should work fine).
- Download latest stable version of Open SSL source code from http://www.openssl.org/source/openssl-1.0.1h.tar.gz and put in the root directory of the your local Dullahan repository (the directory containing the Dullahan.bat file).
- Download latest stable version of PhantomJS source code from https://github.com/ariya/phantomjs/archive/1.9.7.zip and put in the root directory of the your local Dullahan repository.
Warning: Compiling PhantomJS from source takes a long time (several hours), mainly due to thousands of files in the WebKit module.
- Double click on the Dullanhan.bat batch file in the root directory of the your local Dullahan repository (this just sets up a command prompt and adds NANT to the path).
- Run
nant
- this executes thePrep.build
script which extracts the source code for Open SSL and PhantomJS from the zip files and builds them four times (generating the Qt libraries for 32-bit debug, 32-bit release, 64-bit debug and 64-bit release). - Once this completes (several hours later) you should have 4 directories under the
Lib
directory containing the Qt libraries, a copy of the Qt includes in theIncludes
directory and a copy of the Qtmoc.exe
tool in theTools
directory. These are required for the next stage of the build - building the C++/CLI wrapper. - The
LibSrc
directory can be delete once this process completes.