Difference between revisions of "GetTheCode"

From Sirikata Wiki
Jump to navigation Jump to search
(Add nightly source archive option, separate submodules to its own section and link to explanation, move note about special characters in path to the top to make it much more prominent.)
(updated submodule command)
Line 38: Line 38:
 
Sirikata uses [http://www.kernel.org/pub/software/scm/git-core/docs/git-submodule.html Git Submodules] to reference a number of closely related dependencies.  See the [[Source Code]] page for more details.  For a user compiling Sirikata this means that submodules must be kept up to date.  From the top level Sirikata directory issue
 
Sirikata uses [http://www.kernel.org/pub/software/scm/git-core/docs/git-submodule.html Git Submodules] to reference a number of closely related dependencies.  See the [[Source Code]] page for more details.  For a user compiling Sirikata this means that submodules must be kept up to date.  From the top level Sirikata directory issue
  
   git submodule init
+
   git submodule update --init --recursive
  git submodule update
 
  
 
to initialize and update submodules.  These commands should be issued each time you update from the main repository as well to ensure that you have the most up to date code for dependencies.  Note that these commands have been integrated into the top level Makefile for convenience.
 
to initialize and update submodules.  These commands should be issued each time you update from the main repository as well to ensure that you have the most up to date code for dependencies.  Note that these commands have been integrated into the top level Makefile for convenience.

Revision as of 06:45, 31 March 2011

Note Sirikata's build system doesn't currently handle special characters in path names well. Known problem characters are spaces and +. In general, avoid special characters in the path to Sirikata for the time being.

Browsing the Code

Our project is hosted in a GitHub repository. You can browse the source online by visiting the Sirikata project page.

Nightly Source Archives

Archives of the source tree are generated nightly. These include the main source tree as well as submodules (see explanation below) fully checked out and updated. You should be able to use this build sirikata without ever having to use git. For example, the following will download and extract the archive and leave you ready to build it.

 wget http://www.sirikata.com/builds/nightlies/src/LATEST -O sirikata.tar.gz
 tar -xzf sirikata.tar.gz
 cd sirikata

This is a full anonymous git checkout, so you can use it as a base to start developing against, i.e. after untarring, you have a full git repository.

Getting the Full Tree

Get git

We use git for source code version control. First be sure that you have git installed. You can find packaged and source downloads for all platforms here. On Windows you most likely want to install the msysgit variant. On Linux you can likely use a package directly from your distribution. For example, on Ubuntu, the following will install the basic git tools:

 sudo apt-get install git-core

If you want to develop Sirikata you should familiarize yourself with git. Git's documentation page provides a lot of good starting points.

Check out the code

If you're checking out the code anonymously, use the public clone url. Move to where you want to check out the code and issue the command

 git clone git://github.com/sirikata/sirikata.git [dest_directory]
 cd dest_directory   # will be sirikata if dest_directory was not provided

If you are a developer, you can use the secure clone URL. Once you have given GitHub your public key for authentication, you can issue the command.

 git clone git@github.com:sirikata/sirikata.git [dest_directory]
 cd dest_directory   # will be sirikata if dest_directory was not provided

In this case you will also be able to push your results back to our repository.

Submodules

Sirikata uses Git Submodules to reference a number of closely related dependencies. See the Source Code page for more details. For a user compiling Sirikata this means that submodules must be kept up to date. From the top level Sirikata directory issue

 git submodule update --init --recursive

to initialize and update submodules. These commands should be issued each time you update from the main repository as well to ensure that you have the most up to date code for dependencies. Note that these commands have been integrated into the top level Makefile for convenience.

Build

You should now have all the code in a directory called sirikata. Now you probably want to build it.