Difference between revisions of "Developing"

From Gestinux Wiki
Jump to navigation Jump to search
(minor edits)
Line 2: Line 2:
  
  
You are welcome to help making Gestinux better.
+
You are welcome to help make Gestinux better.
  
Here are some rules to maintain the project. We can discuss about it in the [https://sourceforge.net/apps/phpbb/gestinux/viewforum.php?f=10 development forum].
+
Some guidelines for project maintenance follow, which can be discueed in the [https://sourceforge.net/apps/phpbb/gestinux/viewforum.php?f=10 development forum].
  
Gestinux is developed with '''Lazarus''' 1.0.4 and '''FreePascal''' 2.6.0.
+
Gestinux is being developed using '''Lazarus''' 1.0.4 and '''FreePascal''' 2.6.0.
  
== Get the sources ==
+
== Obtaining the sources ==
  
Sources are managed with subversion. You must use a SVN Client and connect to it.
+
Gestinux source code is managed using 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
 
With svn only, the command line is : svn checkout http://svn.code.sf.net/p/gestinux/code
Line 16: Line 16:
 
Enter your username and password on sourceforge.net
 
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 1.0 is nearly complete and is 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.
+
* Version 0.5 is probably obsolete, owing to changes in FPC, and we don't plan to change anything in the 0.5 branch.
  
== Packages to install ==
+
== Packages which are required ==
  
 
Release 1.0 should compile with the following packages.
 
Release 1.0 should compile with the following packages.
You can use more recent versions of the packages, but at your own risks !  
+
You can use more recent versions of the packages, but at your own risk !  
  
Let's know if it works fine with a newer version of any package.
+
Let us know if using a newer version of any of these packages works sucessfully.
  
 
*  Zeos DBO 7.0.3-stable
 
*  Zeos DBO 7.0.3-stable
Line 35: Line 35:
 
** Install.
 
** Install.
 
* LazReport 0.9.8
 
* LazReport 0.9.8
** Open components/lazreport/source/lazreport.lpk in the installation folder of Lazarus (/usr/share/lazarus/<version> on Linux)
+
** Open components/lazreport/source/lazreport.lpk in the Lazarus installation folder (/usr/share/lazarus/<version> on Linux)
 
** In Options, IDE integration, select "automatically rebuild as needed"  
 
** In Options, IDE integration, select "automatically rebuild as needed"  
 
** Install.
 
** Install.
Line 42: Line 42:
 
** In Options, IDE integration, select "automatically rebuild as needed"
 
** In Options, IDE integration, select "automatically rebuild as needed"
 
** Install
 
** Install
* [[Gestinux_util]] 1.1 : package containing components used by gestinux
+
* [[Gestinux_util]] 1.1 : a package containing the components Gestinux uses
 
** Open util/gestinux_util.dpk in the gestinux sources (svn)
 
** Open util/gestinux_util.dpk in the gestinux sources (svn)
 
** Install.
 
** Install.
  
Sometimes, for unknow reasons, you have to rebuild lazarus with option clean+build all...
+
Sometimes, for unknown reasons, you have to rebuild Lazarus with the option: clean+build all...
Installing and rebuilding after each package is longer, but safer. Otherwise you will often get problems
+
Installing and rebuilding after each package is longer, but safer. Otherwise you will often get problems.
  
== Rules for development ==
+
== Gestinux development Rules ==
  
* Source must be compilable with : Lazarus 1.0.4 and FPC 2.6.0  
+
* The source must be compilable with : Lazarus 1.0.4 and FPC 2.6.0  
 
* Do not use features available only in Lazarus 1.1 or other SVN.
 
* Do not use features available only in Lazarus 1.1 or other SVN.
* Use only English for identifiers and comments.
+
* Only use English for identifiers and comments.
* Use Code formater (CTRL+D) to indent modified sources, with default options.
+
* Use the Code Formatter (CTRL+D) to indent modified sources, with default options.
* Read [[gestinux_util]] documentation, and do not use component Txxxx when there is a TGxxxx in this package  
+
* Read the [[gestinux_util]] documentation, and do not use a Txxxx component when there is a TGxxxx component in this package  
  
 
Ask to be granted a developer profile in SourceForge.  
 
Ask to be granted a developer profile in SourceForge.  
Line 63: Line 63:
  
 
Everyone can help !
 
Everyone can help !
If you are a beginner, there are some simple things to do, and this would save time.
+
If you are a beginner, there are some simple things you can do, and this would save time.
 
For gurus, we do need better components.
 
For gurus, we do need better components.
  
You can [https://sourceforge.net/tracker/?limit=25&group_id=320994&atid=1349209&status=1submit=Filter look at Tracker] to see what is the most useful to do.  
+
You can [https://sourceforge.net/tracker/?limit=25&group_id=320994&atid=1349209&status=1submit=Filter look at the Tracker] to see what is the most useful improvement you might make.  
  
Before starting anything, it is of course advisable to discuss a little about it in the [http://gestinux.net/forum/index.php forum].
+
Before starting anything, you are advised to discuss your proposal a bit in the [http://gestinux.net/forum/index.php forum].
  
 
= Translation system =
 
= Translation system =
  
Refer to the [[Internationalisation programmation]] page to learn how you can use it and make translations in gestinux.
+
Refer to the [[Internationalisation programmation]] page to learn how you can use it and offer translations for Gestinux.
  
 
= Database =
 
= Database =
Line 79: Line 79:
  
 
MySql 5 and PostgreSQL are supported.
 
MySql 5 and PostgreSQL are supported.
My Sql because it is common and administration is simpler.
+
My Sql because it is common and administration is quite simple.
PostgreSql because it is a true free software.
+
PostgreSql because it is completely free software.
In the future, we may try other DBMS, but it requires a larger team to go forward.
+
In the future, we may try other DBMS, but that would require a bigger development team.
  
 
In the main sources, avoid SQL statements specific to MySQL or Postgres.
 
In the main sources, avoid SQL statements specific to MySQL or Postgres.
Line 88: Line 88:
 
== Table and fields definitions and properties ==
 
== 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.  
+
In [[Gestinux_util]] there is a [[TGTable]] component used to store all the 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.
+
The database and table structures are created by the main executable, as specified in unitdatamodule.pas, in [[TGTable]] properties. See the component [[TGTable]] for more details.

Revision as of 19:53, 31 January 2013

 Français

Developing Gestinux

You are welcome to help make Gestinux better.

Some guidelines for project maintenance follow, which can be discueed in the development forum.

Gestinux is being developed using Lazarus 1.0.4 and FreePascal 2.6.0.

Obtaining the sources

Gestinux source code is managed using 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 complete and is currently released as a beta version. The svn branch is "trunk".
  • Version 0.5 is probably obsolete, owing to changes in FPC, and we don't plan to change anything in the 0.5 branch.

Packages which are required

Release 1.0 should compile with the following packages. You can use more recent versions of the packages, but at your own risk !

Let us know if using a newer version of any of these packages works sucessfully.

  • Zeos DBO 7.0.3-stable
    • Download the package and unzip to any directory.
    • Open packages/lazarus/zcomponent.lpk and click Install
  • Power PDF 0.9.10
    • 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 Lazarus installation folder (/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 1.1 : a package containing the components Gestinux uses
    • Open util/gestinux_util.dpk in the gestinux sources (svn)
    • Install.

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

Gestinux development Rules

  • The source must be compilable with : Lazarus 1.0.4 and FPC 2.6.0
  • Do not use features available only in Lazarus 1.1 or other SVN.
  • Only use English for identifiers and comments.
  • Use the Code Formatter (CTRL+D) to indent modified sources, with default options.
  • Read the gestinux_util documentation, and do not use a Txxxx component when there is a TGxxxx component 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 you can do, and this would save time. For gurus, we do need better components.

You can look at the Tracker to see what is the most useful improvement you might make.

Before starting anything, you are advised to discuss your proposal a bit in the forum.

Translation system

Refer to the Internationalisation programmation page to learn how you can use it and offer translations for Gestinux.

Database

Supported DBMS

MySql 5 and PostgreSQL are supported. My Sql because it is common and administration is quite simple. PostgreSql because it is completely free software. In the future, we may try other DBMS, but that would require a bigger development team.

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 all the 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 table structures are created by the main executable, as specified in unitdatamodule.pas, in TGTable properties. See the component TGTable for more details.