diff --git a/build/makepack-dolibarrtheme.pl b/build/makepack-dolibarrtheme.pl index 435734870e6..fe3828f339d 100644 --- a/build/makepack-dolibarrtheme.pl +++ b/build/makepack-dolibarrtheme.pl @@ -74,14 +74,10 @@ my $copyalreadydone=0; my $batch=0; print "Makepack theme version $VERSION\n"; -print "Enter name of theme(s) to package (separated with space): "; +print "Enter name of theme to package: "; $PROJECT=; chomp($PROJECT); -@PROJECTLIST=split(/ /,$PROJECT); -$PROJECT=join('',@PROJECTLIST); - - # Ask and set version $MAJOR and $MINOR print "Enter value for version: "; $PROJVERSION=; @@ -97,8 +93,6 @@ if ($MINOR eq '') $FILENAME="$PROJECT"; $FILENAMETGZ="theme_$PROJECT-$MAJOR.$MINOR"; -$FILENAMEZIP="theme_$PROJECT-$MAJOR.$MINOR"; - if (-d "/usr/src/redhat") { # redhat $RPMDIR="/usr/src/redhat"; @@ -207,13 +201,11 @@ if ($nboftargetok) { mkdir "$BUILDROOT"; mkdir "$BUILDROOT/htdocs"; mkdir "$BUILDROOT/htdocs/theme"; + mkdir "$BUILDROOT/htdocs/theme/$PROJECT"; print "Copy $SOURCE into $BUILDROOT\n"; mkdir "$BUILDROOT"; - foreach my $tmp (@PROJECTLIST) - { - $ret=`cp -pr "$SOURCE/htdocs/theme/$tmp" "$BUILDROOT/htdocs/theme"`; - } + $ret=`cp -pr "$SOURCE/htdocs/theme/$PROJECT" "$BUILDROOT/htdocs/theme"`; } print "Clean $BUILDROOT\n"; $ret=`rm -fr $BUILDROOT/htdocs/theme/$PROJECT/Thumbs.db $BUILDROOT/htdocs/theme/$PROJECT/*/Thumbs.db $BUILDROOT/htdocs/theme/$PROJECT/*/*/Thumbs.db $BUILDROOT/htdocs/theme/$PROJECT/*/*/*/Thumbs.db`; @@ -229,12 +221,16 @@ if ($nboftargetok) { if ($target eq 'TGZ') { unlink $FILENAMETGZ.tgz; +# unlink $BUILDROOT/$FILENAMETGZ.tgz; print "Compress $BUILDROOT/htdocs into $FILENAMETGZ.tgz...\n"; $cmd="tar --exclude-vcs --exclude-from \"$DESTI/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMETGZ.tgz\" htdocs"; $ret=`$cmd`; +# $cmd="tar --exclude-vcs --exclude-from \"$DESTI/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" htdocs\n"; +# $ret=`$cmd`; if ($OS =~ /windows/i) { print "Move $FILENAMETGZ.tgz to $DESTI/$FILENAMETGZ.tgz\n"; $ret=`mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`; +# $ret=`mv "$BUILDROOT/$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`; } next; } @@ -243,9 +239,56 @@ if ($nboftargetok) { unlink $FILENAMEZIP.zip; print "Compress $FILENAMETGZ into $FILENAMEZIP.zip...\n"; chdir("$BUILDROOT"); - $ret=`7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip htdocs`; - print "Move $FILENAMEZIP.zip to $DESTI\n"; - $ret=`mv "$FILENAMEZIP.zip" "$DESTI/$FILENAMEZIP.zip"`; + #print "cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*\n"; + #$ret=`cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`; + $ret=`7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`; + print "Move $FILENAMEZIP.zip to $DESTI\n"; + rename("$BUILDROOT/$FILENAMEZIP.zip","$DESTI/$FILENAMEZIP.zip"); + next; + } + + if ($target eq 'RPM') { # Linux only + $BUILDFIC="$FILENAME.spec"; + unlink $FILENAMETGZ.tgz; + print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n"; + $ret=`tar --exclude-vcs --exclude-from "$SOURCE/build/tgz/tar_exclude.txt" --directory "$BUILDROOT" --group=500 --owner=500 -czvf "$BUILDROOT/$FILENAMETGZ.tgz" $FILENAMETGZ`; + + print "Move $FILENAMETGZ.tgz to $RPMDIR/SOURCES/$FILENAMETGZ.tgz\n"; + $cmd="mv \"$BUILDROOT/$FILENAMETGZ.tgz\" \"$RPMDIR/SOURCES/$FILENAMETGZ.tgz\""; + $ret=`$cmd`; + + print "Copy $SOURCE/make/rpm/${BUILDFIC} to $BUILDROOT\n"; +# $ret=`cp -p "$SOURCE/make/rpm/${BUILDFIC}" "$BUILDROOT"`; + open (SPECFROM,"<$SOURCE/make/rpm/${BUILDFIC}") || die "Error"; + open (SPECTO,">$BUILDROOT/$BUILDFIC") || die "Error"; + while () { + $_ =~ s/__VERSION__/$MAJOR.$MINOR.$BUILD/; + print SPECTO $_; + } + close SPECFROM; + close SPECTO; + + print "Launch RPM build (rpm --clean -ba $BUILDROOT/${BUILDFIC})\n"; + $ret=`rpm --clean -ba $BUILDROOT/${BUILDFIC}`; + + print "Move $RPMDIR/RPMS/noarch/${FILENAMERPM}.noarch.rpm into $DESTI/${FILENAMERPM}.noarch.rpm\n"; + $cmd="mv \"$RPMDIR/RPMS/noarch/${FILENAMERPM}.noarch.rpm\" \"$DESTI/${FILENAMERPM}.noarch.rpm\""; + $ret=`$cmd`; + next; + } + + if ($target eq 'DEB') { + print "Automatic build for DEB is not yet supported.\n"; + } + + if ($target eq 'EXE') { + unlink "$FILENAMEEXE.exe"; + print "Compress into $FILENAMEEXE.exe by $FILENAMEEXE.nsi...\n"; + $command="\"$REQUIREMENTTARGET{$target}\" /DMUI_VERSION_DOT=$MAJOR.$MINOR.$BUILD /X\"SetCompressor bzip2\" \"$SOURCE\\build\\exe\\$FILENAME.nsi\""; + print "$command\n"; + $ret=`$command`; + print "Move $FILENAMEEXE.exe to $DESTI\n"; + rename("$SOURCE\\build\\exe\\$FILENAMEEXE.exe","$DESTI/$FILENAMEEXE.exe"); next; } diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 46079f3c665..81112a18cab 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -103,8 +103,6 @@ cui hai bisogno ed essere facile da usare. %{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz %{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name} %{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name} -%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime -%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap # Lang for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_* diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index d837be49912..af09e33cfeb 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -63,25 +63,14 @@ $configfileparameters=array( 'separator', 'dolibarr_main_authentication', 'separator', - '?dolibarr_main_auth_ldap_login_attribute', - '?dolibarr_main_auth_ldap_host', - '?dolibarr_main_auth_ldap_port', - '?dolibarr_main_auth_ldap_version', - '?dolibarr_main_auth_ldap_dn', - '?dolibarr_main_auth_ldap_admin_login', - '?dolibarr_main_auth_ldap_admin_pass', - '?dolibarr_main_auth_ldap_debug', - 'separator', - '?dolibarr_lib_ADODB_PATH', - '?dolibarr_lib_TCPDF_PATH', - '?dolibarr_lib_FPDFI_PATH', - '?dolibarr_lib_NUSOAP_PATH', - '?dolibarr_lib_PHPEXCEL_PATH', - '?dolibarr_lib_GEOIP_PATH', - '?dolibarr_lib_ODTPHP_PATH', - '?dolibarr_lib_ODTPHP_PATHTOPCLZIP', - '?dolibarr_font_DOL_DEFAULT_TTF', - '?dolibarr_font_DOL_DEFAULT_TTF_BOLD' + 'dolibarr_main_auth_ldap_login_attribute', + 'dolibarr_main_auth_ldap_host', + 'dolibarr_main_auth_ldap_port', + 'dolibarr_main_auth_ldap_version', + 'dolibarr_main_auth_ldap_dn', + 'dolibarr_main_auth_ldap_admin_login', + 'dolibarr_main_auth_ldap_admin_pass', + 'dolibarr_main_auth_ldap_debug' ); $configfilelib=array( // 'separator', @@ -109,18 +98,7 @@ $configfilelib=array( 'dolibarr_main_auth_ldap_dn', 'dolibarr_main_auth_ldap_admin_login', 'dolibarr_main_auth_ldap_admin_pass', - 'dolibarr_main_auth_ldap_debug', - 'separator', - 'dolibarr_lib_ADODB_PATH', - 'dolibarr_lib_TCPDF_PATH', - 'dolibarr_lib_FPDFI_PATH', - 'dolibarr_lib_NUSOAP_PATH', - 'dolibarr_lib_PHPEXCEL_PATH', - 'dolibarr_lib_GEOIP_PATH', - 'dolibarr_lib_ODTPHP_PATH', - 'dolibarr_lib_ODTPHP_PATHTOPCLZIP', - 'dolibarr_font_DOL_DEFAULT_TTF', - 'dolibarr_font_DOL_DEFAULT_TTF_BOLD' + 'dolibarr_main_auth_ldap_debug' ); $var=true; print ''; @@ -138,23 +116,9 @@ foreach($configfileparameters as $key) if (empty($ignore)) { - $newkey = preg_replace('/^\?/','',$key); - - if (preg_match('/^\?/',$key) && empty(${$newkey})) - { - $i++; - continue; // We discard parametes starting with ? - } - - if ($newkey == 'separator' && $lastkeyshown == 'separator') - { - $i++; - continue; - } - $var=!$var; print ""; - if ($newkey == 'separator') + if ($key == 'separator') { print ''; } @@ -163,17 +127,16 @@ foreach($configfileparameters as $key) // Label print "'; // Key - print ''; + print ''; // Value print ""; } print "\n"; - $lastkeyshown=$newkey; } $i++; } diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php index 128b13106e6..8ab85c8ee05 100644 --- a/htdocs/webservices/admin/webservices.php +++ b/htdocs/webservices/admin/webservices.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent - * + * * 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 * the Free Software Foundation; either version 2 of the License, or @@ -92,7 +92,7 @@ print ""; print ''; -dol_htmloutput_mesg($mesg); +if ($mesg) print '
'.$mesg; print '

'; @@ -140,6 +140,7 @@ if ($conf->fournisseur->enabled) } print '
'; +dol_htmloutput_mesg($mesg); $db->close(); diff --git a/htdocs/webservices/index.php b/htdocs/webservices/index.php index d99da75f9aa..097c53bfe87 100644 --- a/htdocs/webservices/index.php +++ b/htdocs/webservices/index.php @@ -91,9 +91,6 @@ if ($conf->fournisseur->enabled) } print '
'; -print '
'; -print 'NUSoap library path used by Dolibarr: '.NUSOAP_PATH.'
'; -print '
'; $db->close();
 ".$configfilelib[$i].''.$newkey.''.$key.'"; - if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey}); - else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT'); - else if ($newkey == 'dolibarr_main_url_root_alt' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT_ALT'); - else print ${$newkey}; + if ($key == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$key}); + else if ($key == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$key})) print ${$key}.' => '.constant('DOL_MAIN_URL_ROOT'); + else if ($key == 'dolibarr_main_url_root_alt' && preg_match('/__auto__/',${$key})) print ${$key}.' => '.constant('DOL_MAIN_URL_ROOT_ALT'); + else print ${$key}; print "