Skip to content
kiwipuppeh edited this page Apr 13, 2016 · 8 revisions

Getting Started

In order to get started with building AnvilClient it had a few dependencies that have to be pre-compiled first. Normally once these dependencies are compiled one time, you will no longer need to rebuild them, just keep them in the assigned directories and Anvil will rebuild using generated binaries.

Downloading Everything

In order to speed up the process, here are links to all of the websites for the various builds.

Extract these to a directory of your choice for these examples the directories are listed below as an example, you will have to change the directory most likely in your case.

  1. P:\boost_1_60
  2. P:\cef3
  3. P:\netcpplib
  4. P:\cmake
  5. P:\cpprestsdk

Development Environment

Before we begin compiling, we should get a few environment variables set up. You can either do this via a batch script or via the gui. We will cover both.

Batch Script

TODO: Batch Script

User Environment Variables

In windows if you would like these environment variables to be set for your user profile so you do not have to launch Visual Studio via a batch script, you can set them by going to...

  1. Open My PC (Or Computer)

  2. Right click and click on Properties

  3. Click on the option for Advanced System Settings (You will need elevation)

  4. Click on the Environment Variables button

  5. Click the New... button under User variables for USERNAME

  6. Enter these combinations

  • Variable: BOOST160_DIR Value: P:\boost_1_60

  • Variable: CEF3_DIR Value: P:\cef3\cef_binary_3.2526.1366.g8617e7c_windows32

  • Variable: CPPNETLIB_DIR Value: P:\netcpplib

  • Variable: CPPRESTSDK_DIR Value: P:\cpprestsdk

Compiling the dependencies

Run cmake-gui and it should have two text boxes near the top, one for location of source code, and output for build.

Statically compiling CEF

Set the source location to where you extracted CEF source code too. (Ex. P:\cef3\cef_binary_3.2526.1366.g8617e7c_windows32)

Set the build path to the location where you extracted the CEF source code to while adding "/build" without quotes. If a message comes up asking if you would like to create the directory if it doesn't exist, click yes. Click configure, when you do that a box should pop up. Select Visual Studio 2015 or MSVC14 (They are the same thing). If no errors happen click the generate button.

CMake should finished successfully, if not try to resolve the issues or request to edit the wiki to correct it.

Navigate to the /build directory that got created in the cef directory and open cef.sln. Once it opens it should build without issue, ensure that it is set to build both Debug and Release binaries (if you plan on building both for Anvil). Once building finishes you should have binaries and library files in the /Debug and /Release directories.

Statically compiling net-cpplib

Open CMake again and go to where you extracted the net-cpplib. For this example I have mine extracted to P:\netcpplib. Set the project source to where it was extracted (ex. P:\netcpplib) and the build directory to a build directory (ex. P:\netcpplib\build).

Click Add Entry.

Set the name to be "BOOST_ROOT" without quotations and change the type to PATH.

Set the path to where you have boost extracted in my case it is P:\boost_1_60

Click Add Entry again.

Set the name to be "BOOST_INCLUDEDIR" without quotations and change the file type to PATH.

I set the path to P:\boost_1_60\boost

Click Add Entry again

Set the name to be "BOOST_LIBRARYDIR" without quotations and change the file type to path

The path should be set to P:/boost_1_60/lib32-msvc-14.0 if you are using the pre-compiled binaries

Click configure, you should not get any errors. Click generate and you should get Generating done.

You can close cmake at this time. Navigate to the netcpplib\build directory and open up the CPP-NETLIB.sln file

Find the project that is cppnetlib-uri and right click->properties and goto C/C++ then Code Generation and change it from /MD to /MT if you are on release or /MTd if you are on debugging.

Statically compile cpprestsdk

External Link for Statically Compiling the Microsoft CppRestSdk

Finishing Touches

Now copy over the binary files from the cef release package to the /bin folder of AnvilOnline. Build AnvilClient and copy the final .dll over to the GameRoot/bin directory

Use AnvilLauncher to launch AnvilOnline with SkipUpdate setting set to True.