/skychart-3.6-2150-src/tools/doc/wiki_doc/en/documentation/installation_and_compilation_of_the_source_code.html
HTML | 281 lines | 228 code | 45 blank | 8 comment | 0 complexity | ca906704bd29cb20d46ca0d1f43af177 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, BSD-3-Clause, LGPL-2.1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
- lang="en" dir="ltr">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>en:documentation:installation_and_compilation_of_the_source_code</title>
- <meta name="generator" content="DokuWiki Release 2009-12-25c "Lemming"" />
- <meta name="robots" content="index,follow" />
- <meta name="date" content="2011-09-29T14:59:19+0200" />
- <meta name="keywords" content="en,documentation,installation_and_compilation_of_the_source_code" />
- <link rel="search" type="application/opensearchdescription+xml" href="http://ap-i.net/static/skychart/lib/exe/opensearch.php" title="Skychart" />
- <link rel="start" href="http://ap-i.net/static/skychart/" />
- <link rel="contents" href="http://ap-i.net/static/skychart/en/documentation/installation_and_compilation_of_the_source_code?do=index" title="Index" />
- <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="http://ap-i.net/static/skychart/feed.php" />
- <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="http://ap-i.net/static/skychart/feed.php?mode=list&ns=en:documentation" />
- <link rel="alternate" type="text/html" title="Plain HTML" href="http://ap-i.net/static/skychart/_export/xhtml/en/documentation/installation_and_compilation_of_the_source_code" />
- <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://ap-i.net/static/skychart/_export/raw/en/documentation/installation_and_compilation_of_the_source_code" />
- <link rel="canonical" href="installation_and_compilation_of_the_source_code.html" />
- <link rel="stylesheet" media="all" type="text/css" href="../../lib/exe/css.php@s=all&t=skychart&tseed=1264943874.css" />
- <link rel="stylesheet" media="screen" type="text/css" href="../../lib/exe/css.php@t=skychart&tseed=1264943874.css" />
- <link rel="stylesheet" media="print" type="text/css" href="../../lib/exe/css.php@s=print&t=skychart&tseed=1264943874.css" />
- </head>
- <body>
- <div class="dokuwiki export">
- <!-- TOC START -->
- <div class="toc">
- <div class="tocheader toctoggle" id="toc__header">Table of Contents</div>
- <div id="toc__inside">
- <ul class="toc">
- <li class="clear">
- <ul class="toc">
- <li class="level2"><div class="li"><span class="li"><a href="installation_and_compilation_of_the_source_code.html#how_to_install_the_software_from_the_source_code" class="toc">How to install the software from the source code</a></span></div>
- <ul class="toc">
- <li class="level3"><div class="li"><span class="li"><a href="installation_and_compilation_of_the_source_code.html#get_the_source_code" class="toc">Get the source code</a></span></div></li>
- <li class="level3"><div class="li"><span class="li"><a href="installation_and_compilation_of_the_source_code.html#automated_compilation_and_installation" class="toc">Automated Compilation and installation</a></span></div></li>
- <li class="level3"><div class="li"><span class="li"><a href="installation_and_compilation_of_the_source_code.html#interactive_compilation" class="toc">Interactive compilation</a></span></div></li>
- </ul>
- </li>
- <li class="level2"><div class="li"><span class="li"><a href="installation_and_compilation_of_the_source_code.html#install_lazarus" class="toc">Install Lazarus</a></span></div></li>
- <li class="level2"><div class="li"><span class="li"><a href="installation_and_compilation_of_the_source_code.html#naming_convention_for_the_program_source" class="toc">Naming convention for the program source</a></span></div></li>
- <li class="level2"><div class="li"><span class="li"><a href="installation_and_compilation_of_the_source_code.html#directory_structure" class="toc">Directory structure</a></span></div></li></ul>
- </li></ul>
- </div>
- </div>
- <!-- TOC END -->
- <h2><a name="how_to_install_the_software_from_the_source_code" id="how_to_install_the_software_from_the_source_code">How to install the software from the source code</a></h2>
- <div class="level2">
- </div>
- <!-- SECTION "How to install the software from the source code" [1-62] -->
- <h3><a name="get_the_source_code" id="get_the_source_code">Get the source code</a></h3>
- <div class="level3">
- <p>
- Create a new directory for the source code.
- You have two ways to get the code:
- </p>
- <ul>
- <li class="level1"><div class="li"> Download the source file skychart_v3_xxx_source.tar.gz <br/>
- to this directory and extract the files.<br/>
- On Linux use : tar xzf skychart_v3_xxx_source.tar.gz <br/>
- On Windows use 7-zip available from: <a href="http://sourceforge.net/projects/sevenzip/" class="urlextern" title="http://sourceforge.net/projects/sevenzip/" rel="nofollow">http://sourceforge.net/projects/sevenzip/</a></div>
- </li>
- </ul>
- <ul>
- <li class="level1"><div class="li"> Or better use a <a href="http://subversion.tigris.org" class="urlextern" title="http://subversion.tigris.org" rel="nofollow">Subversion client</a> to ease the update of daily changes.<br/>
- The command is: <br/>
- <pre class="code">svn co https://svn.origo.ethz.ch/skychart/trunk .</pre>
- </div>
- </li>
- </ul>
- </div>
- <!-- SECTION "Get the source code" [63-609] -->
- <h3><a name="automated_compilation_and_installation" id="automated_compilation_and_installation">Automated Compilation and installation</a></h3>
- <div class="level3">
- <p>
- If you just want to compile the software without using the Lazarus interactive environment you can use the scripts available in the base directory.
- </p>
- <p>
- Before running these scripts be sure to have the Free Pascal binaries in your PATH environment, this is where you find the fpcmake command.
- </p>
- <p>
- In the base directory you also found the daily_build.sh script I use to automatically build the packages for Linux and Windows.
- </p>
- </div>
- <h4><a name="for_linux_and_mac" id="for_linux_and_mac">For Linux and Mac</a></h4>
- <div class="level4">
- <pre class="code">./configure [fpc=free_pascal_path] [lazarus=lazarus_path] [prefix=installation_path]
- make
- make install
- make install_data
- </pre>
- <p>
- For example to install the complete software from source on Ubuntu 11.10:
- </p>
- <pre class="code">sudo apt-get install build-essential lazarus subversion
- svn co https://svn.origo.ethz.ch/skychart/trunk skychart
- cd skychart
- ./configure fpc=/usr/lib/fpc/2.4.4 lazarus=/usr/lib/lazarus/0.9.30 prefix=/usr/local
- make
- sudo make install
- sudo make install_data
- sudo make install_cat1
- sudo make install_cat2
- sudo make install_pict
- </pre>
- </div>
- <h4><a name="for_windows" id="for_windows">For Windows</a></h4>
- <div class="level4">
- <ul>
- <li class="level1"><div class="li"> Beware not to have another make command than the Free Pascal one in your path. <br/>
- </div>
- </li>
- <li class="level1"><div class="li"> Manually compile the library getdss and plan404 with <a href="http://www.mingw.org/" class="urlextern" title="http://www.mingw.org/" rel="nofollow">Mingw</a>.<br/>
- </div>
- </li>
- <li class="level1"><div class="li"> Install the command <a href="http://gnuwin32.sourceforge.net/packages/sed.htm" class="urlextern" title="http://gnuwin32.sourceforge.net/packages/sed.htm" rel="nofollow">sed for Windows</a>.<br/>
- </div>
- </li>
- <li class="level1"><div class="li"> Edit the file configure.cmd to adjust the values for sed=, fpc=, lazarus=, prefix=</div>
- </li>
- <li class="level1"><div class="li"> You may have to adjust the scripts according to the Linux version because I not use them and they are probably out of date. </div>
- </li>
- </ul>
- <pre class="code">configure.cmd
- make
- make install
- make install_data
- </pre>
- </div>
- <!-- SECTION "Automated Compilation and installation" [610-2235] -->
- <h3><a name="interactive_compilation" id="interactive_compilation">Interactive compilation</a></h3>
- <div class="level3">
- <p>
- First, install the required components from src/skychart/component directory.
- </p>
- <p>
- Click Open Package, select component/cdccomponents.lpk, click Compile, Install.<br/>
- When the install tells you to rebuild Lazarus say Yes.
- </p>
- <p>
- You can now open the main project files skychart/cdc.lpi and compile.
- </p>
- <p>
- To run in debug adjust Run-Run Parameters-Working Directory to your CDC directory.
- </p>
- <p>
- To reduce the executable size for production, use strip and upx.
- </p>
- <p>
- The library getdss and plan404 are written in C language. To compile them, install the gcc compiler (<a href="http://www.mingw.org/" class="urlextern" title="http://www.mingw.org/" rel="nofollow">Mingw</a> on Windows) and run make from each library folder.
- </p>
- <p>
- A few Windows specific libraries and plugins are not yet ported to Lazarus,
- please use Delphi if you want to compile them.
- </p>
- </div>
- <!-- SECTION "Interactive compilation" [2236-3025] -->
- <h2><a name="install_lazarus" id="install_lazarus">Install Lazarus</a></h2>
- <div class="level2">
- <p>
- To know which version of Lazarus is require for a specific version of Skychart, install the binary version and look at the menu Help / About. There is a line that show the FPC and Lazarus version used.
- </p>
- <p>
- Install Lazarus from <a href="http://lazarus.freepascal.org" class="urlextern" title="http://lazarus.freepascal.org" rel="nofollow">http://lazarus.freepascal.org</a>. See <a href="http://wiki.lazarus.freepascal.org/Installing_Lazarus" class="urlextern" title="http://wiki.lazarus.freepascal.org/Installing_Lazarus" rel="nofollow">http://wiki.lazarus.freepascal.org/Installing_Lazarus</a> for more information.
- </p>
- <p>
- Launch Lazarus and open Components-Configure, Installed Packages.
- </p>
- <p>
- Check that Printer4Lazarus and TurboPowerIPro are installed, this is normally the case.<br/>
- If not, install them from lazarus/component :
- </p>
- <ul>
- <li class="level1"><div class="li"> printers/printer4lazarus.lpk</div>
- </li>
- <li class="level1"><div class="li"> turbopower_ipro/turbopoweripro.lpk</div>
- </li>
- </ul>
- <p>
- I use the following procedure to install or update Free Pascal and Lazarus on Linux with the cross compiler for Windows:
- </p>
- <pre class="code">cd ~/fpc
- # svn co http://svn.freepascal.org/svn/fpc/branches/fixes_2_2 .
- svn up
- make clean
- make build
- sudo make install
- make clean OS_TARGET=win32 CPU_TARGET=i386
- make build OS_TARGET=win32 CPU_TARGET=i386
- sudo make crossinstall OS_TARGET=win32 CPU_TARGET=i386
- ver=`fpc -iV`
- sudo ln -f -s /usr/local/lib/fpc/$ver/ppc386 /usr/local/bin
- sudo ln -f -s /usr/local/lib/fpc/$ver/ppcross386 /usr/local/bin
- cd ~/lazarus
- # svn co http://svn.freepascal.org/svn/lazarus/trunk .
- svn up
- make clean
- make OS_TARGET=win32 CPU_TARGET=i386 clean
- make bigide
- make OS_TARGET=win32 CPU_TARGET=i386 bigide
- </pre>
- </div>
- <!-- SECTION "Install Lazarus" [3026-4388] -->
- <h2><a name="naming_convention_for_the_program_source" id="naming_convention_for_the_program_source">Naming convention for the program source</a></h2>
- <div class="level2">
- <p>
- The following naming convention is used for the main project source code
- to enable quick recognition of the destination of the units.
- </p>
- <pre class="code">
- cdc.lpi : The main project
- pu_*.pas : Form units with specific code only
- pu_*.lfm : Form definition
- cu_*.pas : Unit containing non-visual object.
- u_*.pas : Unit with generic code.
- </pre>
- </div>
- <!-- SECTION "Naming convention for the program source" [4389-4810] -->
- <h2><a name="directory_structure" id="directory_structure">Directory structure</a></h2>
- <div class="level2">
- <pre class="code">
- |- src -| < base directory, compilation scripts
- |- skychart | < skychart module
- |- component < project component
- |- library < project library
- |- ...
- |- units < all compilation object go here
- |- varobs | < varobs module
- |- tools | - data < the "data" directory structure require to run the progran
- | - cat < the basic catalogs, the program used to build them
- | - ... < other data files
- </pre>
- </div>
- <!-- SECTION "Directory structure" [4811-] --></div>
- </body>
- </html>