Fix git branch and commit revision in version.
This commit is contained in:
@@ -6,7 +6,7 @@ set(RPM_ARCH x86_64 CACHE STRING "Architecture of the rpm file")
|
|||||||
|
|
||||||
add_custom_target(rpm
|
add_custom_target(rpm
|
||||||
COMMAND ${CMAKE_SOURCE_DIR}/dist/maketarball.sh
|
COMMAND ${CMAKE_SOURCE_DIR}/dist/maketarball.sh
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy strawberry-${STRAWBERRY_VERSION_SPARKLE}.tar.xz ${RPMBUILD_DIR}/SOURCES/
|
COMMAND ${CMAKE_COMMAND} -E copy strawberry-${STRAWBERRY_VERSION_PACKAGE}.tar.xz ${RPMBUILD_DIR}/SOURCES/
|
||||||
COMMAND rpmbuild -bs ${CMAKE_SOURCE_DIR}/dist/strawberry.spec
|
COMMAND rpmbuild -bs ${CMAKE_SOURCE_DIR}/dist/strawberry.spec
|
||||||
COMMAND ${MOCK_COMMAND}
|
COMMAND ${MOCK_COMMAND}
|
||||||
--verbose
|
--verbose
|
||||||
|
|||||||
@@ -1,169 +1,63 @@
|
|||||||
# Change this file when releasing a new version.
|
|
||||||
|
|
||||||
# Version numbers.
|
|
||||||
set(STRAWBERRY_VERSION_MAJOR 0)
|
set(STRAWBERRY_VERSION_MAJOR 0)
|
||||||
set(STRAWBERRY_VERSION_MINOR 1)
|
set(STRAWBERRY_VERSION_MINOR 1)
|
||||||
set(STRAWBERRY_VERSION_PATCH 1)
|
set(STRAWBERRY_VERSION_PATCH 1)
|
||||||
#set(STRAWBERRY_VERSION_PRERELEASE rc1)
|
#set(STRAWBERRY_VERSION_PRERELEASE rc1)
|
||||||
|
|
||||||
# This should be set to OFF in a release branch
|
|
||||||
set(INCLUDE_GIT_REVISION ON)
|
set(INCLUDE_GIT_REVISION ON)
|
||||||
|
|
||||||
# Rules about version number comparison on different platforms:
|
|
||||||
# Debian:
|
|
||||||
# Two stages are repeated until there are no more characters to compare:
|
|
||||||
# one block of consecutive digits (\d+) is compared numerically, then one
|
|
||||||
# block of consecutive NON-digits (\D+) is compared lexigraphically,
|
|
||||||
# with the exception that ~ sorts before everything else.
|
|
||||||
#
|
|
||||||
# The "upstream version" and "debian revision" are separated by the last
|
|
||||||
# dash in the version number.
|
|
||||||
#
|
|
||||||
# Algorithm is in "man deb-version", test comparisons with
|
|
||||||
# dpkg --compare-versions.
|
|
||||||
#
|
|
||||||
# These are in sorted order:
|
|
||||||
# 1.0~rc1
|
|
||||||
# 1.0~rc2
|
|
||||||
# 1.0
|
|
||||||
# 1.0-1-g044287b
|
|
||||||
# 1.0-506-g044287b
|
|
||||||
# 1.0.1
|
|
||||||
# 1.0.2
|
|
||||||
# 1.0.a
|
|
||||||
#
|
|
||||||
# Rpm:
|
|
||||||
# The string is split on non-alphanumeric characters. Numeric sections are
|
|
||||||
# compared numerically and non-numeric sections are compared lexigraphically.
|
|
||||||
# If one sections is numeric and the other sections is non-numeric, the
|
|
||||||
# numeric sections is always NEWER.
|
|
||||||
#
|
|
||||||
# The "version" and "release" fields are compared with the same algorithm -
|
|
||||||
# if the versions are equal the releases are compared to determine which
|
|
||||||
# package is newer.
|
|
||||||
#
|
|
||||||
# Algorithm is described in:
|
|
||||||
# http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Package_Versioning
|
|
||||||
# Test comparisons with:
|
|
||||||
# import rpm
|
|
||||||
# rpm.labelCompare((epoch, version, release), (epoch, version, release))
|
|
||||||
#
|
|
||||||
# These are in sorted order:
|
|
||||||
# 1.0-0.rc1
|
|
||||||
# 1.0-0.rc2
|
|
||||||
# 1.0-1
|
|
||||||
# 1.0-2.506-g044287b
|
|
||||||
# 1.0.1-1
|
|
||||||
# 1.0.2-1
|
|
||||||
#
|
|
||||||
# Sparkle (mac) and QtSparkle (windows):
|
|
||||||
# The strings are split into sections of characters that are all of the same
|
|
||||||
# "type" - where a "type" is period, digit, or other. Sections are then
|
|
||||||
# compared against each other - digits are compared numerically and other
|
|
||||||
# are compared lexigraphically. When two sections are of different types,
|
|
||||||
# the numeric section is always NEWER.
|
|
||||||
#
|
|
||||||
# If the common parts of both strings are equal, but one string has more
|
|
||||||
# sections, the type of the first extra section is used to determine which
|
|
||||||
# version is newer.
|
|
||||||
# If the extra section is a string, the shorter result is NEWER, otherwise
|
|
||||||
# the shorter section is OLDER. That means that 1.0 is NEWER than 1.0rc1,
|
|
||||||
# but 1.0 is OLDER than 1.0.1.
|
|
||||||
#
|
|
||||||
# See compareversions.cpp in QtSparkle.
|
|
||||||
|
|
||||||
# Version numbers in Strawberry:
|
|
||||||
# Deb:
|
|
||||||
# With git: $tagname-$commitcount-g$sha1
|
|
||||||
# Without git: $major.$minor.$patch[~$prerelease]
|
|
||||||
#
|
|
||||||
# Rpm: Version Release
|
|
||||||
# Prerelease: $major.$minor.$patch 0.$prerelease
|
|
||||||
# Without git: $major.$minor.$patch 1
|
|
||||||
# With git: $tagname 2.$commitcount.g$sha1
|
|
||||||
#
|
|
||||||
# QtSparkle (Windows):
|
|
||||||
# With git: $tagname-$commitcount-g$sha1
|
|
||||||
# Without git: $major.$minor.$patch[$prerelease]
|
|
||||||
#
|
|
||||||
# Mac info.plist: CFBundleVersion
|
|
||||||
# Prerelease: 4096.$major.$minor.$patch.0
|
|
||||||
# Without git: 4096.$major.$minor.$patch.1
|
|
||||||
# With git: 4096.$tagname.2.$commitcount
|
|
||||||
# The 4096. prefix is because the previous versioning scheme used svn revision
|
|
||||||
# numbers, which got up to 3000+.
|
|
||||||
|
|
||||||
|
|
||||||
set(majorminorpatch "${STRAWBERRY_VERSION_MAJOR}.${STRAWBERRY_VERSION_MINOR}.${STRAWBERRY_VERSION_PATCH}")
|
set(majorminorpatch "${STRAWBERRY_VERSION_MAJOR}.${STRAWBERRY_VERSION_MINOR}.${STRAWBERRY_VERSION_PATCH}")
|
||||||
|
|
||||||
set(STRAWBERRY_VERSION_DISPLAY "${majorminorpatch}")
|
set(STRAWBERRY_VERSION_DISPLAY "${majorminorpatch}")
|
||||||
set(STRAWBERRY_VERSION_DEB "${majorminorpatch}")
|
|
||||||
set(STRAWBERRY_VERSION_RPM_V "${majorminorpatch}")
|
set(STRAWBERRY_VERSION_RPM_V "${majorminorpatch}")
|
||||||
set(STRAWBERRY_VERSION_RPM_R "1")
|
set(STRAWBERRY_VERSION_RPM_R "1")
|
||||||
set(STRAWBERRY_VERSION_SPARKLE "${majorminorpatch}")
|
set(STRAWBERRY_VERSION_PACKAGE "${majorminorpatch}")
|
||||||
set(STRAWBERRY_VERSION_PLIST "4096.${majorminorpatch}")
|
|
||||||
|
|
||||||
if(${STRAWBERRY_VERSION_PATCH} EQUAL "0")
|
if(${STRAWBERRY_VERSION_PATCH} EQUAL "0")
|
||||||
set(STRAWBERRY_VERSION_DISPLAY "${STRAWBERRY_VERSION_MAJOR}.${STRAWBERRY_VERSION_MINOR}")
|
set(STRAWBERRY_VERSION_DISPLAY "${STRAWBERRY_VERSION_MAJOR}.${STRAWBERRY_VERSION_MINOR}")
|
||||||
endif(${STRAWBERRY_VERSION_PATCH} EQUAL "0")
|
endif(${STRAWBERRY_VERSION_PATCH} EQUAL "0")
|
||||||
|
|
||||||
# Add prerelease
|
|
||||||
if(STRAWBERRY_VERSION_PRERELEASE)
|
if(STRAWBERRY_VERSION_PRERELEASE)
|
||||||
set(STRAWBERRY_VERSION_DISPLAY "${STRAWBERRY_VERSION_DISPLAY} ${STRAWBERRY_VERSION_PRERELEASE}")
|
set(STRAWBERRY_VERSION_DISPLAY "${STRAWBERRY_VERSION_DISPLAY} ${STRAWBERRY_VERSION_PRERELEASE}")
|
||||||
set(STRAWBERRY_VERSION_DEB "${STRAWBERRY_VERSION_DEB}~${STRAWBERRY_VERSION_PRERELEASE}")
|
|
||||||
set(STRAWBERRY_VERSION_RPM_R "0.${STRAWBERRY_VERSION_PRERELEASE}")
|
set(STRAWBERRY_VERSION_RPM_R "0.${STRAWBERRY_VERSION_PRERELEASE}")
|
||||||
set(STRAWBERRY_VERSION_SPARKLE "${STRAWBERRY_VERSION_SPARKLE}${STRAWBERRY_VERSION_PRERELEASE}")
|
set(STRAWBERRY_VERSION_PACKAGE "${STRAWBERRY_VERSION_PACKAGE}${STRAWBERRY_VERSION_PRERELEASE}")
|
||||||
set(STRAWBERRY_VERSION_PLIST "${STRAWBERRY_VERSION_PLIST}.0")
|
|
||||||
else(STRAWBERRY_VERSION_PRERELEASE)
|
|
||||||
set(STRAWBERRY_VERSION_PLIST "${STRAWBERRY_VERSION_PLIST}.1")
|
|
||||||
endif(STRAWBERRY_VERSION_PRERELEASE)
|
endif(STRAWBERRY_VERSION_PRERELEASE)
|
||||||
|
|
||||||
# Add git revision
|
find_program(GIT_EXECUTABLE git)
|
||||||
if(FORCE_GIT_REVISION)
|
|
||||||
set(GIT_REV ${FORCE_GIT_REVISION})
|
|
||||||
set(GIT_INFO_RESULT 0)
|
|
||||||
else(FORCE_GIT_REVISION)
|
|
||||||
find_program(GIT_EXECUTABLE git)
|
|
||||||
|
|
||||||
if(NOT GIT_EXECUTABLE-NOTFOUND)
|
if(NOT GIT_EXECUTABLE-NOTFOUND)
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe
|
# Get the current working branch
|
||||||
RESULT_VARIABLE GIT_INFO_RESULT
|
execute_process(
|
||||||
OUTPUT_VARIABLE GIT_REV
|
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||||
ERROR_QUIET
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
RESULT_VARIABLE GIT_INFO_RESULT
|
||||||
endif()
|
OUTPUT_VARIABLE GIT_BRANCH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET
|
||||||
|
)
|
||||||
|
# Get the latest abbreviated commit hash of the working branch
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
|
||||||
|
RESULT_VARIABLE GIT_INFO_RESULT
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_QUIET
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${GIT_INFO_RESULT} EQUAL 0)
|
if(${GIT_INFO_RESULT} EQUAL 0)
|
||||||
string(REGEX REPLACE "^(.+)-([0-9]+)-(g[a-f0-9]+)$" "\\1;\\2;\\3"
|
|
||||||
GIT_PARTS ${GIT_REV})
|
|
||||||
|
|
||||||
if(NOT GIT_PARTS)
|
|
||||||
message(FATAL_ERROR "Failed to parse git revision string '${GIT_REV}'")
|
|
||||||
endif(NOT GIT_PARTS)
|
|
||||||
|
|
||||||
list(LENGTH GIT_PARTS GIT_PARTS_LENGTH)
|
|
||||||
if(GIT_PARTS_LENGTH EQUAL 3)
|
|
||||||
list(GET GIT_PARTS 0 GIT_TAGNAME)
|
|
||||||
list(GET GIT_PARTS 1 GIT_COMMITCOUNT)
|
|
||||||
list(GET GIT_PARTS 2 GIT_SHA1)
|
|
||||||
set(HAS_GET_REVISION ON)
|
set(HAS_GET_REVISION ON)
|
||||||
endif(GIT_PARTS_LENGTH EQUAL 3)
|
set(GIT_REV "${GIT_COMMIT_HASH}")
|
||||||
endif(${GIT_INFO_RESULT} EQUAL 0)
|
endif(${GIT_INFO_RESULT} EQUAL 0)
|
||||||
|
|
||||||
if(INCLUDE_GIT_REVISION AND HAS_GET_REVISION)
|
if(INCLUDE_GIT_REVISION AND HAS_GET_REVISION)
|
||||||
set(STRAWBERRY_VERSION_DISPLAY "${GIT_REV}")
|
set(STRAWBERRY_VERSION_DISPLAY "${STRAWBERRY_VERSION_DISPLAY} ${GIT_BRANCH} ${GIT_REV}")
|
||||||
set(STRAWBERRY_VERSION_DEB "${GIT_REV}")
|
set(STRAWBERRY_VERSION_PACKAGE "${STRAWBERRY_VERSION_PACKAGE}-${GIT_BRANCH}-${GIT_REV}")
|
||||||
set(STRAWBERRY_VERSION_RPM_V "${GIT_TAGNAME}")
|
set(STRAWBERRY_VERSION_RPM_V "${STRAWBERRY_VERSION_RPM_V}.${GIT_BRANCH}.${GIT_REV}")
|
||||||
set(STRAWBERRY_VERSION_RPM_R "2.${GIT_COMMITCOUNT}.${GIT_SHA1}")
|
set(STRAWBERRY_VERSION_RPM_R "1")
|
||||||
set(STRAWBERRY_VERSION_SPARKLE "${GIT_REV}")
|
|
||||||
set(STRAWBERRY_VERSION_PLIST "4096.${GIT_TAGNAME}.2.${GIT_COMMITCOUNT}")
|
|
||||||
endif(INCLUDE_GIT_REVISION AND HAS_GET_REVISION)
|
endif(INCLUDE_GIT_REVISION AND HAS_GET_REVISION)
|
||||||
|
|
||||||
if(0)
|
message(STATUS "Strawberry Version:")
|
||||||
message(STATUS "Display: ${STRAWBERRY_VERSION_DISPLAY}")
|
message(STATUS "Display: ${STRAWBERRY_VERSION_DISPLAY}")
|
||||||
message(STATUS "Deb: ${STRAWBERRY_VERSION_DEB}")
|
message(STATUS "Package: ${STRAWBERRY_VERSION_PACKAGE}")
|
||||||
message(STATUS "Rpm: ${STRAWBERRY_VERSION_RPM_V}-${STRAWBERRY_VERSION_RPM_R}")
|
message(STATUS "Rpm: ${STRAWBERRY_VERSION_RPM_V}-${STRAWBERRY_VERSION_RPM_R}")
|
||||||
message(STATUS "Sparkle: ${STRAWBERRY_VERSION_SPARKLE}")
|
|
||||||
message(STATUS "Plist: ${STRAWBERRY_VERSION_PLIST}")
|
|
||||||
endif(0)
|
|
||||||
|
|||||||
7
dist/maketarball.sh.in
vendored
7
dist/maketarball.sh.in
vendored
@@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
name=strawberry
|
name=strawberry
|
||||||
version="@STRAWBERRY_VERSION_SPARKLE@"
|
version="@STRAWBERRY_VERSION_PACKAGE@"
|
||||||
deb_dist="@DEB_DIST@"
|
|
||||||
root=$(cd "${0%/*}/.." && echo $PWD/${0##*/})
|
root=$(cd "${0%/*}/.." && echo $PWD/${0##*/})
|
||||||
root=`dirname "$root"`
|
root=`dirname "$root"`
|
||||||
rootnoslash=`echo $root | sed "s/^\///"`
|
rootnoslash=`echo $root | sed "s/^\///"`
|
||||||
@@ -15,8 +14,6 @@ tar -cJf $name-$version.tar.xz \
|
|||||||
--exclude "$root/dist/*.tar" \
|
--exclude "$root/dist/*.tar" \
|
||||||
--exclude "$root/dist/*.tar.*" \
|
--exclude "$root/dist/*.tar.*" \
|
||||||
--exclude "$root/CMakeLists.txt.user" \
|
--exclude "$root/CMakeLists.txt.user" \
|
||||||
|
--exclude "$root/build" \
|
||||||
--exclude ".directory" \
|
--exclude ".directory" \
|
||||||
"$root"
|
"$root"
|
||||||
|
|
||||||
echo "Also creating ${name}_${version}~${deb_dist}.orig.tar.xz..."
|
|
||||||
cp "$name-$version.tar.xz" "${name}_${version}~${deb_dist}.orig.tar.xz"
|
|
||||||
|
|||||||
29
dist/strawberry.spec.in
vendored
29
dist/strawberry.spec.in
vendored
@@ -4,9 +4,9 @@ Release: @STRAWBERRY_VERSION_RPM_R@.@RPM_DISTRO@
|
|||||||
Summary: A audio player and music collection organiser
|
Summary: A audio player and music collection organiser
|
||||||
|
|
||||||
Group: Applications/Multimedia
|
Group: Applications/Multimedia
|
||||||
License: GPLv3
|
License: GPL-3.0+
|
||||||
URL: http://www.strawbs.org/
|
URL: http://www.strawbs.org/
|
||||||
Source0: %{name}-@STRAWBERRY_VERSION_SPARKLE@.tar.xz
|
Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@@ -49,14 +49,6 @@ Requires: glib-2.0
|
|||||||
Requires: gio-2.0
|
Requires: gio-2.0
|
||||||
Requires: protobuf
|
Requires: protobuf
|
||||||
Requires: cryptopp
|
Requires: cryptopp
|
||||||
Requires: libsqlite3-0
|
|
||||||
Requires: taglib
|
|
||||||
Requires: libcdio
|
|
||||||
Requires: libgpod-1.0
|
|
||||||
Requires: libchromaprint
|
|
||||||
Requires: libmtp
|
|
||||||
Requires: libpulse
|
|
||||||
Requires: libxml
|
|
||||||
Requires: Qt5Core
|
Requires: Qt5Core
|
||||||
Requires: Qt5Gui
|
Requires: Qt5Gui
|
||||||
Requires: Qt5Widgets
|
Requires: Qt5Widgets
|
||||||
@@ -91,18 +83,17 @@ Requires: gstreamer1.0(decoder-audio/x-wav)
|
|||||||
Strawberry is a modern audio player and music collection organiser.
|
Strawberry is a modern audio player and music collection organiser.
|
||||||
It is a fork of Clementine. The name is inspired by the band Strawbs.
|
It is a fork of Clementine. The name is inspired by the band Strawbs.
|
||||||
|
|
||||||
Features include:
|
Features:
|
||||||
|
* Play and organize music
|
||||||
* Organize and play your music collection
|
* Edit tags on music files
|
||||||
* Edit tags on your music
|
* Album cover art from Lastfm, Musicbrainz, Discogs and Amazon
|
||||||
* Download album cover art from Last.fm, musicbrainz, Discogs and Amazon
|
|
||||||
* Native desktop notifications
|
* Native desktop notifications
|
||||||
* Import and export playlists in multiple formats
|
* Playlists in multiple formats
|
||||||
* Copy music to your iPod, iPhone, MTP or mass-storage USB player
|
* Transfer music to iPod, iPhone, MTP or mass-storage USB player
|
||||||
* Support for multiple backends
|
* Support for multiple backends
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-@STRAWBERRY_VERSION_SPARKLE@
|
%setup -q -n %{name}-@STRAWBERRY_VERSION_PACKAGE@
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{cmake} .. -DUSE_INSTALL_PREFIX=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
%{cmake} .. -DUSE_INSTALL_PREFIX=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||||
@@ -116,7 +107,6 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
|||||||
cd build
|
cd build
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc
|
%doc
|
||||||
@@ -127,5 +117,6 @@ make clean
|
|||||||
%{_datadir}/icons/hicolor/64x64/apps/strawberry.png
|
%{_datadir}/icons/hicolor/64x64/apps/strawberry.png
|
||||||
%{_datadir}/icons/hicolor/128x128/apps/strawberry.png
|
%{_datadir}/icons/hicolor/128x128/apps/strawberry.png
|
||||||
%{_datadir}/icons/hicolor/scalable/apps/strawberry.svg
|
%{_datadir}/icons/hicolor/scalable/apps/strawberry.svg
|
||||||
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
@@ -1041,17 +1041,17 @@ if (APPLE)
|
|||||||
|
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_SPARKLE}.dmg
|
OUTPUT ${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_PACKAGE}.dmg
|
||||||
${CMAKE_COMMAND} -E remove -f ${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_SPARKLE}.dmg
|
${CMAKE_COMMAND} -E remove -f ${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_PACKAGE}.dmg
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../dist/create-dmg.sh ${PROJECT_BINARY_DIR}/strawberry.app
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../dist/create-dmg.sh ${PROJECT_BINARY_DIR}/strawberry.app
|
||||||
COMMAND ${CMAKE_COMMAND} -E rename
|
COMMAND ${CMAKE_COMMAND} -E rename
|
||||||
${PROJECT_BINARY_DIR}/strawberry.dmg
|
${PROJECT_BINARY_DIR}/strawberry.dmg
|
||||||
${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_SPARKLE}.dmg
|
${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_PACKAGE}.dmg
|
||||||
DEPENDS strawberry
|
DEPENDS strawberry
|
||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
add_custom_target(dmg
|
add_custom_target(dmg
|
||||||
DEPENDS ${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_SPARKLE}.dmg)
|
DEPENDS ${PROJECT_BINARY_DIR}/strawberry-${STRAWBERRY_VERSION_PACKAGE}.dmg)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
install(TARGETS strawberry
|
install(TARGETS strawberry
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
|
|||||||
@@ -552,7 +552,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
|
|||||||
qLog(Debug) << "Creating sparkle updater";
|
qLog(Debug) << "Creating sparkle updater";
|
||||||
qtsparkle::Updater* updater = new qtsparkle::Updater(QUrl("https://strawberry-data.appspot.com/sparkle-windows"), this);
|
qtsparkle::Updater* updater = new qtsparkle::Updater(QUrl("https://strawberry-data.appspot.com/sparkle-windows"), this);
|
||||||
updater->SetNetworkAccessManager(new NetworkAccessManager(this));
|
updater->SetNetworkAccessManager(new NetworkAccessManager(this));
|
||||||
updater->SetVersion(STRAWBERRY_VERSION_SPARKLE);
|
updater->SetVersion(STRAWBERRY_VERSION_PACKAGE);
|
||||||
connect(check_updates, SIGNAL(triggered()), updater, SLOT(CheckNow()));
|
connect(check_updates, SIGNAL(triggered()), updater, SLOT(CheckNow()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,6 @@
|
|||||||
#define VERSION_H_IN
|
#define VERSION_H_IN
|
||||||
|
|
||||||
#define STRAWBERRY_VERSION_DISPLAY "${STRAWBERRY_VERSION_DISPLAY}"
|
#define STRAWBERRY_VERSION_DISPLAY "${STRAWBERRY_VERSION_DISPLAY}"
|
||||||
#define STRAWBERRY_VERSION_SPARKLE "${STRAWBERRY_VERSION_SPARKLE}"
|
#define STRAWBERRY_VERSION_PACKAGE "${STRAWBERRY_VERSION_PACKAGE}"
|
||||||
|
|
||||||
#endif // VERSION_H_IN
|
#endif // VERSION_H_IN
|
||||||
|
|||||||
Reference in New Issue
Block a user