Linux, programming, computers and life

February 15, 2006

Building mplayer with fribidi

Filed under: linux

While in ArchLinux it’s extremely easy to build packages from source using ABS, i had a little problem while trying to build mplayer with fribidi support.
Obviously, i added --with-fribidi-config=/usr/bin/fribidi-config --enable-fribidi to the PKGBUILD, but it did not help. So, after some googling i found out there’s a small error in the mplayer configure script. It must be changed a little in order to allow fribidi. The change can be done this way in the PKGBUILD:

sed -i ’s/FRIBIDI_CHARSET_UTF8/FRIBIDI_CHAR_SET_UTF8/g’ configure
CFLAGS= ./configure –prefix=/usr –enable-gui –disable-arts –enable-x11 –disable-sgiaudio ….

Just add the bold line, make sure you add all the configure flags you need, and you are done.

Technorati Tags , ,

Linux script vs Windows batchfile

Filed under: CLI, life, linux

While Linux certainly has it own problems… here’s a little story.
A friend, not a programmer, asked me to write a batch file which will run a certain program, wait for an hour and then kill it.
In Linux, something like:

$PROG & sleep 1h ; kill $!

Will probably work (PROG is a variable with a program name). On Windows, after some googling i came up with this:

SET KILL=%WINDIR%\system32\taskkill
start %PROGPATH%/%PROGNAME%
PING 1.1.1.1 -n 1 -w %SLEEPMSEC% >NUL
%KILL% /IM %PROGNAME%

Note that “sleep” is implemented with ping - which is great idea (not mine). There’s major drawback here - all the instances of the certain program probably will be killed.

You tell me which is simpler….

Technorati Tags: , , ,

Get free blog up and running in minutes with Blogsome
Theme designed by Gary Rogers