Developing

From Gestinux Wiki
Revision as of 09:50, 7 December 2012 by Tintinux (talk | contribs)
Jump to navigation Jump to search
 Français

Developing Gestinux

You are welcome to help making Gestinux better.

Here are some rules to maintain the project. We can discuss about it in the development forum.

Gestinux is developed with Lazarus 1.0.2 and FreePascal 2.6.0.

Get the sources

Sources are managed with subversion. You must use a SVN Client and connect to it.

With svn only, the command line is : svn checkout http://svn.code.sf.net/p/gestinux/code

Enter your username and password on sourceforge.net

  • Version 1.0 is nearly finished and currently released as a beta version. The svn branch is "trunk".
  • Version 0.5 is probably obsolete, due to changes in FPC, and we don't plan to change anything in this branch.

Packages to install

Release 1.0 should compile with the following packages. You can use more recent versions of the packages, but at your own risks ! Let's know if it works fine with a newer version of any package.

  • Zeos DBO
  • Power PDF 0.9.7.1
    • Download the package and unzip to any directory.
    • Open pack_powerpdf.lpk
    • Install.
  • LazReport 0.9.8
    • Open components/lazreport/source/lazreport.lpk in the installation folder of Lazarus (/usr/share/lazarus/<version> on Linux)
    • In Options, IDE integration, select "automatically rebuild as needed"
    • Install.
  • LazReportPDFExport 0.7
    • Open components/lazreport/source/addons/pdfexport/lazreportpdfexport.lpk in Lazarus installed files.
    • In Options, IDE integration, select "automatically rebuild as needed"
    • Install
  • Gestinux_util : package containing components used by gestinux
    • Open util/gestinux_util.dpk in the gestinux sources
    • Install.

Sometimes, for unknow reasons, you have to rebuild lazarus with option clean+build all... Installing and rebuilding after each package is longer, but safer. Otherwise you will often get problems

Rules for development

  • Source must be compilable with : Lazarus 1.0.2, FPC 2.6.0
  • Do not use features available only in Lazarus 1.1 or other SVN.
  • Use only English for identifiers and comments.
  • Use Jedi Code formater to indent your sources, with default options.
  • Read gestinux_util documentation, and do not use component Txxxx when there is a TGxxxx in this package

Ask to be granted a developer profile in SourceForge. Don't forget to lock the files before any change.

What to do

Everyone can help ! If you are a beginner, there are some simple things to do, and this would save time. For gurus, we do need better components.

You can look at Tracker to see what is the most useful to do. But some coordination with the project manager is better before you start anything !

Translation system

Refer to the translation documentation page to learn how you can use it and make translations,

Database

Supported DBMS

MySql 5 and PostgreSQL are supported. My Sql because it is common and administration is simpler. PostgreSql because it is a true free software. In the future, we may try other DBMS, but it requires a larger team to go forward.

In the main sources, avoid SQL statements specific to MySQL or Postgres. When there is no alternative, compatibility procedures should be made. They are all centralized in one unit (unitdatamodule.pas for now).

Table and fields definitions and properties

In Gestinux_util there is a TGTable component used to store metadata of tables used in Gestinux. With this component, there is no need to store table definitions elsewhere, and no SQL script is required to initialize or upgrade the database.

The database and tables structures are created by the main executable, as specified in unitdatamodule.pas, in TGTable properties. See the component TGTable for more details.