These notes are for developing a C++ application. If you are a developing a .NET/C# application please see our .NET Wiki instead.
Checklist
You will need the following:
- The latest Awesomium v1.7 SDK for Windows (download it here)
- Microsoft Visual C++ (there is a free ‘Express’ version)
Install the SDK
Run the installer and follow the on-screen instructions. Upon success, you should find a folder in your Start Menu with additional links and samples to play with.
Environment Path
The installer should install the includes and library files under a path which looks like the following:
C:\Program Files (x86)\Awesomium Technologies LLC\Awesomium SDK\1.7.2.2
To help you reference this path in your projects, an environment variable named AWE_DIR
should have been defined during installation.
- Awesomium Include Path:
$(AWE_DIR)include
- Awesomium Lib Path:
$(AWE_DIR)build\lib
- Awesomium Bin Path:
$(AWE_DIR)build\bin
Folder Structure of the SDK
The SDK should contain the following folders in the installation directory:
- build/bin folder: Contains DLLs that you will need to bundle with your application
- build/bin/packed folder: Contains optional compressed DLLs to use with your application (smaller size, very slight delay in load time).
- build/lib folder: Contains static libraries that you will need to link against your application.
- include folder: Contains headers that you will need to #include in your source files to access our C++ API
Set up your project
#### Configure project settings
- Create a new project in Microsoft Visual C++ (the Empty Project template is recommended).
- Add your C++ source files.
- Right-click your project name, select Properties to open up the Property Pages dialog.
- Add
$(AWE_DIR)include
to Additional Include Directories (should be under Configuration Properties → C/C++ → General) for both Debug and Release configurations. - Add
$(AWE_DIR)build\lib
to Additional Library Directories (should be under Configuration Properties → Linker → General) for all build configurations. - Add
awesomium.lib
to Additional Dependencies (should be under Configuration Properties → Linker → Input) for all build configurations.
Copy files to your build distribution
Before running your executable, make sure to copy the following files from the SDK’s build/bin directory to your respective build directories.
avcodec-53.dll
avformat-53.dll
avutil-51.dll
awesomium.dll
awesomium_process.exe
icudt.dll
libEGL.dll
libGLESv2.dll
xinput9_1_0.dll
If you wish to use the remote inspector (see WebConfig
), make sure to also copy inspector.pak
to your working directory.
Include the API
To include the entire API for Awesomium in your source files, you simply need to include WebCore.h:
#include <Awesomium/WebCore.h>