Implement MIDORI_CHECK_VERSION for use in extensions

This commit is contained in:
Christian Dywan 2008-11-30 01:22:03 +01:00
parent d5e9443624
commit 5f149946d6
2 changed files with 15 additions and 1 deletions

View file

@ -31,4 +31,10 @@
/* For convenience, include localization header */ /* For convenience, include localization header */
#include <glib/gi18n.h> #include <glib/gi18n.h>
#define MIDORI_CHECK_VERSION(major, minor, micro) \
(MIDORI_MAJOR_VERSION > (major) || \
(MIDORI_MAJOR_VERSION == (major) && MIDORI_MINOR_VERSION > (minor)) || \
(MIDORI_MAJOR_VERSION == (major) && MIDORI_MINOR_VERSION == (minor) && \
MIDORI_MICRO_VERSION >= (micro)))
#endif /* __MIDORI_H__ */ #endif /* __MIDORI_H__ */

10
wscript
View file

@ -9,8 +9,12 @@ import sys
import os import os
import UnitTest import UnitTest
major = 0
minor = 1
micro = 0
APPNAME = 'midori' APPNAME = 'midori'
VERSION = '0.1.0' VERSION = str (major) + '.' + str (minor) + '.' + str (micro)
try: try:
git = subprocess.Popen (['git', 'rev-parse', '--short', 'HEAD'], git = subprocess.Popen (['git', 'rev-parse', '--short', 'HEAD'],
@ -127,6 +131,10 @@ def configure (conf):
conf.define ('PACKAGE_BUGREPORT', 'http://www.twotoasts.de/bugs') conf.define ('PACKAGE_BUGREPORT', 'http://www.twotoasts.de/bugs')
conf.define ('GETTEXT_PACKAGE', APPNAME) conf.define ('GETTEXT_PACKAGE', APPNAME)
conf.define ('MIDORI_MAJOR_VERSION', major)
conf.define ('MIDORI_MINOR_VERSION', minor)
conf.define ('MIDORI_MICRO_VERSION', micro)
conf.write_config_header ('config.h') conf.write_config_header ('config.h')
conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H') conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H')