Skip to content

Commit

Permalink
- suppress xml errors
Browse files Browse the repository at this point in the history
- win32 cross compilation
- cleanup
  • Loading branch information
u-voelkel committed Dec 19, 2009
1 parent 57d53a3 commit 9b1cf72
Show file tree
Hide file tree
Showing 16 changed files with 197 additions and 290 deletions.
6 changes: 5 additions & 1 deletion configure.ac
@@ -1,10 +1,14 @@
dnl Process this file with autoconf to produce a configure script.
dnl $Id: $

AC_INIT([fuppes], [0.655], [fuppes@ulrich-voelkel.de])
m4_include([m4/version.m4])
AC_INIT([fuppes], VERSION_NUMBER, [fuppes@ulrich-voelkel.de])
AM_CONFIG_HEADER(src/config.h)
AM_INIT_AUTOMAKE([1.9])

AH_TEMPLATE([FUPPES_VERSION], [The Current Version Number of FUPPES])
AC_DEFINE([FUPPES_VERSION], "[VERSION_NUMBER]")

AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_PROG_CXX
Expand Down
62 changes: 39 additions & 23 deletions crosscompile_win32.sh
Expand Up @@ -16,7 +16,7 @@ HOST="i586-mingw32msvc"
PREFIX=`pwd`"/win32"

# make command (e.g. "make -j 2")
MAKE="make"
MAKE="make -j 2"
MAKE_INSTALL="make install"

# you should not need to change anything below
Expand All @@ -37,33 +37,33 @@ if ! test -d $PREFIX; then
fi

# create source directory
if ! test -d $PREFIX"/sources"; then
mkdir $PREFIX"/sources"
if ! test -d $PREFIX"/src"; then
mkdir $PREFIX"/src"
fi
cd $PREFIX"/sources"/
cd $PREFIX"/src"/


# $1 = paket name, $2 = file ext, $3 = url
function loadpkt {

if ! test -d downloads; then
mkdir downloads
if ! test -d ../downloads; then
mkdir ../downloads
fi

SRC_PKT=$1$2
if ! test -e downloads/$SRC_PKT; then
wget --directory-prefix=downloads/ $3$SRC_PKT
if ! test -e ../downloads/$SRC_PKT; then
wget --directory-prefix=../downloads/ $3$SRC_PKT
fi

case $2 in
".tar.gz")
tar -xvzf downloads/$1$2
tar -xvzf ../downloads/$1$2
;;
".tar.bz2")
tar -xvjf downloads/$1$2
tar -xvjf ../downloads/$1$2
;;
".zip")
unzip -o downloads/$1$2
unzip -o ../downloads/$1$2
;;
esac

Expand Down Expand Up @@ -176,12 +176,19 @@ echo "build ffmpeg? [Y/n]"
HAVE_FFMPEG="no"
read build
if test "$build" != "n"; then
HAVE_FFMPEG2="yes"
HAVE_FFMPEG="yes"

echo "build libffmpegthumbnailer? [Y/n]"
read build
if test "$build" != "n"; then
HAVE_FFMPEGTHUMBNAILER="yes"
fi

fi



echo "strip libraries and executables? [Y/n]"
echo "strip and touch libraries and executables? [Y/n]"
DO_STRIP="no"
read strip
if test "$strip" != "n"; then
Expand Down Expand Up @@ -524,6 +531,7 @@ if test "$HAVE_JPEG" == "yes"; then
loadpkt "jpegsrc.v7" ".tar.gz" \
"http://www.ijg.org/files/"
cd jpeg-7
sed -i -e 's/typedef int boolean/typedef char boolean/' jmorecfg.h
./configure --host=$HOST --prefix=$PREFIX
$MAKE
make install
Expand Down Expand Up @@ -556,22 +564,27 @@ if test "$HAVE_IMAGEMAGICK" == "yes"; then
loadpkt "ImageMagick-6.5.8-5" ".tar.gz" \
"ftp://ftp.imagemagick.org/pub/ImageMagick/"

# CFLAGS="-DHAVE_BOOLEAN $CFLAGS" \
sed -i -e 's/"\*.la"/"\*.dll"/' magick/module.c
sed -i -e 's/"%s.la"/"%s.dll"/' magick/module.c
sed -i -e 's/GetEnvironmentValue("MAGICK_CODER_MODULE_PATH")/ConstantString(".\\\\magick-modules")/' magick/module.c
sed -i -e 's/GetEnvironmentValue("MAGICK_CODER_FILTER_PATH")/ConstantString(".\\\\magick-filters")/' magick/module.c


./configure --host=$HOST --prefix=$PREFIX \
--disable-deprecated --without-perl --with-modules \
--without-x --without-gslib --with-magick-plus-plus=no \
--disable-installed --enable-embeddable
--with-quantum-depth=8 --enable-embeddable
#--disable-installed

$MAKE CFLAGS="-DHAVE_BOOLEAN $CFLAGS"
make install
$MAKE_INSTALL
cd ..

else
echo "skipped ImageMagick"
fi


