feat: update PyBMap dependency.

- update PyBMap dependency.
- use BMap 0.2 instead of old one.
- change default encoding name string according to the change of LibCmo changes.
This commit is contained in:
2024-09-21 22:59:14 +08:00
parent f5c50ae079
commit c8d59ef5f4
3 changed files with 18 additions and 17 deletions

View File

@ -78,12 +78,13 @@ elif sys.platform.startswith('darwin'):
else:
_g_BMapLibName = "BMap.bin"
_g_BMapLibPath: str = os.path.join(os.path.dirname(__file__), _g_BMapLibName)
_g_BMapModule: ctypes.CDLL | None = None
try:
_g_BMapModule = ctypes.cdll.LoadLibrary(
os.path.join(os.path.dirname(__file__), _g_BMapLibName)
)
_g_BMapModule = ctypes.cdll.LoadLibrary(_g_BMapLibPath)
except:
print(f'Fail to load native BMap dynamic library file "{_g_BMapLibPath}".')
_g_BMapModule = None
def is_bmap_available() -> bool:
@ -107,6 +108,8 @@ def _create_bmap_func(fct_name: str, fct_params: list[typing.Any]) -> typing.Cal
#region Function Defines
##### GENERATED FUNCTIONS BEGIN #####
## BMInit
# @return True if no error, otherwise False.
BMInit = _create_bmap_func('BMInit', [])
@ -781,5 +784,6 @@ BM3dObject_GetVisibility = _create_bmap_func('BM3dObject_GetVisibility', [bm_voi
# @return True if no error, otherwise False.
BM3dObject_SetVisibility = _create_bmap_func('BM3dObject_SetVisibility', [bm_void_p, bm_CKID, bm_bool])
#endregion
##### GENERATED FUNCTIONS END #####
#endregion