From 2f2120e21a1b153d4662891980939db16de5a65d Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Mon, 10 Aug 2009 15:52:48 +0000 Subject: [PATCH] update tools for 1.6.2 git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@617 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/compute_resources.pl | 5 ++ src/messenger/pack.pl | 92 ++++++++++++++++++++---------- src/messenger/tools/sortit.pl | 33 +++++++++++ 3 files changed, 99 insertions(+), 31 deletions(-) create mode 100755 src/messenger/tools/sortit.pl diff --git a/src/messenger/compute_resources.pl b/src/messenger/compute_resources.pl index 17f3748b..15db18bf 100755 --- a/src/messenger/compute_resources.pl +++ b/src/messenger/compute_resources.pl @@ -4,12 +4,14 @@ ["redirect(ed)?\\.tpl", 1], ["\\.tpl", 0], + ["view/license.php", 0], ["view/themes.php", 2], ["view/translate.php", 2], ["view/translatelist.php", 2], ["view/settings.php", 2], ["view/updates.php", 2], ["view/features.php", 2], + ["view/performance.php", 2], ["view/avatar.php", 2], ["view/permissions.php", 2], ["view/agent.php", 2], @@ -30,6 +32,7 @@ ["operator/settings.php", 2], ["operator/updates.php", 2], ["operator/features.php", 2], + ["operator/performance.php", 2], ["operator/avatar.php", 2], ["operator/permissions.php", 2], ["operator/operator.php", 2], @@ -43,6 +46,8 @@ ["webim/client.php", 0], ["webim/leavemessage.php", 0], + ["webim/captcha.php", 0], + ["webim/license.php", 0], ["webim/mail.php", 0], ["libs/operator_settings.php", 2], diff --git a/src/messenger/pack.pl b/src/messenger/pack.pl index fa4a2bae..8f35be6b 100755 --- a/src/messenger/pack.pl +++ b/src/messenger/pack.pl @@ -5,7 +5,7 @@ ################################################################## $targetFolder = "deploy"; -$suffix = "161"; +$suffix = "162"; ################################################################## # Copies tree into target folder, preprocess .phps @@ -42,49 +42,79 @@ die "Target folder exists: $targetFolder" if -e $targetFolder; process_dir("./webim", $targetFolder); +`rm -rf release$suffix`; +die "release folder exists: release$suffix" if -e "release$suffix"; +mkdir "release$suffix"; + chdir "$targetFolder/locales"; -`zip -r ../../webim${suffix}_de.zip de`; -`rm -rf de`; +`zip -r ../../release$suffix/pre_webim${suffix}_ar.zip ar`; +`rm -rf ar`; -`zip -r ../../webim${suffix}_ru.zip ru`; -`rm -rf ru`; +`zip -r ../../release$suffix/pre_webim${suffix}_da.zip da`; +`rm -rf da`; -`zip -r ../../webim${suffix}_fr.zip fr`; -`rm -rf fr`; +`zip -r ../../release$suffix/pre_webim${suffix}_ka.zip ka`; +`rm -rf ka`; -`zip -r ../../webim${suffix}_it.zip it`; -`rm -rf it`; - -`zip -r ../../webim${suffix}_lv.zip lv`; +`zip -r ../../release$suffix/pre_webim${suffix}_lv.zip lv`; `rm -rf lv`; -`zip -r ../../webim${suffix}_pl.zip pl`; -`rm -rf pl`; +`zip -r ../../release$suffix/pre_webim${suffix}_nl.zip nl`; +`rm -rf nl`; -`zip -r ../../webim${suffix}_pt-br.zip pt-br`; -`rm -rf pt-br`; +`zip -r ../../release$suffix/pre_webim${suffix}_ro.zip ro`; +`rm -rf ro`; -`zip -r ../../webim${suffix}_sp.zip sp`; -`rm -rf sp`; - -`zip -r ../../webim${suffix}_tr.zip tr`; +`zip -r ../../release$suffix/pre_webim${suffix}_tr.zip tr`; `rm -rf tr`; -`zip -r ../../webim${suffix}_ua.zip ua`; -`rm -rf ua`; - -`zip -r ../../webim${suffix}_he.zip he`; -`rm -rf he`; - -`zip -r ../../webim${suffix}_hr.zip hr`; -`rm -rf hr`; - -`zip -r ../../webim${suffix}_zh-cn.zip zh-cn`; +`zip -r ../../release$suffix/pre_webim${suffix}_zh-cn.zip zh-cn`; `rm -rf zh-cn`; -`zip -r ../../webim${suffix}_zh-tw.zip zh-tw`; +chdir ".."; + +`zip -r ../release$suffix/webim${suffix}demo.zip *`; + +chdir "locales"; + +`zip -r ../../release$suffix/webim${suffix}_de.zip de`; +`rm -rf de`; + +`zip -r ../../release$suffix/webim${suffix}_ru.zip ru`; +`rm -rf ru`; + +`zip -r ../../release$suffix/webim${suffix}_fr.zip fr`; +`rm -rf fr`; + +`zip -r ../../release$suffix/webim${suffix}_it.zip it`; +`rm -rf it`; + +`zip -r ../../release$suffix/webim${suffix}_pl.zip pl`; +`rm -rf pl`; + +`zip -r ../../release$suffix/webim${suffix}_pt-br.zip pt-br`; +`rm -rf pt-br`; + +`zip -r ../../release$suffix/webim${suffix}_sp.zip sp`; +`rm -rf sp`; + + +`zip -r ../../release$suffix/webim${suffix}_ua.zip ua`; +`rm -rf ua`; + +`zip -r ../../release$suffix/webim${suffix}_he.zip he`; +`rm -rf he`; + +`zip -r ../../release$suffix/webim${suffix}_hr.zip hr`; +`rm -rf hr`; + + +`zip -r ../../release$suffix/webim${suffix}_zh-tw.zip zh-tw`; `rm -rf zh-tw`; chdir ".."; -`zip -r ../webim$suffix.zip *`; +`zip -r ../release$suffix/webim$suffix.zip *`; + +chdir ".."; +`rm -rf $targetFolder`; diff --git a/src/messenger/tools/sortit.pl b/src/messenger/tools/sortit.pl new file mode 100755 index 00000000..7d9e68f7 --- /dev/null +++ b/src/messenger/tools/sortit.pl @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +sub sort_transl($) { + my($from) = @_; + my @translation = (); + my $header = ""; + open(IN, "$from"); + while() { + chomp; + my $curr = $_; + if(/^([\w\.]+)=(.*)$/) { + if($1 ne "encoding" && $1 ne "output_charset" && $1 ne "output_encoding") { + push @translation, $curr; + } else { + $header .= "$curr\n"; + } + } else { + die "wrong line in $from: $curr\n"; + } + } + close(IN); + open(OUT, "> $from"); + print OUT $header; + for$line(sort @translation) { + print OUT "$line\n"; + } + close(OUT); +} + +die "no parameter\n" if $#ARGV < 0; +die "doesn't exists\n" unless -e $ARGV[0]; + +sort_transl($ARGV[0]);