# ffmpeg rev 19439 - 2009-07-16 00:51
if test "$HAVE_FFMPEG" == "yes"; then

echo "start building ffmpeg"
Expand All @@ -593,7 +606,7 @@ sed -i -e 's/usleep/Sleep/' ffmpeg.c
--disable-demuxer=dv1394 --disable-indevs

$MAKE
make install
$MAKE_INSTALL
cd ..

else
Expand All @@ -604,11 +617,10 @@ fi
if test "$HAVE_FFMPEGTHUMBNAILER" == "yes"; then

echo "start building ffmpegthumbnailer"
loadpkt "ffmpegthumbnailer-1.5.5" ".tar.gz" \
loadpkt "ffmpegthumbnailer-1.5.6" ".tar.gz" \
"http://ffmpegthumbnailer.googlecode.com/files/"


sed -i -e 's/-version-info 3:2:0/-no-undefined -version-info 3:2:0/' Makefile.am
sed -i -e 's/-version-info 3:3:0/-no-undefined -version-info 3:3:0/' Makefile.am

autoreconf -vfi
./configure --host=$HOST --prefix=$PREFIX
Expand All @@ -627,13 +639,17 @@ fi
# FUPPES
cd $PREFIX/..
./configure --host=$HOST --prefix=$PREFIX \
--enable-lame
--enable-lame --enable-transcoder-ffmpeg
$MAKE
make install
$MAKE_INSTALL


# strip libraries and executables
if test "$DO_STRIP" == "yes"; then
$HOST-strip -s $PREFIX/bin/*
$HOST-strip -s $PREFIX/lib/bin/*
touch $PREFIX/bin/*
touch $PREFIX/lib/bin/*
touch $PREFIX/share/fuppes/*
fi

3 changes: 2 additions & 1 deletion m4/Makefile.am
@@ -1 +1,2 @@
EXTRA_DIST = iconv.m4
EXTRA_DIST = iconv.m4 \
version.sh
14 changes: 1 addition & 13 deletions src/Makefile.am
Expand Up @@ -197,8 +197,7 @@ libfuppes_la_SOURCES = \
lib/SharedConfig.cpp\
lib/SharedLog.cpp\
lib/Fuppes.cpp\
lib/libmain.cpp\
version.h
lib/libmain.cpp

if HAVE_INOTIFY
libfuppes_la_SOURCES += \
Expand All @@ -215,17 +214,6 @@ libfuppes_la_LDFLAGS = \
${MAD_LIBS}\
${LIBICONV}


BUILT_SOURCES += version.h

version.h: Makefile
if test -e "../version.sh"; then \
../version.sh; \
fi

CLEANFILES += \
version.h

pixmapsdir = $(datadir)/fuppes
dist_pixmaps_DATA = \
lib/Presentation/style.css \
Expand Down
3 changes: 3 additions & 0 deletions src/lib/Common/Common.cpp
Expand Up @@ -46,6 +46,9 @@
#include <algorithm>
#include <cctype>
#include <fcntl.h>
#ifndef WIN32
#include <dlfcn.h>
#endif

#ifdef HAVE_ICONV
#include <iconv.h>
Expand Down
15 changes: 14 additions & 1 deletion src/lib/Common/Thread.cpp
@@ -1,4 +1,4 @@
/* -*- Mode: C++; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
/***************************************************************************
* Thread.cpp
*
Expand Down Expand Up @@ -239,3 +239,16 @@ void* Thread::threadFunc(void* thread)
pthread_exit(NULL);
#endif
}

void Thread::msleep(unsigned int milliseconds)
{
#ifdef WIN32
Sleep(milliseconds);
#else
if(milliseconds < 1000)
usleep(milliseconds * 1000);
else
sleep(milliseconds / 1000);
#endif
}

4 changes: 3 additions & 1 deletion src/lib/Common/Thread.h
@@ -1,4 +1,4 @@
/* -*- Mode: C++; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
/***************************************************************************
* Thread.h
*
Expand Down Expand Up @@ -103,6 +103,8 @@ class Thread
#else
static void* threadFunc(void*);
#endif

void msleep(unsigned int milliseconds);

private:

Expand Down
11 changes: 3 additions & 8 deletions src/lib/HTTP/HTTPRequestHandler.cpp
Expand Up @@ -131,15 +131,10 @@ bool CHTTPRequestHandler::HandleHTTPRequest(CHTTPMessage* pRequest, CHTTPMessage
)
{
CPresentationPlugin* pres = CPluginMgr::presentationPlugin();
if(!pres) {
CSharedLog::Log(L_NORM, __FILE__, __LINE__, "no presentation plugin available");
//return false;
if(pres && pres->handleRequest(pRequest, pResponse)) {
return true;
}
else if(pres->handleRequest(pRequest, pResponse)) {
return true;
}

#warning remove

CPresentationHandler* pHandler = new CPresentationHandler();
pHandler->OnReceivePresentationRequest(pRequest, pResponse);
delete pHandler;
Expand Down

0 comments on commit 9b1cf72

Please sign in to comment.