Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(linux): Rename (lib)kmnkbp to (lib)keymancore 〽️ #9793

Merged
merged 5 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deb-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
echo "::endgroup::"

api_verification:
name: Verify API for libkmnkbp0.so
name: Verify API for libkeymancore.so
needs: [sourcepackage, binary_packages]
runs-on: ubuntu-latest

Expand Down
20 changes: 10 additions & 10 deletions core/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ builder_describe_outputs \
configure:mac-arm64 /core/build/mac-arm64/$BUILDER_CONFIGURATION/build.ninja \
configure:arch /core/build/arch/$BUILDER_CONFIGURATION/build.ninja \
configure:wasm /core/build/wasm/$BUILDER_CONFIGURATION/build.ninja \
build:x86 /core/build/x86/$BUILDER_CONFIGURATION/src/libkmnkbp0.a \
build:x64 /core/build/x64/$BUILDER_CONFIGURATION/src/libkmnkbp0.a \
build:mac /core/build/mac/$BUILDER_CONFIGURATION/libkmnkbp0.a \
build:mac-x86_64 /core/build/mac-x86_64/$BUILDER_CONFIGURATION/src/libkmnkbp0.a \
build:mac-arm64 /core/build/mac-arm64/$BUILDER_CONFIGURATION/src/libkmnkbp0.a \
build:arch /core/build/arch/$BUILDER_CONFIGURATION/src/libkmnkbp0.a \
build:wasm /core/build/wasm/$BUILDER_CONFIGURATION/src/libkmnkbp0.a
build:x86 /core/build/x86/$BUILDER_CONFIGURATION/src/libkeymancore.a \
build:x64 /core/build/x64/$BUILDER_CONFIGURATION/src/libkeymancore.a \
build:mac /core/build/mac/$BUILDER_CONFIGURATION/libkeymancore.a \
build:mac-x86_64 /core/build/mac-x86_64/$BUILDER_CONFIGURATION/src/libkeymancore.a \
build:mac-arm64 /core/build/mac-arm64/$BUILDER_CONFIGURATION/src/libkeymancore.a \
build:arch /core/build/arch/$BUILDER_CONFIGURATION/src/libkeymancore.a \
build:wasm /core/build/wasm/$BUILDER_CONFIGURATION/src/libkeymancore.a

# Import our standard compiler defines; this is copied from
# /resources/build/meson/standard.meson.build by build.sh, because meson doesn't
Expand Down Expand Up @@ -157,9 +157,9 @@ do_action build

if builder_start_action build:mac; then
lipo -create \
"$KEYMAN_ROOT/core/build/mac-x86_64/$BUILDER_CONFIGURATION/src/libkmnkbp0.a" \
"$KEYMAN_ROOT/core/build/mac-arm64/$BUILDER_CONFIGURATION/src/libkmnkbp0.a" \
-output "$KEYMAN_ROOT/core/build/mac/$BUILDER_CONFIGURATION/libkmnkbp0.a"
"$KEYMAN_ROOT/core/build/mac-x86_64/$BUILDER_CONFIGURATION/src/libkeymancore.a" \
"$KEYMAN_ROOT/core/build/mac-arm64/$BUILDER_CONFIGURATION/src/libkeymancore.a" \
-output "$KEYMAN_ROOT/core/build/mac/$BUILDER_CONFIGURATION/libkeymancore.a"
builder_finish_action success build:mac
fi

