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

(Use 'Build.sh')
(add link to msysGit)
Line 3: Line 3:
 
''Warning: the source code for Fiji is rather large; make sure that you have two gigabytes of disk space free before beginning this.''
 
''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 [http://git.or.cz/ git].  If you are not familiar with Git, you might want to read [[Git mini howto|this page]] or [[:Category:Git|these pages]] instead.
+
To fetch the Fiji source code you should use [http://git.or.cz/ git] (Windows users, please go [http://msysgit.googlecode.com here]).  If you are not familiar with Git, you might want to read [[Git mini howto|this page]] or [[:Category:Git|these pages]] instead.
  
 
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:

Revision as of 04:52, 24 March 2009

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.

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.

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