detecting KDE version at run-time
Simon Hausmann
hausmann at kde.org
Thu Oct 24 19:12:16 BST 2002
Hi,
for consistency with Qt and to allow detecting the KDE version at
run-time I'd like to add this patch to kdelibs. Thoughts?
Simon
-------------- next part --------------
Index: Makefile.am
===================================================================
RCS file: /home/kde/kdelibs/kdecore/Makefile.am,v
retrieving revision 1.300
diff -u -p -b -r1.300 Makefile.am
--- Makefile.am 2002/10/19 14:54:31 1.300
+++ Makefile.am 2002/10/24 18:09:28
@@ -86,7 +86,8 @@ libkdecore_la_SOURCES = libintl.cpp kapp
ksycoca.cpp ksycocadict.cpp ksycocafactory.cpp ksycoca.skel \
kxmessages.cpp kstartupinfo.cpp kcatalogue.cpp kasyncio.cpp \
kmultipledrag.cpp kstaticdeleter.cpp kappdcopiface.cpp \
- kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp
+ kappdcopiface.skel kclipboard.cpp kcheckaccelerators.cpp \
+ kdeversion.cpp
libkdecore_la_LDFLAGS = $(QT_LDFLAGS) $(KDE_RPATH) $(KDE_MT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS) -version-info 5:0:1 -no-undefined
libkdecore_la_LIBADD = malloc/libklmalloc.la $(SVGICON_LIB) ../dcop/libDCOP.la ../libltdl/libltdlc.la $(LIB_XEXT) $(LIBRESOLV) $(LIBXINERAMA) $(LIB_DMALLOC) $(LIBART_LIBS)
Index: kdeversion.cpp
===================================================================
RCS file: kdeversion.cpp
diff -N kdeversion.cpp
--- /dev/null Fri Feb 1 11:53:05 2002
+++ kdeversion.cpp Thu Oct 24 20:09:28 2002
@@ -0,0 +1,25 @@
+/* This file is part of the KDE libraries
+ Copyright (c) 2002 KDE Team
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "kdeversion.h"
+
+const char *kdeVersion()
+{
+ return KDE_VERSION_STRING;
+}
Index: kdeversion.h
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kdeversion.h,v
retrieving revision 1.14
diff -u -p -b -r1.14 kdeversion.h
--- kdeversion.h 2002/09/17 10:59:16 1.14
+++ kdeversion.h 2002/10/24 18:09:28
@@ -28,4 +28,6 @@
#define KDE_VERSION_MINOR 0
#define KDE_VERSION_RELEASE 8
+const char *kdeVersion();
+
#endif // _KDE_VERSION_H_
More information about the kde-core-devel
mailing list