Commit 959155fa authored by Alberto Villa's avatar Alberto Villa Committed by Vincent PINON

Rename VERSION #define to KDENLIVE_VERSION

Conflicts:
	src/mainwindow.cpp

Conflicts:
	src/mainwindow.cpp
parent ad810d1d
...@@ -15,33 +15,31 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) ...@@ -15,33 +15,31 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF) option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
# Get current version. # Get current version.
set(VERSION "\"${KDENLIVE_VERSION}\"") set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION}")
if(NOT RELEASE_BUILD) if(NOT RELEASE_BUILD AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
if(EXISTS ${PROJECT_SOURCE_DIR}/.git) # Probably a Git workspace; determine the revision.
# Probably a Git workspace: determine the revision. find_package(Git QUIET)
find_package(Git) if(GIT_FOUND)
if(GIT_FOUND) exec_program(${GIT_EXECUTABLE}
${CMAKE_SOURCE_DIR}
ARGS "describe --tags"
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
RETURN_VALUE TAG_RESULT
)
# git describe --tags failed; maybe the repository was checked with depth=1.
if(NOT ${TAG_RESULT} EQUAL 0)
exec_program(${GIT_EXECUTABLE} exec_program(${GIT_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
ARGS "describe --tags" ARGS "describe --always"
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
RETURN_VALUE TAG_RESULT
) )
# git describe --tags failed, for example it fails if repo was checked with depth=1 endif()
if(NOT ${TAG_RESULT} EQUAL 0) message(STATUS "Kdenlive Git revision: ${KDENLIVE_GIT_REVISION}")
exec_program(${GIT_EXECUTABLE} set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})")
${CMAKE_CURRENT_SOURCE_DIR} else()
ARGS "describe --always" message(STATUS "Kdenlive Git revision could not be determined")
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION endif()
) endif()
endif(NOT ${TAG_RESULT} EQUAL 0)
message("Current Kdenlive Git revision is ${KDENLIVE_GIT_REVISION}")
set(VERSION "\"${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})\"")
else(GIT_FOUND)
message("Could not determine the Git revision")
endif(GIT_FOUND)
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
endif(NOT RELEASE_BUILD)
include(CheckIncludeFiles) include(CheckIncludeFiles)
check_include_files(malloc.h HAVE_MALLOC_H) check_include_files(malloc.h HAVE_MALLOC_H)
......
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#cmakedefine VERSION @VERSION@ #define KDENLIVE_VERSION "@KDENLIVE_VERSION_STRING@"
#define MLT_PREFIX "@MLT_PREFIX@" #define MLT_PREFIX "@MLT_PREFIX@"
......
...@@ -687,7 +687,7 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene, const QStringList & ...@@ -687,7 +687,7 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene, const QStringList &
QDomElement markers = sceneList.createElement("markers"); QDomElement markers = sceneList.createElement("markers");
addedXml.setAttribute("version", DOCUMENTVERSION); addedXml.setAttribute("version", DOCUMENTVERSION);
addedXml.setAttribute("kdenliveversion", VERSION); addedXml.setAttribute("kdenliveversion", KDENLIVE_VERSION);
addedXml.setAttribute("profile", profilePath()); addedXml.setAttribute("profile", profilePath());
addedXml.setAttribute("projectfolder", m_projectFolder.path()); addedXml.setAttribute("projectfolder", m_projectFolder.path());
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
KAboutData aboutData(QByteArray("kdenlive"), QByteArray("kdenlive"), KAboutData aboutData(QByteArray("kdenlive"), QByteArray("kdenlive"),
ki18n("Kdenlive"), VERSION, ki18n("Kdenlive"), KDENLIVE_VERSION,
ki18n("An open source video editor."), ki18n("An open source video editor."),
KAboutData::License_GPL, KAboutData::License_GPL,
ki18n("Copyright © 2007–2014 Kdenlive authors")); ki18n("Copyright © 2007–2014 Kdenlive authors"));
......
...@@ -118,14 +118,7 @@ ...@@ -118,14 +118,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <locale.h> #include <locale.h>
// Uncomment for deeper debugging static const char version[] = KDENLIVE_VERSION;
//#define DEBUG_MAINW
#ifdef DEBUG_MAINW
#include <QDebug>
#endif
static const char version[] = VERSION;
namespace Mlt namespace Mlt
{ {
......
...@@ -51,7 +51,7 @@ const int mltVersionMajor = 0; ...@@ -51,7 +51,7 @@ const int mltVersionMajor = 0;
const int mltVersionMinor = 8; const int mltVersionMinor = 8;
const int mltVersionRevision = 8; const int mltVersionRevision = 8;
static const char kdenlive_version[] = VERSION; static const char kdenlive_version[] = KDENLIVE_VERSION;
Wizard::Wizard(bool upgrade, QWidget *parent) : Wizard::Wizard(bool upgrade, QWidget *parent) :
QWizard(parent), QWizard(parent),
......
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