From a77eba021b9ed282a428e38fa49e1605478b24b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jul 2022 00:08:48 +0200 Subject: [PATCH] Fix makepack --- build/README | 24 ++---------------------- build/makepack-dolibarr.pl | 16 ++++++++++++---- build/makepack-howto.txt | 31 +++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/build/README b/build/README index 626953f9376..19cf4ad1ec2 100644 --- a/build/README +++ b/build/README @@ -13,32 +13,12 @@ It is here only to build Dolibarr packages, and those generated packages will no There are several tools: +-------------------------------------------------------------------------------------------------- - To build full Dolibarr packages, launch the script > Launch command perl makepack-dolibarr.pl --------------------------------------------------------------------------------------------------- - - -Prerequisites to build tgz, debian and rpm packages: -> apt-get install tar dpkg dpatch p7zip-full rpm zip - - --------------------------------------------------------------------------------------------------- - -Prerequisites to build autoexe DoliWamp package: -> apt-get install wine q4wine -> Launch "wine cmd" to check a drive Z: pointing to / exists. -> Install InnoSetup - For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/ -> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB - For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com). - See file build/exe/doliwamp.iss to know the doliwamp version currently setup. -> Add path to ISCC into PATH windows var: - Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH -> To build manually the .exe 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. +See makepack-howto.txt for prerequisites. -------------------------------------------------------------------------------------------------- diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 2cce46146c4..48e89713216 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -76,15 +76,23 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"}) { print "Error: Missing environment variables.\n"; print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n"; + print "$PROG.$Extension aborted.\n"; + print "\n"; + print "You can set them with\n"; + print "On Linux:\n"; + print "export DESTIBETARC='/tmp'; export DESTISTABLE='/tmp';\n"; + print "On Windows:\n"; + print "set DESTIBETARC=c:/tmp\n"; + print "set DESTISTABLE=c:/tmp;\n"; + print "\n"; print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n"; print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n"; - print "$PROG.$Extension aborted.\n"; sleep 2; exit 1; } if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"}) { - print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n"; + print "Error: Directory of environment variable DESTIBETARC ($ENV{'DESTIBETARC'}) or DESTISTABLE ($ENV{'DESTISTABLE'}) does not exist.\n"; print "$PROG.$Extension aborted.\n"; sleep 2; exit 1; @@ -94,7 +102,7 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"}) # -------------- if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; } elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; } -elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; } +elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i || "$^O" =~ /msys/i) { $OS='windows'; $CR="\r"; } if (! $OS) { print "Error: Can't detect your OS.\n"; print "Can't continue.\n"; @@ -390,7 +398,7 @@ if ($nboftargetok) { $olddir=getcwd(); chdir("$SOURCE"); - print "Clean $SOURCE/htdocs\n"; + print "Clean $SOURCE/htdocs/includes/autoload.php\n"; $ret=`rm -f $SOURCE/htdocs/includes/autoload.php`; $ret=`git ls-files . --exclude-standard --others`; diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index d4e37e32629..be88302cd1d 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -1,7 +1,34 @@ ----- Dolibarr Makepack How To ----- This documentation describe steps to build a BETA or RELEASE versions -of Dolibarr. There is a chapter for BETA version and a chapter for -RELEASE version. +of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE version. + + +***** Prerequisites For Linux ***** + +Prerequisites to build tgz, debian and rpm packages: +> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli + +Prerequisites to build autoexe DoliWamp package: +> apt-get install wine q4wine +> Launch "wine cmd" to check a drive Z: pointing to / exists. +> Install InnoSetup + For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/ +> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB + For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com). + See file build/exe/doliwamp.iss to know the doliwamp version currently setup. +> Add path to ISCC into PATH windows var: + Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH +> To build manually the .exe 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. + + +***** Prerequisites For Windows ***** + +Install Perl +Install WampServer-3.2.*-64.exe +isetup-5.5.8.exe + ***** Actions to do a BETA ***** This files describe steps made by Dolibarr packaging team to make a