diff --git a/ChangeLog b/ChangeLog
index 3d7ebf3875cef6a83b77d576861b987e4e342771..0e380a9f04ca1b786717c26a5513b82b6aa1f7de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,56 +2,66 @@
 English Dolibarr ChangeLog
 --------------------------------------------------------------
 
+
+***** ChangeLog for 3.4.3 compared to 3.4.2 *****
+Fix: Warning into bank conciliation feature.
+Fix: Bad get of localtaxes into contracts add lines.
+Fix: Add a limit into list to avoid browser to hang when database is too large.
+
 ***** ChangeLog for 3.4.2 compared to 3.4.1 *****
-Fix: field's problem into company's page (RIB)
-Fix: Document cerfa doesn't contained firstname & lastname from donator
+Fix: field's problem into company's page (RIB).
+Fix: Document cerfa doesn't contained firstname & lastname from donator.
 Fix: Bad rounding on margin calculations and display.
 Fix: Option drop table into backup was broken.
-Fix: [ bug #1105 ] Searching Boxes other search option
-Fix: wrong buy price update
-Fix: [ bug #1142 ] Set paiement on invoice (PGSql)
-Fix: [ bug #1145 ] Agenda button list type do not display
-Fix: [ bug #1148 ] Product consomation : supplier order bad status
-Fix: [ bug #1159 ] Commercial search "other" give p.note do not exists
-Fix: [ bug #1174 ] Product translated description not good into PDF
-Fix: [ bug #1163 ] SQL Error when searching for supplier orders
-Fix: [ bug #1162 ] Translaction for morning and afternoon
-Fix: [ bug #1161 ] Search on product label
+Fix: [ bug #1105 ] Searching Boxes other search option.
+Fix: wrong buy price update.
+Fix: [ bug #1142 ] Set paiement on invoice (PGSql).
+Fix: [ bug #1145 ] Agenda button list type do not display.
+Fix: [ bug #1148 ] Product consomation : supplier order bad status.
+Fix: [ bug #1159 ] Commercial search "other" give p.note do not exists.
+Fix: [ bug #1174 ] Product translated description not good into PDF.
+Fix: [ bug #1163 ] SQL Error when searching for supplier orders.
+Fix: [ bug #1162 ] Translaction for morning and afternoon.
+Fix: [ bug #1161 ] Search on product label.
 Fix: [ bug #1075 ] POS module doesn't decrement stock of products in delayed payment mode.
-Fix: [ bug #1171 ] Documents lost in interventions after validating
-Fix: fix unsubscribe URL into mailing when sending manually (not by script)
-Fix: [ bug #1182 ] ODT company_country tag is htmlencoded
-Fix: [ bug #1196 ] Product barcode search does not expect 13th digit on EAN13 type
-Fix: [ bug #1202 ] Wrong amount in deposit % invoice from proposal
+Fix: [ bug #1171 ] Documents lost in interventions after validating.
+Fix: fix unsubscribe URL into mailing when sending manually (not by script).
+Fix: [ bug #1182 ] ODT company_country tag is htmlencoded.
+Fix: [ bug #1196 ] Product barcode search does not expect 13th digit on EAN13 type.
+Fix: [ bug #1202 ] Wrong amount in deposit % invoice from proposal.
+Fix: Removed analytics tags into doc page.
+Fix: Call Image on this instead of pdf.
+Fix: Missing parameter for photo.
+Fix: Bad SQL request for turnover report.
 
 ***** ChangeLog for 3.4.1 compared to 3.4.0 *****
-Fix: Display buying price on line edit when no supplier price is defined
-Fix: Retrieving of margin info when invoice created automatically from order
-Fix: Reordering supplier products in list by supplier or supplier ref was crashing
-Fix: [ bug #1029 ] Tulip numbering mask
-Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card
-Fix: [ bug #1033 ] SUPPLIER REF disappeared
-Fix: update extrafield do not display immediatly after update
-Fix: Fix bug with canvas thirdparty
-Fix: [ bug #1037 ] Consumption> Supplier invoices related
-Fix: User group name do not display in card (view or edit mode)
-Fix: Link "Show all supplier invoice" on suplier card not working 
-Fix: [ bug #1039 ] Pre-defined invoices conversion
-Fix: If only service module is activated, it's impossible to delete service
-Fix: [ bug #1043 ] Bad interventions ref numbering
-Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted
-Fix: Localtaxes balance not showing
-Fix: Intervention box links to contracts id
-Fix: Compatiblity with multicompany module
-Fix: Edit propal line was losing product supplier price id
-Fix: Delete linked element to supplier invoice when deleted 
-Fix: [ bug #1061 ] Bad info shipped products
-Fix: [ bug #1062 ] Documents lost in propals and contracts validating
-Fix: Supplier price displayed on document lines and margin infos didnt take discount
-Fix: sorting on qty did not work in supplier product list
-Fix: there was no escaping on filter fields in supplier product list
-Fix: bugs on margin reports and better margin calculation on credit notes
-Qual: Add travis-ci integration
+Fix: Display buying price on line edit when no supplier price is defined.
+Fix: Retrieving of margin info when invoice created automatically from order.
+Fix: Reordering supplier products in list by supplier or supplier ref was crashing.
+Fix: [ bug #1029 ] Tulip numbering mask.
+Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card.
+Fix: [ bug #1033 ] SUPPLIER REF disappeared.
+Fix: update extrafield do not display immediatly after update.
+Fix: Fix bug with canvas thirdparty.
+Fix: [ bug #1037 ] Consumption> Supplier invoices related.
+Fix: User group name do not display in card (view or edit mode).
+Fix: Link "Show all supplier invoice" on suplier card not working. 
+Fix: [ bug #1039 ] Pre-defined invoices conversion.
+Fix: If only service module is activated, it's impossible to delete service.
+Fix: [ bug #1043 ] Bad interventions ref numbering.
+Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted.
+Fix: Localtaxes balance not showing.
+Fix: Intervention box links to contracts id.
+Fix: Compatiblity with multicompany module.
+Fix: Edit propal line was losing product supplier price id.
+Fix: Delete linked element to supplier invoice when deleted.
+Fix: [ bug #1061 ] Bad info shipped products.
+Fix: [ bug #1062 ] Documents lost in propals and contracts validating.
+Fix: Supplier price displayed on document lines and margin infos didnt take discount.
+Fix: sorting on qty did not work in supplier product list.
+Fix: there was no escaping on filter fields in supplier product list.
+Fix: bugs on margin reports and better margin calculation on credit notes.
+Qual: Add travis-ci integration.
 
 ***** ChangeLog for 3.4 compared to 3.3.* *****
 For users:
@@ -149,6 +159,13 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
  
 
 
+***** ChangeLog for 3.3.5 compared to 3.3.4 *****
+- Fix: Change to make debian package ok despite removal of ckeditor.
+- Fix: jcrop file to match debian rules
+- Fix: Add missing country UK.
+- Fix: Minor fix into package.
+- Fix: Add missing label on project field.
+
 ***** ChangeLog for 3.3.4 compared to 3.3.3 *****
 - Fix: [ bug #1001 ] Social Contribution : State not correct
 - Fix: Better management of pdf generation when tcpdf is not available.
@@ -319,7 +336,6 @@ Dolibarr license has also been updated from GPLv2+ to GPLv3+.
 
 
 ***** ChangeLog for 3.2.3 compared to 3.2.2 *****
-
 - Fix: Some permission into agenda module.
 - Fix: Generation of PDF was not using correct font for some languages.
 - Fix some translations.
@@ -473,7 +489,6 @@ WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol
 
 
 ***** ChangeLog for 3.1.3 compared to 3.1.2 *****
-
 Fix: PgSQL - property must be set if success
 Fix: Provide a solution for backup when mysqldump is not available
 Fix: Bug #460 - Wrong entity assignment when creating a warehouse
@@ -482,7 +497,6 @@ Fix: bug #405 - Late icon always displayed on comm/propal.php
 
 
 ***** ChangeLog for 3.1.2 compared to 3.1.1 *****
-
 - Fix: Can clone a proposal
 - Fix: Add member ID in substitution method
 - Fix: Duplicate end tag and missing form parts
@@ -495,7 +509,6 @@ Fix: bug #405 - Late icon always displayed on comm/propal.php
 
 
 ***** ChangeLog for 3.1.1 compared to 3.1.0 *****
-
 - New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added, 
        credit notes are not removed from total amount of invoice but are just 
        payments used to reducs remain to pay.
@@ -617,7 +630,6 @@ For translators:
 
 
 ***** ChangeLog for 3.0 compared to 2.9.* *****
-
 For users:
 - New: Can edit date of cheque receipts.
 - New: Add Sales journal and Purchase journal report.
@@ -713,7 +725,6 @@ For developers:
 
 
 ***** ChangeLog for 2.9 compared to 2.8.* *****
-
 For users:
 - New: POS module allow to choose which warehouse to use.
 - New: Support "Department/State" field on company setup, contact, 
@@ -831,7 +842,6 @@ For users:
 
 
 ***** ChangeLog for 2.8 compared to 2.7.* *****
-
 For users:
 - New: Support note on trips module
 - New: Can link contacts to projects
@@ -882,7 +892,6 @@ For developers:
 
 
 ***** ChangeLog for 2.7.1 compared to 2.7 *****
-
 For users:
 - Fix: Bad decimal management for it_IT and fr_BE languages.
 - Fix: A third party created from a member is created as a 
@@ -895,7 +904,6 @@ For users:
 
 
 ***** ChangeLog for 2.7 compared to 2.6.* *****
-
 For users:
 - New: Add a print icon to show a page to print without menus.
 - New: Can add a free text on bank cheque receipts.
@@ -994,7 +1002,6 @@ For developers:
 
 
 ***** ChangeLog for 2.6 compared to 2.5.* *****
-
 For users:
 - New: Add filter on status in emailing selector for Dolibarr users.
 - New: Can add bookmarks on all pages.
@@ -1077,7 +1084,6 @@ For developers:
 
 
 ***** ChangeLog for 2.5 compared to 2.4.* *****
-
 For users:
 - Sessions timeout can be configured to overwrite PHP setup.
 - Can filter on date in services list.
@@ -1141,7 +1147,6 @@ For developers:
    
 
 ***** ChangeLog for 2.4 compared to 2.2.* *****
-
 For users:
 - Add a calendar module (module agenda) with ical/vcal/rss export.
 - Look enhancement in graphics (thanks artichow).
@@ -1196,7 +1201,6 @@ For developers:
 
 
 ***** ChangeLog for 2.2 compared to 2.1.* *****
-
 - Add more statistics on main page.
 - Add option to add message on login page.
 - Management of categories for third parties.
@@ -1230,7 +1234,6 @@ For developers:
 
 
 ***** ChangeLog for 2.1 compared to 2.0.* *****
-
 - Added a better installer.
 - Support user and groups permissions.
 - Translation in english and support for several languages.
@@ -1295,12 +1298,10 @@ For developers:
 
 
 ***** ChangeLog for 2.0.1 compared to 2.0 *****
-
 Minor bug fixes
 
 
 
 ***** ChangeLog for 2.0 compared to 1.0.* *****
-
 ChangeLog file size is so important, that it is not included inside Dolibarr
 package. You can find it at www.dolibarr.org
diff --git a/build/README b/build/README
index 954270d6ef2f3bbaf66079909039b69473f28568..897a59c4eef9d32e261953e4af04b513d6ee781a 100644
--- a/build/README
+++ b/build/README
@@ -7,10 +7,27 @@ All sub-directories of "build" directory contains files required to build
 automatically Dolibarr packages.
 There are several tools:
 
+
+
 - To build full Dolibarr packages, launch the script
-> Edit version in makepack-dolibarr.pl file.
 > Launch command perl makepack-dolibarr.pl
 
+Note: Prerequisites to build tgz, debian, rpm package
+> apt-get install tar dpkg dpatch p7zip-full rpm zip
+
+Note: Prerequisites to build autoexe DoliWamp package:
+> Install InnoSetup
+   For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
+> Install WampServer into "C:\Program Files\Wamp"
+   For example by running wampserver2.2e-php5.4.3-httpd-2.4.2-mysql5.5.24-x64.exe (http://www.wampserver.com)
+> Install WampServer addon to have versions: Apache2.2.11, Mysql5.0.45, Php5.3.0
+   For example by running WampServer2-APACHE2211.exe (http://www.wampserver.com)
+   For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
+   For example by running WampServer2-PHP530.exe (http://www.wampserver.com)
+> To build from Windows (running from makepack-dolibarr.pl script is however
+  recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
+  The .exe file will be build into directory build.
+
 - To build a translaction package, launch the script
 > perl makepack-dolibarrlang.pl
 
@@ -20,17 +37,6 @@ There are several tools:
 - To build a package for a module, launch the script
 > perl makepack-dolibarrmodule.pl
 
-- To build an autoexe DoliWamp package:
-> Install InnoSetup (http://www.jrsoftware.org)
-> Install WampServer into "C:\Program Files\Wamp" (http://www.wampserver.com)
-> Install WampServer addon to have versions:
-   Apache2.2.6, Mysql5.0.45, Php5.2.5
-> Modify file build/exe/doliwamp.iss to change variable SourceDir
-  with value of Dolibarr repository.
-> Modify AppVerName and OutputBaseFilename.
-> Launch innosetup, open file build/exe/doliwamp.iss and click on
-  button "Compile". The .exe file will be build into directory build.
-
 - To build developper documentation, launch the script
 > perl dolybarr-doxygen-build.pl
 
@@ -43,24 +49,33 @@ generated packages will not contains this "build" directory.
 
 We can find in "build", following sub-directories:
 
-* deb:
+* aps:
+To build APS package.
+
+* debian:
 To build Debian package.
 
-* rpm:
-To build Redhat or Mandrake package.
+* dmg:
+To build Mac OS package (not ready yet).
 
-* tgz:
-To build a tgz package.
+* doap:
+To build Doap descriptor to promote/describe Dolibarr releases.
+
+* doxygen:
+Dir with config file to build doxygen documentation.
 
 * exe:
 To build exe package for Windows that distribute Dolibarr sources or
 to build the complete DoliWamp package.
 
-* tgz:
-To build a zip package.
+* launchpad:
+Doc file to explain how to use launchpad.
 
-* doap:
-To build Doap descriptor to promote/describe Dolibarr releases.
+* live:
+Doc file to explain how to create a demo live CD.
+
+* obs:
+Doc file to explain how to push release onto OBS.
 
 * pad:
 To build a PAD file descriptor to promote/describe Dolibarr releases.
@@ -68,5 +83,14 @@ To build a PAD file descriptor to promote/describe Dolibarr releases.
 * patch:
 Script file to generate a patch file to distribute a Dolibarr mod.
 
-* dmg:
-To build dmg DoliMamp package for Mac OS X
+* perl:
+Tool to install dolibarr when using virtualmin pro
+
+* rpm:
+To build Redhat, Opensuse or Mandriva package.
+
+* tgz:
+To build a tgz package.
+
+* zip:
+To build a zip package.
diff --git a/build/debian/changelog b/build/debian/changelog
index cc9bd706d869aae47e725acd2f19cd710d52e438..f3bf1b1d126261727c42a9a0856d84e0325522ef 100644
--- a/build/debian/changelog
+++ b/build/debian/changelog
@@ -3,7 +3,7 @@ dolibarr (3.4.2) unstable; urgency=low
   [ Laurent Destailleur (eldy) ]
   * Maintenance release.
     
- -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net>  Mon, 22 Apr 2013 12:00:00 +0100     
+ -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net>  Mon, 30 Dec 2013 12:00:00 +0100     
 
 dolibarr (3.4.1) unstable; urgency=low
 
@@ -17,4 +17,4 @@ dolibarr (3.4.0) unstable; urgency=low
   [ Laurent Destailleur (eldy) ]
   * New upstream release.
     
- -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net>  Mon, 22 Apr 2013 12:00:00 +0100     
+ -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net>  Mon, 22 Apr 2013 12:00:00 +0100
diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss
index 98bfeee9109a079f8d2eeba02b03a86405116bac..77a9e1b95c958394c040de14a0fc9281eec386b3 100644
--- a/build/exe/doliwamp/doliwamp.iss
+++ b/build/exe/doliwamp/doliwamp.iss
@@ -1,1022 +1,1019 @@
-; ----- DoliWamp.iss ---------------------------------------------------------------------
-; Script to build an auto installer for Dolibarr.
-; Works with InnoSetup 5.4.0 (a)
-; Idea from WampServer 2 (http://www.wampserver.com)
-;----------------------------------------------------------------------------------------
-; You must edit some path in this file to build an exe (like SourceDir).
-; WARNING: Be sure that user.* files of Mysql database used to build
-; package contains only one user called root with no password.
-; For this, you can edit the mysql.user table of the source database to keep
-; only the root user with no password, stop server and catch
-; files user.MY* to put them in the Dolibarr build/exe/doliwamp/mysql directory.
-;
-;----------------------------------------------------------------------------------------
-
-
-[Setup]
-; ----- Change this -----
-AppName=DoliWamp
-; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
-AppVerName=DoliWamp-3.4.2
-; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
-OutputBaseFilename=DoliWamp-3.4.2
-; Define full path from wich all relative path are defined
-; You must modify this to put here your dolibarr root directory
-;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx
-SourceDir=..\..\..
-; ----- End of change
-;OutputManifestFile=build\doliwampbuild.log
-AppId=doliwamp
-AppPublisher=NLTechno
-AppPublisherURL=http://www.nltechno.com
-AppSupportURL=http://www.dolibarr.org
-AppUpdatesURL=http://www.dolibarr.org
-AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
-AppCopyright=Copyright (C) 2008-2013 Laurent Destailleur, NLTechno
-DefaultDirName=c:\dolibarr
-DefaultGroupName=Dolibarr
-;LicenseFile=COPYING
-;Compression=none
-Compression=lzma
-SolidCompression=yes
-WizardImageFile=build\exe\doliwamp\doliwamp.bmp
-WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp
-SetupIconFile=doc\images\dolibarr.ico
-PrivilegesRequired=admin
-DisableProgramGroupPage=yes
-ChangesEnvironment=no
-CreateUninstallRegKey=yes
-;UseSetupLdr=no
-;UninstallDisplayIcon={app}\bidon
-OutputDir=build
-ShowLanguageDialog=auto
-ShowUndisplayableLanguages=no
-;LanguageDetectionMethod=none
-LanguageDetectionMethod=uilanguage
-;SignedUninstaller=yes
-
-[Languages]
-Name: "en"; MessagesFile: "compiler:Default.isl,build\exe\doliwamp\Languages\MyEnglish.isl"
-Name: "br"; MessagesFile: "compiler:Languages\Portuguese.isl,build\exe\doliwamp\Languages\MyBrazilianPortuguese.isl"
-Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl,build\exe\doliwamp\Languages\MyCatalan.isl"
-Name: "da"; MessagesFile: "compiler:Languages\Danish.isl,build\exe\doliwamp\Languages\MyDanish.isl"
-Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl,build\exe\doliwamp\Languages\MySpanish.isl"
-Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl,build\exe\doliwamp\Languages\MyDutch.isl"
-Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl,build\exe\doliwamp\Languages\MyFinnish.isl"
-Name: "fr"; MessagesFile: "compiler:Languages\French.isl,build\exe\doliwamp\Languages\MyFrench.isl"
-Name: "ge"; MessagesFile: "compiler:Languages\German.isl,build\exe\doliwamp\Languages\MyGerman.isl"
-Name: "it"; MessagesFile: "compiler:Languages\Italian.isl,build\exe\doliwamp\Languages\MyItalian.isl"
-Name: "nb"; MessagesFile: "compiler:Languages\Norwegian.isl,build\exe\doliwamp\Languages\MyNorwegian.isl"
-Name: "po"; MessagesFile: "compiler:Languages\Polish.isl,build\exe\doliwamp\Languages\MyPolish.isl"
-Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl,build\exe\doliwamp\Languages\MyPortuguese.isl"
-Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl,build\exe\doliwamp\Languages\MyRussian.isl"
-Name: "sv"; MessagesFile: "compiler:Languages\Slovenian.isl,build\exe\doliwamp\Languages\MySlovenian.isl"
-
-[Tasks]
-;Name: "autostart"; Description: "Automatically launch DoliWamp server on startup. If you check this option, Services will be installed as automatic. Otherwise, services will be installed as manual and will start and stop with the service manager."; GroupDescription: "Auto Start:" ;Flags: unchecked;
-Name: "quicklaunchicon"; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
-Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
-
-[Dirs]
-Name: "{app}\logs"
-Name: "{app}\tmp"
-Name: "{app}\dolibarr_documents"
-Name: "{app}\bin\apache\apache2.2.11\logs"
-
-[Files]
-; Stop/start
-Source: "build\exe\doliwamp\stopdoliwamp.bat"; DestDir: "{app}\"; Flags: ignoreversion; AfterInstall: close()
-Source: "build\exe\doliwamp\startdoliwamp.bat"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\install_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\uninstall_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\removefiles.bat"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\rundoliwamp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\rundolihelp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\rundoliadmin.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\mysqlinitpassword.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\mysqltestinstall.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\startdoliwamp_manual_donotuse.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
-; PhpMyAdmin, Apache, Php, Mysql
-; Put here path of Wampserver applications
-; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 or 5.1.36
-; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 or 5.1.36
-Source: "C:\Program Files\Wamp\apps\phpmyadmin3.2.0.1\*.*"; DestDir: "{app}\apps\phpmyadmin3.2.0.1"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
-Source: "C:\Program Files\Wamp\bin\apache\apache2.2.11\*.*"; DestDir: "{app}\bin\apache\apache2.2.11"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
-Source: "C:\Program Files\Wamp\bin\php\php5.3.0\*.*"; DestDir: "{app}\bin\php\php5.3.0"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
-Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
-; Mysql data files (does not overwrite if exists)
-Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
-; Dolibarr
-Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
-Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,xdebug\*"
-Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
-Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
-Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
-; Config files
-Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin3.2.0.1"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.2.11\conf"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.3.0"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\ca_demo_dolibarr.crt"; DestDir: "{app}"; Flags: ignoreversion;
-Source: "build\exe\doliwamp\ca_demo_dolibarr.key"; DestDir: "{app}"; Flags: ignoreversion;
-; Licence
-Source: "COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion;
-
-
-
-[Icons]
-Name: "{group}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
-Name: "{group}\Tools\Help center"; Filename: "{app}\rundolihelp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
-Name: "{group}\Tools\Start DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampon.ico
-Name: "{group}\Tools\Stop DoliWamp server"; Filename: "{app}\stopdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampoff.ico
-Name: "{group}\Tools\Admin DoliWamp server"; Filename: "{app}\rundoliadmin.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliadmin.ico
-Name: "{group}\Tools\Uninstall DoliWamp"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; IconFilename: {app}\uninstall_services.bat
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Dolibarr"; WorkingDir: "{app}"; Filename: "{app}\rundoliwamp.bat"; Tasks: quicklaunchicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
-Name: "{userdesktop}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
-Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
-;Start of servers fromstartup menu disabled as services are auto
-;Name: "{userstartup}\DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; Flags: runminimized; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
-
-
-[Code]
-
-//variables globales
-var phpVersion: String;
-var apacheVersion: String;
-var path: String;
-var pfPath: String;
-var winPath: String;
-var pathWithSlashes: String;
-var Page: TInputQueryWizardPage;
-
-var smtpServer: String;
-var apachePort: String;
-var mysqlPort: String;
-var newPassword: String;
-
-var lockFile: String;
-var srcFile: String;
-var destFile: String;
-var srcFileH: String;
-var destFileH: String;
-var srcFileA: String;
-var destFileA: String;
-var srcContents: String;
-var browser: String;
-var mysqlVersion: String;
-var phpmyadminVersion: String;
-var phpDllCopy: String;
-var batFile: String;
-
-var mysmtp: String;
-var myporta: String;
-var myportas: String;
-var myport: String;
-var mypass: String;
-
-var firstinstall: Boolean;
-var value: String;
-
-
-//-----------------------------------------------
-//procedures lancees au debut de l'installation
-function InitializeSetup(): Boolean;
-begin
-  Result := MsgBox(CustomMessage('YouWillInstallDoliWamp')+#13#13+CustomMessage('ThisAssistantInstallOrUpgrade')+#13#13+CustomMessage('IfYouHaveTechnicalKnowledge')+#13#13+CustomMessage('ButIfYouLook')+#13#13+CustomMessage('DoYouWantToStart'), mbConfirmation, MB_YESNO) = IDYES;
-end;
-
-procedure InitializeWizard();
-begin
-  //version des applis, a modifier pour chaque version de WampServer 2
-  apacheVersion := '2.2.11';
-  phpVersion := '5.3.0' ;
-  mysqlVersion := '5.0.45';
-  phpmyadminVersion := '3.2.0.1';
-
-  smtpServer := 'localhost';
-  apachePort := '80';
-  mysqlPort := '3306';
-  newPassword := 'changeme';
-
-  firstinstall := true;
-
-
-  //LoadStringFromFile (srcFile, srcContents);
-  //posvalue=Pos('$dolibarr_main_db_port=', srcFile);
-
-  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','smtpServer', value) then
-  begin
-      if value <> '' then smtpServer:=value;
-  end
-  else
-  begin
-    if RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Microsoft\Internet Account Manager\Accounts\00000001','SMTP Server', value) then
-    begin
-      if value <> '' then smtpServer:=value;
-    end
-    else
-    begin
-      if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'PMail\ServiceInfo\Mail_Account_1','SvcSMTPHost', value) then
-      begin
-        if value <> '' then smtpServer:=value;
-      end
-      else
-      begin
-        if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\MSCRM','SMTPServer', value) then
-        begin
-          if value <> '' then smtpServer:=value;
-        end
-      end
-    end
-  end;
-
-  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort', value) then
-  begin
-      if value <> '' then apachePort:=value;
-  end;
-
-  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','mysqlPort', value) then
-  begin
-      if value <> '' then mysqlPort:=value;
-  end;
-
-  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','newPassword', value) then
-  begin
-      if value <> '' then newPassword:=value;
-  end;
-
-
-  // Prepare an object calle "Page" of type wpInstalling.
-  // Object will be show later in NextButtonClick function.
-  Page := CreateInputQueryPage(wpInstalling,
-  CustomMessage('TechnicalParameters'), '',
-  CustomMessage('IfFirstInstall'));
-
-  // TODO Add control differently if first install or update
-  if firstinstall
-  then
-  begin
-    Page.Add(CustomMessage('SMTPServer'), False);
-    Page.Add(CustomMessage('ApachePort'), False);
-    Page.Add(CustomMessage('MySqlPort'), False);
-    Page.Add(CustomMessage('MySqlPassword'), False);
-  end
-  else
-  begin
-    Page.Add(CustomMessage('SMTPServer'), False);
-    Page.Add(CustomMessage('ApachePort'), False);
-    Page.Add(CustomMessage('MySqlPort'), False);
-    Page.Add(CustomMessage('MySqlPassword'), False);
-  end;
-  
-  // Default values
-  Page.Values[0] := smtpServer;
-  Page.Values[1] := apachePort;
-  Page.Values[2] := mysqlPort;
-  Page.Values[3] := newPassword;
-
-end;
-
-
-//-----------------------------------------------
-// Stop all services (if exist)
-procedure close();
-var myResult: Integer;
-begin
-path := ExpandConstant('{app}');
-pfPath := ExpandConstant('{pf}');
-winPath := ExpandConstant('{win}');
-pathWithSlashes := path;
-StringChange (pathWithSlashes, '\','/');
-
-batFile := path+'\stopdoliwamp.bat';
-Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-end;
-
-
-
-
-//-----------------------------------------------------------
-// Install pages
-function NextButtonClick(CurPageID: Integer): Boolean;
-var myResult: Integer;
-var res: Boolean;
-var paramok: Boolean;
-var datadirold: String;
-var datadirnew: String;
-var exedirold: String;
-var exedirnew: String;
-var themessage: String;
-begin
-
-   res := True;
-   
-  //MsgBox(''+CurPageID,mbConfirmation,MB_YESNO);
-
-  if CurPageID = Page.ID then
-  begin
-
-    // This must be in if curpage.id = page.id, otherwise it is executed after each Next button
-
-    path := ExpandConstant('{app}');
-    winPath := ExpandConstant('{win}');
-    pathWithSlashes := path;
-    StringChange (pathWithSlashes, '\','/');
-    datadirold := pathWithSlashes+'/bin/mysql/mysql5.0.45/data';
-    datadirnew := pathWithSlashes+'/bin/mysql/data';
-    exedirold := pathWithSlashes+'/bin/mysql/mysql5.0.45';
-    exedirnew := pathWithSlashes+'/bin/mysql/mysql5.0.45';
-
-    // If we have a new database version, we should only copy old my.ini file into new directory
-    // and change only all basedir= strings to use new version. Like this, data dir is still correct.
-    // Install of service and stop/start scripts are already rebuild by installer.
-//      FileCopy(exedirold+'/my.ini',exedirnew+'/my.ini', true);
-
-//    We should not need this, also databases may not be called dolibarr
-//      res := RenameFile(ibdata1dirold+'/dolibarr',ibdata1dirnew+'/dolibarr');
-//      if res then
-//      begin
-//          themessage := CustomMessage('OldVersionFoundAndMoveInNew');
-//          MsgBox(themessage,mbInformation,MB_OK);
-//          TODO Replace also mysql.ini and resintall service
-//      end
-//      else
-//      begin
-//          themessage := CustomMessage('OldVersionFoundButFailedToMoveInNew');
-//          MsgBox(themessage,mbInformation,MB_OK);
-//      end;
-
-
-    //----------------------------------------------
-    // Copie des dll de php vers apache
-    //----------------------------------------------
-	// TODO Update this list when changing PHP/Apache versions
-	
-    phpDllCopy := 'fdftk.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'fribidi.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'gds32.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'libeay32.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'libmhash.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'libmysql.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'libpq.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'msql.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'libmcrypt.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'libmysqli.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'ntwdblib.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-
-    phpDllCopy := 'php5activescript.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'php5nsapi.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'php5ts.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-
-    phpDllCopy := 'ssleay32.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-    phpDllCopy := 'yaz.dll';
-    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
-
-
-    // Remove lock file
-    lockfile := pathWithSlashes+'/dolibarr_documents/install.lock';
-    if FileExists (lockfile) and not DeleteFile(lockfile) then
-    begin
-      themessage := FmtMessage(CustomMessage('FailedToDeleteLock'),[pathWithSlashes]);
- 		  MsgBox(themessage,mbInformation,MB_OK);
-    end
-
-
-		// Check if parameters already defined in conf.php file
-		srcFile := pathWithSlashes+'/www/dolibarr/htdocs/conf/conf.php';
-		if not FileExists (srcFile) then
-		begin
-		    firstinstall := true;
-		
-		    // Values from wizard
-		    mysmtp  := Page.Values[0];
-		    myporta := Page.Values[1];
-		    myportas:= '443';
-		    myport  := Page.Values[2];
-		    mypass  := Page.Values[3];
-		end
-		else
-		begin
-		    firstinstall := false;
-		
-		    // Values from registry
-		    mysmtp  := smtpServer;
-		    myporta := apachePort;
-		    myportas:= '443';
-		    myport  := mysqlPort;
-		    mypass  := newPassword;
-		end;
-		
-		paramok := True;
-		// TODO Test if choice of param is ok if firstinstall
-
-    if (firstinstall) then
-    begin
-    
-		  // Test serveur SMTP
-//      if paramok then
-//      begin
-//    		batFile := pathWithSlashes+'/UsedPort.exe';
-//    		MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
-//  	    Exec(batFile, '-s '+smtpServer+' -p 25', path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-        //themessage := 'Le serveur '+smtpServer+' semble ne pas etre joignable pour l envoi de mail SMTP (port 25). Si vous avez un firewall, verifiez sa configuration. Sinon, revenez en arriere pour choisir une autre valeur pour le serveur SMTP sortant d envoi de mail (Cette information est doit etre fournie par votre fournisseur d acces Internet).';
-//        themessage := 'The server '+smtpServer+' seems to be unreachable to send outgoing SMTP emails (port 25). If you have a firewall, check its setup. Otherwise, go back to choose another value for the SMTP server (This information shoud be given by your Internet Service Provider) or click "No" to ignore error. Cancel choice to choose another value ?';
-//  		  if ((IntToStr(myResult) <> '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
-//        begin
-//  		    paramok := False;
-//  		  end;
-//	    end;
-	
-      if paramok then
-      begin
-  		  // Test port Apache
-    		batFile := pathWithSlashes+'/UsedPort.exe';
-    		//MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
-    		Exec(batFile, '-s localhost -p '+myporta, path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-        //themessage := 'Le port '+myporta+' semble deja pris. Revenez en arriere pour choisir une autre valeur pour le port Apache.';
-        themessage := FmtMessage(CustomMessage('PortAlreadyInUse'),[myporta,'Apache']);
-    		if ((IntToStr(myResult) = '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
-        begin
-    		  paramok := False;
-    		end;
-      end;
-      
-      if paramok then
-      begin
-    		// Test port Mysql
-    		batFile := pathWithSlashes+'/UsedPort.exe';
-    		//MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
-    		Exec(batFile, '-s localhost -p '+myport, path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-        //themessage := 'Le port '+myport+' semble deja pris. Revenez en arriere pour choisir une autre valeur pour le port MySQL.';
-        themessage := FmtMessage(CustomMessage('PortAlreadyInUse'),[myport,'MySql']);
-    		if ((IntToStr(myResult) = '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
-    		begin
-      		paramok := False;
-    		end;
-      end;
-      
-    end;
-		
-		if paramok
-		then
-		begin
-		    
-	    //----------------------------------------------
-	    // Rename file c:/windows/php.ini (we don't want it)
-	    //----------------------------------------------
-		
-	    if FileExists ('c:/windows/php.ini') then
-	    begin
-	      if MsgBox('A previous c:/windows/php.ini file has been detected in your Windows directory. Do you want DoliWamp to rename it to php_old.ini to avoid conflicts ?',mbConfirmation,MB_YESNO) = IDYES then
-	      begin
-	        RenameFile('c:/windows/php.ini','c:/windows/php_old.ini');
-	      end;
-	    end;
-	    if FileExists ('c:/winnt/php.ini') then
-	    begin
-	      if MsgBox('A previous c:/winnt/php.ini file has been detected in your Windows directory. Do you want DoliWamp to rename it to php_old.ini to avoid conflicts ?',mbConfirmation,MB_YESNO) = IDYES then
-	      begin
-	        RenameFile('c:/winnt/php.ini','c:/winnt/php_old.ini');
-	      end;
-	    end;
-		
-		
-		
-	    //----------------------------------------------
-	    // Create rundoliwamp.bat, rundolihelp.bat and rundoliadmin.bat (if not exists)
-	    //----------------------------------------------
-	
-	    destFile := pathWithSlashes+'/rundoliwamp.bat';
-	    srcFile := pathWithSlashes+'/rundoliwamp.bat.install';
-	
-	    destFileH := pathWithSlashes+'/rundolihelp.bat';
-	    srcFileH := pathWithSlashes+'/rundolihelp.bat.install';
-	
-	    destFileA := pathWithSlashes+'/rundoliadmin.bat';
-	    srcFileA := pathWithSlashes+'/rundoliadmin.bat.install';
-	
-	    if (not FileExists (destFile) or not FileExists (destFileH) or not FileExists (destFileA))
-	     and (FileExists(srcFile) and FileExists(srcFileH) and FileExists(srcFileA)) then
-	    begin
-	      //navigateur
-	      browser := 'iexplore.exe';
-	      if FileExists (pfPath+'/Mozilla Firefox/firefox.exe')  then
-	      begin
-	        if MsgBox(CustomMessage('FirefoxDetected'),mbConfirmation,MB_YESNO) = IDYES then
-	        begin
-	          browser := pfPath+'/Mozilla Firefox/firefox.exe';
-	        end;
-	      end;
-	      if browser = 'iexplore.exe' then
-	      begin
-            if FileExists (pfPath+'/Internet Explorer/iexplore.exe')  then
-            begin
-               GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, pfPath+'/Internet Explorer','exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
-	        end
-	        else
-	        begin
-               GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, winPath,'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
-	        end;
-	      end;
-	
-	      LoadStringFromFile (srcFile, srcContents);
-	      StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
-	      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
-	      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
-	      SaveStringToFile(destFile,srcContents, False);
-	
-	      LoadStringFromFile (srcFileH, srcContents);
-	      StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
-	      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
-	      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
-	      SaveStringToFile(destFileH,srcContents, False);
-	
-	      LoadStringFromFile (srcFileA, srcContents);
-	      StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
-	      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
-	      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
-	      SaveStringToFile(destFileA,srcContents, False);
-	    end
-
-
-      if MsgBox(CustomMessage('DoliWampWillStartApacheMysql'),mbConfirmation,MB_YESNO) = IDYES then
-      begin
-
-		
-		    //----------------------------------------------
-		    // Create file alias phpmyadmin (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/alias/phpmyadmin.conf';
-		    srcFile := pathWithSlashes+'/alias/phpmyadmin.conf.install';
-		
-		    if FileExists(srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //installDir et version de phpmyadmin
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		    DeleteFile(srcFile);
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file alias dolibarr (if not exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/alias/dolibarr.conf';
-		    srcFile := pathWithSlashes+'/alias/dolibarr.conf.install';
-		
-		    if not FileExists (destFile) and FileExists(srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
-		
-		      SaveStringToFile(destFile, srcContents, False);
-		    end
-		    DeleteFile(srcFile);
-		
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file configuration for phpmyadmin (if not exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
-		    srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
-		
-		    if not FileExists (destFile) and FileExists (srcFile) then
-		    begin
-	        // sinon on prends le fichier par defaut
-	        LoadStringFromFile (srcFile, srcContents);
-	        StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
-	        StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
-	        SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file httpd.conf (if not exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf';
-		    srcFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf.install';
-		
-		    if not FileExists (destFile) and FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-
-		      //installDir et version de php
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
-              StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file my.ini (if not exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini';
-		    srcFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini.install';
-		
-		    if not FileExists (destFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //installDir et version de php
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file index.php (always but archive if exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/www/index.php';
-		    srcFile := pathWithSlashes+'/www/index.php.install';
-		
-		    if not FileExists (destFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		      StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
-		      SaveStringToFile(destFile, srcContents, False);
-		    end
-		    else
-		    begin
-		      RenameFile(destFile, destFile+'.old');
-		      LoadStringFromFile (srcFile, srcContents);
-		      StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
-		      SaveStringToFile(destFile, srcContents, False);
-		    end
-		
-		
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file dolibarr parametres predefinis install web (if not exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/www/dolibarr/htdocs/install/install.forced.php';
-		    srcFile := pathWithSlashes+'/www/dolibarr/htdocs/install/install.forced.php.install';
-		
-		    if not FileExists (destFile) and FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file install_services.bat (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/install_services.bat';
-		    srcFile := pathWithSlashes+'/install_services.bat.install';
-		
-		    if FileExists(srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //version de apache et mysql
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file install_services_auto.bat (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/install_services_auto.bat';
-		    srcFile := pathWithSlashes+'/install_services_auto.bat.install';
-		
-		    if FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //version de apache et mysql
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file uninstall_services.bat (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/uninstall_services.bat';
-		    srcFile := pathWithSlashes+'/uninstall_services.bat.install';
-		
-		    if FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //version de apache et mysql
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-		    //----------------------------------------------
-		    // Create file mysqlinitpassword.bat (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/mysqlinitpassword.bat';
-		    srcFile := pathWithSlashes+'/mysqlinitpassword.bat.install';
-		
-		    if FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //version de apache et mysql
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		    //----------------------------------------------
-		    // Create file mysqltestinstall.bat (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/mysqltestinstall.bat';
-		    srcFile := pathWithSlashes+'/mysqltestinstall.bat.install';
-		
-		    if FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //version de apache et mysql
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		    //----------------------------------------------
-		    // Create file startdoliwamp_manual_donotuse.bat (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/startdoliwamp_manual_donotuse.bat';
-		    srcFile := pathWithSlashes+'/startdoliwamp_manual_donotuse.bat.install';
-		
-		    if FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //version de apache et mysql
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
-		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		    
-		
-		    //----------------------------------------------
-		    // Create file builddemosslfiles.bat (always)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/builddemosslfiles.bat';
-		    srcFile := pathWithSlashes+'/builddemosslfiles.bat.install';
-		
-		    if FileExists (srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		
-		      //version de apache et mysql
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
-		
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-
-		
-		    //----------------------------------------------
-		    // Create file php.ini in php (if not exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini';
-		    srcFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini.install';
-		
-		    if not FileExists (destFile) and FileExists(srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
-              StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		    //----------------------------------------------
-		    // Create file php.ini in apache (if not exists)
-		    //----------------------------------------------
-		
-		    destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/php.ini';
-		    srcFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini.install';
-		
-		    if not FileExists (destFile) and FileExists(srcFile) then
-		    begin
-		      LoadStringFromFile (srcFile, srcContents);
-		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
-		      StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
-              StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
-		      SaveStringToFile(destFile,srcContents, False);
-		    end
-		
-		
-		
-	   		// Uninstall and Install services
-		  	batFile := path+'\uninstall_services.bat';
-        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-  			batFile := path+'\install_services.bat';
-  			Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-			
-  			// Start services
-        batFile := path+'\startdoliwamp.bat';
-        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-        //MsgBox(myResult,mbInformation,MB_OK);
-			
-        // Change mysql password (works only if not yet defined)
-        batFile := path+'\mysqlinitpassword.bat';
-        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-			
-        // Remove dangerous files
-        batFile := path+'\removefiles.bat';
-        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
-
-			
-		    // Save parameters to registry
-		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'smtpServer',  mysmtp);
-		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'apachePort',  myporta);
-		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'apachePSSL',  myportas);
-		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'mysqlPort',   myport);
-		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'newPassword', mypass);
-		
-		
-        res := True;
-		
-		  end
-		  else
-		  begin
-		  
-//	  	MsgBox('Apache and Mysql installation has been canceled. Please select parameters to start their installation.',mbInformation,MB_OK)
-
-      	res := False;
-		  	
-		  end
-      
-    end
-    else
-    begin
-    
-        //MsgBox('Selected values seems to be already used. Please choose other values.',mbInformation,MB_OK);
-		  	
-		  	res := False;
-
-    end
-    
-  end
-
-
-  Result := res;
-end;
-
-
-
-
-
-//-----------------------------------------------
-//procedure launched by the end of the installation, it deletes the installation files
-procedure DeinitializeSetup();
-begin
-//  DeleteFile(path+'\install_services.bat');
-//  DeleteFile(path+'\install_services_auto.bat');
-end;
-
-
-//-----------------------------------------------
-//procedure launched at beginning of the uninstallation
-function InitializeUninstall(): Boolean;
-begin
-    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','smtpServer');
-    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort');
-    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','mysqlPort');
-    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','newPassword');
-    Result := RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp');
-
-    Result := True;
-end;
-
-//-----------------------------------------------
-//procedure launched by the end of the uninstallation
-procedure DeinitializeUninstall();
-begin
-  path := ExpandConstant('{app}');
-  winPath := ExpandConstant('{win}');
-  pathWithSlashes := path;
-  StringChange (pathWithSlashes, '\','/');
-
-  MsgBox(FmtMessage(CustomMessage('ProgramHasBeenRemoved'),[path]),mbInformation,MB_OK);
-end;
-
-
-[Run]
-; Launch Dolibarr in browser. This is run after Wizard because of postinstall flag
-Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec postinstall skipifsilent runhidden
-
-
-[UninstallDelete]
-Type: files; Name: "{app}\*.*"
-Type: files; Name: "{app}\bin\mysql\mysql5.0.45\*.*"
-Type: filesandordirs; Name: "{app}\alias"
-Type: filesandordirs; Name: "{app}\apps"
-Type: filesandordirs; Name: "{app}\bin\apache"
-Type: filesandordirs; Name: "{app}\bin\php"
-Type: filesandordirs; Name: "{app}\help"
-Type: filesandordirs; Name: "{app}\lang"
-Type: filesandordirs; Name: "{app}\logs"
-Type: filesandordirs; Name: "{app}\scripts"
-Type: filesandordirs; Name: "{app}\tmp"
-Type: filesandordirs; Name: "{app}\www\dolibarr"
-
-
-[UninstallRun]
-Filename: "{app}\uninstall_services.bat"; Flags: runhidden
-
-
-
+; ----- DoliWamp.iss ---------------------------------------------------------------------
+; Script to build an auto installer for Dolibarr.
+; Works with InnoSetup 5.4.0 (a)
+; Idea from WampServer 2 (http://www.wampserver.com)
+;----------------------------------------------------------------------------------------
+; You must edit some path in this file to build an exe (like SourceDir).
+; WARNING: Be sure that user.* files of Mysql database used to build
+; package contains only one user called root with no password.
+; For this, you can edit the mysql.user table of the source database to keep
+; only the root user with no password, stop server and catch
+; files user.MY* to put them in the Dolibarr build/exe/doliwamp/mysql directory.
+;
+;----------------------------------------------------------------------------------------
+
+
+[Setup]
+; ----- Change this -----
+AppName=DoliWamp
+; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
+AppVerName=DoliWamp-3.4.2
+; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
+OutputBaseFilename=DoliWamp-3.4.2
+; ----- End of change
+;OutputManifestFile=build\doliwampbuild.log
+; Define full path from which all relative path are defined
+; You must modify this to put here your dolibarr root directory
+;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx
+SourceDir=..\..\..
+AppId=doliwamp
+AppPublisher=NLTechno
+AppPublisherURL=http://www.nltechno.com
+AppSupportURL=http://www.dolibarr.org
+AppUpdatesURL=http://www.dolibarr.org
+AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
+AppCopyright=Copyright (C) 2008-2013 Laurent Destailleur, NLTechno
+DefaultDirName=c:\dolibarr
+DefaultGroupName=Dolibarr
+;LicenseFile=COPYING
+;Compression=none
+Compression=lzma
+SolidCompression=yes
+WizardImageFile=build\exe\doliwamp\doliwamp.bmp
+WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp
+SetupIconFile=doc\images\dolibarr.ico
+PrivilegesRequired=admin
+DisableProgramGroupPage=yes
+ChangesEnvironment=no
+CreateUninstallRegKey=yes
+;UseSetupLdr=no
+;UninstallDisplayIcon={app}\bidon
+OutputDir=build
+ShowLanguageDialog=auto
+ShowUndisplayableLanguages=no
+LanguageDetectionMethod=uilanguage
+;SignedUninstaller=yes
+
+[Languages]
+Name: "en"; MessagesFile: "compiler:Default.isl,build\exe\doliwamp\Languages\MyEnglish.isl"
+Name: "br"; MessagesFile: "compiler:Languages\Portuguese.isl,build\exe\doliwamp\Languages\MyBrazilianPortuguese.isl"
+Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl,build\exe\doliwamp\Languages\MyCatalan.isl"
+Name: "da"; MessagesFile: "compiler:Languages\Danish.isl,build\exe\doliwamp\Languages\MyDanish.isl"
+Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl,build\exe\doliwamp\Languages\MySpanish.isl"
+Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl,build\exe\doliwamp\Languages\MyDutch.isl"
+Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl,build\exe\doliwamp\Languages\MyFinnish.isl"
+Name: "fr"; MessagesFile: "compiler:Languages\French.isl,build\exe\doliwamp\Languages\MyFrench.isl"
+Name: "ge"; MessagesFile: "compiler:Languages\German.isl,build\exe\doliwamp\Languages\MyGerman.isl"
+Name: "it"; MessagesFile: "compiler:Languages\Italian.isl,build\exe\doliwamp\Languages\MyItalian.isl"
+Name: "nb"; MessagesFile: "compiler:Languages\Norwegian.isl,build\exe\doliwamp\Languages\MyNorwegian.isl"
+Name: "po"; MessagesFile: "compiler:Languages\Polish.isl,build\exe\doliwamp\Languages\MyPolish.isl"
+Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl,build\exe\doliwamp\Languages\MyPortuguese.isl"
+Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl,build\exe\doliwamp\Languages\MyRussian.isl"
+Name: "sv"; MessagesFile: "compiler:Languages\Slovenian.isl,build\exe\doliwamp\Languages\MySlovenian.isl"
+
+[Tasks]
+;Name: "autostart"; Description: "Automatically launch DoliWamp server on startup. If you check this option, Services will be installed as automatic. Otherwise, services will be installed as manual and will start and stop with the service manager."; GroupDescription: "Auto Start:" ;Flags: unchecked;
+Name: "quicklaunchicon"; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+
+[Dirs]
+Name: "{app}\logs"
+Name: "{app}\tmp"
+Name: "{app}\dolibarr_documents"
+Name: "{app}\bin\apache\apache2.2.11\logs"
+
+[Files]
+; Stop/start
+Source: "build\exe\doliwamp\stopdoliwamp.bat"; DestDir: "{app}\"; Flags: ignoreversion; AfterInstall: close()
+Source: "build\exe\doliwamp\startdoliwamp.bat"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\install_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\uninstall_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\removefiles.bat"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\rundoliwamp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\rundolihelp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\rundoliadmin.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\mysqlinitpassword.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\mysqltestinstall.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\startdoliwamp_manual_donotuse.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\builddemosslfiles.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversion;
+; PhpMyAdmin, Apache, Php, Mysql
+; Put here path of Wampserver applications
+; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45 or 5.1.36
+; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45 or 5.1.36
+Source: "C:\Program Files\Wamp\apps\phpmyadmin3.2.0.1\*.*"; DestDir: "{app}\apps\phpmyadmin3.2.0.1"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log,darkblue_orange"
+Source: "C:\Program Files\Wamp\bin\apache\apache2.2.11\*.*"; DestDir: "{app}\bin\apache\apache2.2.11"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
+Source: "C:\Program Files\Wamp\bin\php\php5.3.0\*.*"; DestDir: "{app}\bin\php\php5.3.0"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
+Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
+; Mysql data files (does not overwrite if exists)
+Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
+; Dolibarr
+Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,nltechno*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
+Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,xdebug\*"
+Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
+Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
+Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
+; Config files
+Source: "build\exe\doliwamp\phpmyadmin.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\config.inc.php.install"; DestDir: "{app}\apps\phpmyadmin3.2.0.1"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.2.11\conf"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.3.0"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\ca_demo_dolibarr.crt"; DestDir: "{app}"; Flags: ignoreversion;
+Source: "build\exe\doliwamp\ca_demo_dolibarr.key"; DestDir: "{app}"; Flags: ignoreversion;
+; Licence
+Source: "COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion;
+
+
+
+[Icons]
+Name: "{group}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
+Name: "{group}\Tools\Help center"; Filename: "{app}\rundolihelp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
+Name: "{group}\Tools\Host your ERP-CRM in the Cloud"; Filename: "http://wiki.dolibarr.org/index.php/Cloud_Solutions"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
+Name: "{group}\Tools\Start DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampon.ico
+Name: "{group}\Tools\Stop DoliWamp server"; Filename: "{app}\stopdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampoff.ico
+Name: "{group}\Tools\Admin DoliWamp server"; Filename: "{app}\rundoliadmin.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliadmin.ico
+Name: "{group}\Tools\Uninstall DoliWamp"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; IconFilename: {app}\uninstall_services.bat
+Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Dolibarr"; WorkingDir: "{app}"; Filename: "{app}\rundoliwamp.bat"; Tasks: quicklaunchicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
+Name: "{userdesktop}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
+Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
+;Start of servers fromstartup menu disabled as services are auto
+;Name: "{userstartup}\DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; Flags: runminimized; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
+
+
+[Code]
+
+//variables globales
+var phpVersion: String;
+var apacheVersion: String;
+var path: String;
+var pfPath: String;
+var winPath: String;
+var pathWithSlashes: String;
+var Page: TInputQueryWizardPage;
+
+var smtpServer: String;
+var apachePort: String;
+var mysqlPort: String;
+var newPassword: String;
+
+var lockFile: String;
+var srcFile: String;
+var destFile: String;
+var srcFileH: String;
+var destFileH: String;
+var srcFileA: String;
+var destFileA: String;
+var srcContents: String;
+var browser: String;
+var mysqlVersion: String;
+var phpmyadminVersion: String;
+var phpDllCopy: String;
+var batFile: String;
+
+var mysmtp: String;
+var myporta: String;
+var myportas: String;
+var myport: String;
+var mypass: String;
+
+var firstinstall: Boolean;
+var value: String;
+
+
+//-----------------------------------------------
+//procedures lancees au debut de l'installation
+function InitializeSetup(): Boolean;
+begin
+  Result := MsgBox(CustomMessage('YouWillInstallDoliWamp')+#13#13+CustomMessage('ThisAssistantInstallOrUpgrade')+#13#13+CustomMessage('IfYouHaveTechnicalKnowledge')+#13#13+CustomMessage('ButIfYouLook')+#13#13+CustomMessage('DoYouWantToStart'), mbConfirmation, MB_YESNO) = IDYES;
+end;
+
+procedure InitializeWizard();
+begin
+  //version des applis, a modifier pour chaque version de WampServer 2
+  apacheVersion := '2.2.11';
+  phpVersion := '5.3.0' ;
+  mysqlVersion := '5.0.45';
+  phpmyadminVersion := '3.2.0.1';
+
+  smtpServer := 'localhost';
+  apachePort := '80';
+  mysqlPort := '3306';
+  newPassword := 'changeme';
+
+  firstinstall := true;
+
+
+  //LoadStringFromFile (srcFile, srcContents);
+  //posvalue=Pos('$dolibarr_main_db_port=', srcFile);
+
+  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','smtpServer', value) then
+  begin
+      if value <> '' then smtpServer:=value;
+  end
+  else
+  begin
+    if RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Microsoft\Internet Account Manager\Accounts\00000001','SMTP Server', value) then
+    begin
+      if value <> '' then smtpServer:=value;
+    end
+    else
+    begin
+      if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'PMail\ServiceInfo\Mail_Account_1','SvcSMTPHost', value) then
+      begin
+        if value <> '' then smtpServer:=value;
+      end
+      else
+      begin
+        if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\MSCRM','SMTPServer', value) then
+        begin
+          if value <> '' then smtpServer:=value;
+        end
+      end
+    end
+  end;
+
+  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort', value) then
+  begin
+      if value <> '' then apachePort:=value;
+  end;
+
+  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','mysqlPort', value) then
+  begin
+      if value <> '' then mysqlPort:=value;
+  end;
+
+  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','newPassword', value) then
+  begin
+      if value <> '' then newPassword:=value;
+  end;
+
+
+  // Prepare an object calle "Page" of type wpInstalling.
+  // Object will be show later in NextButtonClick function.
+  Page := CreateInputQueryPage(wpInstalling,
+  CustomMessage('TechnicalParameters'), '',
+  CustomMessage('IfFirstInstall'));
+
+  // TODO Add control differently if first install or update
+  if firstinstall
+  then
+  begin
+    Page.Add(CustomMessage('SMTPServer'), False);
+    Page.Add(CustomMessage('ApachePort'), False);
+    Page.Add(CustomMessage('MySqlPort'), False);
+    Page.Add(CustomMessage('MySqlPassword'), False);
+  end
+  else
+  begin
+    Page.Add(CustomMessage('SMTPServer'), False);
+    Page.Add(CustomMessage('ApachePort'), False);
+    Page.Add(CustomMessage('MySqlPort'), False);
+    Page.Add(CustomMessage('MySqlPassword'), False);
+  end;
+  
+  // Default values
+  Page.Values[0] := smtpServer;
+  Page.Values[1] := apachePort;
+  Page.Values[2] := mysqlPort;
+  Page.Values[3] := newPassword;
+
+end;
+
+
+//-----------------------------------------------
+// Stop all services (if exist)
+procedure close();
+var myResult: Integer;
+begin
+path := ExpandConstant('{app}');
+pfPath := ExpandConstant('{pf}');
+winPath := ExpandConstant('{win}');
+pathWithSlashes := path;
+StringChange (pathWithSlashes, '\','/');
+
+batFile := path+'\stopdoliwamp.bat';
+Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+end;
+
+
+
+
+//-----------------------------------------------------------
+// Install pages
+function NextButtonClick(CurPageID: Integer): Boolean;
+var myResult: Integer;
+var res: Boolean;
+var paramok: Boolean;
+var datadirold: String;
+var datadirnew: String;
+var exedirold: String;
+var exedirnew: String;
+var themessage: String;
+begin
+
+   res := True;
+   
+  //MsgBox(''+CurPageID,mbConfirmation,MB_YESNO);
+
+  if CurPageID = Page.ID then
+  begin
+
+    // This must be in if curpage.id = page.id, otherwise it is executed after each Next button
+
+    path := ExpandConstant('{app}');
+    winPath := ExpandConstant('{win}');
+    pathWithSlashes := path;
+    StringChange (pathWithSlashes, '\','/');
+    datadirold := pathWithSlashes+'/bin/mysql/mysql5.0.45/data';
+    datadirnew := pathWithSlashes+'/bin/mysql/data';
+    exedirold := pathWithSlashes+'/bin/mysql/mysql5.0.45';
+    exedirnew := pathWithSlashes+'/bin/mysql/mysql5.0.45';
+
+    // If we have a new database version, we should only copy old my.ini file into new directory
+    // and change only all basedir= strings to use new version. Like this, data dir is still correct.
+    // Install of service and stop/start scripts are already rebuild by installer.
+//      FileCopy(exedirold+'/my.ini',exedirnew+'/my.ini', true);
+
+//    We should not need this, also databases may not be called dolibarr
+//      res := RenameFile(ibdata1dirold+'/dolibarr',ibdata1dirnew+'/dolibarr');
+//      if res then
+//      begin
+//          themessage := CustomMessage('OldVersionFoundAndMoveInNew');
+//          MsgBox(themessage,mbInformation,MB_OK);
+//          TODO Replace also mysql.ini and resintall service
+//      end
+//      else
+//      begin
+//          themessage := CustomMessage('OldVersionFoundButFailedToMoveInNew');
+//          MsgBox(themessage,mbInformation,MB_OK);
+//      end;
+
+
+    //----------------------------------------------
+    // Copie des dll de php vers apache
+    //----------------------------------------------
+	// TODO Update this list when changing PHP/Apache versions
+	
+    phpDllCopy := 'fdftk.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'fribidi.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'gds32.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'libeay32.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'libmhash.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'libmysql.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'libpq.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'msql.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'libmcrypt.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'libmysqli.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'ntwdblib.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+
+    phpDllCopy := 'php5activescript.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'php5nsapi.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'php5ts.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+
+    phpDllCopy := 'ssleay32.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+    phpDllCopy := 'yaz.dll';
+    filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+
+
+    // Remove lock file
+    lockfile := pathWithSlashes+'/dolibarr_documents/install.lock';
+    if FileExists (lockfile) and not DeleteFile(lockfile) then
+    begin
+      themessage := FmtMessage(CustomMessage('FailedToDeleteLock'),[pathWithSlashes]);
+ 		  MsgBox(themessage,mbInformation,MB_OK);
+    end
+
+
+		// Check if parameters already defined in conf.php file
+		srcFile := pathWithSlashes+'/www/dolibarr/htdocs/conf/conf.php';
+		if not FileExists (srcFile) then
+		begin
+		    firstinstall := true;
+		
+		    // Values from wizard
+		    mysmtp  := Page.Values[0];
+		    myporta := Page.Values[1];
+		    myportas:= '443';
+		    myport  := Page.Values[2];
+		    mypass  := Page.Values[3];
+		end
+		else
+		begin
+		    firstinstall := false;
+		
+		    // Values from registry
+		    mysmtp  := smtpServer;
+		    myporta := apachePort;
+		    myportas:= '443';
+		    myport  := mysqlPort;
+		    mypass  := newPassword;
+		end;
+		
+		paramok := True;
+		// TODO Test if choice of param is ok if firstinstall
+
+    if (firstinstall) then
+    begin
+    
+		  // Test serveur SMTP
+//      if paramok then
+//      begin
+//    		batFile := pathWithSlashes+'/UsedPort.exe';
+//    		MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
+//  	    Exec(batFile, '-s '+smtpServer+' -p 25', path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+        //themessage := 'Le serveur '+smtpServer+' semble ne pas etre joignable pour l envoi de mail SMTP (port 25). Si vous avez un firewall, verifiez sa configuration. Sinon, revenez en arriere pour choisir une autre valeur pour le serveur SMTP sortant d envoi de mail (Cette information est doit etre fournie par votre fournisseur d acces Internet).';
+//        themessage := 'The server '+smtpServer+' seems to be unreachable to send outgoing SMTP emails (port 25). If you have a firewall, check its setup. Otherwise, go back to choose another value for the SMTP server (This information shoud be given by your Internet Service Provider) or click "No" to ignore error. Cancel choice to choose another value ?';
+//  		  if ((IntToStr(myResult) <> '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
+//        begin
+//  		    paramok := False;
+//  		  end;
+//	    end;
+	
+      if paramok then
+      begin
+  		  // Test port Apache
+    		batFile := pathWithSlashes+'/UsedPort.exe';
+    		//MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
+    		Exec(batFile, '-s localhost -p '+myporta, path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+        //themessage := 'Le port '+myporta+' semble deja pris. Revenez en arriere pour choisir une autre valeur pour le port Apache.';
+        themessage := FmtMessage(CustomMessage('PortAlreadyInUse'),[myporta,'Apache']);
+    		if ((IntToStr(myResult) = '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
+        begin
+    		  paramok := False;
+    		end;
+      end;
+      
+      if paramok then
+      begin
+    		// Test port Mysql
+    		batFile := pathWithSlashes+'/UsedPort.exe';
+    		//MsgBox('batFile = '+batFile,mbConfirmation,MB_YESNO)
+    		Exec(batFile, '-s localhost -p '+myport, path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+        //themessage := 'Le port '+myport+' semble deja pris. Revenez en arriere pour choisir une autre valeur pour le port MySQL.';
+        themessage := FmtMessage(CustomMessage('PortAlreadyInUse'),[myport,'MySql']);
+    		if ((IntToStr(myResult) = '0') and (MsgBox(themessage,mbConfirmation,MB_YESNO) = IDYES)) then
+    		begin
+      		paramok := False;
+    		end;
+      end;
+      
+    end;
+		
+		if paramok
+		then
+		begin
+		    
+	    //----------------------------------------------
+	    // Rename file c:/windows/php.ini (we don't want it)
+	    //----------------------------------------------
+		
+	    if FileExists ('c:/windows/php.ini') then
+	    begin
+	      if MsgBox('A previous c:/windows/php.ini file has been detected in your Windows directory. Do you want DoliWamp to rename it to php_old.ini to avoid conflicts ?',mbConfirmation,MB_YESNO) = IDYES then
+	      begin
+	        RenameFile('c:/windows/php.ini','c:/windows/php_old.ini');
+	      end;
+	    end;
+	    if FileExists ('c:/winnt/php.ini') then
+	    begin
+	      if MsgBox('A previous c:/winnt/php.ini file has been detected in your Windows directory. Do you want DoliWamp to rename it to php_old.ini to avoid conflicts ?',mbConfirmation,MB_YESNO) = IDYES then
+	      begin
+	        RenameFile('c:/winnt/php.ini','c:/winnt/php_old.ini');
+	      end;
+	    end;
+		
+		
+		
+	    //----------------------------------------------
+	    // Create rundoliwamp.bat, rundolihelp.bat and rundoliadmin.bat (if not exists)
+	    //----------------------------------------------
+	
+	    destFile := pathWithSlashes+'/rundoliwamp.bat';
+	    srcFile := pathWithSlashes+'/rundoliwamp.bat.install';
+	
+	    destFileH := pathWithSlashes+'/rundolihelp.bat';
+	    srcFileH := pathWithSlashes+'/rundolihelp.bat.install';
+	
+	    destFileA := pathWithSlashes+'/rundoliadmin.bat';
+	    srcFileA := pathWithSlashes+'/rundoliadmin.bat.install';
+	
+	    if (not FileExists (destFile) or not FileExists (destFileH) or not FileExists (destFileA))
+	     and (FileExists(srcFile) and FileExists(srcFileH) and FileExists(srcFileA)) then
+	    begin
+	      //navigateur
+	      browser := 'iexplore.exe';
+	      if FileExists (pfPath+'/Mozilla Firefox/firefox.exe')  then
+	      begin
+	        if MsgBox(CustomMessage('FirefoxDetected'),mbConfirmation,MB_YESNO) = IDYES then
+	        begin
+	          browser := pfPath+'/Mozilla Firefox/firefox.exe';
+	        end;
+	      end;
+	      if browser = 'iexplore.exe' then
+	      begin
+            if FileExists (pfPath+'/Internet Explorer/iexplore.exe')  then
+            begin
+               GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, pfPath+'/Internet Explorer','exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
+	        end
+	        else
+	        begin
+               GetOpenFileName(CustomMessage('ChooseDefaultBrowser'), browser, winPath,'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
+	        end;
+	      end;
+	
+	      LoadStringFromFile (srcFile, srcContents);
+	      StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
+	      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
+	      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
+	      SaveStringToFile(destFile,srcContents, False);
+	
+	      LoadStringFromFile (srcFileH, srcContents);
+	      StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
+	      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
+	      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
+	      SaveStringToFile(destFileH,srcContents, False);
+	
+	      LoadStringFromFile (srcFileA, srcContents);
+	      StringChangeEx (srcContents, 'WAMPBROWSER', browser, True);
+	      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
+	      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
+	      SaveStringToFile(destFileA,srcContents, False);
+	    end
+
+
+      if MsgBox(CustomMessage('DoliWampWillStartApacheMysql'),mbConfirmation,MB_YESNO) = IDYES then
+      begin
+
+		
+		    //----------------------------------------------
+		    // Create file alias phpmyadmin (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/alias/phpmyadmin.conf';
+		    srcFile := pathWithSlashes+'/alias/phpmyadmin.conf.install';
+		
+		    if FileExists(srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //installDir et version de phpmyadmin
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		    DeleteFile(srcFile);
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file alias dolibarr (if not exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/alias/dolibarr.conf';
+		    srcFile := pathWithSlashes+'/alias/dolibarr.conf.install';
+		
+		    if not FileExists (destFile) and FileExists(srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
+		
+		      SaveStringToFile(destFile, srcContents, False);
+		    end
+		    DeleteFile(srcFile);
+		
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file configuration for phpmyadmin (if not exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
+		    srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
+		
+		    if not FileExists (destFile) and FileExists (srcFile) then
+		    begin
+	        // sinon on prends le fichier par defaut
+	        LoadStringFromFile (srcFile, srcContents);
+	        StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
+	        StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
+	        SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file httpd.conf (if not exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf';
+		    srcFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf.install';
+		
+		    if not FileExists (destFile) and FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+
+		      //installDir et version de php
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
+              StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file my.ini (if not exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini';
+		    srcFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini.install';
+		
+		    if not FileExists (destFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //installDir et version de php
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file index.php (always but archive if exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/www/index.php';
+		    srcFile := pathWithSlashes+'/www/index.php.install';
+		
+		    if not FileExists (destFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		      StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
+		      SaveStringToFile(destFile, srcContents, False);
+		    end
+		    else
+		    begin
+		      RenameFile(destFile, destFile+'.old');
+		      LoadStringFromFile (srcFile, srcContents);
+		      StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
+		      SaveStringToFile(destFile, srcContents, False);
+		    end
+		
+		
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file dolibarr parametres predefinis install web (if not exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/www/dolibarr/htdocs/install/install.forced.php';
+		    srcFile := pathWithSlashes+'/www/dolibarr/htdocs/install/install.forced.php.install';
+		
+		    if not FileExists (destFile) and FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file install_services.bat (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/install_services.bat';
+		    srcFile := pathWithSlashes+'/install_services.bat.install';
+		
+		    if FileExists(srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //version de apache et mysql
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file install_services_auto.bat (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/install_services_auto.bat';
+		    srcFile := pathWithSlashes+'/install_services_auto.bat.install';
+		
+		    if FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //version de apache et mysql
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file uninstall_services.bat (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/uninstall_services.bat';
+		    srcFile := pathWithSlashes+'/uninstall_services.bat.install';
+		
+		    if FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //version de apache et mysql
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+		    //----------------------------------------------
+		    // Create file mysqlinitpassword.bat (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/mysqlinitpassword.bat';
+		    srcFile := pathWithSlashes+'/mysqlinitpassword.bat.install';
+		
+		    if FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //version de apache et mysql
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		    //----------------------------------------------
+		    // Create file mysqltestinstall.bat (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/mysqltestinstall.bat';
+		    srcFile := pathWithSlashes+'/mysqltestinstall.bat.install';
+		
+		    if FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //version de apache et mysql
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		    //----------------------------------------------
+		    // Create file startdoliwamp_manual_donotuse.bat (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/startdoliwamp_manual_donotuse.bat';
+		    srcFile := pathWithSlashes+'/startdoliwamp_manual_donotuse.bat.install';
+		
+		    if FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //version de apache et mysql
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
+		      StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		    
+		
+		    //----------------------------------------------
+		    // Create file builddemosslfiles.bat (always)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/builddemosslfiles.bat';
+		    srcFile := pathWithSlashes+'/builddemosslfiles.bat.install';
+		
+		    if FileExists (srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		
+		      //version de apache et mysql
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
+		
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+
+		
+		    //----------------------------------------------
+		    // Create file php.ini in php (if not exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini';
+		    srcFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini.install';
+		
+		    if not FileExists (destFile) and FileExists(srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
+              StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		    //----------------------------------------------
+		    // Create file php.ini in apache (if not exists)
+		    //----------------------------------------------
+		
+		    destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/php.ini';
+		    srcFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini.install';
+		
+		    if not FileExists (destFile) and FileExists(srcFile) then
+		    begin
+		      LoadStringFromFile (srcFile, srcContents);
+		      StringChangeEx (srcContents, 'WAMPROOT', pathWithSlashes, True);
+		      StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
+              StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
+		      SaveStringToFile(destFile,srcContents, False);
+		    end
+		
+		
+		
+	   		// Uninstall and Install services
+		  	batFile := path+'\uninstall_services.bat';
+        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+  			batFile := path+'\install_services.bat';
+  			Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+			
+  			// Start services
+        batFile := path+'\startdoliwamp.bat';
+        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+        //MsgBox(myResult,mbInformation,MB_OK);
+			
+        // Change mysql password (works only if not yet defined)
+        batFile := path+'\mysqlinitpassword.bat';
+        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+			
+        // Remove dangerous files
+        batFile := path+'\removefiles.bat';
+        Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+
+			
+		    // Save parameters to registry
+		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'smtpServer',  mysmtp);
+		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'apachePort',  myporta);
+		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'apachePSSL',  myportas);
+		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'mysqlPort',   myport);
+		    RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'newPassword', mypass);
+		
+		
+        res := True;
+		
+		  end
+		  else
+		  begin
+		  
+//	  	MsgBox('Apache and Mysql installation has been canceled. Please select parameters to start their installation.',mbInformation,MB_OK)
+
+      	res := False;
+		  	
+		  end
+      
+    end
+    else
+    begin
+    
+        //MsgBox('Selected values seems to be already used. Please choose other values.',mbInformation,MB_OK);
+		  	
+		  	res := False;
+
+    end
+    
+  end
+
+
+  Result := res;
+end;
+
+
+
+
+
+//-----------------------------------------------
+//procedure launched by the end of the installation, it deletes the installation files
+procedure DeinitializeSetup();
+begin
+//  DeleteFile(path+'\install_services.bat');
+//  DeleteFile(path+'\install_services_auto.bat');
+end;
+
+
+//-----------------------------------------------
+//procedure launched at beginning of the uninstallation
+function InitializeUninstall(): Boolean;
+begin
+    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','smtpServer');
+    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort');
+    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','mysqlPort');
+    Result := RegDeleteValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','newPassword');
+    Result := RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp');
+
+    Result := True;
+end;
+
+//-----------------------------------------------
+//procedure launched by the end of the uninstallation
+procedure DeinitializeUninstall();
+begin
+  path := ExpandConstant('{app}');
+  winPath := ExpandConstant('{win}');
+  pathWithSlashes := path;
+  StringChange (pathWithSlashes, '\','/');
+
+  MsgBox(FmtMessage(CustomMessage('ProgramHasBeenRemoved'),[path]),mbInformation,MB_OK);
+end;
+
+
+[Run]
+; Launch Dolibarr in browser. This is run after Wizard because of postinstall flag
+Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec postinstall skipifsilent runhidden
+
+
+[UninstallDelete]
+Type: files; Name: "{app}\*.*"
+Type: files; Name: "{app}\bin\mysql\mysql5.0.45\*.*"
+Type: filesandordirs; Name: "{app}\alias"
+Type: filesandordirs; Name: "{app}\apps"
+Type: filesandordirs; Name: "{app}\bin\apache"
+Type: filesandordirs; Name: "{app}\bin\php"
+Type: filesandordirs; Name: "{app}\help"
+Type: filesandordirs; Name: "{app}\lang"
+Type: filesandordirs; Name: "{app}\logs"
+Type: filesandordirs; Name: "{app}\scripts"
+Type: filesandordirs; Name: "{app}\tmp"
+Type: filesandordirs; Name: "{app}\www\dolibarr"
+
+
+[UninstallRun]
+Filename: "{app}\uninstall_services.bat"; Flags: runhidden
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 8554a1d7a92e3f372e3df4e116a2967d2a5ee634..5867cd2c16facdc5cfad835b769b11d642f9cefe 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -23,7 +23,7 @@ $RPMSUBVERSION="auto";	# auto use value found into BUILD
 "RPM_FEDORA"=>"rpmbuild",
 "RPM_MANDRIVA"=>"rpmbuild",
 "RPM_OPENSUSE"=>"rpmbuild",
-"DEB"=>"dpkg",
+"DEB"=>"dpkg dpatch",
 "APS"=>"zip",
 "EXEDOLIWAMP"=>"ISCC.exe"
 );
@@ -217,7 +217,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
             last;
         } else {
             # Pas erreur ou erreur autre que programme absent
-            print " Found ".$REQUIREMENTTARGET{$target}."\n";
+            print " Found ".$req."\n";
         }
     }
 }
diff --git a/build/pad/pad_dolibarr.xml b/build/pad/pad_dolibarr.xml
index bd379443cf726bd183576e0c1433d38dbd9b649a..37f4d4abd6fef0524ddb493b4fe22d818217a5cd 100644
--- a/build/pad/pad_dolibarr.xml
+++ b/build/pad/pad_dolibarr.xml
@@ -35,9 +35,9 @@
 	<Program_Info>
 		<Program_Name>Dolibarr</Program_Name>
 		<Program_Version>3.4</Program_Version>
-		<Program_Release_Month>07</Program_Release_Month>
-		<Program_Release_Day>07</Program_Release_Day>
-		<Program_Release_Year>2013</Program_Release_Year>
+		<Program_Release_Month>01</Program_Release_Month>
+		<Program_Release_Day>01</Program_Release_Day>
+		<Program_Release_Year>2014</Program_Release_Year>
 		<Program_Cost_Dollars />
 		<Program_Cost_Other_Code />
 		<Program_Cost_Other />
diff --git a/build/pad/pad_doliwamp.xml b/build/pad/pad_doliwamp.xml
index 320751fd48934ca2c424b4c8c8f2087f8d5be864..cd3d2facf5e505008edd035f032c428b135d983b 100644
--- a/build/pad/pad_doliwamp.xml
+++ b/build/pad/pad_doliwamp.xml
@@ -35,9 +35,9 @@
 	<Program_Info>
 		<Program_Name>DoliWamp</Program_Name>
 		<Program_Version>3.4</Program_Version>
-		<Program_Release_Month>07</Program_Release_Month>
-		<Program_Release_Day>07</Program_Release_Day>
-		<Program_Release_Year>2013</Program_Release_Year>
+		<Program_Release_Month>01</Program_Release_Month>
+		<Program_Release_Day>01</Program_Release_Day>
+		<Program_Release_Year>2014</Program_Release_Year>
 		<Program_Cost_Dollars />
 		<Program_Cost_Other_Code />
 		<Program_Cost_Other />
diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec
index eb7c7305b11cdeb96459f4f0d44106fabc5b8bd6..c1c70d0acea0e411377f292cd2c70c1848472e7f 100755
--- a/build/rpm/dolibarr_fedora.spec
+++ b/build/rpm/dolibarr_fedora.spec
@@ -330,5 +330,5 @@ fi
 
 # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
 %changelog
-* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3
+* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
 - Initial version (#723326)
diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec
index 4bc224917557946af94b0661a1d1d8e7ff508165..ba5daf1aad03956c7c1d7ba9b66812b767c60de2 100755
--- a/build/rpm/dolibarr_generic.spec
+++ b/build/rpm/dolibarr_generic.spec
@@ -558,5 +558,5 @@ fi
 
 # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
 %changelog
-* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3
+* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
 - Initial version (#723326)
diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec
index 98ef5fa1b44e288887c0fc1f91a66747753643e5..0c68270166e84fa6d85f886c2b50540c5d3d6e9f 100755
--- a/build/rpm/dolibarr_mandriva.spec
+++ b/build/rpm/dolibarr_mandriva.spec
@@ -335,5 +335,5 @@ fi
 
 # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
 %changelog
-* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3
+* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
 - Initial version (#723326)
diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec
index 1734ad6a4e3cb7fc65e6ae3e250bccd007e57d6d..2f4cf7cf4111d08e6d9ed864e64d5f4802f1fabe 100755
--- a/build/rpm/dolibarr_opensuse.spec
+++ b/build/rpm/dolibarr_opensuse.spec
@@ -345,5 +345,5 @@ fi
 
 # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
 %changelog
-* Sun Feb 17 2013 Laurent Destailleur 3.4.2-0.3
+* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
 - Initial version (#723326)
diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index 5bf1664f695b2e9764df5c0ac1da89776302eca2..4cc7f5761562e72464a1b3c5189fbe8d0bc1b724 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -48,3 +48,8 @@ with
 //var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
 window.location.href=pRef
 * Replace hard coded string with i18n["String"];
+
+
+JCROP:
+------
+* Remove analytics tag into file index.html
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index acdf756eb86de00428cb1c34fb623ffc5b76f732..f8d8e0e0e050ef30f31f36777a26f21bf8aec840 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -152,7 +152,8 @@ foreach ($modulesdir as $dir)
     					$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
     					if ($objMod->version == 'development'  && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0;
     					if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
-						//if ($mode == 'expdev' && ($objMod->version != 'experimental' && $objMod->version != 'development')) $modulequalified=0;
+						// We discard modules according to property disabled
+    					if (! empty($objMod->hidden)) $modulequalified=false;
 
     					// Define array $categ with categ with at least one qualified module
     					if ($modulequalified)
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index f32fa89b59bc3ce2f98f4a2c0b43d9bde46d6c4c..dba3b44a14bc7feeb474a1152d07e6074f5d09d5 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -473,8 +473,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
 			$var=true;
 
 			print '<table class="noborder" width="100%">';
-			print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").'</td></tr>';
-			while ($i < $num)
+			print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1">('.$num.')</td></tr>';
+
+			$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
+			while ($i < $nbofloop)
 			{
 				$obj = $db->fetch_object($result);
 				$var=!$var;
@@ -511,7 +513,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
 				$i++;
 				$total += $obj->total_ttc;
 			}
-			if ($total>0) {
+			if ($num > $nbofloop)
+			{
+				print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
+			}
+			else if ($total>0)
+			{
 				print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td>&nbsp;</td></tr>";
 			}
 			print "</table><br>";
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index 2a31d4a48b707091d3fbaf630acee16ba7b03b91..7389990c10557ea54e700ac6327f34a54afd9d83 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -313,8 +313,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
 			$var=true;
 
 			print '<table class="noborder" width="100%">';
-			print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">('.$num.')</a></td></tr>';
-			while ($i < $num)
+			print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1">('.$num.')</a></td></tr>';
+
+			$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
+			while ($i < $nbofloop)
 			{
 				$obj = $db->fetch_object($result);
 				$var=!$var;
@@ -356,7 +358,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
 				$i++;
 				$total += $obj->total_ttc;
 			}
-			if ($total>0) {
+			if ($num > $nbofloop)
+			{
+				print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
+			}
+			else if ($total>0)
+			{
 				print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td>&nbsp;</td></tr>";
 			}
 			print "</table><br>";
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 01ec205564a1dcf6f4699cc3b2990638e07f4c98..0c12b5e437a9e8eee3255d7a5f9289d66bf4052d 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -1159,7 +1159,7 @@ class AccountLine extends CommonObject
         $this->db->begin();
 
         // Delete urls
-        $result=$this->delete_urls();
+        $result=$this->delete_urls($user);
         if ($result < 0)
         {
             $nbko++;
@@ -1296,7 +1296,7 @@ class AccountLine extends CommonObject
                 // No error check. Can fail if category already affected
             }
 
-            $bankline->rappro=1;
+            $this->rappro=1;
 
             $this->db->commit();
             return 1;
diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php
index ebfe0c4834bf62a2046e956f39d779da6a0d1c09..f3e5f746e6b3668a65e6f57da9c22a518148b49c 100644
--- a/htdocs/compta/stats/cabyprodserv.php
+++ b/htdocs/compta/stats/cabyprodserv.php
@@ -1,5 +1,6 @@
 <?php
-/* Copyright (C) 2013      Antoine Iauch        <aiauch@gpcsolutions.fr>
+/* Copyright (C) 2013 Antoine Iauch        <aiauch@gpcsolutions.fr>
+ * Copyright (C) 2013 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -171,23 +172,21 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl
 // SQL request
 $catotal=0;
 
-if ($modecompta == 'CREANCES-DETTES') {
+if ($modecompta == 'CREANCES-DETTES') 
+{
     $sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label,";
-    $sql.= " sum(DISTINCT l.total_ht) as amount, sum(DISTINCT l.total_ttc) as amount_ttc";
-    $sql.= " FROM ".MAIN_DB_PREFIX."product as p";
-    $sql.= " JOIN ".MAIN_DB_PREFIX."facturedet as l";
-    $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON l.fk_facture = f.rowid";
-    if ($selected_cat === -2) {
-	$sql.=" LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product";
-    }
-    if ($selected_cat && $selected_cat !== -2) {
-	$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = " . $selected_cat;
-	if ($subcat) {
-	    $sql.=" OR c.fk_parent = " . $selected_cat;
+    $sql.= " sum(l.total_ht) as amount, sum(l.total_ttc) as amount_ttc";
+    $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as l, ".MAIN_DB_PREFIX."product as p";
+	if ($selected_cat === -2)	// Without any category 
+	{
+	    $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product";
+	}
+	else if ($selected_cat) 	// Into a specific category
+	{
+	    $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp";
 	}
-	$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_categorie = c.rowid";
-    }
     $sql.= " WHERE l.fk_product = p.rowid";
+	$sql.= " AND l.fk_facture = f.rowid";
     $sql.= " AND f.fk_statut in (1,2)";
     if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
 	$sql.= " AND f.type IN (0,1,2)";
@@ -197,16 +196,21 @@ if ($modecompta == 'CREANCES-DETTES') {
     if ($date_start && $date_end) {
 	$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
     }
-    if ($selected_cat === -2) {
-	$sql.=" AND cp.fk_product is null";
-    }
-    if ($selected_cat && $selected_cat !== -2) {
-	$sql.= " AND cp.fk_product = p.rowid";
-    }
+	if ($selected_cat === -2)	// Without any category  
+	{
+	    $sql.=" AND cp.fk_product is null";
+	}
+	else if ($selected_cat) {	// Into a specific category
+	    $sql.= " AND (c.rowid = ".$selected_cat;
+	    if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat;
+	    $sql.= ")";
+		$sql.= " AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid";
+	}
     $sql.= " AND f.entity = ".$conf->entity;
-    $sql.= " GROUP BY p.rowid ";
-    $sql.= "ORDER BY p.ref ";
+    $sql.= " GROUP BY p.rowid";
+    $sql.= " ORDER BY p.ref";
 
+    dol_syslog("cabyprodserv sql=".$sql);
     $result = $db->query($sql);
     if ($result) {
 	$num = $db->num_rows($result);
@@ -381,7 +385,10 @@ if ($modecompta == 'CREANCES-DETTES') {
     print '</form>';
 } else {
     // $modecompta != 'CREANCES-DETTES'
-    // TODO: better message
+    // TODO: better message, for example:
+    // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an
+    // invoice with 2 product (product A for 10 euros and product B for 20 euros), what is part of paiment for product A and part of paiment for product B ?
+    // Because there is no way to know this, this report is not relevant.  
     print '<div class="warning">' . $langs->trans("WarningNotRelevant") . '</div>';
 }
 
diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php
index 63ca148e5c3d54cc042501451a265f44fe53cc97..bbf03e0865c5746b4694ae353ca402ce53b0e49c 100644
--- a/htdocs/compta/stats/casoc.php
+++ b/htdocs/compta/stats/casoc.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2001-2003 Rodolphe Quiedeville  <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2011 Laurent Destailleur   <eldy@users.sourceforge.net>
+ * Copyright (C) 2004-2013 Laurent Destailleur   <eldy@users.sourceforge.net>
  * Copyright (C) 2005-2009 Regis Houssin         <regis.houssin@capnetworks.com>
  * Copyright (C) 2007      Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
  * Copyright (C) 2013      Antoine Iauch         <aiauch@gpcsolutions.fr>
@@ -177,18 +177,15 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl
 $catotal=0;
 if ($modecompta == 'CREANCES-DETTES') {
 	$sql = "SELECT DISTINCT s.rowid as socid, s.nom as name,";
-	$sql.= " sum(DISTINCT f.total) as amount, sum(DISTINCT f.total_ttc) as amount_ttc";
-	$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
-	$sql.= " JOIN ".MAIN_DB_PREFIX."facture as f";
-	if ($selected_cat === -2) {
+	$sql.= " sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
+	$sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
+	if ($selected_cat === -2)	// Without any category 
+	{
 	    $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe";
 	}
-	if ($selected_cat && $selected_cat !== -2) {
-	    $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = ".$selected_cat;
-	    if ($subcat) {
-		$sql.=" OR c.fk_parent = " . $selected_cat;
-	    }
-	     $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON cs.fk_categorie = c.rowid";
+	else if ($selected_cat) 	// Into a specific category
+	{
+	    $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs";
 	}
 	$sql.= " WHERE f.fk_statut in (1,2)";
 	if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
@@ -200,34 +197,57 @@ if ($modecompta == 'CREANCES-DETTES') {
 	if ($date_start && $date_end) {
 	    $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
 	}
-	if ($selected_cat === -2) {
+	if ($selected_cat === -2)	// Without any category  
+	{
 	    $sql.=" AND cs.fk_societe is null";
 	}
-	if ($selected_cat && $selected_cat !== -2) {
-	    $sql.= " AND cs.fk_societe = s.rowid";
+	else if ($selected_cat) {	// Into a specific category
+	    $sql.= " AND (c.rowid = ".$selected_cat;
+	    if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat;
+	    $sql.= ")";
+		$sql.= " AND cs.fk_categorie = c.rowid AND cs.fk_societe = s.rowid";
 	}
-    } else {
+} else {
 	/*
 	 * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les
 	 * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin)
 	 */
 	$sql = "SELECT s.rowid as socid, s.nom as name, sum(pf.amount) as amount_ttc";
-	$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
-	$sql.= ", ".MAIN_DB_PREFIX."facture as f";
+	$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
 	$sql.= ", ".MAIN_DB_PREFIX."paiement_facture as pf";
 	$sql.= ", ".MAIN_DB_PREFIX."paiement as p";
-	$sql .= " WHERE p.rowid = pf.fk_paiement";
+	$sql.= ", ".MAIN_DB_PREFIX."societe as s";
+	if ($selected_cat === -2)	// Without any category 
+	{
+	    $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe";
+	}
+	else if ($selected_cat) 	// Into a specific category
+	{
+	    $sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs";
+	}
+	$sql.= " WHERE p.rowid = pf.fk_paiement";
 	$sql.= " AND pf.fk_facture = f.rowid";
 	$sql.= " AND f.fk_soc = s.rowid";
 	if ($date_start && $date_end) {
 	    $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
 	}
+	if ($selected_cat === -2)	// Without any category  
+	{
+	    $sql.=" AND cs.fk_societe is null";
+	}
+	else if ($selected_cat) {	// Into a specific category
+	    $sql.= " AND (c.rowid = ".$selected_cat;
+	    if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat;
+	    $sql.= ")";
+		$sql.= " AND cs.fk_categorie = c.rowid AND cs.fk_societe = s.rowid";
+	}
 }
 $sql.= " AND f.entity = ".$conf->entity;
 if ($socid) $sql.= " AND f.fk_soc = ".$socid;
 $sql.= " GROUP BY s.rowid, s.nom";
 $sql.= " ORDER BY s.rowid";
 
+dol_syslog("casoc sql=".$sql);
 $result = $db->query($sql);
 if ($result) {
 	$num = $db->num_rows($result);
@@ -248,7 +268,7 @@ if ($result) {
 
 // On ajoute les paiements anciennes version, non lies par paiement_facture
 if ($modecompta != 'CREANCES-DETTES') {
-	$sql = "SELECT '0' as socid, 'Autres' as name, sum(DISTINCT p.amount) as amount_ttc";
+	$sql = "SELECT '0' as socid, 'Autres' as name, sum(p.amount) as amount_ttc";
 	$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
 	$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
 	$sql.= ", ".MAIN_DB_PREFIX."paiement as p";
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index d49fb69c32e650241bbc41ca9c7035c369b6da2b..aba03ea5347aa2cfe9c9266e51630ac8c731bb13 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -3,8 +3,8 @@
  * Copyright (C) 2004-2012	Laurent Destailleur		<eldy@users.sourceforge.net>
  * Copyright (C) 2005-2012	Regis Houssin			<regis.houssin@capnetworks.com>
  * Copyright (C) 2006		Andre Cianfarani		<acianfa@free.fr>
- * Copyright (C) 2010-2012	Juanjo Menent			<jmenent@2byte.es>
- * Copyright (C) 2013       Christophe Battarel   <christophe.battarel@altairis.fr>
+ * Copyright (C) 2010-2013	Juanjo Menent			<jmenent@2byte.es>
+ * Copyright (C) 2013       Christophe Battarel     <christophe.battarel@altairis.fr>
  * Copyright (C) 2013       Florian Henry		  	<florian.henry@open-concept.pro>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -444,8 +444,8 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
             $desc=GETPOST('dp_desc');
         }
 
-        $localtax1_tx=get_localtax($tva_tx,1,$object->societe);
-        $localtax2_tx=get_localtax($tva_tx,2,$object->societe);
+        $localtax1_tx=get_localtax($tva_tx,1,$object->thirdparty);
+        $localtax2_tx=get_localtax($tva_tx,2,$object->thirdparty);
 
 		// ajout prix achat
 		$fk_fournprice = $_POST['fournprice'];
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index 9aca2c29c26ee51313eae9c90da2afb737f5644f..41f8ce454931f6ea6d27b3f73b26b9f5d380a5cc 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -557,7 +557,13 @@ function listOfSessions()
     global $conf;
 
     $arrayofSessions = array();
-    $sessPath = ini_get("session.save_path").'/';
+    // session.save_path can be returned empty so we set a default location and work from there
+    $sessPath = '/tmp';
+    $iniPath = ini_get("session.save_path");
+    if ($iniPath) {
+        $sessPath = $iniPath;
+    }
+    $sessPath .= '/'; // We need the trailing slash
     dol_syslog('admin.lib:listOfSessions sessPath='.$sessPath);
 
     $dh = @opendir(dol_osencode($sessPath));
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index eeeb699a844ea542ba16a81e4398f654d033fa2a..6dbb9e1119d4b430e74fdba68536ed4cc6be67bb 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -70,9 +70,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
 insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__);
 insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/fiche.php?leftmenu=contacts&amp;action=create', 'NewContactAddress', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
 insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 602__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=p', 'Prospects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=c', 'Customers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=f', 'Suppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=p', 'ThirdPartyProspects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=c', 'ThirdPartyCustomers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=f', 'ThirdPartySuppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__);
 insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 607__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=o', 'Others', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 4, __ENTITY__);
 -- Third parties - Category customer
 insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&amp;type=1', 'SuppliersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__);
diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php
index 8789c246307de61d7056063ee0a4dabd6eac073f..e85e4a7d767494ca9137ca9629a13800b845a52a 100644
--- a/htdocs/core/modules/member/doc/pdf_standard.class.php
+++ b/htdocs/core/modules/member/doc/pdf_standard.class.php
@@ -195,8 +195,8 @@ class pdf_standard
 		// Center
 		if ($textright=='')	// Only a left part
 		{
-			if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
-			else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
+			if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
+			else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
 			else
 			{
 				$pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height);
@@ -230,8 +230,8 @@ class pdf_standard
 		}
 		else	// Only a right part
 		{
-			if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
-			else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
+			if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
+			else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
 			else
 			{
 				$pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height);
diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php
index 7b3b73c22f5b9c358a19f3b317ccf16bde3baf42..e9ad20345cfef54da6ed2b0f2488e4afd4ff31a5 100644
--- a/htdocs/core/modules/modAgenda.class.php
+++ b/htdocs/core/modules/modAgenda.class.php
@@ -23,15 +23,15 @@
 
 /**
  *		\defgroup   agenda     Module agenda
- *      \brief      Module pour gerer l'agenda et actions
+ *      \brief      Module to manage agenda and events
  *      \file       htdocs/core/modules/modAgenda.class.php
  *      \ingroup    agenda
- *      \brief      Fichier de description et activation du module agenda
+ *      \brief      File of class to describe and enable/disable module Agenda
  */
 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
 
 /**
- *	Classe de description et activation du module Adherent
+ *	Class to describe and enable/disable module Agenda
  */
 class modAgenda extends DolibarrModules
 {
diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php
index 5c3f3f266bb582477809a39fa53d023ca75310b1..2b60ea480255f85aaff3a2c03138da8381985aaf 100644
--- a/htdocs/core/modules/modFckeditor.class.php
+++ b/htdocs/core/modules/modFckeditor.class.php
@@ -62,6 +62,8 @@ class modFckeditor extends DolibarrModules
 		$this->config_page_url = array("fckeditor.php");
 
 		// Dependances
+		global $dolibarr_js_CKEDITOR;
+		$this->hidden = ($dolibarr_js_CKEDITOR == 'disabled'?1:0);	// A condition to disable module (used for native debian packages)
 		$this->depends = array();
 		$this->requiredby = array();
 
diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
index 5ee5c2bd72b5333fb3658e88048ef927102295dc..f4fd38b52adebec5362d891eb7224580e61dbd8c 100644
--- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
+++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
@@ -120,9 +120,10 @@ class pdf_standardlabel
 	 * @param    string     $footer         Footer
 	 * @param    Translate  $outputlangs    Output langs
 	 * @param    string     $textright      Text right
+	 * @param    string     $photo    		Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text)
 	 * @return   void
 	 */
-	function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='')
+	function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='')
 	{
 		global $mysoc,$conf,$langs;
 
@@ -148,8 +149,6 @@ class pdf_standardlabel
 				$logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
 			}
 		}
-		// Define photo
-		$photo='';
 
 		// Define background image
 		$backgroundimage='';
@@ -184,8 +183,8 @@ class pdf_standardlabel
 		// Middle
 		if ($textright=='')	// Only a left part
 		{
-			if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
-			else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
+			if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
+			else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
 			else
 			{
 				$pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height);
@@ -218,8 +217,8 @@ class pdf_standardlabel
 		}
 		else	// Only a right part
 		{
-			if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
-			else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
+			if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
+			else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
 			else
 			{
 				$pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height);
@@ -394,13 +393,13 @@ class pdf_standardlabel
     /**
      *  Function to build PDF on disk, then output on HTTP strem.
      *
-     *  @param	array		$arrayofmembers  	Array of members informations
+     *  @param	array		$arrayofrecords  	Array of record informations (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>)
      *  @param  Translate	$outputlangs     	Lang object for output language
      *  @param	string		$srctemplatepath	Full path of source filename for generator using a template file
 	 *	@param	string		$outputdir			Output directory
      *  @return int             				1=OK, 0=KO
      */
-    function write_file($arrayofmembers,$outputlangs,$srctemplatepath,$outputdir='')
+    function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='')
     {
         global $user,$conf,$langs,$mysoc,$_Avery_Labels;
 
@@ -468,10 +467,10 @@ class pdf_standardlabel
 
 
         // Add each record
-        foreach($arrayofmembers as $val)
+        foreach($arrayofrecords as $val)
         {
             // imprime le texte specifique sur la carte
-            $this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['id'],$val['photo']);
+            $this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['photo']);
         }
 
         //$pdf->SetXY(10, 295);
diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php
index 63934cad40417fa9900b619713493a15bd628622..4c4ebad6c3af0d35d0f585e8019a1434db958b76 100644
--- a/htdocs/core/modules/printsheet/modules_labels.php
+++ b/htdocs/core/modules/printsheet/modules_labels.php
@@ -63,25 +63,25 @@ class ModelePDFLabels
  *  Create a document onto disk accordign to template module
  *
  *	@param  DoliDB		$db					Database handler
- *	@param  array		$arrayofmembers		Array of members
+ *	@param  array		$arrayofrecords		Array of records
  *	@param	string		$modele				Force le modele a utiliser ('' to not force)
  *	@param	Translate	$outputlangs		Objet lang a utiliser pour traduction
  *	@param	string		$outputdir			Output directory
  *	@return int        						<0 if KO, >0 if OK
  */
-function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='')
+function members_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='')
 {
 	global $conf,$langs;
 	$langs->load("members");
 
 	$error=0;
-	
+
 	// Increase limit for PDF build
 	$err=error_reporting();
 	error_reporting(0);
 	@set_time_limit(120);
 	error_reporting($err);
-	
+
 	$code='';
 	$srctemplatepath='';
 
@@ -99,7 +99,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
 	}
 	else $code=$modele;
 	$modele='standardlabel';
-	
+
 	// If selected modele is a filename template (then $modele="modelname:filename")
 	$tmp=explode(':',$modele,2);
 	if (! empty($tmp[1]))
@@ -108,7 +108,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
 		$srctemplatepath=$tmp[1];
 	}
 	else $srctemplatepath=$code;
-	
+
 	// Search template files
 	$file=''; $classname=''; $filefound=0;
 	$dirmodels=array('/');
@@ -118,7 +118,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
 		foreach(array('doc','pdf') as $prefix)
 		{
 			$file = $prefix."_".$modele.".class.php";
-	
+
 			// On verifie l'emplacement du modele
 			$file=dol_buildpath($reldir."core/modules/printsheet/doc/".$file,0);
 			if (file_exists($file))
@@ -130,18 +130,18 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
 		}
 		if ($filefound) break;
 	}
-	
+
 	// Charge le modele
 	if ($filefound)
 	{
 		require_once $file;
 
 		$obj = new $classname($db);
-	
+
 		// We save charset_output to restore it because write_file can change it if needed for
 		// output format that does not support UTF8.
 		$sav_charset_output=$outputlangs->charset_output;
-		if ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath, $outputdir) > 0)
+		if ($obj->write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir) > 0)
 		{
 			$outputlangs->charset_output=$sav_charset_output;
 			return 1;
diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php
old mode 100644
new mode 100755
diff --git a/htdocs/includes/jquery/plugins/jcrop/index.html b/htdocs/includes/jquery/plugins/jcrop/index.html
index 4f65fb095c8b4f054212f7609e0219abdbb117aa..209c929c61d01e4827debc2ae912c99bf8ace2a6 100755
--- a/htdocs/includes/jquery/plugins/jcrop/index.html
+++ b/htdocs/includes/jquery/plugins/jcrop/index.html
@@ -46,20 +46,5 @@
 </div>
 
 
-
-
-<!-- Below here for internal analysis {{{ -->
-
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-5176876-1");
-pageTracker._trackPageview();
-</script>
-
-<!-- }}} -->
-
 </body>
 </html>
diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql
index d96bc2d3f36b1e8408f5d3c588cb43ce4e6cf480..253f8cedbe8b7e5c77a6efb3418721f62210ab66 100644
--- a/htdocs/install/mysql/data/llx_c_tva.sql
+++ b/htdocs/install/mysql/data/llx_c_tva.sql
@@ -88,13 +88,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (80
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (802,80,    '0','0','VAT Rate 0',1);
 
 -- FRANCE (id country=1)
-insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11,  1,'19.6','0','VAT standard rate (France hors DOM-TOM)',1);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11,  1,'20','0','VAT standard rate (France hors DOM-TOM)',1);
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 12,  1, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0);
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 13,  1, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14,  1, '5.5','0','VAT reduced rate (France hors DOM-TOM)',1);
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 15,  1,   '0','0','VAT Rate 0 ou non applicable',1);
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 16,  1, '2.1','0','VAT super-reduced rate',1);
-insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17,  1,   '7','0','VAT reduced rate',1);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17,  1,  '10','0','VAT reduced rate',1);
 
 -- GERMANY (id country=5)
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51,  5,  '19.0','0','allgemeine Ust.',1);
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 2bc80f696bd59fa3e810e63412018d159b892496..3eac4f09a99e9e0789c6f01778c3580e070212a1 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -659,6 +659,7 @@ from=from
 toward=toward
 Access=Access
 SetDemandReason=Set source
+XMoreLines=%s line(s) hidden
 
 # Week day
 Monday=Monday
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index 9ad1a71b1a8dd7aaa24dbe9c6f5b8bbe349e61c5..cc4a20266202e05a8978f9f65ad0c9a6ca80b9c7 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -657,6 +657,7 @@ from=de
 toward=vers
 Access=Accès
 SetDemandReason=Définir l'origine
+XMoreLines=%s ligne(s) non affichée(s)
 
 # Week day
 Monday=Lundi
diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php
index 80bc1d49cd04233da198ce8caa2cc34076360513..409c426ecdf9e261fa0b756fde76fcf4a84f43ea 100644
--- a/htdocs/projet/class/task.class.php
+++ b/htdocs/projet/class/task.class.php
@@ -27,7 +27,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
 
 /**
  * 	Class to manage tasks
- *	Initialy built by build_class_from_table on 2008-09-10 12:41
  */
 class Task extends CommonObject
 {