makepack-howto.txt 6.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 Microsoft Visual C++ Redistributable 2017 (https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170)
  25. > Install WampServer-3.2.6-64.exe (Apache 2.4.51, PHP 7.4.26, MariaDB 10.6.5 for example. Version must match the values found into doliwamp.iss)
  26. > Install GIT for Windows (https://git-scm.com/ => You must choose option "Add Git bash profile", "Git commit as-is")
  27. > Install Dolibarr current version:
  28. git clone https://github.com/dolibarr/dolibarr or git clone --branch X.Y https://github.com/dolibarr/dolibarr
  29. > Add the path of PHP (C:\wamp64\bin\php\php7.4.26) and InnoSetup (C:\Program Files (x86)\Inno Setup 5) into the %PATH% of Windows.
  30. > Create a config file c:\dolibarr\dolibarr\htdocs\conf\conf.php with content
  31. <?php
  32. $dolibarr_main_document_root="c:\dolibarr\dolibarr\htdocs";
  33. $dolibarr_main_url_root='http://localhost';
  34. ***** Actions to do a BETA *****
  35. This files describe steps made by Dolibarr packaging team to make a
  36. beta version of Dolibarr, step by step.
  37. - Check all files are commited.
  38. - Update version/info in ChangeLog, for this you can:
  39. 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"
  40. 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"
  41. 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"
  42. Recopy the content of the output file into the file ChangeLog.
  43. - Note: To know number of lines changes: git diff --shortstat A B
  44. - Update version number with x.y.z-w in file htdocs/filefunc.inc.php
  45. - Commit all changes.
  46. - Run makepack-dolibarr.pl to generate all packages.
  47. - Create a branch (x.y), if version seems stable enough.
  48. - Move build files into www.dolibarr.org web site
  49. (/home/dolibarr/wwwroot/files/lastbuild).
  50. - Post a news on dolibarr.org/dolibarr.fr + social networks
  51. ***** Actions to do a RELEASE *****
  52. This files describe steps made by Dolibarr packaging team to make a
  53. complete release of Dolibarr, step by step.
  54. - Check all files are commited.
  55. - Update version/info in ChangeLog, for this you can:
  56. 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"
  57. 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"
  58. 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"
  59. Recopy the content of the output file into the file ChangeLog.
  60. - Note: To know the number of lines changes: git diff --shortstat A B
  61. - Update version number with x.y.z in file htdocs/filefunc.inc.php
  62. - Commit all changes.
  63. - Run makepack-dolibarr.pl to generate all packages.
  64. - Check content of built packages.
  65. - Run makepack-dolibarr.pl again with option to publish files on
  66. dolibarr foundation server (Dir /home/dolibarr/wwwroot/files/stable on www.dolibarr.org).
  67. - Run makepack-dolibarr.pl again with option to publish files on
  68. sourceforge. This will also add official tag.
  69. - Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
  70. on server to point to new files (used by some web sites).
  71. - Post a news on dolibarr.org/dolibarr.fr + social networks