Skip to content

Commit 5a7bbcf

Browse files
committed
Fixes some new Android requirements; adds SystemConfiguration framework on MacOS to link flags in preparation to updating curl dependency; fixes rich-text word boundary detection for non-latin languages
1 parent 21b1d47 commit 5a7bbcf

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

cmake/Modules/CocosConfigDepend.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ macro(cocos2dx_depend)
4848
find_library(IOKIT_LIBRARY IOKit)
4949
find_library(APPKIT_LIBRARY AppKit)
5050
find_library(ICONV_LIBRARY iconv)
51+
find_library(SYSTEM_CONFIGURATION_LIBRARY SystemConfiguration)
5152
list(APPEND PLATFORM_SPECIFIC_LIBS
5253
${COCOA_LIBRARY}
5354
${OPENGL_LIBRARY}
@@ -56,6 +57,7 @@ macro(cocos2dx_depend)
5657
${COCOS_APPLE_LIBS}
5758
${APPKIT_LIBRARY}
5859
${ICONV_LIBRARY}
60+
${SYSTEM_CONFIGURATION_LIBRARY}
5961
)
6062
elseif(IOS)
6163
# Locate system libraries on iOS

cocos/platform/android/libcocos2dx/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apply plugin: 'com.android.library'
22

33
android {
4+
namespace "org.cocos2dx.lib"
45
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
56

67
defaultConfig {
@@ -22,6 +23,9 @@ android {
2223
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2324
}
2425
}
26+
buildFeatures {
27+
aidl true
28+
}
2529
}
2630

2731
dependencies {

cocos/ui/UIRichText.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ void RichText::formatText()
14981498
namespace {
14991499
inline bool isUTF8CharWrappable(const StringUtils::StringUTF8::CharUTF8& ch)
15001500
{
1501-
return (!ch.isASCII() || !std::isalnum(ch._char[0], std::locale()));
1501+
return ch.isASCII() && !std::isalnum(ch._char[0], std::locale()) && ch._char[0] != '\''; // !ASCII || !alnum was too broad effectively breaking inside any non-Latin word! Apostrophe is a common word character in languages like Ukrainian and English.
15021502
}
15031503

15041504
int getPrevWordPos(const StringUtils::StringUTF8& text, int idx)

0 commit comments

Comments
 (0)