From 8da6bcc4df6c3d939d2a4738fde3a94502870e38 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 18 Jun 2011 13:40:33 +0000 Subject: [PATCH] Add make dist target --- qbittorrent.pro | 9 +++++++++ src/qtlibtorrent/qbtsession.cpp | 3 +-- version.pri | 13 +++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/qbittorrent.pro b/qbittorrent.pro index d92342723..5b2b062ca 100644 --- a/qbittorrent.pro +++ b/qbittorrent.pro @@ -2,3 +2,12 @@ TEMPLATE = subdirs SUBDIRS += src +include(version.pri) + +# Dist +dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ && +dist.commands += svn export . ../$${PROJECT_NAME}-$${PROJECT_VERSION} && +dist.commands += tar zcpvf ../$${PROJECT_NAME}-$${PROJECT_VERSION}.tar.gz ../$${PROJECT_NAME}-$${PROJECT_VERSION} && +dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION} + +QMAKE_EXTRA_TARGETS += dist diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 6f9553b06..016ee6add 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -87,7 +87,6 @@ QBtSession* QBtSession::m_instance = 0; const qreal QBtSession::MAX_RATIO = 9999.; const int MAX_TRACKER_ERRORS = 2; -enum VersionType { NORMAL,ALPHA,BETA,RELEASE_CANDIDATE,DEVEL }; // Main constructor QBtSession::QBtSession() @@ -113,7 +112,7 @@ QBtSession::QBtSession() version << VERSION_MAJOR; version << VERSION_MINOR; version << VERSION_BUGFIX; - version << VERSION_TYPE; + version << 0; const QString peer_id = "qB"; // Construct session s = new session(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)), 0); diff --git a/version.pri b/version.pri index 70097d96e..c3cd4c582 100644 --- a/version.pri +++ b/version.pri @@ -1,11 +1,12 @@ +PROJECT_NAME = qbittorrent +PROJECT_VERSION = 2.8.2 + os2 { - DEFINES += VERSION=\'\"v2.8.1\"\' + DEFINES += VERSION=\'\"v$${VERSION}\"\' } else { - DEFINES += VERSION=\\\"v2.8.1\\\" + DEFINES += VERSION=\\\"v$${VERSION}\\\" } + DEFINES += VERSION_MAJOR=2 DEFINES += VERSION_MINOR=8 -DEFINES += VERSION_BUGFIX=1 - -# NORMAL,ALPHA,BETA,RELEASE_CANDIDATE,DEVEL -DEFINES += VERSION_TYPE=NORMAL +DEFINES += VERSION_BUGFIX=2