Goodbye Autotools, hello CMake and minizip

master
Artem Vorotnikov 2015-06-11 14:14:15 +03:00
parent 5246f9140d
commit cfc4c13bd0
70 changed files with 310 additions and 4880 deletions

41
.gitignore vendored
View File

@ -1,40 +1 @@
COPYING
INSTALL
README
AUTHORS
NEWS
Makefile.in
Makefile
aclocal.m4
autom4te.cache
configure
config.cache
config.h
config.log
config.rpath
config.status
compile
depcomp
description-pak
install-sh
missing
po/stamp-it
src/gamesxml2c
.*.swp
*.o
*.a
*.mo
intl
intltool-extract.in
intltool-merge.in
intltool-update.in
intltool-extract
intltool-merge
intltool-update
intltool-modules
libtool
m4
mkinstalldirs
xqf.spec
xqf.desktop
xqf
build

286
CMakeLists.txt Normal file
View File

@ -0,0 +1,286 @@
cmake_minimum_required(VERSION 2.8.7)
# Project information
project(xqf)
set (VERSION "1.0.6.2")
set (DOMAIN ${PROJECT_NAME})
set (LINGUAS ca da de es fi fr pl ru)
# Paths
set (PACKAGE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/xqf")
set (LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
set (PIXMAPS_ENTRY_PATH ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)
if (NOT CMAKE_INSTALL_PREFIX)
set (CMAKE_INSTALL_PREFIX "/usr")
endif (NOT CMAKE_INSTALL_PREFIX)
# Definitions
add_definitions (-DPACKAGE="${PROJECT_NAME}" -DPACKAGE_VERSION="${VERSION}" -DXQF_VERSION="${VERSION}" -DDOMAIN="${DOMAIN}" -DLOCALEDIR="${LOCALEDIR}" -DPACKAGE_DATA_DIR="${PACKAGE_DATA_DIR}")
# Options
option(USE_GTK3 "Use GTK+ toolkit version 3" OFF)
option(DEPRECATED_DISABLE "Disable deprecated parts of GLib, GObject, GDK and GTK+" OFF)
option(USE_GEOIP "Depend on GeoIP library for geolocation" ON)
option(USE_GZIP "Enable gzip compressor support" ON)
option(RCON_STANDALONE "Build standalone RCON" OFF)
if (NOT WITH_QSTAT)
set (WITH_QSTAT "/usr/bin/qstat")
endif (NOT WITH_QSTAT)
add_definitions (-DQSTAT_EXEC="${WITH_QSTAT}")
if (CMAKE_BUILD_TYPE EQUAL DEBUG)
add_definitions (-DDEBUG)
endif (CMAKE_BUILD_TYPE EQUAL DEBUG)
if (RCON_STANDALONE)
add_definitions (-DRCON_STANDALONE)
endif (RCON_STANDALONE)
if (USE_GEOIP)
add_definitions (-DUSE_GEOIP)
endif (USE_GEOIP)
if (USE_GZIP)
add_definitions (-DUSE_GZIP)
endif (USE_GZIP)
# Source list
set (xqf_HEADERS_DIR ${CMAKE_SOURCE_DIR}/src)
set (xqf_SOURCES
${CMAKE_SOURCE_DIR}/src/xqf.ui
${CMAKE_SOURCE_DIR}/src/addmaster.c
${CMAKE_SOURCE_DIR}/src/addserver.c
${CMAKE_SOURCE_DIR}/src/config.c
${CMAKE_SOURCE_DIR}/src/country-filter.c
${CMAKE_SOURCE_DIR}/src/debug.c
${CMAKE_SOURCE_DIR}/src/dialogs.c
${CMAKE_SOURCE_DIR}/src/dns.c
${CMAKE_SOURCE_DIR}/src/filter.c
${CMAKE_SOURCE_DIR}/src/flt-player.c
${CMAKE_SOURCE_DIR}/src/game.c
${CMAKE_SOURCE_DIR}/src/history.c
${CMAKE_SOURCE_DIR}/src/host.c
${CMAKE_SOURCE_DIR}/src/launch.c
${CMAKE_SOURCE_DIR}/src/menus.c
${CMAKE_SOURCE_DIR}/src/pixmaps.c
${CMAKE_SOURCE_DIR}/src/pref.c
${CMAKE_SOURCE_DIR}/src/psearch.c
${CMAKE_SOURCE_DIR}/src/rc.c
${CMAKE_SOURCE_DIR}/src/rcon.c
${CMAKE_SOURCE_DIR}/src/server.c
${CMAKE_SOURCE_DIR}/src/skin.c
${CMAKE_SOURCE_DIR}/src/skin_pcx.c
${CMAKE_SOURCE_DIR}/src/sort.c
${CMAKE_SOURCE_DIR}/src/source.c
${CMAKE_SOURCE_DIR}/src/srv-info.c
${CMAKE_SOURCE_DIR}/src/srv-list.c
${CMAKE_SOURCE_DIR}/src/srv-prop.c
${CMAKE_SOURCE_DIR}/src/stat.c
${CMAKE_SOURCE_DIR}/src/statistics.c
${CMAKE_SOURCE_DIR}/src/utils.c
${CMAKE_SOURCE_DIR}/src/xqf.c
${CMAKE_SOURCE_DIR}/src/xqf-ui.c
${CMAKE_SOURCE_DIR}/src/zipped.c
${CMAKE_SOURCE_DIR}/src/redial.c
${CMAKE_SOURCE_DIR}/src/q3maps.c
${CMAKE_SOURCE_DIR}/src/utmaps.c
${CMAKE_SOURCE_DIR}/src/loadpixmap.c
${CMAKE_SOURCE_DIR}/src/scripts.c
${CMAKE_SOURCE_DIR}/src/tga/memtopixmap.c
${CMAKE_SOURCE_DIR}/src/tga/tga.c
${CMAKE_SOURCE_DIR}/src/addmaster.h
${CMAKE_SOURCE_DIR}/src/addserver.h
${CMAKE_SOURCE_DIR}/src/config.h
${CMAKE_SOURCE_DIR}/src/country-filter.h
${CMAKE_SOURCE_DIR}/src/debug.h
${CMAKE_SOURCE_DIR}/src/dialogs.h
${CMAKE_SOURCE_DIR}/src/dns.h
${CMAKE_SOURCE_DIR}/src/filter.h
${CMAKE_SOURCE_DIR}/src/flt-player.h
${CMAKE_SOURCE_DIR}/src/game.h
${CMAKE_SOURCE_DIR}/src/history.h
${CMAKE_SOURCE_DIR}/src/host.h
${CMAKE_SOURCE_DIR}/src/launch.h
${CMAKE_SOURCE_DIR}/src/menus.h
${CMAKE_SOURCE_DIR}/src/pixmaps.h
${CMAKE_SOURCE_DIR}/src/pref.h
${CMAKE_SOURCE_DIR}/src/psearch.h
${CMAKE_SOURCE_DIR}/src/quake2_pal.h
${CMAKE_SOURCE_DIR}/src/quake_pal.h
${CMAKE_SOURCE_DIR}/src/rc.h
${CMAKE_SOURCE_DIR}/src/rcon.h
${CMAKE_SOURCE_DIR}/src/server.h
${CMAKE_SOURCE_DIR}/src/skin.h
${CMAKE_SOURCE_DIR}/src/skin_pcx.h
${CMAKE_SOURCE_DIR}/src/sort.h
${CMAKE_SOURCE_DIR}/src/source.h
${CMAKE_SOURCE_DIR}/src/srv-info.h
${CMAKE_SOURCE_DIR}/src/srv-list.h
${CMAKE_SOURCE_DIR}/src/srv-prop.h
${CMAKE_SOURCE_DIR}/src/stat.h
${CMAKE_SOURCE_DIR}/src/statistics.h
${CMAKE_SOURCE_DIR}/src/utils.h
${CMAKE_SOURCE_DIR}/src/xqf-ui.h
${CMAKE_SOURCE_DIR}/src/xqf.h
${CMAKE_SOURCE_DIR}/src/zipped.h
${CMAKE_SOURCE_DIR}/src/redial.h
${CMAKE_SOURCE_DIR}/src/q3maps.h
${CMAKE_SOURCE_DIR}/src/utmaps.h
${CMAKE_SOURCE_DIR}/src/loadpixmap.h
${CMAKE_SOURCE_DIR}/src/scripts.h
${CMAKE_SOURCE_DIR}/src/tga/memtopixmap.h
${CMAKE_SOURCE_DIR}/src/tga/tga.h
)
set (flag_DATA ${CMAKE_SOURCE_DIR}/src/xpm/lan.png)
set (xpm_MAIN ${CMAKE_SOURCE_DIR}/pixmaps/xqf.xpm)
set (xpm_DATA
${CMAKE_SOURCE_DIR}/src/xpm/update.xpm
${CMAKE_SOURCE_DIR}/src/xpm/refresh.xpm
${CMAKE_SOURCE_DIR}/src/xpm/refrsel.xpm
${CMAKE_SOURCE_DIR}/src/xpm/stop.xpm
${CMAKE_SOURCE_DIR}/src/xpm/connect.xpm
${CMAKE_SOURCE_DIR}/src/xpm/observe.xpm
${CMAKE_SOURCE_DIR}/src/xpm/record.xpm
${CMAKE_SOURCE_DIR}/src/xpm/sfilter.xpm
${CMAKE_SOURCE_DIR}/src/xpm/pfilter.xpm
)
set (icon_SIZE 22 32 48 128)
include_directories (${xqf_HEADERS_DIR} ${CMAKE_BINARY_DIR})
if (DEPRECATED_DISABLE)
add_definitions (-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
-DG_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES)
endif (DEPRECATED_DISABLE)
# Use the package PkgConfig to detect GTK+ headers/library files
find_package (PkgConfig REQUIRED)
find_package (Gettext REQUIRED)
pkg_check_modules (UNZIP REQUIRED minizip)
pkg_check_modules (XML REQUIRED libxml-2.0)
if (USE_GTK3)
pkg_check_modules (GTK3 REQUIRED gtk+-3.0)
include_directories (${GTK3_INCLUDE_DIRS})
link_directories (${GTK3_LIBRARY_DIRS})
add_definitions (${GTK3_CFLAGS_OTHER})
else (USE_GTK3)
pkg_check_modules (GTK2 REQUIRED gtk+-2.0)
include_directories (${GTK2_INCLUDE_DIRS})
link_directories (${GTK2_LIBRARY_DIRS})
add_definitions (${GTK2_CFLAGS_OTHER})
endif (USE_GTK3)
if (USE_GEOIP)
pkg_check_modules (GEOIP REQUIRED geoip)
include_directories (${GEOIP_INCLUDE_DIRS})
link_directories (${GEOIP_LIBRARY_DIRS})
endif (USE_GEOIP)
include_directories (${UNZIP_INCLUDE_DIRS})
link_directories (${UNZIP_LIBRARY_DIRS})
include_directories (${XML_INCLUDE_DIRS})
link_directories (${XML_LIBRARY_DIRS})
include_directories (${GETTEXT_INCLUDE_DIRS})
link_directories (${GETTEXT_LIBRARY_DIRS})
# Compile and link
add_executable (gamesxml2c ${CMAKE_SOURCE_DIR}/src/gamesxml2c.c)
target_link_libraries (gamesxml2c xml2)
add_custom_command (TARGET gamesxml2c COMMAND gamesxml2c ${CMAKE_SOURCE_DIR}/src/games.xml > ${CMAKE_BINARY_DIR}/games.c DEPENDS gamesxml2c)
add_definitions (-DGAMES_INCLUDE="${CMAKE_BINARY_DIR}/games.c")
# Compile and link
add_executable (xqf ${xqf_SOURCES})
target_link_libraries (xqf ${UNZIP_LIBRARIES} dl)
if (USE_GTK3)
target_link_libraries (xqf ${GTK3_LIBRARIES})
else (USE_GTK3)
target_link_libraries (xqf ${GTK2_LIBRARIES})
endif (USE_GTK3)
if (USE_GEOIP)
target_link_libraries (xqf GeoIP)
endif (USE_GEOIP)
if (RCON_STANDALONE)
target_link_libraries (xqf -lreadline)
endif (RCON_STANDALONE)
# i18n
add_custom_target (translation ALL DEPENDS)
foreach (LANG ${LINGUAS})
set (_poFile ${CMAKE_SOURCE_DIR}/po/${LANG}.po)
if (EXISTS ${_poFile})
set (POT_FILE ${CMAKE_SOURCE_DIR}/po/${DOMAIN}.pot)
set (PO_FILE_NEW ${CMAKE_BINARY_DIR}/${LANG}.po)
set (GMO_FILE_NEW ${CMAKE_BINARY_DIR}/${LANG}.gmo)
add_custom_command (TARGET translation
COMMAND msgmerge ${_poFile} ${POT_FILE} -o ${PO_FILE_NEW}
COMMAND msgfmt -c -o ${GMO_FILE_NEW} ${PO_FILE_NEW})
endif (EXISTS ${_poFile})
endforeach (LANG ${LINGUAS})
add_custom_command (TARGET translation
COMMAND echo ${LINGUAS} > ${CMAKE_BINARY_DIR}/LINGUAS
COMMAND msgfmt --desktop -d ${CMAKE_BINARY_DIR} --template=${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.desktop.in -c -o ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop
)
# Installation
# Executable
install (TARGETS xqf DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
# UI
install (FILES ${CMAKE_SOURCE_DIR}/src/xqf.ui DESTINATION ${PACKAGE_DATA_DIR}/ui)
# Icons
install (FILES ${xpm_DATA} DESTINATION ${PACKAGE_DATA_DIR}/xpm)
install (FILES ${xpm_MAIN} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps)
install (FILES ${flag_DATA} DESTINATION ${PACKAGE_DATA_DIR}/default/flags)
foreach (SIZE ${icon_SIZE})
install (FILES ${CMAKE_SOURCE_DIR}/pixmaps/${SIZE}x${SIZE}/xqf.png
DESTINATION ${PIXMAPS_ENTRY_PATH}/${SIZE}x${SIZE}/apps)
endforeach (SIZE ${icon_SIZE})
install (FILES ${CMAKE_SOURCE_DIR}/pixmaps/scalable/xqf.svg DESTINATION ${PIXMAPS_ENTRY_PATH}/scalable/apps)
# Config
install (FILES ${CMAKE_SOURCE_DIR}/src/qstat.cfg ${CMAKE_SOURCE_DIR}/src/qstat_savage.sh DESTINATION ${PACKAGE_DATA_DIR})
# Man pages
install (FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.6 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6)
# i18n
foreach (LANG ${LINGUAS})
install (FILES ${CMAKE_BINARY_DIR}/${LANG}.gmo DESTINATION ${LOCALEDIR}/${LANG}/LC_MESSAGES RENAME ${DOMAIN}.mo )
endforeach (LANG ${LINGUAS})
install (FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)

View File

@ -1,30 +0,0 @@
SUBDIRS = po src docs pixmaps
man_MANS = xqf.6
@INTLTOOL_DESKTOP_RULE@
DESKTOP_IN_FILES = xqf.desktop.in
DESKTOP_FILES = $(DESKTOP_IN_FILES:.desktop.in=.desktop)
desktopdir= $(datadir)/applications
desktop_DATA = $(DESKTOP_FILES)
EXTRA_DIST = \
BUGS \
autogen.sh \
clean.sh \
$(man_MANS) \
xqf.spec \
$(DESKTOP_IN_FILES) \
intltool-merge.in \
intltool-update.in \
intltool-extract.in
DISTCLEANFILES = \
po/.intltool-merge-cache \
intltool-extract \
intltool-merge \
intltool-update \
$(DESKTOP_FILES)

View File

@ -1,168 +0,0 @@
#! /bin/sh
# Run this to generate all the initial makefiles, etc.
# Stolen from the GNU Midnight Commander. Customized for giFTcurs.
# adapted for xqf
# Make it possible to specify path in the environment
: ${AUTOCONF=autoconf}
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
: ${ACLOCAL=aclocal}
: ${GETTEXTIZE=gettextize}
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
(
cd $srcdir
# For autotools compatibility
if ! test -e README; then
ln -s README.md README
fi
# For autotools compatibility
if ! test -e NEWS; then
ln -s NEWS.md NEWS
fi
# For autotools compatibility
if ! test -e AUTHORS; then
ln -s AUTHORS.md AUTHORS
fi
# extract flag icons
rm pixmaps/flags/*.png
tar -C pixmaps -xzf pixmaps/flags.tar.gz
# The autoconf cache (version after 2.52) is not reliable yet.
rm -rf autom4te.cache
# Ensure that gettext is reasonably new.
gettext_ver=`$GETTEXTIZE --version | sed -n '1s/\.//g;1s/.* //;1s/^\(...\)$/\100/;1s/^\(...\)\(.\)$/\10\2/;1p'`
if test $gettext_ver -lt 01038; then
echo "Don't use gettext older than 0.10.38" 2>&1
exit 1
fi
echo "Running $GETTEXTIZE and intltoolize..."
rm -rf intl
if test $gettext_ver -ge 01100; then
if test $gettext_ver -ge 01104; then
# gettextize doesn't want us to run it in a non-interactive script.
GETTEXTIZE_FIXED=./gettextize.fixed
egrep -v "read.*/dev/tty" `which $GETTEXTIZE` > $GETTEXTIZE_FIXED
chmod +x $GETTEXTIZE_FIXED
GETTEXTIZE=$GETTEXTIZE_FIXED
fi
# $GETTEXTIZE --copy --force --intl --no-changelog >tmpout || exit 1
glib-gettextize --copy --force || exit 1
intltoolize --copy --force --automake || exit 1
if test -f Makefile.am~; then
rm -rf Makefile.am
mv Makefile.am~ Makefile.am
fi
if test -f configure.in~ ; then
rm -rf configure.in
mv configure.in~ configure.in
fi
for i in po/Rules-quot po/boldquot.sed po/en@boldquot.header \
po/en@quot.header po/insert-header.sin po/quot.sed \
po/remove-potcdate.sin po/Makefile.in.in
do
if diff -s $i $i~ >/dev/null 2>&1 ; then
mv $i~ $i
fi
done
# Do we need po/Makevars.in and family for gettext 0.11 ?
if test ! -f po/Makevars; then
cat > po/Makevars <<EOF
# Usually the message domain is the same as the package name.
DOMAIN = \$(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
MSGID_BUGS_ADDRESS = xqf-developer@lists.sourceforge.net
EOF
fi
else
$GETTEXTIZE --copy --force >tmpout || exit 1
if test -f po/ChangeLog~; then
rm -f po/ChangeLog
mv po/ChangeLog~ po/ChangeLog
fi
fi
rm -f aclocal.m4
if test -f `aclocal --print-ac-dir`/gettext.m4; then
: # gettext macro files are available to aclocal.
else
# gettext macro files are not available.
# Find them and copy to a local directory.
# Ugly way to parse the instructions gettexize gives us.
m4files="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
fromdir=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
rm -rf gettext.m4
mkdir gettext.m4
for i in $m4files; do
cp -f $fromdir/$i gettext.m4
done
ACLOCAL_INCLUDES="-I gettext.m4"
fi
if test -d m4; then
# gettextize 0.11.4 wants this for some reason
ACLOCAL_INCLUDES="$ACLOCAL_INCLUDES -I m4"
fi
rm -f tmpout $GETTEXTIZE_FIXED
## workaround for libtoolize putting files in ..
#if [ ! -e install-sh ]; then
# removeinstallsh=1
# touch install-sh
#fi
#
#echo "running libtoolize ..."
#libtoolize --force || die libtoolize libtool
#
#[ -n "$removeinstallsh" ] && rm install-sh
# Some old version of GNU build tools fail to set error codes.
# Check that they generate some of the files they should.
echo "Running $ACLOCAL..."
$ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS || exit 1
test -f aclocal.m4 || \
{ echo "aclocal failed to generate aclocal.m4" 2>&1; exit 1; }
echo "Running $AUTOHEADER..."
$AUTOHEADER || exit 1
test -f src/gnuconfig.h.in || \
{ echo "autoheader failed to generate src/gnuconfig.h.in" 2>&1; exit 1; }
echo "Running $AUTOCONF..."
$AUTOCONF || exit 1
test -f configure || \
{ echo "autoconf failed to generate configure" 2>&1; exit 1; }
## Workaround for Automake 1.5 to ensure that depcomp is distributed.
echo "Running $AUTOMAKE..."
## doesn't work $AUTOMAKE -a src/Makefile || exit 1
$AUTOMAKE -a || exit 1
test -f Makefile.in || \
{ echo "automake failed to generate Makefile.in" 2>&1; exit 1; }
) || exit 1
#conf_flags="--enable-maintainer-mode --enable-compile-warnings"
#echo Running $srcdir/configure $conf_flags "$@" ...
#$srcdir/configure --cache-file=config.cache $conf_flags "$@" && \
# echo "Now type \`make' (\`gmake' on some systems) to compile XQF"

View File

@ -1,64 +0,0 @@
#!/bin/sh
rm -f \
Makefile \
config.status \
config.cache \
config.log \
configure \
Makefile.in \
aclocal.m4 \
config.guess \
config.sub \
install-sh \
mkinstalldirs \
missing \
depcomp \
*/Makefile \
src/Makefile.in \
ltconfig \
ltmain.sh \
libtool \
compile \
config.h \
intl/libintl.h \
src/gnuconfig.h \
src/gnuconfig.h.in \
src/xpm/Makefile.in \
src/xpm/Makefile \
src/*.o \
src/test_utils \
src/xqf \
pixmaps/Makefile.in \
pixmaps/flags/Makefile.in \
po/Makefile.in \
po/POTFILES \
po/*.gmo \
INSTALL
# gettextize
rm -rf \
ABOUT-NLS \
config.rpath \
mkinstalldirs \
m4 \
po/Makefile.in \
po/Makevars.template \
po/Rules-quot \
po/boldquot.sed \
po/en@boldquot.header \
po/en@quot.header \
po/insert-header.sin \
po/quot.sed \
po/remove-potcdate.sin \
intl/*.* \
intl/ChangeLog \
intl/VERSION
#intltool
rm -rf \
intltool-*.in \
po/remove-potcdate.sed \
po/stamp-po
rm -rf \
pixmaps/flags/*.png

View File

@ -1,236 +0,0 @@
#
# Autoconf support for XQF
# Initially written by Markus Fischer <mfischer@josefine.ben.tuwien.ac.at>
#
AC_INIT([XQF],[1.0.6.2],[xqf-developer@lists.sourceforge.net], [xqf])
AC_CONFIG_SRCDIR([src/xqf.c])
AC_PREREQ(2.52)
AM_INIT_AUTOMAKE
dnl AM_CONFIG_HEADER(src/gnuconfig.h:src/gnuconfig.h.in)
AM_CONFIG_HEADER(src/gnuconfig.h)
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.40.0])
GETTEXT_PACKAGE=xqf
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext domain name.])
dnl Checks for programs.
AC_PROG_CC
AC_ISC_POSIX
AC_PROG_LN_S
AC_PROG_RANLIB
dnl Checks for header files.
AC_HEADER_STDC
#The Release stuff for the spec file.
RELEASE="1"
AC_ARG_WITH(rpm_release,[ --with-rpm-release=VAL RPM Release (e.g. 1mdk)])
if test "x$with_rpm_release" != "x" ; then
RELEASE="$with_rpm_release"
fi
AC_SUBST(RELEASE)
pkg_modules="gtk+-2.0 >= 2.0.0 gdk-pixbuf-xlib-2.0 x11"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
dnl check for qstat
AC_ARG_WITH(qstat,[ --with-qstat=CMD use CMD to run qstat])
AC_MSG_CHECKING(qstat version)
QSTATEXEC="qstat"
if test "x$with_qstat" != "x" ; then
QSTATEXEC="$with_qstat"
fi
qstat_version=`$QSTATEXEC 2>/dev/null | grep version | cut -d' ' -f 3`
if test "x$qstat_version" = "x" ; then
AC_MSG_RESULT(qstat not found)
qstat_is=notfound
else
AC_MSG_RESULT($qstat_version)
fi
AC_SUBST(QSTATEXEC)
AC_CHECK_HEADER(zlib.h,,[AC_MSG_ERROR([zlib.h not found, please install zlib development files])])
AC_CHECK_LIB(z, crc32,[AC_DEFINE([HAVE_LIBZ],[],[Whether libz is installed])],[AC_MSG_ERROR([libz not found])])
dnl determine if we should include readline support...
dnl ripped from physfs package
dnl AC_ARG_ENABLE(readline,
dnl AC_HELP_STRING([--enable-externalrcon],[compile external rcon program (default=yes)])
dnl , ,enable_rcon=yes)
XQFRCON_LIBS=
AC_ARG_ENABLE(externalrcon,[ --enable-externalrcon compile external rcon program (default=no)])
if test x$enable_externalrcon = xyes; then
AC_CHECK_HEADER(readline/readline.h, have_readline_hdr=yes)
AC_CHECK_LIB(readline, readline, have_readline_lib=yes)
AC_CHECK_HEADER(readline/history.h, have_history_hdr=yes)
AC_CHECK_LIB(readline, add_history, have_history_lib=yes)
if test x$have_readline_hdr = xyes -a x$have_readline_lib = xyes; then
if test x$have_history_hdr = xyes -a x$have_history_lib = xyes; then
XQFRCON_LIBS="-lreadline"
AC_SUBST(XQFRCON_LIBS)
else
AC_MSG_WARN([libreadline not found, rcon program disabled])
fi
else
AC_MSG_WARN([libreadline not found, rcon program disabled])
fi
fi
AM_CONDITIONAL(BUILD_XQFRCON, test "x$XQFRCON_LIBS" != x)
dnl determine whether GeoIP should be used
AC_CHECK_HEADER(GeoIP.h,have_geoip_hdr=yes,have_geoip_hdr=no)
AC_MSG_CHECKING([whether GeoIP should be used])
AC_ARG_ENABLE(geoip,[ --enable-geoip use GeoIP (default=auto)],USE_GEOIP=$enableval, USE_GEOIP=yes)
AC_MSG_RESULT([$USE_GEOIP])
# --enable-geoip-dummy=/usr/lib/libGeoIP.so
AC_MSG_CHECKING([whether a GeoIP dummy library should be used])
AC_ARG_ENABLE(geoip_dummy,
[ --enable-geoip-dummy=FILE use dummy GeoIP lib based on FILE (default=no)],
use_geoip_dummy="$enableval", use_geoip_dummy=no)
AC_MSG_RESULT([$use_geoip_dummy])
if test "x$USE_GEOIP" != "xno"; then
if test "x$have_geoip_hdr" = "xyes";then
AC_DEFINE_UNQUOTED(USE_GEOIP,1,Define if we should use GeoIP)
if test "x$USE_GEOIP" = "xyes"; then
if test "x$use_geoip_dummy" != "xno"; then
DUMMY_LIBGEOIP_SONAME=`objdump -p "$use_geoip_dummy"|awk '$1 == "SONAME" {print $2}'`
if test "x$DUMMY_LIBGEOIP_SONAME" != x; then
DUMMY_LIBGEOIP_ORIG="$use_geoip_dummy"
GEOIP_LIB='-L$(top_builddir)/src -lxqf_dummy_GeoIP'
AC_SUBST(DUMMY_LIBGEOIP_SONAME)
AC_SUBST(DUMMY_LIBGEOIP_ORIG)
else
AC_MSG_ERROR([$use_geoip_dummy is no valid GeoIP library])
fi
else
GEOIP_LIB="-lGeoIP"
fi
else
GEOIP_LIB="$USE_GEOIP"
fi
AC_SUBST(GEOIP_LIB)
else
AC_MSG_WARN([GeoIP.h not found, GeoIP feature disabled])
fi
fi
AM_CONDITIONAL(DUMMY_LIBGEOIP, test x$DUMMY_LIBGEOIP_SONAME != x)
# --enable-geoip-dummy=/usr/lib/libGeoIP.so
AC_MSG_CHECKING([whether a GDK-Pixbuf dummy library should be used])
AC_ARG_ENABLE(pixbuf_dummy,
[ --enable-pixbuf-dummy=FILE use dummy gdk-pixbuf lib based on FILE (default=no)],
use_pixbuf_dummy="$enableval", use_pixbuf_dummy=no)
AC_MSG_RESULT([$use_pixbuf_dummy])
if test "x$use_pixbuf_dummy" != "xno"; then
DUMMY_LIBGDKPIXBUF_SONAME=`objdump -p "$use_pixbuf_dummy"|awk '$1 == "SONAME" {print $2}'`
if test "x$DUMMY_LIBGDKPIXBUF_SONAME" != x; then
DUMMY_LIBGDKPIXBUF_ORIG="$use_pixbuf_dummy"
GDK_PIXBUF_LIBS='-L$(top_builddir)/src -lxqf_dummy_gdk_pixbuf'
AC_SUBST(DUMMY_LIBGDKPIXBUF_SONAME)
AC_SUBST(DUMMY_LIBGDKPIXBUF_ORIG)
else
AC_MSG_ERROR([$use_pixbuf_dummy is no valid library])
fi
AC_SUBST(GDK_PIXBUF_LIBS)
fi
AM_CONDITIONAL(DUMMY_LIBGDKPIXBUF, test x$DUMMY_LIBGDKPIXBUF_SONAME != x)
dnl check if user wants bzip2 compression instead of gzip
COMPRESSION="-DCOMPRESSOR_GZIP"
AC_ARG_ENABLE(bzip2,[ --enable-bzip2 use bzip2 for data compression])
if test x$enable_bzip2 = xyes; then
COMPRESSION="-DCOMPRESSOR_BZIP2"
fi
AC_SUBST(COMPRESSION)
dnl check if user wants debug
AC_ARG_ENABLE(debug,[ --enable-debug turn on debugging ])
if test x$enable_debug = xyes; then
DEBUG="-DDEBUG"
CFLAGS="-g -O0"
else
DEBUG=""
fi
AC_SUBST(DEBUG)
AC_SUBST(VERSION)
AC_SUBST(QSTATEXEC)
AC_DEFINE_UNQUOTED(XQF_VERSION, "$VERSION", XQF Version number)
AC_DEFINE_UNQUOTED(QSTAT_EXEC, "$QSTATEXEC", QSTAT executable path)
# workaround for intl/ which requires config.h
echo "configure: creating link config.h -> src/gnuconfig.h"
test -e config.h -a ! -L config.h && rm config.h
test ! -e config.h && ln -s src/gnuconfig.h config.h
rm -f intl/libintl.h
# damn gettext should do that itself!
if test "$USE_INCLUDED_LIBINTL" = "yes"; then
echo "configure: creating link intl/libintl.h -> libgnuintl.h"
ln -s libgnuintl.h intl/libintl.h
fi
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
AC_ARG_ENABLE(profiling,[ --enable-profiling compile with profiling (default=no)])
AC_MSG_CHECKING(whether profiling is requested)
if test x$enable_profiling = xyes; then
CFLAGS="$CFLAGS -pg"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
src/xpm/Makefile
src/zip/Makefile
src/tga/Makefile
docs/Makefile
pixmaps/Makefile
pixmaps/128x128/Makefile
pixmaps/22x22/Makefile
pixmaps/32x32/Makefile
pixmaps/48x48/Makefile
pixmaps/flags/Makefile
pixmaps/scalable/Makefile
po/Makefile.in
])
AC_OUTPUT
if test "x$qstat_is" = "xnotfound" ; then
AC_MSG_RESULT([
*** QStat is *required* to run XQF
*** Get it from http://qstat.org/
*** and put it in your path
])
fi

2
docs/.gitignore vendored
View File

@ -1,2 +0,0 @@
Makefile
Makefile.in

View File

@ -1 +0,0 @@
EXTRA_DIST = xqfdocs.html PreLaunch.example

2
pixmaps/.gitignore vendored
View File

@ -1,2 +0,0 @@
Makefile
Makefile.in

View File

@ -1,10 +0,0 @@
themedir = $(datadir)/icons/hicolor
size = 128x128
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
xqf.png
EXTRA_DIST = $(icons_DATA)

View File

@ -1,10 +0,0 @@
themedir = $(datadir)/icons/hicolor
size = 22x22
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
xqf.png
EXTRA_DIST = $(icons_DATA)

View File

@ -1,10 +0,0 @@
themedir = $(datadir)/icons/hicolor
size = 32x32
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
xqf.png
EXTRA_DIST = $(icons_DATA)

View File

@ -1,10 +0,0 @@
themedir = $(datadir)/icons/hicolor
size = 48x48
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
xqf.png
EXTRA_DIST = $(icons_DATA)

View File

@ -1,6 +0,0 @@
SUBDIRS = 128x128 22x22 32x32 48x48 flags scalable
desktopicondir = $(datadir)/pixmaps
desktopicon_DATA = xqf.xpm
EXTRA_DIST = $(pixmap_DATA) $(desktopicon_DATA)

View File

@ -1,3 +0,0 @@
Makefile
Makefile.in
??.png

View File

@ -1,4 +0,0 @@
EXTRA_DIST = $(flag_DATA)
flagdir = $(pkgdatadir)/default/flags
flag_DATA = $(wildcard $(srcdir)/*.png)

View File

@ -1,10 +0,0 @@
themedir = $(datadir)/icons/hicolor
size = scalable
context = apps
iconsdir = $(themedir)/$(size)/$(context)
icons_DATA = \
xqf.svg
EXTRA_DIST = $(icons_DATA)

14
po/.gitignore vendored
View File

@ -1,14 +0,0 @@
Makefile
Makefile.in
Makefile.in.in
POTFILES
*.gmo
messages
messages.mo
xqf.pot
*.header
*.sin
*.sed
Rules-quot
Makevars.template
.intltool-merge-cache

View File

@ -1,8 +0,0 @@
ca
da
de
es
fi
fr
pl
ru

View File

@ -1,222 +0,0 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
#
# This file may be copied and used freely without restrictions. It may
# be used in projects which are not available under a GNU Public License,
# but which still want to provide support for the GNU gettext functionality.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
DATADIRNAME = @DATADIRNAME@
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
ALL_LINGUAS = @ALL_LINGUAS@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
POTFILES = \
# This comment gets stripped out
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
.SUFFIXES:
.SUFFIXES: .po .pox .gmo .mo .msg .cat
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
.po.gmo:
$(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $(srcdir)/$$lang.gmo as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
if test -r $$lang.gmo.m; then \
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
if test -r $(srcdir)/$$lang.gmo.m ; then \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $(srcdir)/$$lang.gmo.m as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
# Empty stubs to satisfy archaic automake needs
dvi info ctags tags CTAGS TAGS ID:
# Define this as empty until I found a useful application.
install-exec installcheck:
uninstall:
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
check: all $(GETTEXT_PACKAGE).pot
rm -f missing notexist
srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
if [ -r missing -o -r notexist ]; then \
exit 1; \
fi
mostlyclean:
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES stamp-it
rm -f *.mo *.msg *.cat *.cat.m *.gmo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f Makefile.in.in
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
test -f $$file || file="$(srcdir)/$$file"; \
ln $$file $(distdir) 2> /dev/null \
|| cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.gmo failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
Makefile POTFILES: stamp-it
@if test ! -f $@; then \
rm -f stamp-it; \
$(MAKE) stamp-it; \
fi
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,41 +0,0 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = xqf
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = xqf-developer@lists.sourceforge.net
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =

View File

@ -1,39 +0,0 @@
# List of source files containing translatable strings.
xqf.desktop.in
# Package source files
src/addmaster.c
src/addserver.c
#src/config.c
#src/debug.c
src/dialogs.c
#src/dns.c
src/filter.c
src/flt-player.c
src/game.c
#src/history.c
#src/host.c
src/launch.c
#src/menus.c
#src/pixmaps.c
src/pref.c
src/psearch.c
#src/rc.c
src/rcon.c
src/redial.c
#src/server.c
#src/skin.c
#src/skin_pcx.c
#src/sort.c
src/source.c
#src/srv-info.c
#src/srv-list.c
src/srv-prop.c
src/stat.c
src/statistics.c
src/utils.c
src/xqf-ui.c
src/xqf.c
#src/zipped.c
src/country-filter.c
src/loadpixmap.c

12
src/.gitignore vendored
View File

@ -1,12 +0,0 @@
gnuconfig.h
gnuconfig.h.in
Makefile
Makefile.in
stamp-h.in
stamp-h
stamp-h1
.libs
.deps
xqf
xqf-rcon
test_utils

View File

@ -1,206 +0,0 @@
SUBDIRS = xpm zip tga
localedir = $(datadir)/locale
AM_CPPFLAGS = -I$(top_srcdir)/intl \
-DLOCALEDIR=\"$(localedir)\" \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPIXMAPSDIR=\"$(datadir)/pixmaps\" \
$(GTK_CFLAGS) \
$(QSTAT23) \
$(DEBUG) \
$(COMPRESSION) \
$(GDK_PIXBUF_CFLAGS) \
$(PACKAGE_CFLAGS)
qstatcfgdir = $(pkgdatadir)
qstatcfg_DATA = qstat.cfg
uidir = $(pkgdatadir)/ui
ui_DATA = \
xqf.ui
qstatsavagedir = $(pkgdatadir)
qstatsavage_DATA = qstat_savage.sh
EXTRA_DIST = \
games.xml \
games.c \
qstat.cfg \
qstat_savage.sh \
xqf.map \
$(noinst_SCRIPTS)
bin_PROGRAMS = xqf
if BUILD_XQFRCON
bin_PROGRAMS += xqf-rcon
endif
EXTRA_PROGRAMS = gamesxml2c
xqf_LDADD = $(INTLLIBS) \
$(top_builddir)/src/zip/libunzip.a \
$(top_builddir)/src/tga/libtga.a \
$(GTK_LIBS) \
$(GEOIP_LIB) \
$(PACKAGE_LIBS) \
$(GDK_PIXBUF_LIBS) \
-lz -ldl
xqf_LDFLAGS = -Wl,-rpath,$(pkglibdir) -Wl,--export-dynamic -Wl,--version-script=$(top_srcdir)/src/xqf.map
xqf_CFLAGS = -DQSTAT_SAVAGE_SCRIPT=\"$(qstatsavagedir)/$(qstatsavage_DATA)\"
# we need to specify all deps manually due to dummy libs
xqf_DEPENDENCIES = \
$(top_builddir)/src/zip/libunzip.a \
$(top_builddir)/src/tga/libtga.a
xqf_rcon_LDADD = @INTLLIBS@ $(GLIB_LIBS) $(XQFRCON_LIBS) @PACKAGE_LIBS@
xqf_rcon_SOURCES = \
rcon.c rcon.h \
debug.c debug.h \
utils.c utils.h
xqf_rcon_CFLAGS = -DRCON_STANDALONE $(GLIB_CFLAGS)
xqf_SOURCES = \
addmaster.c \
addserver.c \
config.c \
country-filter.c \
debug.c \
dialogs.c \
dns.c \
filter.c \
flt-player.c \
game.c \
history.c \
host.c \
launch.c \
menus.c \
pixmaps.c \
pref.c \
psearch.c \
rc.c \
rcon.c \
server.c \
skin.c \
skin_pcx.c \
sort.c \
source.c \
srv-info.c \
srv-list.c \
srv-prop.c \
stat.c \
statistics.c \
utils.c \
xqf.c \
xqf-ui.c \
zipped.c \
redial.c \
q3maps.c \
utmaps.c \
loadpixmap.c \
scripts.c \
addmaster.h \
addserver.h \
config.h \
country-filter.h \
debug.h \
dialogs.h \
dns.h \
filter.h \
flt-player.h \
game.h \
history.h \
host.h \
launch.h \
menus.h \
pixmaps.h \
pref.h \
psearch.h \
quake2_pal.h \
quake_pal.h \
rc.h \
rcon.h \
server.h \
skin.h \
skin_pcx.h \
sort.h \
source.h \
srv-info.h \
srv-list.h \
srv-prop.h \
stat.h \
statistics.h \
utils.h \
xqf-ui.h \
xqf.h \
zipped.h \
redial.h \
q3maps.h \
utmaps.h \
loadpixmap.h \
scripts.h
noinst_SCRIPTS = gensyms.pl
noinst_PROGRAMS = test_utils
test_utils_SOURCES = test_utils.c \
utils.c utils.h \
debug.c debug.h
test_utils_LDADD = $(xqf_LDADD)
# it's only temporary, so ...
gamesxml2c_LDFLAGS = -lxml2
gamesxml2c_LDADD = -lxml2
gamesxml2c_CFLAGS = $(shell xml2-config --cflags)
gamesxml2c_SOURCES = \
gamesxml2c.c
pkglibexec_PROGRAMS =
if DUMMY_LIBGEOIP
pkglibexec_PROGRAMS += libxqf_dummy_GeoIP.so.0
xqf_DEPENDENCIES += libxqf_dummy_GeoIP.so
endif
if DUMMY_LIBGDKPIXBUF
pkglibexec_PROGRAMS += libxqf_dummy_gdk_pixbuf.so.0
xqf_DEPENDENCIES += libxqf_dummy_gdk_pixbuf.so
endif
libxqf_dummy_gdk_pixbuf.c:
$(top_srcdir)/src/gensyms.pl -x gdk_pixbuf_new_from_file,gdk_pixbuf_render_pixmap_and_mask,gdk_pixbuf_unref $(DUMMY_LIBGDKPIXBUF_ORIG) -o $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c || rm $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c
test -s $(top_srcdir)/src/libxqf_dummy_gdk_pixbuf.c
nodist_libxqf_dummy_gdk_pixbuf_so_0_SOURCES = libxqf_dummy_gdk_pixbuf.c
libxqf_dummy_gdk_pixbuf_so_0_SOURCES = libxqf_dummy_gdk_pixbuf_stubs.c
libxqf_dummy_gdk_pixbuf_so_0_LDFLAGS = -nostdlib -shared -Wl,-f,$(DUMMY_LIBGDKPIXBUF_SONAME) -Wl,-soname,libxqf_dummy_gdk_pixbuf.so.0
libxqf_dummy_gdk_pixbuf_so_0_CFLAGS = -fPIC -DPIC
libxqf_dummy_gdk_pixbuf.so: libxqf_dummy_gdk_pixbuf.so.0
rm -f $@
$(LN_S) $< $@
libxqf_dummy_GeoIP.c:
$(top_srcdir)/src/gensyms.pl -x GeoIP_new,GeoIP_open $(DUMMY_LIBGEOIP_ORIG) -o $(top_srcdir)/src/libxqf_dummy_GeoIP.c || rm $(top_srcdir)/src/libxqf_dummy_GeoIP.c
test -s $(top_srcdir)/src/libxqf_dummy_GeoIP.c
nodist_libxqf_dummy_GeoIP_so_0_SOURCES = libxqf_dummy_GeoIP.c
libxqf_dummy_GeoIP_so_0_SOURCES = libxqf_dummy_GeoIP_stubs.c
libxqf_dummy_GeoIP_so_0_LDFLAGS = -nostdlib -shared -Wl,-f,$(DUMMY_LIBGEOIP_SONAME) -Wl,-soname,libxqf_dummy_GeoIP.so.0
libxqf_dummy_GeoIP_so_0_CFLAGS = -fPIC -DPIC
libxqf_dummy_GeoIP.so: libxqf_dummy_GeoIP.so.0
rm -f $@
$(LN_S) $< $@
CLEANFILES = \
$(nodist_libxqf_dummy_gdk_pixbuf_so_0_SOURCES) \
$(nodist_libxqf_dummy_GeoIP_so_0_SOURCES) \
libxqf_dummy_GeoIP.so \
libxqf_dummy_gdk_pixbuf.so
gamelist: gamesxml2c
$(top_builddir)/src/gamesxml2c $(top_srcdir)/src/games.xml > $(top_srcdir)/src/games.c
.PHONY: gamelist

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <string.h> /* strlen, strstr, strcpy */

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <glib.h>
#include <glib/gi18n.h>

View File

@ -15,7 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#ifdef USE_GEOIP

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdarg.h> /* va_start, va_end */

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h>

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <regex.h>

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h> /* FILE, fprintf, fopen, fclose */
#include <string.h> /* strlen, strcpy, strcmp, strtok */
@ -185,7 +183,7 @@ static struct quake_private zeq2lite_private;
static struct quake_private turtlearena_private;
static struct quake_private alienarena_private;
#include "games.c"
#include GAMES_INCLUDE
struct gsname2type_s
{

File diff suppressed because it is too large Load Diff

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h> /* chmod, waitpid, kill */
#include <string.h> /* memchr, strlen */
#include <unistd.h> /* execvp, fork, _exit, chdir, read, close, write, fcntl, sleep */
@ -409,4 +407,3 @@ void condef_free (struct condef *con) {
g_free (con);
}

View File

@ -1,28 +0,0 @@
/* XQF - Quake server browser and launcher
* Dummy functions for GeoIP
* Copyright (C) 2005 Ludwig Nussel <l-n@users.sourceforge.net>
*
* 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
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include <GeoIP.h>
GEOIP_API GeoIP* GeoIP_new(int flags) {
return 0;
}
GEOIP_API GeoIP* GeoIP_open(const char * filename, int flags) {
return 0;
}

View File

@ -1,36 +0,0 @@
/* XQF - Quake server browser and launcher
* Dummy functions for gdk pixbuf
* Copyright (C) 2005 Ludwig Nussel <l-n@users.sourceforge.net>
*
* 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
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include <stddef.h>
unsigned int gdk_pixbuf_major_version;
unsigned int gdk_pixbuf_minor_version;
void *gdk_pixbuf_new_from_file (const char *filename) {
return NULL;
}
void gdk_pixbuf_render_pixmap_and_mask(void *pixbuf,
void **pixmap_return, void **mask_return,
int alpha_threshold) {
*pixmap_return = NULL;
*mask_return = NULL;
}
void gdk_pixbuf_unref(void *p) {};

View File

@ -19,8 +19,6 @@
// modified version of what glade generates
#include "gnuconfig.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h>
@ -172,4 +170,3 @@ GtkWidget *create_menubar (const struct menuitem *items,
return menubar;
}

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <gtk/gtk.h>
#include "utils.h"
@ -605,4 +603,3 @@ void pixmap_cache_clear (GSList **cache, int maxitems) {
g_slist_free (tmp);
}
}

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h> /* FD_SETSIZE */
#include <stdio.h> /* fprintf */
#include <stdlib.h> /* strtol */

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <regex.h>
#include <string.h> /* strcmp */
@ -403,4 +401,3 @@ void find_player (int find_next) {
reset_main_status_bar();
}
}

View File

@ -17,8 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -28,10 +26,10 @@
#include <fcntl.h>
#include <glib.h>
#include <unzip.h>
#include "debug.h"
#include "utils.h"
#include "zip/unzip.h"
#include "q3maps.h"

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h> /* socket, send, bind, connect */
#include <stdio.h> /* fprintf */
#include <stdarg.h> /* va_start, va_end */
@ -32,9 +30,7 @@
#include <sys/time.h> // select
#ifdef RCON_STANDALONE
# ifdef ENABLE_NLS
# include <locale.h>
# endif
#include <locale.h>
#include <stdlib.h>
#include <readline/readline.h>
#include <readline/history.h>
@ -356,7 +352,7 @@ static char* rcon_receive() {
/* Q2, Q3 */
default:
default:
// "\377\377\377\377print\n"
msg = packet + 4 + 6;
size = size - 4 - 6;
@ -652,11 +648,9 @@ int main(int argc, char* argv[]) {
char* buf = NULL;
int res;
#ifdef ENABLE_NLS
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
#endif
rcon_servertype = Q3_SERVER;

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <string.h> /* strlen, strstr, strcpy */

View File

@ -17,8 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
@ -134,7 +132,7 @@ static enum script_option_type scriptoption_get_type(const char* str) {
if (!strcmp(str, "list")) {
return SCRIPT_OPTION_TYPE_LIST;
}
return SCRIPT_OPTION_TYPE_INVALID;
}

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h> /* strtol */

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <sys/socket.h> /* inet_ntoa */
#include <netinet/in.h> /* inet_ntoa */

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h> /* chmod */
#include <stdio.h> /* FILE, fprintf, etc... */
#include <string.h> /* strchr, strcmp */

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h> /* kill */
#include <stdio.h> /* FILE, fopen, fclose, fprintf, ... */
#include <string.h> /* strchr, strcmp, strlen, strcpy, memchr, strtok */
@ -302,7 +300,7 @@ static gboolean stat_master_input_callback (GIOChannel *chan, GIOCondition condi
}
strncpy(conn->buf + (conn->bufsize - res), buf, res);
if (status == G_IO_STATUS_EOF) {
debug(3, "stat_master_input_callback -- eof");
debug(6, "conn->buf: [%d]", buf);
@ -813,7 +811,7 @@ static gboolean stat_servers_input_callback (GIOChannel *chan, GIOCondition cond
debug(3, "stat_servers_input_callback -- eof");
debug(6, "conn->buf: [%d]", buf);
debug(3, "Conn %ld Sub Process Done with server list %lx", conn, conn->job->servers);
strings = stat_buffer_to_strings(conn->buf, conn->bufsize);
current = strings;
@ -832,7 +830,7 @@ static gboolean stat_servers_input_callback (GIOChannel *chan, GIOCondition cond
current = current->next;
}
g_slist_free(strings);
stat_servers_update_done (conn);
stat_next (job);
g_free(buf);
@ -1065,7 +1063,7 @@ static struct stat_conn *stat_update_master_qstat (struct stat_job *job, struct
if (m->type == SAS_SERVER) {
argv[argi++] = "sh";
argv[argi++] = QSTAT_SAVAGE_SCRIPT;
argv[argi++] = m->url;
argv[argi++] = m->url;
}
else if (m->master_type == MASTER_GSLIST) {
int ret = 0;
@ -2024,4 +2022,3 @@ void stat_job_free (struct stat_job *job) {
g_free (job);
}

View File

@ -28,9 +28,12 @@
#ifndef HTTP_HELPER
# define HTTP_HELPER "wget -t 1 -T 20 -q -e robots=off --user-agent=XQF/" VERSION " -O -"
# define HTTP_HELPER "wget -t 1 -T 20 -q -e robots=off --user-agent=XQF/" XQF_VERSION " -O -"
#endif
#ifndef QSTAT_SAVAGE_SCRIPT
#define QSTAT_SAVAGE_SCRIPT "qstat_savage.sh"
#endif
#define QSTAT_DELIM '\t'
#define QSTAT_DELIM_STR "\t"
@ -137,4 +140,3 @@ extern void stat_job_free (struct stat_job *job);
#endif /* __QSTAT_H__ */

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

3
src/tga/.gitignore vendored
View File

@ -1,3 +0,0 @@
Makefile
Makefile.in
.deps

View File

@ -1,21 +0,0 @@
AM_CPPFLAGS = -I$(top_srcdir)/intl \
-I$(top_srcdir)/src \
-DLOCALEDIR=\"$(localedir)\" \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
-DPIXMAPSDIR=\"$(datadir)/pixmaps\" \
$(GTK_CFLAGS) \
$(QSTAT23) \
$(DEBUG) \
$(COMPRESSION) \
$(GDK_PIXBUF_CFLAGS) \
$(PACKAGE_CFLAGS) \
$(OLD_GTK_SUPPORT)
libtga_a_SOURCES=memtopixmap.c memtopixmap.h tga.c tga.h
noinst_LIBRARIES=libtga.a
EXTRA_PROGRAMS=memtopixmap
memtopixmap_CFLAGS = -DSTANDALONE $(INCLUDES)
memtopixmap_SOURCES = $(libtga_a_SOURCES)
memtopixmap_LDADD = @INTLLIBS@ $(GTK_LIBS) $(GDK_PIXBUF_LIBS) @PACKAGE_LIBS@

View File

@ -17,8 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <stdio.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h> /* getpwnam, readdir, dirent */
#include <stdio.h> /* FILE, putc */
#include <string.h> /* strlen, strncpy, strcmp, strspn, strcspn, strchr */

View File

@ -17,8 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>

2
src/xpm/.gitignore vendored
View File

@ -1,2 +0,0 @@
Makefile
Makefile.in

View File

@ -1,16 +0,0 @@
EXTRA_DIST=$(wildcard *.xpm) $(flag_DATA)
flagdir = $(pkgdatadir)/default/flags
flag_DATA = lan.png
xpmdir = $(pkgdatadir)/xpm
xpm_DATA = \
update.xpm \
refresh.xpm \
refrsel.xpm \
stop.xpm \
connect.xpm \
observe.xpm \
record.xpm \
sfilter.xpm \
pfilter.xpm

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdarg.h> /* va_start, va_end */

View File

@ -16,8 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#include "gnuconfig.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h> /* atoi */
@ -37,10 +35,7 @@
#include <signal.h> /* kill... */
#include <sys/wait.h>
#ifdef ENABLE_NLS
# include <locale.h>
#endif
#include <locale.h>
#include <glib.h>
#include <glib/gi18n.h>
@ -4124,12 +4119,10 @@ int main (int argc, char *argv[]) {
xqf_LOCALEDIR = var;
}
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, xqf_LOCALEDIR);
bind_textdomain_codeset (PACKAGE, "UTF-8");
textdomain (PACKAGE);
#endif
set_debug_level (DEFAULT_DEBUG_LEVEL);
debug (5, "main() -- Debug Level Default Set at %d", DEFAULT_DEBUG_LEVEL);

View File

@ -19,8 +19,6 @@
#ifndef __XQF_H__
#define __XQF_H__
#include "gnuconfig.h" /* GNU autoconf */
#include <sys/types.h>
#include <netinet/in.h> /* struct in_addr */
#include <arpa/inet.h> /* struct in_addr */

3
src/zip/.gitignore vendored
View File

@ -1,3 +0,0 @@
.deps
Makefile
Makefile.in

View File

@ -1,2 +0,0 @@
libunzip_a_SOURCES=unzip.c ioapi.c unzip.h ioapi.h
noinst_LIBRARIES=libunzip.a

View File

@ -1,5 +0,0 @@
ioapi.c, ioapi.h, unzip.c and unzip.h are taken from
http://www.winimage.com/zLibDll/unzip.htm
see unzip.h for details

View File

@ -1,177 +0,0 @@
/* ioapi.c -- IO base function header for compress/uncompress .zip
files using zlib + zip or unzip API
Version 0.21, March 10th, 2003
Copyright (C) 1998-2003 Gilles Vollant
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zlib.h"
#include "ioapi.h"
/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
voidpf ZCALLBACK fopen_file_func OF((
voidpf opaque,
const char* filename,
int mode));
uLong ZCALLBACK fread_file_func OF((
voidpf opaque,
voidpf stream,
void* buf,
uLong size));
uLong ZCALLBACK fwrite_file_func OF((
voidpf opaque,
voidpf stream,
const void* buf,
uLong size));
long ZCALLBACK ftell_file_func OF((
voidpf opaque,
voidpf stream));
long ZCALLBACK fseek_file_func OF((
voidpf opaque,
voidpf stream,
uLong offset,
int origin));
int ZCALLBACK fclose_file_func OF((
voidpf opaque,
voidpf stream));
int ZCALLBACK ferror_file_func OF((
voidpf opaque,
voidpf stream));
voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
voidpf opaque;
const char* filename;
int mode;
{
FILE* file = NULL;
const char* mode_fopen = NULL;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
mode_fopen = "r+b";
else
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
mode_fopen = "wb";
if ((filename!=NULL) && (mode_fopen != NULL))
file = fopen(filename, mode_fopen);
return file;
}
uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
voidpf opaque;
voidpf stream;
void* buf;
uLong size;
{
uLong ret;
ret = fread(buf, 1, size, (FILE *)stream);
return ret;
}
uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
voidpf opaque;
voidpf stream;
const void* buf;
uLong size;
{
uLong ret;
ret = fwrite(buf, 1, size, (FILE *)stream);
return ret;
}
long ZCALLBACK ftell_file_func (opaque, stream)
voidpf opaque;
voidpf stream;
{
long ret;
ret = ftell((FILE *)stream);
return ret;
}
long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
voidpf opaque;
voidpf stream;
uLong offset;
int origin;
{
int fseek_origin=0;
long ret;
switch (origin)
{
case ZLIB_FILEFUNC_SEEK_CUR :
fseek_origin = SEEK_CUR;
break;
case ZLIB_FILEFUNC_SEEK_END :
fseek_origin = SEEK_END;
break;
case ZLIB_FILEFUNC_SEEK_SET :
fseek_origin = SEEK_SET;
break;
default: return -1;
}
ret = 0;
fseek((FILE *)stream, offset, fseek_origin);
return ret;
}
int ZCALLBACK fclose_file_func (opaque, stream)
voidpf opaque;
voidpf stream;
{
int ret;
ret = fclose((FILE *)stream);
return ret;
}
int ZCALLBACK ferror_file_func (opaque, stream)
voidpf opaque;
voidpf stream;
{
int ret;
ret = ferror((FILE *)stream);
return ret;
}
void fill_fopen_filefunc (pzlib_filefunc_def)
zlib_filefunc_def* pzlib_filefunc_def;
{
pzlib_filefunc_def->zopen_file = fopen_file_func;
pzlib_filefunc_def->zread_file = fread_file_func;
pzlib_filefunc_def->zwrite_file = fwrite_file_func;
pzlib_filefunc_def->ztell_file = ftell_file_func;
pzlib_filefunc_def->zseek_file = fseek_file_func;
pzlib_filefunc_def->zclose_file = fclose_file_func;
pzlib_filefunc_def->zerror_file = ferror_file_func;
pzlib_filefunc_def->opaque = NULL;
}

View File

@ -1,79 +0,0 @@
/* ioapi.h -- IO base function header for compress/uncompress .zip
files using zlib + zip or unzip API
Version 0.21, March 10th, 2003
Copyright (C) 1998-2003 Gilles Vollant
*/
#ifndef _ZLIBIOAPI_H
#define _ZLIBIOAPI_H
#define ZLIB_FILEFUNC_SEEK_CUR (1)
#define ZLIB_FILEFUNC_SEEK_END (2)
#define ZLIB_FILEFUNC_SEEK_SET (0)
#define ZLIB_FILEFUNC_MODE_READ (1)
#define ZLIB_FILEFUNC_MODE_WRITE (2)
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
#define ZLIB_FILEFUNC_MODE_EXISTING (4)
#define ZLIB_FILEFUNC_MODE_CREATE (8)
#ifndef ZCALLBACK
#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK)
#define ZCALLBACK CALLBACK
#else
#define ZCALLBACK
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef OF
#define OF(args) args
#endif
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
typedef struct zlib_filefunc_def_s
{
open_file_func zopen_file;
read_file_func zread_file;
write_file_func zwrite_file;
tell_file_func ztell_file;
seek_file_func zseek_file;
close_file_func zclose_file;
testerror_file_func zerror_file;
voidpf opaque;
} zlib_filefunc_def;
void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,323 +0,0 @@
/* unzip.h -- IO for uncompress .zip files using zlib
Version 0.21, March 10th, 2003
Copyright (C) 1998-2003 Gilles Vollant
This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
WinZip, InfoZip tools and compatible.
Encryption and multi volume ZipFile (span) are not supported.
Old compressions used by old PKZip 1.x are not supported
I WAIT FEEDBACK at mail info@winimage.com
Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
Condition of use and distribution are the same than zlib :
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/* for more info about .ZIP format, see
http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
http://www.info-zip.org/pub/infozip/doc/
PkWare has also a specification at :
ftp://ftp.pkware.com/probdesc.zip
*/
#ifndef _unz_H
#define _unz_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ZLIB_H
#include "zlib.h"
#endif
#ifndef _ZLIBIOAPI_H
#include "ioapi.h"
#endif
//khorben
#ifndef ZEXPORT
#define ZEXPORT
#endif
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
/* like the STRICT of WIN32, we define a pointer that cannot be converted
from (void*) without cast */
typedef struct TagunzFile__ { int unused; } unzFile__;
typedef unzFile__ *unzFile;
#else
typedef voidp unzFile;
#endif
#define UNZ_OK (0)
#define UNZ_END_OF_LIST_OF_FILE (-100)
#define UNZ_ERRNO (Z_ERRNO)
#define UNZ_EOF (0)
#define UNZ_PARAMERROR (-102)
#define UNZ_BADZIPFILE (-103)
#define UNZ_INTERNALERROR (-104)
#define UNZ_CRCERROR (-105)
/* tm_unz contain date/time info */
typedef struct tm_unz_s
{
uInt tm_sec; /* seconds after the minute - [0,59] */
uInt tm_min; /* minutes after the hour - [0,59] */
uInt tm_hour; /* hours since midnight - [0,23] */
uInt tm_mday; /* day of the month - [1,31] */
uInt tm_mon; /* months since January - [0,11] */
uInt tm_year; /* years - [1980..2044] */
} tm_unz;
/* unz_global_info structure contain global data about the ZIPfile
These data comes from the end of central dir */
typedef struct unz_global_info_s
{
uLong number_entry; /* total number of entries in
the central dir on this disk */
uLong size_comment; /* size of the global comment of the zipfile */
} unz_global_info;
/* unz_file_info contain information about a file in the zipfile */
typedef struct unz_file_info_s
{
uLong version; /* version made by 2 bytes */
uLong version_needed; /* version needed to extract 2 bytes */
uLong flag; /* general purpose bit flag 2 bytes */
uLong compression_method; /* compression method 2 bytes */
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
uLong crc; /* crc-32 4 bytes */
uLong compressed_size; /* compressed size 4 bytes */
uLong uncompressed_size; /* uncompressed size 4 bytes */
uLong size_filename; /* filename length 2 bytes */
uLong size_file_extra; /* extra field length 2 bytes */
uLong size_file_comment; /* file comment length 2 bytes */
uLong disk_num_start; /* disk number start 2 bytes */
uLong internal_fa; /* internal file attributes 2 bytes */
uLong external_fa; /* external file attributes 4 bytes */
tm_unz tmu_date;
} unz_file_info;
extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
const char* fileName2,
int iCaseSensitivity));
/*
Compare two filename (fileName1,fileName2).
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
or strcasecmp)
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
(like 1 on Unix, 2 on Windows)
*/
extern unzFile ZEXPORT unzOpen OF((const char *path));
/*
Open a Zip file. path contain the full pathname (by example,
on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
"zlib/zlib113.zip".
If the zipfile cannot be opened (file don't exist or in not valid), the
return value is NULL.
Else, the return value is a unzFile Handle, usable with other function
of this unzip package.
*/
extern unzFile ZEXPORT unzOpen2 OF((const char *path,
zlib_filefunc_def* pzlib_filefunc_def));
/*
Open a Zip file, like unzOpen, but provide a set of file low level API
for read/write the zip file (see ioapi.h)
*/
extern int ZEXPORT unzClose OF((unzFile file));
/*
Close a ZipFile opened with unzipOpen.
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
return UNZ_OK if there is no problem. */
extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
unz_global_info *pglobal_info));
/*
Write info about the ZipFile in the *pglobal_info structure.
No preparation of the structure is needed
return UNZ_OK if there is no problem. */
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
char *szComment,
uLong uSizeBuf));
/*
Get the global comment string of the ZipFile, in the szComment buffer.
uSizeBuf is the size of the szComment buffer.
return the number of byte copied or an error code <0
*/
/***************************************************************************/
/* Unzip package allow you browse the directory of the zipfile */
extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
/*
Set the current file of the zipfile to the first file.
return UNZ_OK if there is no problem
*/
extern int ZEXPORT unzGoToNextFile OF((unzFile file));
/*
Set the current file of the zipfile to the next file.
return UNZ_OK if there is no problem
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
*/
extern int ZEXPORT unzLocateFile OF((unzFile file,
const char *szFileName,
int iCaseSensitivity));
/*
Try locate the file szFileName in the zipfile.
For the iCaseSensitivity signification, see unzStringFileNameCompare
return value :
UNZ_OK if the file is found. It becomes the current file.
UNZ_END_OF_LIST_OF_FILE if the file is not found
*/
/* ****************************************** */
/* Ryan supplied functions */
/* unz_file_info contain information about a file in the zipfile */
typedef struct unz_file_pos_s
{
uLong pos_in_zip_directory; /* offset in zip file directory */
uLong num_of_file; /* # of file */
} unz_file_pos;
extern int ZEXPORT unzGetFilePos(
unzFile file,
unz_file_pos* file_pos);
extern int ZEXPORT unzGoToFilePos(
unzFile file,
unz_file_pos* file_pos);
/* ****************************************** */
extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
unz_file_info *pfile_info,
char *szFileName,
uLong fileNameBufferSize,
void *extraField,
uLong extraFieldBufferSize,
char *szComment,
uLong commentBufferSize));
/*
Get Info about the current file
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
the current file
if szFileName!=NULL, the filemane string will be copied in szFileName
(fileNameBufferSize is the size of the buffer)
if extraField!=NULL, the extra field information will be copied in extraField
(extraFieldBufferSize is the size of the buffer).
This is the Central-header version of the extra field
if szComment!=NULL, the comment string of the file will be copied in szComment
(commentBufferSize is the size of the buffer)
*/
/***************************************************************************/
/* for reading the content of the current zipfile, you can open it, read data
from it, and close it (you can close it before reading all the file)
*/
extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
/*
Open for reading data the current file in the zipfile.
If there is no error, the return value is UNZ_OK.
*/
extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
int* method,
int* level,
int raw));
/*
Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
*method will receive method of compression, *level will receive level of
compression
note : you can set level parameter as NULL (if you did not want known level,
but you CANNOT set method parameter as NULL
*/
extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
/*
Close the file in zip opened with unzOpenCurrentFile
Return UNZ_CRCERROR if all the file was read but the CRC is not good
*/
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
voidp buf,
unsigned len));
/*
Read bytes from the current file (opened by unzOpenCurrentFile)
buf contain buffer where data must be copied
len the size of buf.
return the number of byte copied if somes bytes are copied
return 0 if the end of file was reached
return <0 with error code if there is an error
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
extern z_off_t ZEXPORT unztell OF((unzFile file));
/*
Give the current position in uncompressed data
*/
extern int ZEXPORT unzeof OF((unzFile file));
/*
return 1 if the end of file was reached, 0 elsewhere
*/
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
voidp buf,
unsigned len));
/*
Read extra field from the current file (opened by unzOpenCurrentFile)
This is the local-header version of the extra field (sometimes, there is
more info in the local-header version than in the central-header)
if buf==NULL, it return the size of the local extra field
if buf!=NULL, len is the size of the buffer, the extra header is copied in
buf.
the return value is the number of bytes copied in buf, or (if <0)
the error code
*/
#ifdef __cplusplus
}
#endif
#endif /* _unz_H */

