source: smplayer/trunk/src/version.cpp

Last change on this file was 188, checked in by Silvan Scherrer, 8 years ago

SMPlayer: update trunk to version 17.1.0

  • Property svn:eol-style set to LF
File size: 1.8 KB
RevLine 
[112]1/* smplayer, GUI front-end for mplayer.
[188]2 Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
[112]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"
[188]20#include <QObject>
[112]21
[188]22#define USE_SVN_VERSIONS 1
23#define DEVELOPMENT_VERSION 0
[112]24
[188]25#define VERSION "17.1.0"
[112]26
[188]27#if USE_SVN_VERSIONS && DEVELOPMENT_VERSION
[119]28#include <svn_revision.h>
[156]29#else
[188]30#define SVN_REVISION "8380"
[112]31#endif
32
[135]33#ifdef Q_OS_WIN
[156]34#if defined(_WIN64)
[135]35#define SMPWIN_ARCH "(64-bit)"
[156]36#elif defined(_WIN32) && !defined(_WIN64)
[135]37#define SMPWIN_ARCH "(32-bit)"
38#endif
39#endif
40
[156]41QString Version::printable() {
[112]42#if USE_SVN_VERSIONS
[135]43#ifdef Q_OS_WIN
[188]44 return QObject::tr("%1 (revision %2) %3").arg(VERSION).arg(SVN_REVISION).arg(SMPWIN_ARCH);
[112]45#else
[188]46 return QObject::tr("%1 (revision %2)").arg(VERSION).arg(SVN_REVISION);
[112]47#endif
[135]48#else
49#ifdef Q_OS_WIN
[188]50 return QString(QString(VERSION) + " " + QString(SMPWIN_ARCH));
[135]51#else
[188]52 return QString(VERSION);
[135]53#endif
54#endif
[112]55}
[142]56
[156]57QString Version::stable() {
[142]58 return QString(VERSION);
59}
[156]60
61QString Version::revision() {
62 return QString(SVN_REVISION);
63}
64
[188]65bool Version::is_unstable() {
66 return (DEVELOPMENT_VERSION == 1);
67}
Note: See TracBrowser for help on using the repository browser.