Difference between revisions of "GetTheCode"

From Sirikata Wiki
Jump to: navigation, 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.)
Line 1: Line 1:
 +
{{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 ===
 
=== Browsing the Code ===
 
Our project is hosted in a [http://github.com GitHub] repository.  You can browse the source online by visiting the [http://github.com/sirikata/sirikata/ Sirikata project page].
 
Our project is hosted in a [http://github.com GitHub] repository.  You can browse the source online by visiting the [http://github.com/sirikata/sirikata/ Sirikata project page].
 +
 +
=== Nightly Source Archives ===
 +
[http://www.sirikata.com/builds/nightlies/ 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 [[BuildTheCode|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 ===
 
=== Getting the Full Tree ===
Line 16: Line 27:
 
   git clone git://github.com/sirikata/sirikata.git [dest_directory]
 
   git clone git://github.com/sirikata/sirikata.git [dest_directory]
 
   cd dest_directory  # will be sirikata if dest_directory was not provided
 
   cd dest_directory  # will be sirikata if dest_directory was not provided
  git submodule init
+
 
  git submodule update
+
 
If you are a developer, you can use the secure clone URL.  Once you have [http://github.com/guides/providing-your-ssh-key given GitHub your public key for authentication], you can issue the command.
 
If you are a developer, you can use the secure clone URL.  Once you have [http://github.com/guides/providing-your-ssh-key given GitHub your public key for authentication], you can issue the command.
  
 
   git clone git@github.com:sirikata/sirikata.git [dest_directory]
 
   git clone git@github.com:sirikata/sirikata.git [dest_directory]
 
   cd dest_directory  # will be sirikata if dest_directory was not provided
 
   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 [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 init
 
   git submodule update
 
   git submodule update
  
In this case you will also be able to push your results back to our repository.
+
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.
  
You should now have all the code in a directory called <tt>sirikata</tt>.  At the moment we require that the full path to sirikata has no spaces in any folder names. Now you probably want to [[BuildTheCode|build it]].
+
=== Build ===
 +
You should now have all the code in a directory called <tt>sirikata</tt>. Now you probably want to [[BuildTheCode|build it]].

Revision as of 22:44, 22 November 2009

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 init
 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.

Build

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