Compiling WebEmber

From WorldForgeWiki
Jump to: navigation, search

Get packages

You will need the same dependencies that Ember has. There is a detailed description here: http://wiki.worldforge.org/wiki/Hammer_Script


apt-get -y install g++ make autoconf automake libtool dpkg-dev cvs git-core libdevil-dev liblua5.1-0-dev libtolua++5.1-dev libzzip-dev \
                  libbz2-dev libxaw7-dev libxxf86vm-dev libopenal-dev libalut-dev libsigc++-2.0-dev libcurl4-openssl-dev \
                  libjpeg62-dev libpng12-dev libtiff4-dev libsdl1.2-dev nvidia-cg-toolkit libpcre3-dev libxrandr-dev libmng-dev \
                  libgcrypt-dev libboost-all-dev cmake-core libfreeimage-dev libxcursor-dev libfreetype6-dev swig


Get Hammer

To get hammer, type:

git clone https://github.com/sajty/hammer.git worldforge
cd worldforge

Install dependencies

To install all needed dependencies, type:

./hammer.sh install-deps all

Getting the source

Next, download all the sources for the WebEmber and all needed libraries.

./hammer.sh checkout libs
./hammer.sh checkout webember

Building

Now we are ready to build!

./hammer.sh build libs
./hammer.sh build webember

This will also install the plugin for you to "~/.mozilla/plugins".
To uninstall, you just need to delete the library and restart the browser.

Running

Its very easy to run, visit: http://sajty.elementfx.com/webember_test.htm
Note: if you rebuild the library, you will need to restart the browser, or it will use the old build.

The ember part of the plugin will be runtime linked to the plugin. Basically its a plugin for the plugin. This allows, that multiple locations will be checked for the prefix.
List of ember prefix locations in the testing order:

  1. WEBEMBER_PREFIX environment variable: If you move ember, you should set this.
  2. Compile time PREFIX macro. If you don't move ember, this will work and this is the main method to find the ember prefix.
  3. standard lib path: If the above two methods fail, it will use standard lib paths and ember will use binreloc to determine prefix.