$Id: download.omh 3786 2016-02-08 13:14:26Z bradbell $
/* --------------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell

CppAD is distributed under multiple licenses. This distribution is under
the terms of the
                    GNU General Public License Version 3.

A copy of this license is included in the COPYING file of this distribution.
Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
-------------------------------------------------------------------------- */

$begin download$$
$escape $$
$spell
	vcdir
	vcvarsall
	Microsoft
	tarball
	yyyy
	mm
	dd
	tarballs
	mkdir
	cmake
	nmake
	Makefiles
	omhelp
	svn
	https
	org
	dir
	exe
	gpl
	xvzf
	CppAD
	cppad
	gzip
	yyyymmdd
	rel
	lic
	epl
	tgz
	hpp
$$
$dollar @$$

$section Download The CppAD Source Code$$

$head Purpose$$
CppAD is an include file library and you therefore need the source
code to use it.
This section discusses how to download the different versions of CppAD.

$head Distribution Directory$$
We refer to the CppAD source directory created by the download instruction
below as the distribution directory.
To be specific, the distribution directory contains the file
$code cppad/cppad.hpp$$.

$head Compressed Archives$$
These files have been archived using $code tar$$ and compressed using
$code gzip$$:
$table
$bold version$$ $pre  $$ $cnext $bold license$$ $pre  $$ $cnext $bold link$$
$rnext
current  $cnext EPL $cnext $href%
http://www.coin-or.org/download/source/CppAD/cppad-20160000.1.epl.tgz%
cppad-20160000.1.epl.tgz%$$
$rnext
current  $cnext GPL $cnext $href%
http://www.coin-or.org/download/source/CppAD/cppad-20160000.1.gpl.tgz%
cppad-20160000.1.gpl.tgz%$$
$rnext
old      $cnext Both $cnext
$href%http://www.coin-or.org/download/source/CppAD/%CppAD download page%$$
$tend

$subhead Current Version$$
The current versions listed above correspond to the subversion
$href%https://projects.coin-or.org/CppAD/browser/trunk%trunk%$$
and the git
$href%https://github.com/bradbell/cppad%master%$$.
These tarballs only last for a few days.

$subhead Release Versions$$
Release versions of the compressed tar files are available on the
$href%http://www.coin-or.org/download/source/CppAD/%CppAD download page%$$.
This includes all the releases going back to 2007.
These file have the form
$codei%
	cppad-%yyyymmdd%.%rel%.%lic%.tgz
%$$
The license code $icode lic$$
is $code gpl$$, $code epl$$ or $code cpl$$ where
$code gpl$$ denotes the GNU General Public License,
$code epl$$ denotes the Eclipse Public License, and
$code cpl$$ denotes the Common Public License
(not being used for new versions).
The version number $icode yyyymmdd$$
is the date at which the features
of the program were frozen where
$icode yyyy$$ is the year, $icode mm$$ is the month, and $icode dd$$
is the day.
The release number $icode rel$$
corresponds to a bug fix index where
higher numbers corresponding to more bug fixes.

$subhead Monthly Versions$$
Monthly versions of the compressed tar files are available on the
$href%http://www.coin-or.org/download/source/CppAD/%CppAD download page%$$.
These are kept until the end of the current year,
when the next release is created.
The monthly versions have the form
$codei%
	cppad-%yyyy%0101.%lic%.tgz
%$$
where the license code $icode lic$$
is $code gpl$$ or $code epl$$
and $icode yyyy$$ is the current year.

$subhead Unix File Extraction$$
On unix, you can use the command
$codei%
	tar -xvzf cppad-%version%.%lic%.tgz
%$$
where $icode version$$ either refers to the current version,
or one of the release versions.
This will decompress and extract the CppAD into
the distribution directory $codei%cppad-%version%$$.
To see if this has been done correctly, check for the following file:
$codei%
	cppad-%version%/cppad/cppad.hpp
%$$

$subhead Windows File Extraction and Testing$$
If you know how to extract the distribution directory from
the tar file, just do so. Otherwise, below is one way you can do it.
(Note that if $code 7z.exe$$, $code cmake.exe$$, and $code nmake.exe$$ are you
your execution path, you will not need to specify their paths below.)

