Commit 27c8db02 authored by Wolfgang Bauer's avatar Wolfgang Bauer

Use KDE Application Version, managed by release script

Set the cmake project version as well (to automatically create version
entries in bugzilla), this needs at least cmake 3.0.0.

Use ecm_setup_version to create a header file with the version defines.
parent 7232037d
cmake_minimum_required(VERSION 2.8.9)
project(kget)
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 2.8.12)
# KDE Application Version, managed by release script
set(KDE_APPLICATIONS_VERSION_MAJOR "18")
set(KDE_APPLICATIONS_VERSION_MINOR "03")
set(KDE_APPLICATIONS_VERSION_MICRO "70")
set(KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
project(kget VERSION ${KDE_APPLICATIONS_VERSION})
find_package(ECM 5.14.0 REQUIRED NO_MODULE)
......@@ -15,6 +20,9 @@ include(ECMInstallIcons)
include(ECMMarkAsTest)
include(GenerateExportHeader)
include(ECMQtDeclareLoggingCategory)
include(ECMSetupVersion)
ecm_setup_version(PROJECT VARIABLE_PREFIX KGET VERSION_HEADER "kget_version.h")
find_package(KF5 REQUIRED
Completion
......
......@@ -26,6 +26,7 @@
#include "settings.h"
#include "mainwindow.h"
#include "ui/newtransferdialog.h"
#include "kget_version.h"
class KGetApp : public QObject
{
......@@ -98,7 +99,7 @@ int main(int argc, char *argv[])
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
KLocalizedString::setApplicationDomain("kget");
KAboutData aboutData(QStringLiteral("kget"), i18n("KGet"),
QStringLiteral("2.95.0"),//+ QByteArray::number(KDE_VERSION_MINOR) + '.' + QByteArray::number(KDE_VERSION_RELEASE)),
QStringLiteral(KGET_VERSION_STRING),
i18n("An advanced download manager by KDE"),
KAboutLicense::GPL,
i18n("(C) 2005 - 2014, The KGet developers\n"
......
......@@ -17,6 +17,7 @@
#include "core/kget.h"
#include "core/filemodel.h"
#include "core/download.h"
#include "kget_version.h"
#include <torrent/torrent.h>
#include <peer/peermanager.h>
......@@ -422,7 +423,7 @@ void BTTransfer::btTransferInit(const QUrl &src, const QByteArray &data)
bt::InitLog(KStandardDirs::locateLocal("appdata", "torrentlog.log"), false, false);//initialize the torrent-log
bt::SetClientInfo("KGet", 2, 95, 0, bt::NORMAL, "KG");//Set client info to KGet TODO: don't hardcode version number
bt::SetClientInfo("KGet", KGET_VERSION_MAJOR, KGET_VERSION_MINOR, KGET_VERSION_PATCH, bt::NORMAL, "KG");//Set client info to KGet
bt::Uint16 i = 0;
while (!bt::Globals::instance().initTCPServer(BittorrentSettings::port() + i) && i < 10)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment