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

(Submodules)
(Fix link)
Line 8: Line 8:
 
Your first step should be to "clone" the fiji repository with the following command:
 
Your first step should be to "clone" the fiji repository with the following command:
  
  git clone contrib@pacific.mpi-cbg.de:/srv/git/fiji.git
+
  git clone contrib@fiji.sc:/srv/git/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.
 
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.
Line 16: Line 16:
 
  git clone git://github.com/dscho/fiji
 
  git clone git://github.com/dscho/fiji
 
  cd fiji
 
  cd fiji
  git config remote.origin.url git://pacific.mpi-cbg.de/fiji.git
+
  git config remote.origin.url git://fiji.sc/fiji.git
 
  git pull
 
  git pull
  
Line 26: Line 26:
 
then you probably are behind a firewall that does not let you connect to port 9418. [http://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker's_Guide_to_the_Galaxy Do not panic], though, you might be able to clone the repository with
 
then you probably are behind a firewall that does not let you connect to port 9418. [http://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker's_Guide_to_the_Galaxy Do not panic], though, you might be able to clone the repository with
  
  git clone contrib@pacific.mpi-cbg.de:/srv/git/fiji.git
+
  git clone contrib@fiji.sc:/srv/git/fiji.git
  
 
or
 
or
Line 35: Line 35:
  
 
==== Cloning source as known contributor ====
 
==== 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:
+
The above command creates a unknown contributor copy of Fiji in your computer. If you have your own user account in fiji.sc, then you should clone fiji with the following command:
 
   
 
   
  git clone ''username''@pacific.mpi-cbg.de:/srv/git/fiji.git
+
  git clone ''username''@fiji.sc:/srv/git/fiji.git
  
 
Just substitute ''username'' with your corresponding user name on that machine.
 
Just substitute ''username'' with your corresponding user name on that machine.
Line 61: Line 61:
 
=== Getting a snapshot without Git ===
 
=== Getting a snapshot without Git ===
  
If you insist on not using Git, you can download a snapshot of Fiji [http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=fiji.git;a=snapshot;h=master;sf=tgz here], but you need to make sure that you have a new enough Java version installed.
+
If you insist on not using Git, you can download a snapshot of Fiji [http://fiji.sc/cgi-bin/gitweb.cgi?p=fiji.git;a=snapshot;h=master;sf=tgz here], but you need to make sure that you have a new enough Java version installed.
  
 
== Building Fiji from Source==
 
== Building Fiji from Source==

Revision as of 08:32, 21 June 2011

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 contrib@fiji.sc:/srv/git/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://fiji.sc/fiji.git
git pull

If you are getting errors like this:

github.com[0: 207.97.227.239]: errno=Connection timed out fatal: 
unable to connect a socket (Connection timed out)

then you probably are behind a firewall that does not let you connect to port 9418. Do not panic, though, you might be able to clone the repository with

git clone contrib@fiji.sc:/srv/git/fiji.git

or

git clone https://yourusername@github.com/dscho/fiji.git

... where you should replace yourusername with your GitHub username.

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 fiji.sc, then you should clone fiji with the following command:

git clone username@fiji.sc:/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.) For example, if you know that you're going to need to work on the ImageJA, TrakEM2 and mpicbg submodules, you should initialize and update them with the following commands:

git submodule init modules/ImageJA modules/TrakEM2 modules/mpicbg
git submodule update

Note: in the common case, you do not need any submodule to be checked out (except the Java submodule, which will be checked out automatically once you run the Fiji Build with:

./Build.sh

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.

Alternately, if you want to automatically clone, configure and/or update a submodule with all its dependent submodules, you can run (e.g., for TrakEM2):

cd bin
./configure-submodule.py TrakEM2

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