Expand Down
2 changes: 1 addition & 1 deletion core/include/keyman/keyman_core_api.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright: © 2018 SIL International.
Description: Cross platform API C/C++ declarations for libkmnkbp keyboard
Description: Cross platform API C/C++ declarations for libkeymancore keyboard
processor.
Create Date: 2 Oct 2018
Authors: Tim Eves (TSE)
Expand Down
4 changes: 2 additions & 2 deletions core/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright: © 2018-2022 SIL International.
# Description: Cross platform build script to compile libkmnkbp, documentation
# Description: Cross platform build script to compile libkeymancore, documentation
# and tests.
# Create Date: 2 Oct 2018
# Authors: Tim Eves (TSE)
Expand All @@ -19,7 +19,7 @@ project('keyboardprocessor', 'cpp', 'c',
# meson doesn't allow us to reference a file outside its root
subdir('resources')

lib_version = '0.0.0'
lib_version = '1.0.0'

py = import('python')
python = py.find_installation()
Expand Down
6 changes: 3 additions & 3 deletions core/src/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright: © 2018-2022 SIL International.
# Description: Cross platform build script to compile libkmnkbp.
# Description: Cross platform build script to compile libkeymancore.
# Create Date: 2 Oct 2018
# Authors: Tim Eves (TSE)
#
Expand Down Expand Up @@ -94,7 +94,7 @@ mock_files = files(
'mock/mock_processor.cpp',
)

lib = library('kmnkbp0',
lib = library('keymancore',
api_files,
core_files,
kmx_files,
Expand All @@ -111,7 +111,7 @@ lib = library('kmnkbp0',

headerdirs = [ '.', 'keyman' ] # subdirectories of ${prefix}/include to add to header path

kmnkbp = declare_dependency(link_with: lib, include_directories: inc, dependencies: [icu_uc, icu_i18n])
keymancore = declare_dependency(link_with: lib, include_directories: inc, dependencies: [icu_uc, icu_i18n])

pkg = import('pkgconfig')
pkg.generate(
Expand Down
2 changes: 1 addition & 1 deletion core/src/version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
VALUE "InternalName", "Keyman Core"
VALUE "LegalCopyright", "© SIL International"
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", "KMNCORE0-0.DLL"
VALUE "OriginalFilename", "KEYMANCORE1-0.DLL"
ermshiperete marked this conversation as resolved.
Show resolved Hide resolved
VALUE "ProductName", "Keyman Core"
VALUE "ProductVersion", KM_CORE_VERSION_STRING
VALUE "Comments", ""
Expand Down
2 changes: 1 addition & 1 deletion core/tests/kmx_test_source/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ coretest_files = files(
'kmx_test_source.cpp',
)

kmx_test_source_lib = static_library('kmnkbp-tests',
kmx_test_source_lib = static_library('keymancore-tests',
coretest_files,
cpp_args: defns + warns + flags,
include_directories: [inc, libsrc],
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/kmnkbd/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright: © 2018 SIL International.
# Description: Cross platform build script to compile libkmnkbp API unit tests.
# Description: Cross platform build script to compile libkeymancore API unit tests.
# Create Date: 19 Oct 2018
# Authors: Tim Eves (TSE)
#
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/kmx/fixtures/binary/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright: © 2018 SIL International.
# Description: Cross platform build script to compile libkmnkbp API unit tests.
# Description: Cross platform build script to compile libkeymancore API unit tests.
# Create Date: 19 Oct 2018
# Authors: Marc Durdin, Tim Eves (TSE)
# History: 19 Oct 2018 - TSE - Added test for context API functions.
Expand Down
2 changes: 1 addition & 1 deletion core/tests/unit/kmx/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright: © 2018 SIL International.
# Description: Cross platform build script to compile libkmnkbp API unit tests.
# Description: Cross platform build script to compile libkeymancore API unit tests.
# Create Date: 19 Oct 2018
# Authors: Marc Durdin, Tim Eves (TSE)
# History: 19 Oct 2018 - TSE - Added test for context API functions.
Expand Down
2 changes: 1 addition & 1 deletion developer/src/inst/kmdev.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
</Component>

<Component>
<File Name="kmnkbp0-0.dll" KeyPath="yes" />
<File Name="keymancore-1.dll" KeyPath="yes" />
</Component>

<Component>
Expand Down
6 changes: 3 additions & 3 deletions developer/src/tike/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build: version.res manifest.res icons dirs xml xsd pull-core
$(COPY) kmlmc.cmd $(DEVELOPER_PROGRAM)
$(COPY) kmlmp.cmd $(DEVELOPER_PROGRAM)
$(COPY) kmc.cmd $(DEVELOPER_PROGRAM)
$(COPY) $(KEYMAN_ROOT)\core\build\x86\$(TARGET_PATH)\src\kmnkbp0-0.dll $(DEVELOPER_PROGRAM)
$(COPY) $(KEYMAN_ROOT)\core\build\x86\$(TARGET_PATH)\src\keymancore-1.dll $(DEVELOPER_PROGRAM)
if exist $(WIN32_TARGET_PATH)\tike.dbg $(COPY) $(WIN32_TARGET_PATH)\tike.dbg $(DEVELOPER_DEBUGPATH)

xsd:
Expand Down Expand Up @@ -66,7 +66,7 @@ clean: def-clean

signcode:
$(SIGNCODE) /d "Keyman Developer" $(DEVELOPER_PROGRAM)\tike.exe
$(SIGNCODE) /d "Keyman Core" $(DEVELOPER_PROGRAM)\kmnkbp0-0.dll
$(SIGNCODE) /d "Keyman Core" $(DEVELOPER_PROGRAM)\keymancore-1.dll
# Sign the Sentry executables and libraries here
$(SIGNCODE) /d "Keyman Developer" $(DEVELOPER_PROGRAM)\sentry.dll
$(SIGNCODE) /d "Keyman Developer" $(DEVELOPER_PROGRAM)\sentry.x64.dll
Expand All @@ -78,7 +78,7 @@ wrap-symbols:

install:
$(COPY) $(DEVELOPER_PROGRAM)\tike.exe "$(INSTALLPATH_KEYMANDEVELOPER)\tike.exe"
$(COPY) $(DEVELOPER_PROGRAM)\kmnkbp0-0.dll "$(INSTALLPATH_KEYMANDEVELOPER)\kmnkbp0-0.dll"
$(COPY) $(DEVELOPER_PROGRAM)\keymancore-1.dll "$(INSTALLPATH_KEYMANDEVELOPER)\keymancore-1.dll"

test-manifest:
# test that linked manifest exists and correct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class procedure TDebugCore.InitKeymanCore;
begin
if not KeymanCoreLoaded then
begin
path := TKeymanPaths.KeymanCoreLibraryPath(kmnkbp0);
path := TKeymanPaths.KeymanCoreLibraryPath(keymancore);
try
_km_core_set_library_path(path);
except
Expand Down
52 changes: 26 additions & 26 deletions developer/src/tike/main/Keyman.System.KeymanCore.pas
Original file line number Diff line number Diff line change
Expand Up @@ -79,58 +79,58 @@ km_core_context_item = record
);

const
kmnkbp0 = 'kmnkbp0-0.dll';
keymancore = 'keymancore-1.dll';

function km_core_context_items_from_utf16(
const text: pkm_core_cp;
var out_ptr: pkm_core_context_item
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_context_items_from_utf8(
const text: PAnsiChar;
var out_ptr: pkm_core_context_item
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_context_items_to_utf16(
const item: pkm_core_context_item;
buf: pkm_core_cp;
var buf_size: integer
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_context_items_to_utf8(
const item: pkm_core_context_item;
buf: pansichar;
var buf_size: integer
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

procedure km_core_context_items_dispose(
const context_items: km_core_context_item
); cdecl; external kmnkbp0 delayed;
); cdecl; external keymancore delayed;

function km_core_context_set(
context: pkm_core_context;
context_items: pkm_core_context_item
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_context_get(
context: pkm_core_context;
var context_items: pkm_core_context_item
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

procedure km_core_context_clear(
context: pkm_core_context
); cdecl; external kmnkbp0 delayed;
); cdecl; external keymancore delayed;

function km_core_context_append(
context: pkm_core_context;
context_items: pkm_core_context_item
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_context_shrink(
context: pkm_core_context;
num: Integer;
prefix: pkm_core_context_item
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;



Expand Down Expand Up @@ -208,25 +208,25 @@ km_core_action_item = record

function km_core_options_list_size(
opts: pkm_core_option_item
): Integer; cdecl; external kmnkbp0 delayed;
): Integer; cdecl; external keymancore delayed;

function km_core_state_option_lookup(
state: pkm_core_state;
scope: km_core_option_scope;
key: pkm_core_cp;
var value: pkm_core_cp
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_state_options_update(
state: pkm_core_state;
new_opts: pkm_core_option_item
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_state_options_to_json(
state: pkm_core_state;
buf: PAnsiChar;
var space: Integer
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

type
km_core_keyboard_attrs = record
Expand All @@ -241,46 +241,46 @@ km_core_keyboard_attrs = record
function km_core_keyboard_load(
kb_path: km_core_path_name;
var keyboard: pkm_core_keyboard
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

procedure km_core_keyboard_dispose(
keyboard: pkm_core_keyboard
); cdecl; external kmnkbp0 delayed;
); cdecl; external keymancore delayed;

function km_core_keyboard_get_attrs(
keyboard: pkm_core_keyboard;
var out: pkm_core_keyboard_attrs
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_state_create(
keyboard: pkm_core_keyboard;
env: pkm_core_option_item;
var out: pkm_core_state
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

function km_core_state_clone(
state: pkm_core_state;
var out: pkm_core_state
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

procedure km_core_state_dispose(
state: pkm_core_state
); cdecl; external kmnkbp0 delayed;
); cdecl; external keymancore delayed;

function km_core_state_context(
state: pkm_core_state
): pkm_core_context; cdecl; external kmnkbp0 delayed;
): pkm_core_context; cdecl; external keymancore delayed;

function km_core_state_action_items(
state: pkm_core_state;
num_items: pinteger
): pkm_core_action_item; cdecl; external kmnkbp0 delayed;
): pkm_core_action_item; cdecl; external keymancore delayed;

function km_core_state_to_json(
state: pkm_core_state;
buf: PAnsiChar;
space: pinteger
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

type
km_core_attr = record
Expand All @@ -305,7 +305,7 @@ km_core_attr = record

function km_core_get_engine_attrs(
state: pkm_core_state
): pkm_core_attr; cdecl; external kmnkbp0 delayed;
): pkm_core_attr; cdecl; external keymancore delayed;

function
km_core_process_event(
Expand All @@ -314,7 +314,7 @@ function
modifier_state: uint16_t;
is_key_down: uint8_t;
event_flags: uint16_t
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

const
KM_CORE_EVENT_FLAG_DEFAULT = 0; // default value: hardware
Expand Down
6 changes: 3 additions & 3 deletions developer/src/tike/main/Keyman.System.KeymanCoreDebug.pas
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ km_core_state_debug_item = record
function km_core_state_debug_set(
state: pkm_core_state;
value: integer
): km_core_status; cdecl; external kmnkbp0 delayed;
): km_core_status; cdecl; external keymancore delayed;

///
/// Get current debug tracing status
Expand All @@ -158,7 +158,7 @@ function km_core_state_debug_set(
///
function km_core_state_debug_get(
state: pkm_core_state
): uint8_t; cdecl; external kmnkbp0 delayed;
): uint8_t; cdecl; external keymancore delayed;

///
/// Read current debug trace log
Expand All @@ -173,7 +173,7 @@ function km_core_state_debug_get(
function km_core_state_debug_items(
state: pkm_core_state;
num_items: PCardinal
): pkm_core_state_debug_item; cdecl; external kmnkbp0 delayed;
): pkm_core_state_debug_item; cdecl; external keymancore delayed;

implementation

Expand Down
2 changes: 1 addition & 1 deletion docs/settings/linux/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"CPPFLAGS": "-DG_MESSAGES_DEBUG -I${workspaceFolder}/core/build/arch/debug/include/ -I${workspaceFolder}/core/include/ -I/home/eberhard/Develop/keyman/ibus/ibus/src -I${workspaceFolder}/common/include",
"CFLAGS": "-g -O0",
"CXXFLAGS": "-g -O0",
"KEYMAN_PROC_LIBS": "-L${workspaceFolder}/core/build/arch/debug/src -lkmnkbp0",
"KEYMAN_PROC_LIBS": "-L${workspaceFolder}/core/build/arch/debug/src -lkeymancore",
"KEYMAN_PROC_CFLAGS": "-I${workspaceFolder}/core/build/arch/debug/include -I${workspaceFolder}/core/include -I${workspaceFolder}/common/include",
"PKG_CONFIG_PATH": "${workspaceFolder}/core/build/arch/debug/meson-private"
},
Expand Down
Loading