View File

@ -33,20 +33,15 @@ struct compr {
};
#ifdef COMPRESSOR_BZIP2
# define COMPRESSOR_DEFAULT 1
#ifdef USE_GZIP
# define COMPRESSOR_DEFAULT 1 /* gzip */
#else
# ifdef COMPRESSOR_GZIP
# define COMPRESSOR_DEFAULT 2
# else
# define COMPRESSOR_DEFAULT 0 /* None */
# endif
# define COMPRESSOR_DEFAULT 0 /* none */
#endif
static struct compr compressor[] = {
{ "", NULL, NULL },
{ ".bz2", "bzip2 -1", "bzip2 -d -c" },
{ ".gz", "gzip -1", "gzip -d -c" },
{ NULL, NULL, NULL }
};
@ -141,4 +136,3 @@ void zstream_unlink (const char *name) {
g_free (fn);
}
}

View File

@ -1,10 +1,10 @@
[Desktop Entry]
_Name=XQF Game Server Browser
_GenericName=Game Server Browser
_Comment=Locate and connect to game servers
Name=XQF Game Server Browser
GenericName=Game Server Browser
Comment=Locate and connect to game servers
Exec=xqf
Icon=xqf
StartupNotify=true
Terminal=false
Type=Application
Categories=GTK;Game;ActionGame;X-SuSE-Core-Game;
Categories=GTK;Game;ActionGame;