1 /*  smplayer, GUI front-end for mplayer.
2     Copyright (C) 2006-2021 Ricardo Villalba <ricardo@smplayer.info>
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"
20 #include <QObject>
21 
22 #define USE_SVN_VERSIONS 1
23 #define DEVELOPMENT_VERSION 0
24 
25 #define VERSION "21.10.0"
26 
27 #if USE_SVN_VERSIONS && DEVELOPMENT_VERSION
28 #include "svn_revision.h"
29 #else
30 #define SVN_REVISION "10000"
31 #endif
32 
33 #ifdef Q_OS_WIN
34 #if defined(_WIN64)
35 #define SMPWIN_ARCH "(64-bit)"
36 #elif defined(_WIN32) && !defined(_WIN64)
37 #define SMPWIN_ARCH "(32-bit)"
38 #endif
39 #endif
40 
printable()41 QString Version::printable() {
42 #if USE_SVN_VERSIONS
43 #ifdef Q_OS_WIN
44 	return QObject::tr("%1 (revision %2) %3").arg(VERSION).arg(SVN_REVISION).arg(SMPWIN_ARCH);
45 #else
46 	return QObject::tr("%1 (revision %2)").arg(VERSION).arg(SVN_REVISION);
47 #endif
48 #else
49 #ifdef Q_OS_WIN
50 	return QString(QString(VERSION) + " " + QString(SMPWIN_ARCH));
51 #else
52 	return QString(VERSION);
53 #endif
54 #endif
55 }
56 
stable()57 QString Version::stable() {
58 	return QString(VERSION);
59 }
60 
revision()61 QString Version::revision() {
62 	return QString(SVN_REVISION);
63 }
64 
is_unstable()65 bool Version::is_unstable() {
66 	return (DEVELOPMENT_VERSION == 1);
67 }
68