Author: ivanovic
Date: Wed Apr 29 19:36:46 2009
New Revision: 35325
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35325&view=rev
Log:
apply patch #1171 by Polarina (Automatic CPU count detection for
utils/wesnoth-optipng)
Modified:
trunk/utils/wesnoth-optipng
Modified: trunk/utils/wesnoth-optipng
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/wesnoth-optipng?rev=35325&r1=35324&r2=35325&view=diff
==============================================================================
--- trunk/utils/wesnoth-optipng (original)
+++ trunk/utils/wesnoth-optipng Wed Apr 29 19:36:46 2009
@@ -34,6 +34,10 @@
total_original_size=0
total_savings_size=0
total_savings_filecount=0
+
+if [test -e "/proc/cpuinfo"] && [`grep processor /proc/cpuinfo | wc -l` -gt
1]; then
+ max_number_threads=`grep processor /proc/cpuinfo | wc -l`
+fi
####### PROCEDURES #######
@@ -147,7 +151,7 @@
Part of the Battle for Wesnoth project <www.wesnoth.org>
Usage:
- $(basename ${0}) [{--nice|n} <value>] [{--help|-h}]
+ $(basename ${0}) [{--nice|n} <value>] [{--threads} <value>] [{--help|-h}]
Switches:
--nice / -n Sets the process nice <value> under which the optimization
@@ -156,8 +160,8 @@
--help / -h Displays this help text.
- --threads Run script with <value> worker threads. If not specified, only
- one thread is used by default.
+ --threads Run script with <value> worker threads. If not specified, the
+ amount of CPUs detected will be used.
This tool requires OptiPNG
(http://www.cs.toronto.edu/~cosmin/pngtech/optipng/),
Advdef (http://advancemame.sourceforge.net/comp-readme.html) and ImageMagick's
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits