mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 20:34:39 +01:00
Keep all the version numbers in one file, so we don't have to change it in hundreds of places each release.
This commit is contained in:
parent
d3cbeed9b7
commit
7039d04ee6
@ -1,6 +1,7 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
include(FindPkgConfig)
|
||||
include(Version.cmake)
|
||||
|
||||
if (CMAKE_FIND_ROOT_PATH)
|
||||
# Help find the Qt headers if we're cross compiling (since we can't run qmake.exe)
|
||||
@ -109,10 +110,9 @@ add_subdirectory(src)
|
||||
if (NOT APPLE)
|
||||
add_subdirectory(3rdparty/qxt)
|
||||
endif (NOT APPLE)
|
||||
|
||||
add_subdirectory(3rdparty/universalchardet)
|
||||
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(dist)
|
||||
|
||||
if (WIN32 OR APPLE)
|
||||
message(STATUS "Building static qsqlite plugin")
|
||||
|
18
Version.cmake
Normal file
18
Version.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
# Change this file when releasing a new version.
|
||||
# You'll also need to add a new changelog entry in:
|
||||
# debian/changelog
|
||||
# dist/clementine.spec
|
||||
|
||||
# Version numbers. For m.n rc, use m.(n-1).99
|
||||
set(CLEMENTINE_VERSION_MAJOR 0)
|
||||
set(CLEMENTINE_VERSION_MINOR 2)
|
||||
set(CLEMENTINE_VERSION_PATCH 99)
|
||||
set(CLEMENTINE_VERSION_STRING "0.3 rc3") # Displayed in GUIs
|
||||
set(CLEMENTINE_VERSION_SHORT_STRING "0.3-rc3") # Used in filenames
|
||||
|
||||
|
||||
if (CLEMENTINE_VERSION_PATCH)
|
||||
set(CLEMENTINE_VERSION ${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}.${CLEMENTINE_VERSION_PATCH})
|
||||
else (CLEMENTINE_VERSION_PATCH)
|
||||
set(CLEMENTINE_VERSION ${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR})
|
||||
endif (CLEMENTINE_VERSION_PATCH)
|
9
dist/CMakeLists.txt
vendored
Normal file
9
dist/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/clementine.spec.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/clementine.spec)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/maketarball.sh.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/maketarball.sh @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/windows/clementine.nsi @ONLY)
|
||||
# windows/windres.rc is done by src/CMakeLists.txt
|
6
dist/Info.plist → dist/Info.plist.in
vendored
6
dist/Info.plist → dist/Info.plist.in
vendored
@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>clementine</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Clementine 0.3 beta 3</string>
|
||||
<string>Clementine ${CLEMENTINE_VERSION_STRING}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>clementine</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@ -15,13 +15,13 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>0.3 beta 3</string>
|
||||
<string>${CLEMENTINE_VERSION_STRING}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Clementine</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.3_beta3</string>
|
||||
<string>${CLEMENTINE_VERSION_SHORTSTRING}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>123</string>
|
||||
<key>CSResourcesFileMapped</key>
|
@ -1,5 +1,5 @@
|
||||
Name: clementine
|
||||
Version: 0.2.99
|
||||
Version: ${CLEMENTINE_VERSION}
|
||||
Release: 1%{?dist}
|
||||
Summary: A music player and library organiser
|
||||
|
2
dist/maketarball.sh → dist/maketarball.sh.in
vendored
2
dist/maketarball.sh → dist/maketarball.sh.in
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
name=clementine
|
||||
url=`svn info | grep URL | head -n1 | awk '{print $2}' | sed 's/\/dist//'`
|
||||
version=`grep Version $name.spec | head -n1 | awk '{print $2}'`
|
||||
version="@CLEMENTINE_VERSION@"
|
||||
|
||||
echo "Checking out $url into $name-$version..."
|
||||
|
@ -1,8 +1,9 @@
|
||||
!define PRODUCT_NAME "Clementine"
|
||||
!define PRODUCT_PUBLISHER "Clementine"
|
||||
!define PRODUCT_VERSION_MAJOR 0
|
||||
!define PRODUCT_VERSION_MINOR 3
|
||||
!define PRODUCT_DISPLAY_VERSION "0.3-rc3"
|
||||
!define PRODUCT_VERSION_MAJOR @CLEMENTINE_VERSION_MAJOR@
|
||||
!define PRODUCT_VERSION_MINOR @CLEMENTINE_VERSION_MINOR@
|
||||
!define PRODUCT_DISPLAY_VERSION "@CLEMENTINE_VERSION_STRING@"
|
||||
!define PRODUCT_DISPLAY_VERSION_SHORT "@CLEMENTINE_VERSION_SHORT_STRING@"
|
||||
!define PRODUCT_WEB_SITE "http://code.google.com/p/clementine-player/"
|
||||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
||||
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
||||
@ -30,7 +31,7 @@ SetCompressor /SOLID lzma
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
Name "${PRODUCT_NAME}"
|
||||
OutFile "${PRODUCT_NAME}Setup-${PRODUCT_DISPLAY_VERSION}.exe"
|
||||
OutFile "${PRODUCT_NAME}Setup-${PRODUCT_DISPLAY_VERSION_SHORT}.exe"
|
||||
InstallDir "${PRODUCT_INSTALL_DIR}"
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
@ -1,7 +1,7 @@
|
||||
clementine ICON "clementine.ico"
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 0,2,0,0
|
||||
PRODUCTVERSION 0,2,0,0
|
||||
FILEVERSION ${CLEMENTINE_VERSION_MAJOR},${CLEMENTINE_VERSION_MINOR},${CLEMENTINE_VERSION_PATCH},0
|
||||
PRODUCTVERSION ${CLEMENTINE_VERSION_MAJOR},${CLEMENTINE_VERSION_MINOR},${CLEMENTINE_VERSION_PATCH},0
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
@ -9,12 +9,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Clementine"
|
||||
VALUE "FileDescription", "Clementine music player"
|
||||
VALUE "FileVersion", "0.2"
|
||||
VALUE "FileVersion", "${CLEMENTINE_VERSION_STRING}"
|
||||
VALUE "InternalName", "clementine"
|
||||
VALUE "LegalCopyright", "David Sansome"
|
||||
VALUE "OriginalFilename", "clementine.exe"
|
||||
VALUE "ProductName", "Clementine"
|
||||
VALUE "ProductVersion", "0.2"
|
||||
VALUE "ProductVersion", "${CLEMENTINE_VERSION_STRING}"
|
||||
END
|
||||
END
|
||||
|
@ -228,6 +228,10 @@ set(CLEMENTINE-LANGUAGES
|
||||
tr
|
||||
)
|
||||
|
||||
# Configured header file that contains various macros
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# OSD and DBus.
|
||||
if(APPLE)
|
||||
set(CLEMENTINE-SOURCES ${CLEMENTINE-SOURCES} osd_mac.mm mac_startup.mm)
|
||||
@ -264,7 +268,9 @@ endif(APPLE)
|
||||
|
||||
# resource file for windows
|
||||
if(WIN32)
|
||||
set(CLEMENTINE-WIN32-RESOURCES ../dist/windows/windres.rc)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../dist/windows/windres.rc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/windres.rc)
|
||||
set(CLEMENTINE-WIN32-RESOURCES windres.rc)
|
||||
endif(WIN32)
|
||||
|
||||
qt4_wrap_cpp(CLEMENTINE-SOURCES-MOC ${CLEMENTINE-MOC-HEADERS})
|
||||
|
26
src/config.h.in
Normal file
26
src/config.h.in
Normal file
@ -0,0 +1,26 @@
|
||||
/* This file is part of Clementine.
|
||||
|
||||
Clementine is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Clementine is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H_IN
|
||||
#define CONFIG_H_IN
|
||||
|
||||
#define CLEMENTINE_VERSION_MAJOR ${CLEMENTINE_VERSION_MAJOR}
|
||||
#define CLEMENTINE_VERSION_MINOR ${CLEMENTINE_VERSION_MINOR}
|
||||
#define CLEMENTINE_VERSION_PATCH ${CLEMENTINE_VERSION_PATCH}
|
||||
#define CLEMENTINE_VERSION_STRING "${CLEMENTINE_VERSION_STRING}"
|
||||
#define CLEMENTINE_VERSION_SHORT_STRING "${CLEMENTINE_VERSION_SHORT_STRING}"
|
||||
|
||||
#endif // CONFIG_H_IN
|
@ -29,6 +29,7 @@
|
||||
#include "potranslator.h"
|
||||
#include "commandlineoptions.h"
|
||||
#include "engines/enginebase.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <QtSingleApplication>
|
||||
#include <QtDebug>
|
||||
@ -79,7 +80,7 @@ int main(int argc, char *argv[]) {
|
||||
#endif
|
||||
|
||||
QCoreApplication::setApplicationName("Clementine");
|
||||
QCoreApplication::setApplicationVersion("0.3 rc1");
|
||||
QCoreApplication::setApplicationVersion(CLEMENTINE_VERSION_STRING);
|
||||
QCoreApplication::setOrganizationName("Clementine");
|
||||
QCoreApplication::setOrganizationDomain("davidsansome.com");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user