Build From Package Ubuntu

From Emergent

Jump to: navigation, search
Emergent Logo
Building and Installing Emergent

These are step-by-step directions for building emergent from source under Kubuntu after having installed the pre-built prereqs as documented in installation. As compared to building all of our prereqs from source, this saves a lot of time and steps.

Install the rest of emergent's prerequisites

Run this command to grab all the packages you need to compile emergent:

sudo apt-get install g++ libtool autoconf automake subversion libreadline5-dev libogg-dev libvorbis-dev libtiff-dev libungif4-dev

Prepare your environment

Paste this into your shell to permanently setup your PATH, LD_LIBRARY_PATH, EMERGENTDIR and QTDIR environment variables. If you've already done one of those, you may delete that particular line:

#!/bin/bash
BASHRC=~/.bashrc
touch $BASHRC

cat >> $BASHRC << Emergent

export PATH=\$PATH:/usr/local/bin
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib
export EMERGENTDIR=/home/`whoami`/emergent
# Check the following line to be sure it has the Qt version you're actually installing!
export QTDIR=/usr/local/Trolltech/Qt-4.3.2

Emergent
source $BASHRC
tail -n6 $BASHRC # Print what we just appended to this file

Download the emergent source code

This will download the latest source code to ~/emergent. Do the following logged in as the regular user, not the root user:

svn checkout --username anonymous --password emergent http://grey.colorado.edu/svn/emergent/emergent/trunk ~/emergent

Build Emergent

To build emergent, run these commands as the regular user:

cd ~/emergent && autoreconf && ./configure && make
sudo make install

With the default install, emergent will be in /usr/local/bin, and you can just type emergent to run it. Support files, including demos, test cases and standard library files for css are located in /usr/local/share/emergent

Optional: Add an Emergent icon to the startup menu

First become root: (sudo su on Ubuntu) and then paste this into the terminal

echo Creating /usr/share/applications/Emergent.desktop K menu item
cat > /usr/share/applications/Emergent.desktop <<Emergent

[Desktop Entry]
Categories=Education;
Exec=env LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/emergent %f
GenericName=Neural Network Simulation Software
Hidden=false
Icon=/usr/local/share/Emergent/images/emergent_32x32.png
Icon[en_US]=/usr/local/share/Emergent/images/emergent_32x32.png
Name=Emergent
Name[en_US]=Emergent
StartupNotify=true
Terminal=false
Type=Application
X-KDE-SubstituteUID=false
Comment[en_US]=Neural Network Simulation Software
Comment=Neural Network Simulation Software

Emergent

echo Creating /etc/xdg/menus/emergent.menu for application menu item
cat > /etc/xdg/menus/emergent.menu <<Emergent

<Menu>
 <Menu>
  <Name>Education</Name>
  <Layout>
   <Merge type="files" />
   <Filename>Emergent.desktop</Filename>
  </Layout>
  <Include>
   <Filename>Emergent.desktop</Filename>
  </Include>
 </Menu>
</Menu>

Emergent

In KDE, you can now navigate to K Menu > Edutainment > Miscellaneous > Emergent and drag that to your panel if you like. On Gnome it shows up in Menu > Education > Emergent.

Personal tools