| [90] | 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| [186] | 2 | Copyright (C) 2006-2017 Ricardo Villalba <[email protected]>
|
|---|
| [90] | 3 |
|
|---|
| 4 | This program is free software; you can redistribute it and/or modify
|
|---|
| 5 | it under the terms of the GNU General Public License as published by
|
|---|
| 6 | the Free Software Foundation; either version 2 of the License, or
|
|---|
| 7 | (at your option) any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | GNU General Public License for more details.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License
|
|---|
| 15 | along with this program; if not, write to the Free Software
|
|---|
| 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 | #include "version.h"
|
|---|
| [186] | 20 | #include <QObject>
|
|---|
| [90] | 21 |
|
|---|
| [186] | 22 | #define USE_SVN_VERSIONS 1
|
|---|
| 23 | #define DEVELOPMENT_VERSION 0
|
|---|
| [90] | 24 |
|
|---|
| [186] | 25 | #define VERSION "17.1.0"
|
|---|
| [90] | 26 |
|
|---|
| [186] | 27 | #if USE_SVN_VERSIONS && DEVELOPMENT_VERSION
|
|---|
| [90] | 28 | #include "svn_revision.h"
|
|---|
| [154] | 29 | #else
|
|---|
| [186] | 30 | #define SVN_REVISION "8380"
|
|---|
| [90] | 31 | #endif
|
|---|
| 32 |
|
|---|
| [133] | 33 | #ifdef Q_OS_WIN
|
|---|
| [154] | 34 | #if defined(_WIN64)
|
|---|
| [133] | 35 | #define SMPWIN_ARCH "(64-bit)"
|
|---|
| [154] | 36 | #elif defined(_WIN32) && !defined(_WIN64)
|
|---|
| [133] | 37 | #define SMPWIN_ARCH "(32-bit)"
|
|---|
| 38 | #endif
|
|---|
| 39 | #endif
|
|---|
| 40 |
|
|---|
| [154] | 41 | QString Version::printable() {
|
|---|
| [90] | 42 | #if USE_SVN_VERSIONS
|
|---|
| [133] | 43 | #ifdef Q_OS_WIN
|
|---|
| [186] | 44 | return QObject::tr("%1 (revision %2) %3").arg(VERSION).arg(SVN_REVISION).arg(SMPWIN_ARCH);
|
|---|
| [90] | 45 | #else
|
|---|
| [186] | 46 | return QObject::tr("%1 (revision %2)").arg(VERSION).arg(SVN_REVISION);
|
|---|
| [90] | 47 | #endif
|
|---|
| [133] | 48 | #else
|
|---|
| 49 | #ifdef Q_OS_WIN
|
|---|
| [186] | 50 | return QString(QString(VERSION) + " " + QString(SMPWIN_ARCH));
|
|---|
| [133] | 51 | #else
|
|---|
| [186] | 52 | return QString(VERSION);
|
|---|
| [133] | 53 | #endif
|
|---|
| 54 | #endif
|
|---|
| [90] | 55 | }
|
|---|
| [140] | 56 |
|
|---|
| [154] | 57 | QString Version::stable() {
|
|---|
| [140] | 58 | return QString(VERSION);
|
|---|
| 59 | }
|
|---|
| [154] | 60 |
|
|---|
| 61 | QString Version::revision() {
|
|---|
| 62 | return QString(SVN_REVISION);
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| [186] | 65 | bool Version::is_unstable() {
|
|---|
| 66 | return (DEVELOPMENT_VERSION == 1);
|
|---|
| 67 | }
|
|---|