|Version 15 (modified by jpfasano, 8 years ago) (diff)|
Downloading the Source Code
The source code for the COIN-OR projects is maintained using the subversion version control system. We recommend to obtain the source code directly from the subversion repository system, since it allows one to obtain updates and bugfixes very easily. We also provide daily snapshots of the main (official) branch for each project in the form of tarballs.
The source code usually comes with the directory structure explained here.
If you have problems, have a look at the troubleshooting page.
Obtaining the Code Using Subversion
In order to download the code from COIN via subversion, you need to have a subversion client installed on your computer. On UNIX-like systems, including Linux and Cygwin, the executable is usually called svn. Subversion is available from http://subversion.tigris.org. The source code and some precompiled binaries can be downloaded here. If you compile the subversion executable on your own, make sure you specify the --with-ssl flag when you run the ./configure script, so that your svn executable is able to connect to https:// servers. If you already have svn installed on your system, you need to make sure that it is able to connect to https://... URLs. You can find out if your version of svn supports this by typing "svn --version". If it says "handles 'https' scheme," you are fine.
You also have the option of using some GUI clients for subversion. We have had success with eclipse using the subclipse plugin. This tool has the advantage of being cross-platform. If you prefer a tool that integrates with your operating system's file manager, you can try ksvn for KDE, tortoisesvn for Windows, or scplugin for OS/X. Another option is rapidSVN, a cross platform stand-alone client.
NOTE: If you plan to use the configure script and Makefiles, the path to the directory into which you download the source code must not contain white spaces.
Downloading the Code
Unix-type system (including Linux and Cygwin)
In order to obtain the source code for a COIN package (say Pkg), you go into the directory where you want to have subversion put the source code in a new subdirectory (say, Coin-Pkg). Here, you type
svn checkout https://projects.coin-or.org/svn/Pkg/trunk Coin-Pkg
You need to replace the Pkg string in the URL above with the name of the particular COIN package you want to get (such as Cbc, Osi, etc). You can choose any name for the directory where the source code should go (Coin-Pkg in the above example). The trunk part of the URL is used to specify that you want to obtain the code for the latest official release.
With this command, subversion will download all the source code and other files required to compile and run the chosen package, including code from other COIN projects that are required for the compilation of the chosen package. Note, however, that third-party source code (such as the code for the AMPL solver library) will not be downloaded and has to be obtain separately.
If you want to update your local copy of the code at a later point to get the latest changes made in the official version of the package, you go into the downloaded base directory and use the subversion update command.
cd Coin-Pkg svn update
On a Windows machine, you can download the code with TortoiseSVN.
- Install TortoiseSVN on your system.
- Select a directory in windows explorer where you want to place your working copy. Right click to pop up the context menu and select the command SVN Checkout... which brings up the following dialog box:
- In the URL of Repository field enter https://projects.coin-or.org/svn/Pkg/trunk
- In the Checkout directory field enter the source code destination directory. The right most directory should be Coin-Pkg
where Pkg is one of the COIN-OR project names.
If you want to update your local copy of the code at a later point to get the latest changes then in windows explorer right click on the base directory (Coin-Pkg) to pop up the context menu and select the command SVN Update...
The CoinAll Package
A special project is the CoinAll? package. If you download this one, you will obtain the source code for all projects available in COIN.
Obtaining the Code Via Tarballs
NOTE: The following instructions do not yet fully apply, until the switch to SVN is completed. The link to the svn tarball directory is currently http://www.coin-or.org/Tarballs-SVN/.
Daily snapshots for each package, including all (COIN-internal) dependencies and data files, can be found at http://www.coin-or.org/Tarballs/. For each COIN project, you will find a subdirectory there with the tarballs. The name of the tarball with the nightly snotshots of the official release are called Pkg_Date.tgz, where Pkg is the name of the package, and Data is the date. You might also find versioned tarballs for some packages.
To extract the source code from the tarball on a UNIX-like system, you go into the directory in which you want the source code directory to be created. Then you type
gunzip Pkg_Date.tar.gz tar xvf Pkg_Date.tar
If you don't like the name of the extracted base directory, you can rename it, but do not rename any directories inside the source code tree.
On Windows, you can use the standard decompression programs to extract the files.