UNTRANSLATED

Différences

Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.

Lien vers cette vue

en:code:buildsystem [2012/07/13 19:24]
Christian A. Reiter [Creating translations] cleanup
en:code:buildsystem [2013/05/04 00:20] (Version actuelle)
Eric Maeker, MD [Building the additional plugins]
Ligne 6: Ligne 6:
 <note doc>**This documentation describes how to build FreeMedForms applications.**</note> <note doc>**This documentation describes how to build FreeMedForms applications.**</note>
  
-The FreeMedForms project is C++/[[http://qt.nokia.com/products|Qt]] code. In order to build applications, you will need to install and configure the Qt libs (please refer to the Qt docs).+The FreeMedForms project is written in C++/[[http://qt.nokia.com/products|Qt]]. In order to build one of the applications, you will need to install and configure the Qt libraries (please refer to the Qt documentation).
  
-FreeMedForms project applications consist on a very small executable, libs and plugins. When application starts, the executable is loaded, some libs too. If the application starts correctly the plugin manager loads all needed plugins and execute them.+FreeMedForms project applications consist of a very small executable, libs and plugins. When the application starts, the executable is loaded, some libs too The plugin manager then loads all needed plugins and executes them.
  
  
-===== Build dependencies =====+===== Getting the source =====
  
 +We use [[http://git-scm.com/|Git]] as versioning control system, and [[http://code.google.com/|Google Code]] for code hosting.
 +You can go [[http://code.google.com/p/freemedforms/source/checkout|here]] and follow the instructions there to fetch a copy of the FreeMedForms source code.
 +
 +===== Build dependencies =====
 ==== All systems ===== ==== All systems =====
  
-  * FreeMedForms before SVN revision number 3219 needs at least **Qt 4.6.2** or higher. +  * Be sure to install the correct version of Qt, otherwise you will not be able to compile FreeMedForms
-  FreeMedForms since SVN revision number 3219 needs **Qt 4.7.0** or higher+    * FreeMedForms since git revision [[http://code.google.com/p/freemedforms/source/detail?r=eb5da592065d44d5ee25b0b649fa1cfb15178521 |eb5da592065d]] needs **Qt 4.8.0** or higher. 
-  * Be sure to install the correct version of Qt otherwise uou will not be able to compile FreeMedForms.+    before that revision at least **Qt 4.6.2** is needed
  
 ==== Linux needed packages for compilation ==== ==== Linux needed packages for compilation ====
  
-  * For Linux users, you needbefore trying anything with the sources, to install these packages:+  * For Linux users, you need to install the following packages before trying anything with the sources:
     * build-essential     * build-essential
-    * all qt4 libs and binaries+    * all qt4 libs and binaries (libqt4-dev)
     * libxext-dev and libxext6     * libxext-dev and libxext6
 +  * We recommend to use the QtCreator IDE
 <code> <code>
 #in debian/ubuntu #in debian/ubuntu
Ligne 37: Ligne 43:
 ==== Windows needed applications for compilation ==== ==== Windows needed applications for compilation ====
  
-  * Download and install Qt libs+  * Download and install Qt SDK 
 +  * For the Webcam plugin:  
 +    * Download [[http://opencv.org/|OpenCV lib]] 
 +    * Install OpenCV libs in the //contrib// sub-dir
   * We recommend to use the QtCreator IDE   * We recommend to use the QtCreator IDE
  
Ligne 44: Ligne 53:
   * By default all the FreeMedForms apps are built with the quazip 0.4.4 library. This lib is included in the source package.   * By default all the FreeMedForms apps are built with the quazip 0.4.4 library. This lib is included in the source package.
   * Some linux distros do provide specific package of precompiled libquazip.   * Some linux distros do provide specific package of precompiled libquazip.
-  * You can get ride of the bundled QuaZip source by adding<code>CONFIG+=dontbuildquazip</code> to the qmake command line.  +  * You can get rid of the bundled QuaZip source by adding <code>CONFIG+=dontbuildquazip</code> to the qmake command line.  
-  * Using the **dontbuildquazip** config tagwill force the compiler to link FreeMedForms code to the QuaZip library.+  * Using the **dontbuildquazip** config tag will force the compiler to link FreeMedForms code to the system QuaZip library.
  
-==== Building the webcam plugin ====+==== Building the additional plugins ====
  
-  * By default, the WebCam plugin is not built. If you want to build it, you need to install the ** [[http://opencv.willowgarage.com/wiki/|libopencv-dev]] ** on your computer and add the **with-webcam** tag to the config qmake command.<code>qmake ... "CONFIG+=with-webcam" ...</code>+  * To build the optional plugins you can use two methods: 
 +  * 1) add to the qmake commande line: 
 +      *  CONFIG+=with-plugin 
 +      * where 'plugin' is the config name of the plugin 
 +  * 2) Use buildspecs/optionalplugins.pri file 
 +      * Uncomment required plugins 
 + 
 +=== Using the buildspecs/optionalplugins.pri === 
 + 
 +  * Uncomment need lines 
 + 
 +=== Using the command line === 
 + 
 +  * See the following instructions 
 + 
 +=== Accountancy plugin === 
 + 
 +  * v0.8.4 or upper 
 +  * Manages accountancy 
 +  * By default, the Account plugin is not built. If you want to build it, you need to add 
 +    * **with-account** tag to the config qmake command to build the new account plugin.<code>qmake ... "CONFIG+=with-account" ...</code> 
 +    * **with-old-account** tag to the config qmake command to build the //old// account plugin.<code>qmake ... "CONFIG+=with-old-account" ...</code> 
 +  * It is not useful to build both plugins. 
 + 
 +=== Agenda plugin === 
 + 
 +  * Since v0.8.4, the agenda plugin is now an optional plugin 
 +  * Manages multi-user agenda 
 +  * By default, the Agenda plugin is not built. If you want to build it, you need to add  
 +    * **with-agenda** tag to the config qmake command.<code>qmake ... "CONFIG+=with-agenda" ...</code> 
 + 
 +=== Alert plugin === 
 + 
 +  * v0.7.6 or upper 
 +  * Manages alerts for user, patient and application 
 +  * By default, the Alert plugin is not built. If you want to build it, you need to add  
 +    * **with-alerts** tag to the config qmake command.<code>qmake ... "CONFIG+=with-alerts" ...</code> 
 + 
 +=== Feedback plugin === 
 + 
 +  * v0.8.4 or upper 
 +  * Manages user feedback to the dev team 
 +  * By default, the Feedback plugin is not built. If you want to build it, you need  
 +    * to add **with-feedback** tag to the config qmake command.<code>qmake ... "CONFIG+=with-feedback" ...</code> 
 + 
 +=== PMHx plugin === 
 + 
 +  * v0.8.4 or upper 
 +  * Manages patient personal & family PMHx 
 +  * By default, the PMHx plugin is not built. If you want to build it, you need  
 +    * to add **with-pmh** tag to the config qmake command.<code>qmake ... "CONFIG+=with-pmh" ...</code> 
 + 
 +=== WebCam plugin === 
 + 
 +  * v0.8.0 or upper 
 +  * Manages webcam access (patient identity photo for eg) 
 +  * By default, the WebCam plugin is not built. If you want to build it, you need  
 +    * to install the ** [[http://opencv.org/|libopencv-dev]] ** on your computer 
 +    * to add **with-webcam** tag to the config qmake command.<code>qmake ... "CONFIG+=with-webcam" ...</code> 
 + 
 +==== Building optional features ====
  
  
Ligne 55: Ligne 124:
  
   * **For MacOs**: there is a specific MacOs script in the //scripts// dir. You need to install MySQL bin and includes.   * **For MacOs**: there is a specific MacOs script in the //scripts// dir. You need to install MySQL bin and includes.
-  * **For Windows**: +  * **For Windows**: read this [[http://qtfr.org/viewtopic.php?id=8237|useful post]] 
 +  * **For Linux**: No compilation is required, just install the plugins with //sudo apt-get install libqt4-sql-mysql//.
  
 ===== Known issues ===== ===== Known issues =====
  
-It seems like with Fedora Linux you need to set the Qt4 path, before trying to build the sources. This issue needs further developments and seems linked to Fedora itself.+  * It seems like with Fedora Linux you need to set the Qt4 path, before trying to build the sources. This issue needs further developments and seems linked to Fedora itself.
 <code> <code>
 export PATH=$PATH:/usr/lib64/qt4/bin/ export PATH=$PATH:/usr/lib64/qt4/bin/
Ligne 89: Ligne 159:
  
 ==== Creating translations ==== ==== Creating translations ====
-Translations are provided as sources. We provide some scripts to help you in that process. All this has to be done before starting the //make install// process! Please follow these instructions: 
  
-  * Start the Qt tool //lrelease//. The script //updatetranslations.sh// in the root directory automates this process for youIt extracts all translatable strings from all *.cpp source files and creates/updates corresponding *.ts files in the directory //global_resources/translations//, one file for each language (FR,DE,ES).  +  * Translations are provided as sources. We provide some scripts to help you in that process. 
-  Use the Qt tool //QtLinguist// to open these files and provide a translation for each string+  * Translations must be compiled before starting the //make install// step. 
-  Call the //lrelease_all.sh// script (or directly call //lrelease *.ts// in the translations directory) to get the .qm files produced that can be bundled with the app.+  * If you want to: 
 +    * **update the translations source file** use our **./updatetranslations.sh** without any commandline paramsThis step parses all the source files and extracts all translatable strings into *.ts files in //global_resources/translations// 
 +    **translate** use the **Qt Linguist** to *.ts filesand start translating
 +    **compile translations** use the Qt tool **lrelease**.<code>cd global_resources/translations 
 +lrelease *.ts</code> or use our **lrelease_all.sh** script.
 ==== The qmake && make processes ==== ==== The qmake && make processes ====
  
   * //qmake// is a small application from Qt which will translate the Qt project files into //Makefile// for your preferred compiler. This step requires some attention according to the selected build mode. These requirements are detailed below.   * //qmake// is a small application from Qt which will translate the Qt project files into //Makefile// for your preferred compiler. This step requires some attention according to the selected build mode. These requirements are detailed below.
   * You can specify your own spec file to qmake.   * You can specify your own spec file to qmake.
-  * The **LOWERED_APPNAME** define is required for the debug and release compilation. It is used to create the //bin// directory and for the management of the rpath settings in unices os. 
- 
   * **You can use make in multiple thread** (make -j X).   * **You can use make in multiple thread** (make -j X).
-  * <code>make -j 4</code>+  * <code>make -j4</code>
  
  
Ligne 111: Ligne 182:
  
   * Here are some paths descriptions :   * Here are some paths descriptions :
-    * binaries are located in svn/trunk/bin///LOWERED_APPNAME// (eg: for FreeMedForms --> svn/trunk/bin/freemedforms/) +    * binaries are located in /bin///LOWERED_APPNAME// (eg: for FreeMedForms --> /bin/freemedforms/) 
-    * plugins and libs are located in svn/trunk/bin///LOWERED_APPNAME///plugins (eg: for FreeMedForms --> svn/trunk/bin/freemedforms/plugins) +    * plugins and libs are located in /bin///LOWERED_APPNAME///plugins (eg: for FreeMedForms --> /bin/freemedforms/plugins) 
-    * applications resources are located in svn/trunk/global_resources+    * applications resources (pixmaps, sql files etc.) are located in /global_resources
     * users resources are located in your home path (you can modify this behavior using the command line of each FreeMedForms and derivatives : --config="../../path/to/your/config.ini").     * users resources are located in your home path (you can modify this behavior using the command line of each FreeMedForms and derivatives : --config="../../path/to/your/config.ini").
  
 <code> <code>
-cd svn-freemedforms +cd freemedforms 
-qmake-qt4 freemedforms.pro -r "CONFIG+=debug debug_without_install" LOWERED_APPNAME=freemedforms+qmake-qt4 freemedforms.pro -r "CONFIG+=debug debug_without_install"
 make make
 cd bin/freemedforms cd bin/freemedforms
  
 # for Linux # for Linux
-freemedforms_debug --config=../../global_resources/config.ini+./freemedforms_debug --config=../../global_resources/config.ini
  
 # for Mac # for Mac
Ligne 134: Ligne 205:
 ==== Building in release mode ==== ==== Building in release mode ====
  
-When you build in release mode, all instable functions are inhibited and there is no logging to the console. **You __MUST__ install the application (using the //make install// command)**, otherwise application will not work.  To facilitate the installation process several parameters can be passed through the command line.+  * When you build in release mode, all instable functions are inhibited and there is no logging to the console.  
 +  * **You __MUST__ install the application (using the //make install// command)**, otherwise application will not work.   
 +  * To facilitate the installation process several parameters can be passed through the command line.
  
 === Linux OS integration === === Linux OS integration ===
Ligne 140: Ligne 213:
   * The "CONFIG+=LINUX_INTEGRATED" can be set for a better integration into the operating system. When set, the built application will then use the Qt libraries installed in your OS. The libs are installed in // /usr/lib/BuiltApplication// and can not be moved. The binary is installed in /usr/bin. The application resources are installed in // /usr/share/BuiltApplication//. Of course, this is only available for Linux.   * The "CONFIG+=LINUX_INTEGRATED" can be set for a better integration into the operating system. When set, the built application will then use the Qt libraries installed in your OS. The libs are installed in // /usr/lib/BuiltApplication// and can not be moved. The binary is installed in /usr/bin. The application resources are installed in // /usr/share/BuiltApplication//. Of course, this is only available for Linux.
  
-  * The "INSTALL_ROOT_PATH=/home/me/test/" used to tell the installation process where to install the application, libs and resources. If you do not specify a path the application is installed in //svn/trunk/packages/YourOs/AppName//. You can combine Linux integration and root path when building a debian package or a rpm package. Actually only valid for Linux.+  * The "INSTALL_ROOT_PATH=/home/me/test/" used to tell the installation process where to install the application, libs and resources. If you do not specify a path the application is installed in //packages/YourOs/AppName//. You can combine Linux integration and root path when building a debian package or a rpm package. Actually only valid for Linux.
  
   * The "LIBRARY_BASENAME=lib64" is used to tell the installation process where to install plugins and libs. This is only valid in the LINUX_INTEGRATED configuration. The lib path will be: // /usr/LIBRARY_BASENAME/FreeMedForms // .   * The "LIBRARY_BASENAME=lib64" is used to tell the installation process where to install plugins and libs. This is only valid in the LINUX_INTEGRATED configuration. The lib path will be: // /usr/LIBRARY_BASENAME/FreeMedForms // .
Ligne 147: Ligne 220:
 # FreeMedForms Sample # FreeMedForms Sample
 # 1. Building a Linux package into a fake root system # 1. Building a Linux package into a fake root system
-cd svn-freemedforms +cd freemedforms 
-qmake freemedforms.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=%build__path/usr/" "LOWERED_APPNAME=freemedforms"+qmake freemedforms.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=%build__path/usr/"
 make make
 make install make install
  
 # 2. Fresh compilation and install without aiming to create a package # 2. Fresh compilation and install without aiming to create a package
-cd svn-freemedforms +cd freemedforms 
-qmake freemedforms.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=/usr/" "LOWERED_APPNAME=freemedforms"+qmake freemedforms.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=/usr/"
 make make
 make install make install
Ligne 161: Ligne 234:
 # FreeDiams Sample # FreeDiams Sample
 # 1. Building a Linux package into a fake root system # 1. Building a Linux package into a fake root system
-cd svn-freediams +cd freediams 
-qmake freediams.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=%build__path/usr/" "LOWERED_APPNAME=freediams"+qmake freediams.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=%build__path/usr/"
 make make
 make install make install
  
 # 2. Fresh compilation and install without aiming to create a package # 2. Fresh compilation and install without aiming to create a package
-cd svn-freediams +cd freediams 
-qmake freediams.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=/usr/" "LOWERED_APPNAME=freediams"+qmake freediams.pro -r -config release "CONFIG+=LINUX_INTEGRATED" "INSTALL_ROOT_PATH=/usr/"
 make make
 make install make install
Ligne 176: Ligne 249:
 === Mac OS integration === === Mac OS integration ===
  
-For MacOs, you need to: +  * For MacOs, you need to: 
-  * compile the application +    * compile the application 
-  * link to Qt franmework +    * link to Qt franmework 
-  * create a DMG package +    * create a DMG package 
- +  * A script is available for the whole process **scripts/mac/mac_release.sh**. It needs only one arg **-b AppToBuild**.
-A script was written to facilitate the process **svn/trunk/scripts/mac_release.sh**. It needs only one arg **-b AppToBuild**. +
 <code> <code>
-cd svn/trunk/scripts/+cd scripts
  
 # Building FreeDiams in release mode and create the DMG package in one step: # Building FreeDiams in release mode and create the DMG package in one step:
Ligne 203: Ligne 274:
  
 </code> </code>
 +
 ===== Building sources packages ===== ===== Building sources packages =====
  
-A specific script is available for the source package creation: **svn/trunk/scripts/source.sh**.+  * A specific script is available for the source package creation: **scripts/source.sh**.
  
 ==== Source building requirements ==== ==== Source building requirements ====
Ligne 222: Ligne 294:
  
 <code> <code>
-cd git/scripts+cd scripts
 ./source.sh ./source.sh
  
Ligne 229: Ligne 301:
 ls freemedformsfullsources.*.tgz ls freemedformsfullsources.*.tgz
 </code> </code>
 +
 +===== Contributing =====
 +
 +==== Git ====
 +We use Git as our VCS. If you want to make yourself familiar with it, look at the many, many tutorials and help pages available in the internet. 
 +
 +Git is available for Mac OSX, Linux, BSD and Windows (and probably for other OS).
 +As starting point look [[http://git-scm.com/documentation|here]].
 +
 +=== Configuring Git ===
 +
 +First tell git who you are - you are advised to use your real name and a valid email addresse, no nicknames please.
 +<code>
 +git config --global user.name "James T. Kirk"
 +git config --global user.email "kirk@enterprise.com"
 +</code>
 +
 +Now checkout the code as described at the Google Code page (link above).
 +
 +=== Installing git-hooks ===
 +We recommend to install our pre-defined git-hooks to simplify your work when pushing to our server. They run some code quality tests at each commit and automatically correct small issues (remove whitespace at the end of lines etc.):
 +<code>
 +cd /home/kirk/freemedforms./git/hooks
 +ln -s ../../githooks/*
 +</code>
 +
 +==== Server access ====
 +Per default anyone has read-only access to the FMF source code. If you want to write some code and contribute it to the project, please first read [[en:participate|Participate]] and present yourself at the mailing list.
 +We will then give you writing rights on the server, so you can push your changes upwards.
 +
en/code/buildsystem.1342200253.txt.gz · Dernière modification: 2012/07/13 19:24 par Christian A. Reiter
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki FreeMedForms © Eric Maeker, MD