developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Changes between Version 1 and Version 2 of en/sources


Ignore:
Timestamp:
Mar 30, 2009, 11:38:12 AM (9 years ago)
Author:
laurentj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • en/sources

    v1 v2  
    11= Working with jelix sources =
    22
    3 == principles ==
     3These are important informations for those who want to contribute or to retrieve sources directly from the repository.
     4
     5== Principles ==
    46
    57Sources stored in the subversion repository are not ready to be performed by PHP. There are some preprocessing instructions in some php files, so, sources should be parsed by a preprocessor in order to be used by PHP. This preprocessing instruction allow to build packages for some specific PHP configurations, or some specific jelix editions.
     
    2224
    2325
    24  1. récupération de la dernière version de jelix dans le dépôt subversion
    25  1. création d'un fichier de paramètres pour le générateur (un fichier ini)
    26  1. modification des fichiers sources de jelix (correction de bug, amélioration, nouvelle  fonctionnalité etc..)
    27  1. lancement du générateur de sources finales. On obtient un "build"
    28  1. test du build avec une application, et en particulier testapp (qui est fournie dans le dépôt subversion) qui contient tout les tests unitaires
    29  1. si les tests sont concluants, le développeur propose son patch (svn diff) et débute alors le processus de review.
    30 
    31 == getting sources ==
     26== Getting sources ==
    3227
    3328We use [http://subversion.tigris.org/ Subversion] to store sources of jelix and to follow the history of modifications. So you have to install a subversion client on your machine. Then you can access to the repository by giving the address of the repository to subversion commands.
    3429
    35 For "anonymous" users, the address is:
     30For "anonymous" contributors, the address is:
    3631
    3732{{{
    3833   http://svn.jelix.org/jelix/trunk
    3934}}}
     35
    4036
    4137For contributors who have the right to commit into the repository :
     
    4440   svn+ssh://svnjelix@svn.jelix.org/jelix/trunk
    4541}}}
     42
    4643
    4744Note: the username to give is always "svnjelix". The server recognize automatically your real login with your ssh key.
     
    5653svn checkout svn+ssh://svnjelix@svn.jelix.org/jelix/trunk
    5754}}}
     55
     56== Directories ==
     57
     58The 'trunk' directory contains latest improvements for the next major release, and the 'branches' directory contains a directory for each minor releases. In this directory, we only fix bugs. No major new features are commited in them.
     59
     60
     61The directories you find in this directories are:
     62
     63 * build: the scripts to build jelix sources
     64 * ext: the extension for PHP (in C language), for the gold edition of Jelix
     65 * lib: all the files of jelix itself
     66 * temp: temporary directory for the testapp application
     67 * testapp: an application which contains all unit tests, and some example
     68
     69== How to build ==
     70
     71After you retrieve the sources, you need to "build" jelix. There is a script, build/buildjelix.php, which do this build. this is like a "makefile", and it takes a ini file name as a first parameter. This ini file contains options for the build. You have some examples of this files into build/config/.
     72
     73=== Building ===
     74
     75Before doing modifications, you should prepare an working environment: a directory where the built files of jelix will be stored. In this "target" directory, you could use jelix in your applications. Example:
     76
     77Your local copy of the subversion repository could be at:
     78{{{
     79   /home/laurent/projects/jelix/svn/
     80}}}
     81
     82And the target directory where you will have usable files:
     83{{{
     84   /home/laurent/projects/jelix/tests/
     85}}}
     86
     87Create a ini file mybuild.ini. You can copy from one of those which are in build/config, jelix-test.ini for example. It will contain this parameters:
     88
     89{{{
     90MAIN_TARGET_PATH = /home/laurent/projects/jelix/tests/
     91EDITION_NAME =
     92PHP_VERSION_TARGET =
     93
     94ENABLE_PHP_FILTER =
     95ENABLE_PHP_JSON =
     96ENABLE_PHP_XMLRPC =
     97ENABLE_PHP_JELIX =
     98WITH_BYTECODE_CACHE = auto
     99
     100ENABLE_DEVELOPER = 1
     101
     102STRIP_COMMENT =
     103ENABLE_OPTIMIZED_SOURCE =
     104
     105PACKAGE_TAR_GZ =
     106PACKAGE_ZIP =
     107
     108TARGET_REPOSITORY =
     109}}}
     110
     111You can have a full list of availabled parameters by doing:
     112
     113{{{
     114  php build/buildjelix.php -h
     115}}}
     116
     117To generate the sources:
     118
     119{{{
     120  php build/buildjelix.php mybuild.ini
     121}}}
     122
     123If you want to build the testapp application, use an other provided script, build/buildapp.php with an other ini file, (see build/config/testapp-test.ini)
     124
     125{{{
     126  php build/buildapp.php mytestapp.ini
     127}}}
     128
     129
     130'''Note''': Of course, you should run the build after each modification in the sources of jelix, on order to test this changes.
     131
     132
     133=== Generating a package ===
     134
     135The principle is the same as previous. You just have to indicate a directory where the packages will be generated, and you have to activate the flags (PACKAGE_TAR_GZ and/or PACKAGE_ZIP) in your ini file (mypackages.ini for example).
     136
     137
     138{{{
     139MAIN_TARGET_PATH = /home/laurent/projects/jelix/dist/
     140EDITION_NAME =
     141PHP_VERSION_TARGET =
     142
     143ENABLE_PHP_FILTER =
     144ENABLE_PHP_JSON =
     145ENABLE_PHP_XMLRPC =
     146ENABLE_PHP_JELIX =
     147WITH_BYTECODE_CACHE = auto
     148
     149ENABLE_DEVELOPER = 1
     150STRIP_COMMENT =
     151ENABLE_OPTIMIZED_SOURCE =
     152
     153PACKAGE_TAR_GZ = 1
     154PACKAGE_ZIP = 1
     155}}}
     156
     157
     158And then:
     159{{{
     160  php build/buildjelix.php mypackages.ini
     161}}}
     162