~midori/midori/trunk

« back to all changes in this revision

Viewing changes to wscript

  • Committer: Christian Dywan
  • Date: 2011-11-08 00:53:53 UTC
  • Revision ID: git-v1:c5e6b7a020b2927afb2862cfe575fd59f0e79740
Show mismatching build version suffix for extensions

MIDORI_VERSION_SUFFIX resolves to a string that needs to be
added to each extension's version at build time. If it is
different than the running Midori's, it is shown in the
extension list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
APPNAME = 'midori'
35
35
VERSION = VERSION_FULL = str (major) + '.' + str (minor) + '.' + str (micro)
 
36
VERSION_SUFFIX = ' (%s)' % VERSION
36
37
 
37
38
try:
38
39
    if os.path.isdir ('.git'):
39
40
        git = Utils.cmd_output (['git', 'describe'], silent=True)
40
41
        if git:
41
42
            VERSION_FULL = git.strip ()
 
43
            VERSION_SUFFIX = VERSION_FULL.replace (VERSION, '')
42
44
except:
43
45
    pass
44
46
 
300
302
 
301
303
    if debug_level == 'full':
302
304
        conf.define ('PACKAGE_VERSION', '%s (debug)' % VERSION_FULL)
 
305
        conf.env.append_value ('CCFLAGS', '-DMIDORI_VERSION_SUFFIX="%s (debug)"' % VERSION_SUFFIX)
303
306
    else:
304
307
        conf.define ('PACKAGE_VERSION', VERSION_FULL)
 
308
        conf.env.append_value ('CCFLAGS', '-DMIDORI_VERSION_SUFFIX="%s"' % VERSION_SUFFIX)
305
309
    conf.write_config_header ('config.h')
306
310
 
307
311
    if compiler == 'gcc':