mirror of https://github.com/procxx/kepka.git
Read project version from build/version file.
This commit is contained in:
parent
aea5a8ff76
commit
cf0ea4a0a1
|
@ -11,10 +11,12 @@ cmake_policy(SET CMP0091 NEW)
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
include(cmake/variables.cmake)
|
include(cmake/variables.cmake)
|
||||||
|
include(cmake/version.cmake)
|
||||||
|
desktop_app_parse_version(Telegram/build/version)
|
||||||
|
|
||||||
project(Telegram
|
project(Telegram
|
||||||
LANGUAGES C CXX
|
LANGUAGES C CXX
|
||||||
VERSION 1.9.0
|
VERSION ${desktop_app_version_cmake}
|
||||||
DESCRIPTION "Official Telegram Desktop messenger"
|
DESCRIPTION "Official Telegram Desktop messenger"
|
||||||
HOMEPAGE_URL "https://desktop.telegram.org"
|
HOMEPAGE_URL "https://desktop.telegram.org"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1064,14 +1064,13 @@ else()
|
||||||
set(output_name "Telegram")
|
set(output_name "Telegram")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(current_version 1.9.1)
|
|
||||||
set_target_properties(Telegram PROPERTIES
|
set_target_properties(Telegram PROPERTIES
|
||||||
OUTPUT_NAME ${output_name}
|
OUTPUT_NAME ${output_name}
|
||||||
MACOSX_BUNDLE_GUI_IDENTIFIER ${bundle_identifier}
|
MACOSX_BUNDLE_GUI_IDENTIFIER ${bundle_identifier}
|
||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Telegram.plist
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Telegram.plist
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Telegram/${bundle_entitlements}"
|
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Telegram/${bundle_entitlements}"
|
||||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER ${bundle_identifier}
|
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER ${bundle_identifier}
|
||||||
XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION ${current_version}
|
XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION ${desktop_app_version_string}
|
||||||
XCODE_ATTRIBUTE_PRODUCT_NAME ${output_name}
|
XCODE_ATTRIBUTE_PRODUCT_NAME ${output_name}
|
||||||
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT $<$<NOT:$<CONFIG:Debug>>:dwarf-with-dsym>
|
XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT $<$<NOT:$<CONFIG:Debug>>:dwarf-with-dsym>
|
||||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
|
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
|
||||||
|
|
|
@ -20,6 +20,7 @@ executePath = os.getcwd()
|
||||||
scriptPath = os.path.dirname(os.path.realpath(__file__))
|
scriptPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
inputVersion = ''
|
inputVersion = ''
|
||||||
|
versionOriginal = ''
|
||||||
versionMajor = ''
|
versionMajor = ''
|
||||||
versionMinor = ''
|
versionMinor = ''
|
||||||
versionPatch = ''
|
versionPatch = ''
|
||||||
|
@ -29,6 +30,7 @@ for arg in sys.argv:
|
||||||
match = re.match(r'^\s*(\d+)\.(\d+)(\.(\d+)(\.(\d+|beta))?)?\s*$', arg)
|
match = re.match(r'^\s*(\d+)\.(\d+)(\.(\d+)(\.(\d+|beta))?)?\s*$', arg)
|
||||||
if match:
|
if match:
|
||||||
inputVersion = arg
|
inputVersion = arg
|
||||||
|
versionOriginal = inputVersion
|
||||||
versionMajor = match.group(1)
|
versionMajor = match.group(1)
|
||||||
versionMinor = match.group(2)
|
versionMinor = match.group(2)
|
||||||
versionPatch = match.group(4) if match.group(4) else '0'
|
versionPatch = match.group(4) if match.group(4) else '0'
|
||||||
|
@ -117,6 +119,7 @@ replaceInFile(scriptPath + '/version', [
|
||||||
[ r'(AppVersionStr\s+)\d[\d\.]*', r'\g<1>' + versionStr ],
|
[ r'(AppVersionStr\s+)\d[\d\.]*', r'\g<1>' + versionStr ],
|
||||||
[ r'(BetaChannel\s+)\d', r'\g<1>' + ('1' if versionBeta else '0') ],
|
[ r'(BetaChannel\s+)\d', r'\g<1>' + ('1' if versionBeta else '0') ],
|
||||||
[ r'(AlphaVersion\s+)\d+', r'\g<1>' + versionFullAlpha ],
|
[ r'(AlphaVersion\s+)\d+', r'\g<1>' + versionFullAlpha ],
|
||||||
|
[ r'(AppVersionOriginal\s+)\d[\d\.beta]*', r'\g<1>' + versionOriginal ],
|
||||||
])
|
])
|
||||||
|
|
||||||
print('Patching core/version.h...')
|
print('Patching core/version.h...')
|
||||||
|
|
|
@ -4,3 +4,4 @@ AppVersionStrSmall 1.9.1
|
||||||
AppVersionStr 1.9.1
|
AppVersionStr 1.9.1
|
||||||
BetaChannel 0
|
BetaChannel 0
|
||||||
AlphaVersion 1009001008
|
AlphaVersion 1009001008
|
||||||
|
AppVersionOriginal 1.9.1.8
|
||||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit b1cf242c5f381defffcdd92f5044c33e8346ac8a
|
Subproject commit 8776c5c26ea2087da67a4f47d8393727d6572967
|
Loading…
Reference in New Issue