Difference between revisions of "Downloading and Building Fiji From Source"

(Downloading the Source Code with Git)
(Cloning source as unknown contributor: hint at using github.com for the initial clone)
Line 11: Line 11:
  
 
This should start downloading the base fiji repository and unpack it into a directory called "fiji" in your current directory.  Once this has successfully completed, change into the newly created "fiji" directory.
 
This should start downloading the base fiji repository and unpack it into a directory called "fiji" in your current directory.  Once this has successfully completed, change into the newly created "fiji" directory.
 +
 +
'''If this clone is slow''', you might want to try to clone from github.com, and after that switch back to the official repository:
 +
 +
git clone git://github.com/dscho/fiji
 +
cd fiji
 +
git config remote.origin.url git://pacific.mpi-cbg.de/fiji.git
 +
git pull
  
 
==== Cloning source as known contributor ====
 
==== Cloning source as known contributor ====

Revision as of 17:52, 11 March 2010

Downloading the Source Code with Git

Warning: the source code for Fiji is rather large; make sure that you have two gigabytes of disk space free before beginning this.

To fetch the Fiji source code you should use git (Windows users, please go here). If you are not familiar with Git, you might want to read this page or these pages instead.

Cloning source as unknown contributor

Your first step should be to "clone" the fiji repository with the following command:

git clone git://pacific.mpi-cbg.de/fiji.git

This should start downloading the base fiji repository and unpack it into a directory called "fiji" in your current directory. Once this has successfully completed, change into the newly created "fiji" directory.

If this clone is slow, you might want to try to clone from github.com, and after that switch back to the official repository:

git clone git://github.com/dscho/fiji
cd fiji
git config remote.origin.url git://pacific.mpi-cbg.de/fiji.git
git pull

Cloning source as known contributor

The above command creates a unknown contributor copy of Fiji in your computer. If you have your own user account in pacific.mpi-cbg.de, then you should clone fiji with the following command:

git clone username@pacific.mpi-cbg.de:/srv/git/fiji.git

Just substitute username with your corresponding user name on that machine.

Submodules

Some plugins are managed as submodules. If you want to work on them, you will have to initialize and update them. (For more on submodules, see the Git submodule tutorial.) These submodules must be initialized and updated with the following commands:

git submodule init ImageJA TrakEM2 VIB micromanager1.1 mpicbg
git submodule update

The build system will attempt to use the system Java installation if it is available. However, on some platforms this may not work (or you may not have a recent enough Java installation) so we recommend that you also initialize and update the appropriate Java submodule for your system. To do this, run one of these commands:

git submodule init java/linux          # For 32-bit Linux systems
git submodule init java/linux-amd64    # For 64-bit Linux systems
git submodule init java/macosx-java3d  # For MacOS X systems
git submodule init java/win32          # For 32-bit Windows systems
git submodule init java/win64          # For 64-bit Windows systems

Then update the submodules again with:

git submodule update java/<the-name-for-your-OS>


Note: using git submodule update without specifying which submodule, will update all submodules. What update means: "put all submodules, if checked out, to the last commit that was committed in the fiji repos". Which is most likely not what you want--will put any submodule that you have been working on into a (no branch) situation. To fix it, just cd to that submodule git checkout master or whatever branch you were working on.

Getting a snapshot without Git

If you insist on not using Git, you can download a snapshot of Fiji here, but you need to make sure that you have a new enough Java version installed.

Building Fiji from Source

You should now be able to build Fiji with:

sh Build.sh run

... which will invoke Fiji's multi-platform build system. If all goes well, after some time you should see the main Fiji window:

Fiji's main window