My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
GettingStarted  
Instructions on building and running.
Updated Jan 19, 2009 by sirmaxim...@gmail.com

Introduction

The following page details how to download the source, build it, run it and debug it.

Downloading the Source

You can retrieve your svn password from Google Code Settings.

Ensure you have subversion installed on your system. To do this, type the following in your shell prompt:

    sudo apt-get install subversion

From the shell, create a directory to store the source code (ex: ~/depot):

    mkdir ~/depot

Change your location to the newly created folder:

    cd ~/depot

Issue the svn checkout command:

svn checkout https://motemote.googlecode.com/svn/trunk/ motemote --username <g_username>

You will now have all project source code in ~/depot/motemote.

Building the Source

The following will walk you through compilation of the source code after it is downloaded from the repository. Note that there may be missing dependencies, check out the Dependencies page and make sure you're up to date.

Change your shell location to the project root:

    cd ~/depot/motemote

Type the make command:

    make

If successful, you will see the following message:

********************************************************************************
*  SUCCESS, BOOYA!
*
*  BEFORE YOU RUN, MAKE SURE YOU'VE COMPLETED THE
*  FOLLOWING:
*
*  - add 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_motemote>/ia32-linux'
*    to your ~/.bashrc file
********************************************************************************

If make was not successful, issue a clean command from the project root before trying again:

    make clean

Running the Program

Before you run the program, add the following line to your ~/.bashrc file, be sure to change

<path_to_motemote>
to the actual path (most likely /home/
<user_name>
/depot/motemote):

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_motemote>/ia32-linux

To run the program, type the following from the project root folder:

    ia32-linux/motemote

Building Debug Version

To build a debug version of the project, change the following line in your User.make file (located in the project root):

    BUILDDEBUG = 0

To:

    BUILDDEBUG = 1

This will output files in a new ia32-linux-debug folder and the program can be run from there.

    ia32-linux-debug/motemote

Debugging the Program

I use GDB for this, it has a slight learning curve, but will be very useful!

To debug, type the following from the project root (note the path may be different if you intend to debug the release version):

    gdb ia32-linux-debug/motemote

Once in GDB, you can set a breakpoint in your code. For example, if I want to break execution in sample.cpp at line 16, I'd type the following:

    b sample.cpp:16

To execute the program, type:

    run

To stop execution, press Ctrl+C and type:

    kill

To quit GDB type:

    quit

See the references section for more information, they explain things better than I can :)

Submitting Changes

To view the files you have that differ from the repository, from the project root type:

    svn stat

To add a new file to source control:

    svn add <file_path>

To submit your changes, type:

    svn commit -m "<description_of_changes>"

See the references section for more detailed information.

References

Powered by Google Project Hosting