Skip to content

Commit

Permalink
[mms-engine] By default report the hardcoded version
Browse files Browse the repository at this point in the history
It can still be overwritten by MMS_ENGINE_VERSION macro, it's just that
now we have a reasonable default for it.
  • Loading branch information
monich committed Feb 2, 2016
1 parent 25afbec commit 00fc28f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
3 changes: 2 additions & 1 deletion mms-engine/mms-engine.pro
Expand Up @@ -34,7 +34,8 @@ SOURCES += \
main.c \
mms_engine.c
HEADERS += \
mms_engine.h
mms_engine.h \
mms_version.h
OTHER_FILES += \
org.nemomobile.MmsEngine.push.conf \
org.nemomobile.MmsEngine.dbus.conf \
Expand Down
10 changes: 3 additions & 7 deletions mms-engine/mms_engine.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013-2014 Jolla Ltd.
* Copyright (C) 2013-2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand All @@ -17,12 +18,7 @@

#include <gio/gio.h>
#include "mms_settings.h"

#ifdef MMS_ENGINE_VERSION
# define MMS_STRING__(x) #x
# define MMS_STRING_(x) MMS_STRING__(x)
# define MMS_VERSION_STRING MMS_STRING_(MMS_ENGINE_VERSION)
#endif
#include "mms_version.h"

#define MMS_APP_LOG_PREFIX "mms-engine"

Expand Down
27 changes: 27 additions & 0 deletions mms-engine/mms_version.h
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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.
*
*/

#ifndef JOLLA_MMS_VERSION_H
#define JOLLA_MMS_VERSION_H

#ifndef MMS_ENGINE_VERSION
# define MMS_ENGINE_VERSION 1.0.41
#endif

#define MMS_VERSION_STRING__(x) #x
#define MMS_VERSION_STRING_(x) MMS_VERSION_STRING__(x)
#define MMS_VERSION_STRING MMS_VERSION_STRING_(MMS_ENGINE_VERSION)

#endif /* JOLLA_MMS_VERSION_H */

0 comments on commit 00fc28f

Please sign in to comment.