Wednesday, February 9, 2011

Setting up the development environment


In this post I'll go through the steps needed to set up a development environment so you can get started with Replicode.

You need to compile/run the Replicode executive; for that, you need:
  1. A computer with at least 2 fast Cores (>2.4 GHz) and 3GB of RAM, running Win7 or Vista.Failure to meet these minimal requirements will end up in trouble. In particular, no virtualization software will do any good.
  2. Visual Studio C++ 2008 Professional + SP1 + Feature Pack, or Visual Studio Express 2008 VS 2008 Express edition is available here. N.B.: Replicode and dependencies are 32 bits executables.
  3. Download and compile one dependency, called the CoreLibrary: http://cadia.ru.is/svn/repos/CoreLibrary/
  4. Download and compile Replicode: http://cadia.ru.is/svn/repos/replicode/. Notice that Replicode needs the CoreLibrary dll. You'll have to create a symlink in the working directory (e.g. Replicode/Debug or Replicode/Release) pointing to said dll.
If you have any troubles creating a symlink, try following the instructions here: http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/.

Also make sure that you checkout the svn repository for the CoreLibrary from the root (i.e. you get the branches, tags and the trunk into the CoreLibrary folde). There are some paths that depend on that structure.

This solution produces:
  1. The executive: r_exec.dll
  2. The compiler, decompiler and provisioning system: r_comp.dll
  3. User-defined language/executive extensions: usr_operators.dll
  4. The test program: test.exe

For editing Replicode source code, you may want to use notepad++: http://notepad-plus-plus.org/ along with a syntax highlighting profile: http://olafur.hlynsson.is/replicode.def.xml.

Then:
  1. To run the executive, just run the Replicode/Test sub-project. Make sure you have in properties/debugging the same values as the one shown in the (attached) settings picture.
  2. To change the source files, see settings.xml, the main configuration file (included in Replicode/Test).
Now you should be ready to jump into Replicode!