Permalink
Browse files

Fix: W3C

  • Loading branch information...
1 parent 46c03ca commit 24c5993a4741a9b785e74495ddf7f19b3384644a @eldy eldy committed Sep 7, 2011
@@ -74,10 +74,14 @@
my $batch=0;
print "Makepack theme version $VERSION\n";
-print "Enter name of theme to package: ";
+print "Enter name of theme(s) to package (separated with space): ";
$PROJECT=<STDIN>;
chomp($PROJECT);
+@PROJECTLIST=split(/ /,$PROJECT);
+$PROJECT=join('',@PROJECTLIST);
+
+
# Ask and set version $MAJOR and $MINOR
print "Enter value for version: ";
$PROJVERSION=<STDIN>;
@@ -93,6 +97,8 @@
$FILENAME="$PROJECT";
$FILENAMETGZ="theme_$PROJECT-$MAJOR.$MINOR";
+$FILENAMEZIP="theme_$PROJECT-$MAJOR.$MINOR";
+
if (-d "/usr/src/redhat") {
# redhat
$RPMDIR="/usr/src/redhat";
@@ -201,11 +207,13 @@
mkdir "$BUILDROOT";
mkdir "$BUILDROOT/htdocs";
mkdir "$BUILDROOT/htdocs/theme";
- mkdir "$BUILDROOT/htdocs/theme/$PROJECT";
print "Copy $SOURCE into $BUILDROOT\n";
mkdir "$BUILDROOT";
- $ret=`cp -pr "$SOURCE/htdocs/theme/$PROJECT" "$BUILDROOT/htdocs/theme"`;
+ foreach my $tmp (@PROJECTLIST)
+ {
+ $ret=`cp -pr "$SOURCE/htdocs/theme/$tmp" "$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`;
@@ -221,16 +229,12 @@
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;
}
@@ -239,56 +243,9 @@
unlink $FILENAMEZIP.zip;
print "Compress $FILENAMETGZ into $FILENAMEZIP.zip...\n";
chdir("$BUILDROOT");
- #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 (<SPECFROM>) {
- $_ =~ 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");
+ $ret=`7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip htdocs`;
+ print "Move $FILENAMEZIP.zip to $DESTI\n";
+ $ret=`mv "$FILENAMEZIP.zip" "$DESTI/$FILENAMEZIP.zip"`;
next;
}
@@ -103,6 +103,8 @@ 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/*_*
@@ -73,8 +73,15 @@
'?dolibarr_main_auth_ldap_debug',
'separator',
'?dolibarr_lib_ADODB_PATH',
- '?dolibarr_lib_ODTPHP_PATH',
- '?dolibarr_lib_ODTPHP_PATHTOPCLZIP'
+ '?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'
);
$configfilelib=array(
// 'separator',
@@ -104,9 +111,16 @@
'dolibarr_main_auth_ldap_admin_pass',
'dolibarr_main_auth_ldap_debug',
'separator',
- 'dolibarr_lib_ADODB_PATH',
+ '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_lib_ODTPHP_PATHTOPCLZIP',
+ 'dolibarr_font_DOL_DEFAULT_TTF',
+ 'dolibarr_font_DOL_DEFAULT_TTF_BOLD'
);
$var=true;
print '<table class="noborder" width="100%">';
@@ -360,7 +360,7 @@ function callToBreakdown(imgSelector) {
print '<td>'.$langs->trans('Comments').'</td></tr>';
$rowspan=5;
- if ($conf->use_javascript_ajax) $rowspan++;
+ if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT)) $rowspan++;
// Payment mode
print '<tr><td><span class="fieldrequired">'.$langs->trans('PaymentMode').'</span></td><td>';
@@ -2,7 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
- *
+ *
* 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 '</form>';
-if ($mesg) print '<br>'.$mesg;
+dol_htmloutput_mesg($mesg);
print '<br><br>';
@@ -140,7 +140,6 @@
}
print '<br>';
-dol_htmloutput_mesg($mesg);
$db->close();
@@ -91,6 +91,9 @@
}
print '<br>';
+print '<br>';
+print 'NUSoap library path used by Dolibarr: '.NUSOAP_PATH.'<br>';
+print '<br>';
$db->close();

0 comments on commit 24c5993

Please sign in to comment.