$list number$$
Download and install the open source program
$href%http://www.7-zip.org%$$.
$lnext
Download and install the Visual Studio Express; for example
$href%http://www.microsoft.com/en-us/download/confirmation.aspx?id=44914
	%Visual Studio 2013
%$$
$lnext
In a command window, execute the following commands:
$codei|
	set PATH=|path_to_7_zip|;%PATH%
	set PATH=|path_to_cmake|;%PATH%
	set VCDIR=|path_to_vcdir|;%PATH%
	call "%VCDIR%\vcvarsall.bat" x86
|$$
For example, on one machine these paths had the following values:
$codei|
	|path_to_7_zip|=C:\Program Files\7-zip
	|path_to_cmake|=C:\Program Files (x86)\CMake\bin
	|path_to_vcdir|=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
|$$
$lnext
Use the following commands to extract the distribution from the tarball:
$codei%
	7z x cppad-%version%.%lic%.tgz
	7z x cppad-%version%.%lic%.tar
%$$
$lnext
To see if this has been done correctly, check for the following file:
$codei%
	cppad-%version%\cppad\cppad.hpp
%$$
$lnext
The commands below are optional.
They run the CppAD tests using the default $cref cmake$$ settings
(except for the $cref/generator/cmake/generator/$$ option)
$codei%
	mkdir build
	cd build
	cmake -G "NMake Makefiles" ..
	nmake check
%$$
$lend


$subhead Install Instructions$$
The instructions on the web correspond to the current version of CppAD.
If you are using an old version of CppAD
You should follow the install instructions in
the $code doc$$ subdirectory of the distribution directory.


$head Subversion$$

$subhead Limitations$$
This download procedure has the following limitations:
$list number$$
The $href%http://subversion.tigris.org/%subversion%$$
program must be installed on your system.
$lnext
No documentation is included by this download procedure,
though it can be build from the source code; see
$cref/install instructions/download/Subversion/Install Instructions/$$ below.
$lnext
Only the
$href%http://opensource.org/licenses/EPL-1.0%EPL licensed%$$
version of CppAD can be obtained by this download procedure
(some old versions correspond to CPL instead of EPL).
$lend

$subhead Current Version$$
To obtain current version of CppAD, execute the following commands
$codei%
	svn export https://projects.coin-or.org/svn/CppAD/trunk %dir%
%$$
To see if this has been done correctly, check for the following file:
$codei%
	%dir%/cppad/cppad.hpp
%$$
We refer to your directory choice $icode dir$$ above
as the distribution directory.

$subhead Stable Versions$$
Subversion downloads are available for a set of stable versions
(after the specified date, only bug fixes get applied).
The following link will list the available $icode dir$$ values
corresponding to
$href%https://projects.coin-or.org/CppAD/browser/stable% stable versions%$$.
The following command will download a
stable version of the CppAD source code:
$codei%
	svn export https://projects.coin-or.org/svn/CppAD/stable/%dir% %dir%
%$$
To see if this has been done correctly, check for the following file:
$codei%
	%dir%/cppad/cppad.hpp
%$$
Note that it will correspond to the most recent release for this stable
version.

$subhead Release Versions$$
Subversion downloads are available for a set of release versions
(no changes are applied).
The following link will list the available $icode dir$$ values
corresponding to
$href%https://projects.coin-or.org/CppAD/browser/releases%
	release versions
%$$.
The following command will download a
release version of the CppAD source code:
$codei%
	svn export https://projects.coin-or.org/svn/CppAD/releases/%dir% %dir%
%$$
To see if this has been done correctly, check for the following file:
$codei%
	%dir%/cppad/cppad.hpp
%$$

$subhead Install Instructions$$
If you are using subversion to download an old version of CppAD,
you will have to build the documentation to get the corresponding install
instructions.
The documentation for CppAD is built from the source code files using
$href%http://www.seanet.com/~bradbell/omhelp/%OMhelp%$$.
You will need to install the $code omhelp$$ command so that
$codep
	which omhelp
$$
shows it is in your path.
Once you have done this,
in the distribution directory execute the following command:
$codei%
	./build.sh omhelp
%$$
You will then be able to follow the install instructions in
the $code doc$$ subdirectory of the distribution directory.


$end
