From 25076e8a0f932edf200f0b30cfb014ce94af4cb7 Mon Sep 17 00:00:00 2001 From: Stefan Gehn Date: Sun, 27 Dec 2009 11:48:30 +0000 Subject: [PATCH] - Merge in missing changes from gkrellm-2.3.3 release - Revert gkrellm version header change, there are too many places in code/docs containing the version number, one more or less will not hurt - configure: Make configure shell script write configure.mk and move logic for compiler and linker flags into configure - configure: Also search openssl and libntlm via pkg-config and fall back to hardcoded library names for linking if not found - Makefile: Workaround environment-bugs in win32 toolchain by switching from "override CC" to a normal makefile rule for building .o from .c files --- server/Makefile | 11 ++++--- server/gkrellmd-version.h | 35 --------------------- server/gkrellmd.h | 14 ++++++++- server/win32-libgkrellmd.c | 2 +- server/win32-plugin.c | 2 +- server/win32-plugin.h | 4 +-- server/win32-resource.rc | 13 +++----- src/Makefile | 47 ++++++++++------------------ src/configure | 64 +++++++++++++++++++++++++++----------- src/gkrellm-public-proto.h | 2 +- src/gkrellm-version.h | 47 ---------------------------- src/gkrellm.h | 18 +++++++++-- src/sysdeps/win32.c | 4 +-- src/win32-libgkrellm.c | 2 +- src/win32-resource.rc | 13 +++----- 15 files changed, 113 insertions(+), 165 deletions(-) delete mode 100644 server/gkrellmd-version.h delete mode 100644 src/gkrellm-version.h diff --git a/server/Makefile b/server/Makefile index dbb55df..240b01d 100644 --- a/server/Makefile +++ b/server/Makefile @@ -51,7 +51,7 @@ endif CC ?= gcc STRIP ?= -s -GKRELLMD_INCLUDES = gkrellmd.h gkrellmd-version.h $(SHARED_PATH)/log.h +GKRELLMD_INCLUDES = gkrellmd.h $(SHARED_PATH)/log.h PKG_INCLUDE = `$(PKG_CONFIG) --cflags glib-2.0 gthread-2.0` PKG_LIB = `$(PKG_CONFIG) --libs glib-2.0 gmodule-2.0 gthread-2.0` @@ -107,8 +107,6 @@ ifeq ($(HAVE_GETADDRINFO),1) FLAGS += -DHAVE_GETADDRINFO endif -override CC += -Wall $(FLAGS) - OS_NAME=$(shell uname -s) OS_RELEASE=$(shell uname -r) @@ -234,7 +232,7 @@ SYSDEPS = ../src/sysdeps/bsd-common.c ../src/sysdeps/bsd-net-open.c \ ../src/sysdeps/openbsd.c ../src/sysdeps/sensors-common.c \ ../src/sysdeps/solaris.c ../src/sysdeps/win32.c -GKRELLMD_H = gkrellmd.h gkrellmd-version.h gkrellmd-private.h +GKRELLMD_H = gkrellmd.h gkrellmd-private.h main.o: main.c $(GKRELLMD_H) monitor.o: monitor.c $(GKRELLMD_H) @@ -247,7 +245,10 @@ log.o: $(SHARED_PATH)/log.c $(SHARED_PATH)/log.h $(GKRELLMD_H) win32-gui.o: win32-gui.c win32-plugin.o: win32-plugin.c win32-plugin.h $(GKRELLMD_H) win32-resource.o: win32-resource.rc win32-resource.h - windres -v -I.. -o win32-resource.o win32-resource.rc + windres -I.. -o win32-resource.o win32-resource.rc win32-libgkrellmd.o: win32-libgkrellmd.c win32-plugin.h $(GKRELLMD_H) libgkrellmd.a: win32-libgkrellmd.o ar -cr libgkrellmd.a win32-libgkrellmd.o + +%.o: %.c + $(CC) -c -Wall $(FLAGS) $(CFLAGS) $(CPPFLAGS) $< -o $@ diff --git a/server/gkrellmd-version.h b/server/gkrellmd-version.h deleted file mode 100644 index c235c37..0000000 --- a/server/gkrellmd-version.h +++ /dev/null @@ -1,35 +0,0 @@ -/* GKrellM -| Copyright (C) 1999-2007 Bill Wilson -| -| Author: Bill Wilson billw@gkrellm.net -| Latest versions might be found at: http://gkrellm.net -| -| -| GKrellM 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 3 of the License, or -| (at your option) any later version. -| -| GKrellM 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, see http://www.gnu.org/licenses/ -*/ -#ifndef GKRELLMD_VERSION_H -#define GKRELLMD_VERSION_H - -#define GKRELLMD_VERSION_MAJOR 2 -#define GKRELLMD_VERSION_MINOR 3 -#define GKRELLMD_VERSION_REV 3 -#define GKRELLMD_EXTRAVERSION "" - -#define GKRELLMD_CHECK_VERSION(major,minor,rev) \ -(GKRELLMD_VERSION_MAJOR > (major) || \ -(GKRELLMD_VERSION_MAJOR == (major) && GKRELLMD_VERSION_MINOR > (minor)) || \ -(GKRELLMD_VERSION_MAJOR == (major) && GKRELLMD_VERSION_MINOR == (minor) && \ -GKRELLMD_VERSION_REV >= (rev))) - -#endif // GKRELLMD_VERSION_H diff --git a/server/gkrellmd.h b/server/gkrellmd.h index 11e6be0..6cae730 100644 --- a/server/gkrellmd.h +++ b/server/gkrellmd.h @@ -34,7 +34,6 @@ #define GKRELLMD_H #include "log.h" -#include "gkrellmd-version.h" #include #include @@ -105,6 +104,19 @@ # define bindtextdomain(Domain,Directory) (Domain) #endif /* ENABLE_NLS */ +/* ------------------------------------------------------------------- +*/ +#define GKRELLMD_VERSION_MAJOR 2 +#define GKRELLMD_VERSION_MINOR 3 +#define GKRELLMD_VERSION_REV 3 +#define GKRELLMD_EXTRAVERSION "" + +#define GKRELLMD_CHECK_VERSION(major,minor,rev) \ +(GKRELLMD_VERSION_MAJOR > (major) || \ +(GKRELLMD_VERSION_MAJOR == (major) && GKRELLMD_VERSION_MINOR > (minor)) || \ +(GKRELLMD_VERSION_MAJOR == (major) && GKRELLMD_VERSION_MINOR == (minor) && \ +GKRELLMD_VERSION_REV >= (rev))) + #define GKRELLMD_CONFIG "gkrellmd.conf" #if defined(WIN32) // no dot in front of config-filename on win32 diff --git a/server/win32-libgkrellmd.c b/server/win32-libgkrellmd.c index 4675648..2028f3f 100644 --- a/server/win32-libgkrellmd.c +++ b/server/win32-libgkrellmd.c @@ -1,6 +1,6 @@ /* GKrellM Windows Portion | Copyright (C) 2002 Bill Nalen -| 2007-2008 Stefan Gehn +| 2007-2009 Stefan Gehn | | Authors: Bill Nalen bill@nalens.com | Stefan Gehn stefan@gkrellm.srcbox.net diff --git a/server/win32-plugin.c b/server/win32-plugin.c index fd0c19f..b32df10 100644 --- a/server/win32-plugin.c +++ b/server/win32-plugin.c @@ -1,5 +1,5 @@ /* GKrellM Windows Portion -| Copyright (C) 2006-2008 Stefan Gehn +| Copyright (C) 2006-2009 Stefan Gehn | | Authors: Stefan Gehn stefan@gkrellm.srcbox.net | Latest versions might be found at: http://gkrellm.net diff --git a/server/win32-plugin.h b/server/win32-plugin.h index 7cbc99d..472952c 100644 --- a/server/win32-plugin.h +++ b/server/win32-plugin.h @@ -1,6 +1,6 @@ /* GKrellM -| Copyright (C) 1999-2008 Bill Wilson -| 2007-2008 Stefan Gehn +| Copyright (C) 1999-2009 Bill Wilson +| 2007-2009 Stefan Gehn | | Authors: Bill Wilson billw@gkrellm.net | Stefan Gehn stefan@gkrellm.srcbox.net diff --git a/server/win32-resource.rc b/server/win32-resource.rc index 3d8de71..4310058 100644 --- a/server/win32-resource.rc +++ b/server/win32-resource.rc @@ -3,20 +3,15 @@ // http://www.resedit.net #include "win32-resource.h" -#include "gkrellmd-version.h" -#include +#include "windows.h" -// you don't really want to know why this looks so ugly :P -#define STRINGIFY(x) #x -#define TOSTRING(x) STRINGIFY(x) -#define RC_VER_STRING TOSTRING(GKRELLMD_VERSION_MAJOR) "." TOSTRING(GKRELLMD_VERSION_MINOR) "." TOSTRING(GKRELLMD_VERSION_REV) GKRELLMD_EXTRAVERSION // // Version Information resources // LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 1 VERSIONINFO - FILEVERSION GKRELLMD_VERSION_MAJOR,GKRELLMD_VERSION_MINOR,GKRELLMD_VERSION_REV,0 + FILEVERSION 2,3,3,0 PRODUCTVERSION 0,0,0,0 FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP @@ -27,12 +22,12 @@ BEGIN BEGIN VALUE "CompanyName", "" VALUE "FileDescription", "GKrellM Daemon" - VALUE "FileVersion", RC_VER_STRING + VALUE "FileVersion", "2.3.3" VALUE "InternalName", "gkrellmd" VALUE "LegalCopyright", "Copyright (C) 1999-2009 Bill Wilson" VALUE "OriginalFilename", "gkrellmd.exe" VALUE "ProductName", "GKrellM" - VALUE "ProductVersion", RC_VER_STRING + VALUE "ProductVersion", "2.3.3" END END BLOCK "VarFileInfo" diff --git a/src/Makefile b/src/Makefile index 1faac48..b3fc110 100644 --- a/src/Makefile +++ b/src/Makefile @@ -51,44 +51,28 @@ endif ifeq ($(without-ntlm),1) CONFIGURE_ARGS += --without-ntlm endif +# run configure shell script DUMMY_VAR := $(shell ./configure $(CONFIGURE_ARGS)) +# pull in variables set by configure script +include configure.mk -HAVE_GNUTLS = $(shell grep -c HAVE_GNUTLS configure.h) -HAVE_SSL = $(shell grep -c HAVE_SSL configure.h) -HAVE_NTLM = $(shell grep -c HAVE_NTLM configure.h) -HAVE_LIBSENSORS = $(shell grep -c HAVE_LIBSENSORS configure.h) - -ifeq ($(HAVE_GNUTLS),1) - SSL_LIBS ?= -lgnutls-openssl -else -ifeq ($(HAVE_SSL),1) - SSL_LIBS ?= -lssl -lcrypto -else - EXTRAOBJS ?= md5c.o -endif -endif - -ifeq ($(HAVE_NTLM),1) - NTLM_INCLUDES = `$(PKG_CONFIG) --cflags libntlm` - NTLM_LIBS = `$(PKG_CONFIG) --libs libntlm` -endif - -ifeq ($(HAVE_LIBSENSORS),1) - SENSORS_LIBS ?= -lsensors +# Only use own md5-code if neither OpenSSL nor GnuTLS are present +ifneq ($(HAVE_SSL),1) + EXTRAOBJS ?= md5c.o endif CC ?= gcc STRIP ?= -s -GKRELLM_INCLUDES = gkrellm.h gkrellm-version.h gkrellm-public-proto.h $(SHARED_PATH)/log.h +GKRELLM_INCLUDES = gkrellm.h gkrellm-public-proto.h $(SHARED_PATH)/log.h PKG_INCLUDE = `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0` PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0` -FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC) \ - ${NTLM_INCLUDES} -DGKRELLM_CLIENT +FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC)\ + ${SSL_INCLUDE} ${NTLM_INCLUDE} -DGKRELLM_CLIENT -LIBS = $(PKG_LIB) $(GTOP_LIBS) $(SMC_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS) \ +LIBS = $(PKG_LIB) $(GTOP_LIBS) $(SMC_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS)\ $(NTLM_LIBS) ifeq ($(debug),1) @@ -121,8 +105,6 @@ ifeq ($(HAVE_GETADDRINFO),1) endif -override CC += -Wall $(FLAGS) - OBJS = main.o alerts.o battery.o base64.o clock.o cpu.o disk.o fs.o \ hostname.o inet.o mail.o mem.o net.o proc.o sensors.o uptime.o \ chart.o panel.o config.o gui.o krell.o plugins.o pixops.o \ @@ -257,7 +239,7 @@ install_windows: $(INSTALL) -c -m $(BINMODE) libgkrellm.a $(LIBDIR) clean: - $(RM) *.o *~ *.bak configure.h configure.log gkrellm gkrellm.exe \ + $(RM) *.o *~ *.bak configure.h configure.mk configure.log gkrellm gkrellm.exe \ libgkrellm.a sysdeps/*.o core IMAGES = \ @@ -317,7 +299,7 @@ SYSDEPS_SRC = sysdeps/bsd-common.c sysdeps/bsd-net-open.c sysdeps/freebsd.c \ sysdeps/solaris.c sysdeps/darwin.c sysdeps/sensors-common.c \ sysdeps/win32.c -GKRELLM_H = gkrellm.h gkrellm-version.h gkrellm-private.h +GKRELLM_H = gkrellm.h gkrellm-private.h GKRELLM_H_SYS = gkrellm.h gkrellm-public-proto.h gkrellm-private.h \ gkrellm-sysdeps.h @@ -358,7 +340,7 @@ winops-win32.o: winops-win32.c $(GKRELLM_H) win32-plugin.o: win32-plugin.c win32-plugin.h win32-libgkrellm.o: win32-libgkrellm.c win32-plugin.h win32-resource.o: win32-resource.rc win32-resource.h - windres -v -o win32-resource.o win32-resource.rc + windres -o win32-resource.o win32-resource.rc libgkrellm.a: win32-libgkrellm.o ar -cr libgkrellm.a win32-libgkrellm.o @@ -366,3 +348,6 @@ libgkrellm.a: win32-libgkrellm.o # Checks if the build environment is ok check_env: $(PKG_CONFIG) --atleast-version=2.4 gtk+-2.0 + +%.o: %.c + $(CC) -c -Wall $(FLAGS) $(CFLAGS) $(CPPFLAGS) $< -o $@ diff --git a/src/configure b/src/configure index 2fc778a..0cce15b 100755 --- a/src/configure +++ b/src/configure @@ -4,6 +4,7 @@ # This configure is run automatically so no need to run it by hand. # # Copyright (C) 2003-2009 Bill Wilson +set -e for i do @@ -25,32 +26,40 @@ do fi done -PKG_INCLUDE=`pkg-config gtk+-2.0 --cflags` -PKG_LIBS=`pkg-config gtk+-2.0 --libs` - -rm -f configure.h configure.log test test.o test.c - -touch configure.h - +GTK_CFLAGS=`pkg-config gtk+-2.0 --cflags` +GTK_LIBS=`pkg-config gtk+-2.0 --libs` CC=${CC-gcc} +rm -f configure.h configure.mk configure.log + +touch configure.h +touch configure.mk exec 5>./configure.log +echo "CC : ${CC}" 1>& 5 +echo "CFLAGS: ${CFLAGS}" 1>& 5 + rm -f test test.exe test.o test.c - - if [ "$without_ssl" != "yes" ] then # echo "Checking for ssl... " 1>& 2 echo "Checking for ssl... " 1>& 5 +OPENSSL_INCLUDE=`pkg-config openssl --cflags` +OPENSSL_LIBS=`pkg-config openssl --libs` +if [ -z "$OPENSSL_LIBS" ] +then + echo "OpenSSL not found via pkg-config, using hardcoded library names" 1>& 5 + OPENSSL_LIBS="-lssl -lcrypto" +fi + cat << EOF > test.c #include int main() { - SSL_METHOD *ssl_method = NULL; + const SSL_METHOD *ssl_method = NULL; SSLeay_add_ssl_algorithms(); SSL_load_error_strings(); @@ -60,14 +69,17 @@ int main() } EOF -$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5 -$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lssl -lcrypto 2>& 5 +$CC ${CFLAGS} ${GTK_INCLUDE} ${OPENSSL_INCLUDE} -c test.c -o test.o 2>& 5 +$CC test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${OPENSSL_LIBS} 2>& 5 if [ -x ./test ] && ./test then # echo 'Defining HAVE_SSL' 1>& 2 echo 'Defining HAVE_SSL' 1>& 5 echo '#define HAVE_SSL 1' >> configure.h + echo 'HAVE_SSL=1' >> configure.mk + echo "SSL_LIBS=${OPENSSL_LIBS}" >> configure.mk + echo "SSL_INCLUDE=${OPENSSL_INCLUDE}" >> configure.mk without_gnutls=yes else # echo "Not found, mail check will not have ssl support..." 1>& 2 @@ -83,6 +95,14 @@ then # echo "Checking for gnutls... " 1>& 2 echo "Checking for gnutls... " 1>& 5 +GNUTLS_INCLUDE=`pkg-config gnutls --cflags` +GNUTLS_LIBS=`pkg-config gnutls --libs` +if [ -z "$GNUTLS_LIBS" ] +then + echo "GnuTLS not found via pkg-config, using hardcoded library names" 1>& 5 + GNUTLS_LIBS="-lgnutls-openssl" +fi + cat << EOF > test.c #include #include @@ -106,8 +126,8 @@ int main() } EOF -$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5 -$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lgnutls-openssl 2>& 5 +${CC} ${CFLAGS} ${GTK_INCLUDE} ${GNUTLS_INCLUDE} -c test.c -o test.o 2>& 5 +${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${GNUTLS_LIBS} 2>& 5 if [ -x ./test ] && ./test then @@ -115,6 +135,9 @@ then echo 'Defining HAVE_GNUTLS' 1>& 5 echo '#define HAVE_GNUTLS 1' >> configure.h echo '#define HAVE_SSL 1' >> configure.h + echo 'HAVE_SSL=1' >> configure.mk + echo "SSL_LIBS=${GNUTLS_LIBS}" >> configure.mk + echo "SSL_INCLUDE=${GNUTLS_INCLUDE}" >> configure.mk else # echo "Not found, mail check will not have gnutls support..." 1>& 2 echo "Not found, mail check will not have gnutls support..." 1>& 5 @@ -145,14 +168,17 @@ int main() } EOF -$CC ${CFLAGS} ${PKG_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5 -$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} ${PKG_NTLM_LIBS} -lntlm 2>& 5 +${CC} ${CFLAGS} ${GTK_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5 +${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${PKG_NTLM_LIBS} -lntlm 2>& 5 if [ -x ./test ] && ./test then # echo 'Defining HAVE_NTLM' 1>& 2 echo 'Defining HAVE_NTLM' 1>& 5 echo '#define HAVE_NTLM 1' >> configure.h + echo 'HAVE_NTLM=1' >> configure.mk + echo "NTLM_LIBS=${PKG_NTLM_LIBS}" >> configure.mk + echo "NTLM_INCLUDE=${PKG_NTLM_INCLUDE}" >> configure.mk else # echo "Not found, mail check will not have ntlm support..." 1>& 2 echo "Not found, mail check will not have ntlm support..." 1>& 5 @@ -191,13 +217,15 @@ int main() } EOF -$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5 -$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lsensors 2>& 5 +${CC} ${CFLAGS} ${GTK_INCLUDE} -c test.c -o test.o 2>& 5 +${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} -lsensors 2>& 5 if [ -x ./test ] && ./test then echo 'Defining HAVE_LIBSENSORS' 1>& 5 echo '#define HAVE_LIBSENSORS 1' >> configure.h + echo 'HAVE_LIBSENSORS=1' >> configure.mk + echo 'SENSORS_LIBS="-lsensors"' >> configure.mk else echo "Not found, sensors will not have libsensors support..." 1>& 5 fi diff --git a/src/gkrellm-public-proto.h b/src/gkrellm-public-proto.h index 0fbc80c..a381b3d 100644 --- a/src/gkrellm-public-proto.h +++ b/src/gkrellm-public-proto.h @@ -1,5 +1,5 @@ /* GKrellM -| Copyright (C) 1999-2008 Bill Wilson +| Copyright (C) 1999-2009 Bill Wilson | | Author: Bill Wilson billw@gkrellm.net | Latest versions might be found at: http://gkrellm.net diff --git a/src/gkrellm-version.h b/src/gkrellm-version.h deleted file mode 100644 index efe555b..0000000 --- a/src/gkrellm-version.h +++ /dev/null @@ -1,47 +0,0 @@ -/* GKrellM -| Copyright (C) 1999-2008 Bill Wilson -| -| Author: Bill Wilson billw@gkrellm.net -| Latest versions might be found at: http://gkrellm.net -| -| -| GKrellM 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 3 of the License, or -| (at your option) any later version. -| -| GKrellM 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, see http://www.gnu.org/licenses/ -| -| -| Additional permission under GNU GPL version 3 section 7 -| -| If you modify this program, or any covered work, by linking or -| combining it with the OpenSSL project's OpenSSL library (or a -| modified version of that library), containing parts covered by -| the terms of the OpenSSL or SSLeay licenses, you are granted -| additional permission to convey the resulting work. -| Corresponding Source for a non-source form of such a combination -| shall include the source code for the parts of OpenSSL used as well -| as that of the covered work. -*/ -#ifndef GKRELLM_VERSION_H -#define GKRELLM_VERSION_H - -#define GKRELLM_VERSION_MAJOR 2 -#define GKRELLM_VERSION_MINOR 3 -#define GKRELLM_VERSION_REV 3 -#define GKRELLM_EXTRAVERSION "" - -#define GKRELLM_CHECK_VERSION(major,minor,rev) \ - (GKRELLM_VERSION_MAJOR > (major) || \ - (GKRELLM_VERSION_MAJOR == (major) && GKRELLM_VERSION_MINOR > (minor)) || \ - (GKRELLM_VERSION_MAJOR == (major) && GKRELLM_VERSION_MINOR == (minor) && \ - GKRELLM_VERSION_REV >= (rev))) - -#endif // GKRELLM_VERSION_H diff --git a/src/gkrellm.h b/src/gkrellm.h index 3414b90..fa3f314 100644 --- a/src/gkrellm.h +++ b/src/gkrellm.h @@ -1,5 +1,5 @@ /* GKrellM -| Copyright (C) 1999-2008 Bill Wilson +| Copyright (C) 1999-2009 Bill Wilson | | Author: Bill Wilson billw@gkrellm.net | Latest versions might be found at: http://gkrellm.net @@ -39,7 +39,6 @@ #include "config.h" #endif #include "log.h" -#include "gkrellm-version.h" #if !defined(WIN32) #include @@ -103,6 +102,21 @@ #endif /* ENABLE_NLS */ + + +/* ------------------------------------------------------------------- +*/ +#define GKRELLM_VERSION_MAJOR 2 +#define GKRELLM_VERSION_MINOR 3 +#define GKRELLM_VERSION_REV 3 +#define GKRELLM_EXTRAVERSION "" + +#define GKRELLM_CHECK_VERSION(major,minor,rev) \ + (GKRELLM_VERSION_MAJOR > (major) || \ + (GKRELLM_VERSION_MAJOR == (major) && GKRELLM_VERSION_MINOR > (minor)) || \ + (GKRELLM_VERSION_MAJOR == (major) && GKRELLM_VERSION_MINOR == (minor) && \ + GKRELLM_VERSION_REV >= (rev))) + #define GKRELLM_DIR ".gkrellm2" #define GKRELLM_USER_CONFIG ".gkrellm2/user-config" #define GKRELLM_2_1_14_CONFIG ".gkrellm2/user_config" diff --git a/src/sysdeps/win32.c b/src/sysdeps/win32.c index 231a98a..75cb11f 100644 --- a/src/sysdeps/win32.c +++ b/src/sysdeps/win32.c @@ -1,7 +1,7 @@ /* GKrellM -| Copyright (C) 1999-2008 Bill Wilson +| Copyright (C) 1999-2009 Bill Wilson | 2002 Bill Nalen -| 2007-2008 Stefan Gehn +| 2007-2009 Stefan Gehn | | Authors: Bill Wilson billw@gkrellm.net | Bill Nalen bill@nalens.com diff --git a/src/win32-libgkrellm.c b/src/win32-libgkrellm.c index 824d3b3..fbada6b 100644 --- a/src/win32-libgkrellm.c +++ b/src/win32-libgkrellm.c @@ -1,6 +1,6 @@ /* GKrellM Windows Portion | Copyright (C) 2002 Bill Nalen -| 2007-2008 Stefan Gehn +| 2007-2009 Stefan Gehn | | Authors: Bill Nalen bill@nalens.com | Stefan Gehn stefan@gkrellm.srcbox.net diff --git a/src/win32-resource.rc b/src/win32-resource.rc index 33c7d9d..99818b1 100644 --- a/src/win32-resource.rc +++ b/src/win32-resource.rc @@ -3,13 +3,8 @@ // http://www.resedit.net #include "win32-resource.h" -#include "gkrellm-version.h" -#include +#include "windows.h" -// you don't really want to know why this looks so ugly :P -#define STRINGIFY(x) #x -#define TOSTRING(x) STRINGIFY(x) -#define RC_VER_STRING TOSTRING(GKRELLM_VERSION_MAJOR) "." TOSTRING(GKRELLM_VERSION_MINOR) "." TOSTRING(GKRELLM_VERSION_REV) GKRELLM_EXTRAVERSION // // Icon resources @@ -23,7 +18,7 @@ IDI_ICON3 ICON "gkrellm.ico" // LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 1 VERSIONINFO - FILEVERSION GKRELLM_VERSION_MAJOR,GKRELLM_VERSION_MINOR,GKRELLM_VERSION_REV,0 + FILEVERSION 2,3,3,0 PRODUCTVERSION 0,0,0,0 FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP @@ -34,12 +29,12 @@ BEGIN BEGIN VALUE "CompanyName", "" VALUE "FileDescription", "GKrellM" - VALUE "FileVersion", RC_VER_STRING + VALUE "FileVersion", "2.3.3" VALUE "InternalName", "gkrellm" VALUE "LegalCopyright", "Copyright (C) 1999-2009 Bill Wilson" VALUE "OriginalFilename", "gkrellm.exe" VALUE "ProductName", "GKrellM" - VALUE "ProductVersion", RC_VER_STRING + VALUE "ProductVersion", "2.3.3" END END BLOCK "VarFileInfo"