Skip to content

Commit 00cd20a

Browse files
authored
Update version to v5.0.4 (#2604)
* chore(bindings): fix const generator syntax error * chore(version): update version to v5.0.4
1 parent 44b0589 commit 00cd20a

File tree

5 files changed

+8
-22
lines changed

5 files changed

+8
-22
lines changed

CMakeLists.txt

+3-17
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,9 @@ cmake_policy(SET CMP0042 NEW)
2121
# Enable support for MSVC_RUNTIME_LIBRARY
2222
cmake_policy(SET CMP0091 NEW)
2323

24-
# Check if VERSION is provided externally, otherwise default to 5.0.3
25-
if(NOT DEFINED PROJECT_VERSION)
26-
set(PROJECT_VERSION "5.0.4")
27-
endif()
28-
29-
# Use PROJECT_VERSION directly for CPack
30-
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
31-
32-
# Remove the 'v' prefix if it exists and extract the major, minor, and patch versions
33-
string(REGEX MATCH "^[vV]?([0-9]+\\.[0-9]+\\.[0-9]+)" _ ${PROJECT_VERSION})
34-
set(PROJECT_VERSION_BASE ${CMAKE_MATCH_1})
35-
36-
# Print the values of PROJECT_VERSION and PROJECT_VERSION_BASE
37-
message(STATUS "PROJECT_VERSION: ${CPACK_PACKAGE_VERSION} CAPSTONE_VERSION: ${PROJECT_VERSION_BASE}")
38-
39-
# Set the project version without the pre-release identifier
40-
project(capstone VERSION ${PROJECT_VERSION_BASE})
24+
project(capstone
25+
VERSION 5.0.4
26+
)
4127

4228
if (MSVC)
4329
add_compile_options(/W1 /w14189)

bindings/const_generator.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def gen(lang):
237237

238238
if line.startswith('#define '):
239239
line = line[8:] #cut off define
240-
xline = re.split('\s+', line, 1) #split to at most 2 express
240+
xline = re.split(r'\s+', line, 1) #split to at most 2 express
241241
if len(xline) != 2:
242242
continue
243243
if '(' in xline[0] or ')' in xline[0]: #does it look like a function
@@ -261,7 +261,7 @@ def is_with_prefix(x):
261261
# hacky: remove type cast (uint64_t)
262262
t = t.replace('(uint64_t)', '')
263263
t = re.sub(r'\((\d+)ULL << (\d+)\)', r'\1 << \2', t) # (1ULL<<1) to 1 << 1
264-
f = re.split('\s+', t)
264+
f = re.split(r'\s+', t)
265265

266266
if not is_with_prefix(f[0]):
267267
continue

bindings/python/capstone/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
# Package version
181181
CS_VERSION_MAJOR = CS_API_MAJOR
182182
CS_VERSION_MINOR = CS_API_MINOR
183-
CS_VERSION_EXTRA = 3
183+
CS_VERSION_EXTRA = 4
184184

185185
__version__ = "%u.%u.%u" %(CS_VERSION_MAJOR, CS_VERSION_MINOR, CS_VERSION_EXTRA)
186186

include/capstone/capstone.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extern "C" {
5858
// Capstone package version
5959
#define CS_VERSION_MAJOR CS_API_MAJOR
6060
#define CS_VERSION_MINOR CS_API_MINOR
61-
#define CS_VERSION_EXTRA 3
61+
#define CS_VERSION_EXTRA 4
6262

6363
/// Macro for meta programming.
6464
/// Meant for projects using Capstone and need to support multiple

pkgconfig.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PKG_MAJOR = 5
66
PKG_MINOR = 0
77

88
# version bugfix level. Example: PKG_EXTRA = 1
9-
PKG_EXTRA = 3
9+
PKG_EXTRA = 4
1010

1111
# version tag. Examples: rc1, b2, post1 - or just comment out for no tag
1212
PKG_TAG =

0 commit comments

Comments
 (0)