makepack-howto.txt 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ----- Dolibarr Makepack How To -----
  2. This documentation describe steps to build a BETA or RELEASE versions
  3. of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE version.
  4. ***** Prerequisites For Linux *****
  5. Prerequisites to build tgz, debian and rpm packages:
  6. > apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
  7. Prerequisites to build autoexe DoliWamp package from Linux (solution seems broken since Ubuntu 20.04):
  8. > apt-get install wine q4wine
  9. > Launch "wine cmd" to check a drive Z: pointing to / exists.
  10. > Install InnoSetup
  11. For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
  12. > Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
  13. For example by running wampserver3.2.6_x64.exe (https://www.wampserver.com).
  14. See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
  15. > Add path to ISCC into PATH windows var:
  16. Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
  17. > To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
  18. open file build/exe/doliwamp.iss and click on button "Compile".
  19. The .exe file will be build into directory build.
  20. ***** Prerequisites For Windows *****
  21. Prerequisites to build autoexe DoliWamp package from Windows:
  22. > Install Perl for Windows (https://strawberryperl.com/)
  23. > Install isetup-5.5.8.exe (https://www.jrsoftware.org)
  24. > Install WampServer-3.2.*-64.exe (Apache 2.4.51, PHP 7.3.33, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
  25. > Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
  26. > Install Dolibarr current version:
  27. git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
  28. > Add the path of PHP (C:\wamp64\bin\php\php7.3.33) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
  29. > Create a config file c:\dolibarr\dolibarr\htdocs\conf\conf.php with content
  30. <?php
  31. $dolibarr_main_document_root="c:\dolibarr\dolibarr\htdocs";
  32. $dolibarr_main_url_root='http://localhost';
  33. ***** Actions to do a BETA *****
  34. This files describe steps made by Dolibarr packaging team to make a
  35. beta version of Dolibarr, step by step.
  36. - Check all files are commited.
  37. - Update version/info in ChangeLog, for this you can:
  38. To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
  39. To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
  40. To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
  41. Recopy the content of the output file into the file ChangeLog.
  42. - Note: To know number of lines changes: git diff --shortstat A B
  43. - Update version number with x.y.z-w in file htdocs/filefunc.inc.php
  44. - Commit all changes.
  45. - Run makepack-dolibarr.pl to generate all packages.
  46. - Create a branch (x.y), if version seems stable enough.
  47. - Move build files into www.dolibarr.org web site
  48. (/home/dolibarr/wwwroot/files/lastbuild).
  49. - Post a news on dolibarr.org/dolibarr.fr + social networks
  50. ***** Actions to do a RELEASE *****
  51. This files describe steps made by Dolibarr packaging team to make a
  52. complete release of Dolibarr, step by step.
  53. - Check all files are commited.
  54. - Update version/info in ChangeLog, for this you can:
  55. To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
  56. To generate a changelog of a major new version x.y.0 (from a repo pn branch x.y), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
  57. To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
  58. Recopy the content of the output file into the file ChangeLog.
  59. - Note: To know the number of lines changes: git diff --shortstat A B
  60. - Update version number with x.y.z in file htdocs/filefunc.inc.php
  61. - Commit all changes.
  62. - Run makepack-dolibarr.pl to generate all packages.
  63. - Check content of built packages.
  64. - Run makepack-dolibarr.pl again with option to publish files on
  65. dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org).
  66. - Run makepack-dolibarr.pl again with option to publish files on
  67. sourceforge. This will also add official tag.
  68. - Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
  69. on server to point to new files (used by some web sites).
  70. - Post a news on dolibarr.org/dolibarr.fr + social networks