====== Getting started with the source code ====== ===== How to install the source code to compile with Lazarus. ===== The simplest way is to add a ./src directory to your existing cdc binary directory. Download the source file skychart_v3_xxx_source.tar.gz to this directory and extract the file here. \\ On Linux the command is : tar xzf skychart_v3_xxx_source.tar.gz Or better get source from Subversion using a svn client. \\ The command is: svn co https://skychart.svn.sourceforge.net/svnroot/skychart/trunk . Finally you must have something like that : cdc -| < base directory containing the executable |- src -| < devel directory |- skychart | < skychart module |- component < project component |- library < project library |- ... |- units < all compilation object go here |- tools | - data < the "data" directory structure require to run the progran | - ... < various tools not necessarily useful to the end user To use this source code install Lazarus using the last daily snapshot or SVN version from http://lazarus.freepascal.org. See http://wiki.lazarus.freepascal.org/Installing_Lazarus for more information. Launch Lazarus and open Components-Configure, Installed Packages. Check that Printer4Lazarus, JPEGForLazarus and TurboPowerIPro are installed, this is normally the case with the version 0.9.18. If not, install them from lazarus/component printers/printer4lazarus.lpk jpeg/jpegforlazarus.lpk turbopower_ipro/turbopoweripro.lpk Then from src/skychart/component directory install the package for the required component: Click "Open Package", select "component/cdccomponents.lpk", click "Compile", "Install". When the install tell you to rebuild Lazarus say Yes. You can now open the main project files skychart/cdc.lpi and compile. To run in debug adjust Run-Run Parameters-Working Directory to your CDC directory. To reduce the executable size for production use strip and upx. The library getdss and plan404 are written in C language. To compile them, install the gcc compiler ([[http://www.mingw.org/|Mingw]] on Windows) and run make from each library folder. A few Windows specific library and plugin are not yet ported to Lazarus, please use Delphi if you want to compile them. ===== Naming convention for the program source ===== The following naming convention is use for the main project source code to allow to quickly recognise the destination of a unit. 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.