mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Introduce separate version number for Subsurface-mobile
This is hard coded in version.cmake for now. The intent is to go to 1.0 in the first release version and to increment from there whenever we create an update. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5aa94578f7
commit
d42b7f55c4
6 changed files with 15 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
|
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
|
||||||
"#define GIT_VERSION_STRING \"@GIT_VERSION_STRING@\"
|
"#define GIT_VERSION_STRING \"@GIT_VERSION_STRING@\"
|
||||||
#define CANONICAL_VERSION_STRING \"@CANONICAL_VERSION_STRING@\"
|
#define CANONICAL_VERSION_STRING \"@CANONICAL_VERSION_STRING@\"
|
||||||
|
#define MOBILE_VERSION_STRING \"@MOBILE_VERSION_STRING@\"
|
||||||
")
|
")
|
||||||
|
|
||||||
file(COPY cmake/Modules/version.cmake
|
file(COPY cmake/Modules/version.cmake
|
||||||
|
|
|
@ -10,6 +10,7 @@ execute_process(
|
||||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
set(MOBILE_VERSION_STRING "0.93")
|
||||||
|
|
||||||
configure_file(${SRC} ${DST} @ONLY)
|
configure_file(${SRC} ${DST} @ONLY)
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
|
|
|
@ -936,7 +936,7 @@ QString QMLManager::getDate(const QString& diveId)
|
||||||
|
|
||||||
QString QMLManager::getVersion() const
|
QString QMLManager::getVersion() const
|
||||||
{
|
{
|
||||||
QRegExp versionRe(".*:([\\.,\\d]+).*");
|
QRegExp versionRe(".*:([()\\.,\\d]+).*");
|
||||||
if (!versionRe.exactMatch(getUserAgent()))
|
if (!versionRe.exactMatch(getUserAgent()))
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
|
|
|
@ -460,7 +460,7 @@ QString getUserAgent()
|
||||||
// fill in the system data - use ':' as separator
|
// fill in the system data - use ':' as separator
|
||||||
// replace all other ':' with ' ' so that this is easy to parse
|
// replace all other ':' with ' ' so that this is easy to parse
|
||||||
#ifdef SUBSURFACE_MOBILE
|
#ifdef SUBSURFACE_MOBILE
|
||||||
QString userAgent = QString("Subsurface-mobile:%1:").arg(subsurface_canonical_version());
|
QString userAgent = QString("Subsurface-mobile:%1(%2):").arg(subsurface_mobile_version()).arg(subsurface_canonical_version());
|
||||||
#else
|
#else
|
||||||
QString userAgent = QString("Subsurface:%1:").arg(subsurface_canonical_version());
|
QString userAgent = QString("Subsurface:%1:").arg(subsurface_canonical_version());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,3 +9,10 @@ const char *subsurface_canonical_version(void)
|
||||||
{
|
{
|
||||||
return CANONICAL_VERSION_STRING;
|
return CANONICAL_VERSION_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SUBSURFACE_MOBILE
|
||||||
|
const char *subsurface_mobile_version(void)
|
||||||
|
{
|
||||||
|
return MOBILE_VERSION_STRING;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -8,6 +8,10 @@ extern "C" {
|
||||||
const char *subsurface_git_version(void);
|
const char *subsurface_git_version(void);
|
||||||
const char *subsurface_canonical_version(void);
|
const char *subsurface_canonical_version(void);
|
||||||
|
|
||||||
|
#ifdef SUBSURFACE_MOBILE
|
||||||
|
const char *subsurface_mobile_version(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue