Download the AllJoyn™ Source

The AllJoyn source is currently composed of multiple git repositories and is being managed using the repo tool. These instructions describe how use repo to download a copy of the AllJoyn source code in either a Linux or Windows environment. You can also browse the repositories directly if you choose, however we suggest using repo if you want to work with the code as that will ensure you get everything you need to build it. To learn how to submit source changes to the AllJoyn OSP, please see the contribution instructions, and read the AllJoyn.org contribution guidelines.


On Linux

Login to a bash shell

Make sure that Python and git are installed

We suggest that the Python version is 2.6 or greater and that the git version is 1.7 or greater. This can be checked as follows:

$ python -V
$ git --version

If not, install or update them using your system pkg manager, or see your friendly sysadmin.

Make sure repo's shell script is installed and in your PATH

This can be done by issuing the repo command:

$ repo

If you get an error then choose a location you can write to and which is in your PATH (e.g. $HOME/bin or /usr/local/bin), and install repo there as follows:

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > repo
$ chmod a+x $HOME/bin/repo

Download AllJoyn source into a new location

$ mkdir $HOME/alljoyn # for example
$ cd $HOME/alljoyn
$ repo init -u git://github.com/alljoyn/manifest.git
$ repo sync
$ repo start master --all

Note: to check out a specific branch add -b <branch_name> to the repo init command above. You will also need to replace master in the repo start command with <branch_name>. For example to get the code for the experimental branch the repo commands would look like:

$ repo init -u git://github.com/alljoyn/manifest.git -b B02.03.00
$ repo sync
$ repo start B02.03.00 --all

Update the AllJoyn source in that location at any time...

... by running repo sync again.

Additional Help for setting up Linux for AllJoyn development

Additional documentation is available that goes into greater depth about how to setup a Linux environment for AllJoyn development. The documentation is available from the Docs & Downloads section of www.alljoyn.org.


On Windows

Not Using Cygwin

Currently the project management tool "repo" is only available for Linux. Repo can run in Windows using Cygwin, or it is possible to download each git repository required for AllJoyn without using Cygwin. For instructions on setting up Windows for AllJoyn without using Cygwin see the Docs & Downloads section of www.alljoyn.org.

Using Cygwin

AllJoyn does not compile or run on Cygwin, but you can use git and repo on Cygwin to download the AllJoyn source on a Windows machine. Unless you already have git and repo working in an existing Cygwin environment, we suggest installing a clean copy of Cygwin 1.7 in a new location. Once git and repo are working there, you can try installing them in an existing Cygwin environment.

Install Cygwin-1.7

Run Cygwin setup.exe from cygwin.com. On Windows 7, Run As Administrator. Take the defaults except where noted below:

Install Repo's shell script

Open a bash shell window by double-clicking C:\AllJoyn\Cygwin\root\Cygwin.bat in Windows Explorer.

Edit your .bash_profile and make the following changes (or similar):

27,30c27,28
< # Set PATH so it includes the user's private bin if it exists
< # if [ -d "${HOME}/bin" ] ; then
< # PATH=${HOME}/bin:${PATH}
< # fi
---
> # Reset PATH so it includes user's private bin and excludes most Windows programs
> PATH="${HOME}/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows"

Create a private bin and install repo's shell script there:

$ mkdir $HOME/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > $HOME/bin/repo
$ chmod a+x $HOME/bin/repo

Close (exit) this bash window before proceeding!

Make sure that Python and git are installed

We suggest that the Python version is 2.6 or greater and that the git version is 1.7 or greater. This can be checked by opening a new bash shell window (by double-clicking C:\AllJoyn\Cygwin\root\Cygwin.bat in Windows Explorer) and typing:

$ python -V
$ git --version

If those are not the installed versions or are missing, review Install Cygwin-1.7.

Make sure repo's shell script is in your PATH

This can be done by typing:

$ repo

If it is missing review Install Repo's shell script.

Download AllJoyn into a new location

$ mkdir $HOME/alljoyn # for example
$ cd $HOME/alljoyn
$ repo init -u git://github.com/alljoyn/manifest.git
$ repo sync
$ repo start master --all

Note: to check out a specific branch add -b <branch_name> to the repo init command above. You will also need to replace master in the repo start command with <branch_name>. For example to get the code for the experimental branch the repo commands would look like:

$ repo init -u git://github.com/alljoyn/manifest.git -b experimental
$ repo sync
$ repo start experimental --all

If repo init throws an error message such as the following,

1 main python 2016 C:\AllJoyn\Cygwin\root\bin\python.exe: *** fatal error - unable to remap \\?\C:\AllJoyn\Cygwin\root\lib\python2.6\lib-dynload\time.dll to same address as parent: 0x380000 != 0x410000

then you will have to rebase:

> cd C:\AllJoyn\Cygwin\root\bin
> .\ash.exe
$ /bin/rebaseall
$ exit

FixImage (/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll) failed with last error = 13

Update AllJoyn source in that location at any time...

... by running repo sync again.

Removing the temporary/test Cygwin installation

OPTIONAL: If you installed an additional, temporary copy of Cygwin to test git and repo, you can remove it at any time by removing the Cygwin root and package directories created at installation (C:\AllJoyn\Cygwin\root and C:\AllJoyn\Cygwin\pkg in the above example). Close any bash shell windows and remove the directories from Windows Explorer. If you un-install Cygwin from Windows' Programs tool, it may affect your existing copy of Cygwin.


More on git and repo

We probably don’t need to describe git here, but for the sake of completeness: git is an open-source version-control system designed to handle large, distributed software projects. The AllJoyn source code is maintained in five separate git repositories. We use git for local operations within individual git repositories, such as commits, diffs, and edits.

git: http://git-scm.com/

Repo is an open-source tool built on top of git. The Android project uses repo to help manage the many git repositories that contain their source code. We use repo in much the same way. Repo is not meant to replace git, only to make git easier to work with for projects using multiple repositories. For example, with a single repo command you can download the source code from all five AllJoyn git repositories.

repo: http://source.android.com/source/git-repo.html