From 4e7eaeffb1276f2a10fa461b6d0208ebec72276d Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 16 Feb 2023 15:54:35 +1000 Subject: [PATCH 01/40] feat(windows): test rename for 64 dll --- windows/src/engine/.gitignore | 12 ++++---- windows/src/engine/Makefile | 20 +++++++------- windows/src/engine/engine.sln | 4 +-- windows/src/engine/inst/components.wxs | 6 +++- .../src/engine/keyman64-ver/Keyman64-ver.res | Bin 0 -> 884 bytes windows/src/engine/keyman64-ver/Makefile | 26 ++++++++++++++++++ .../{keyman64 => keyman64-ver}/TODO.TXT | 0 .../keyman64-ver.rc} | 0 .../keyman64-ver.sln} | 2 +- .../keyman64-ver.vcxproj} | 11 +++++--- .../keyman64-ver.vcxproj.filters} | 2 +- .../{keyman64 => keyman64-ver}/version.rc | 4 +-- windows/src/engine/keyman64/Makefile | 26 ------------------ .../src/engine/keymanx64/keymanx64.vcxproj | 6 ++-- windows/src/engine/kmtip/kmtip.vcxproj | 6 ++-- windows/src/engine/testhost/testhost.cpp | 6 ++-- 16 files changed, 69 insertions(+), 62 deletions(-) create mode 100644 windows/src/engine/keyman64-ver/Keyman64-ver.res create mode 100644 windows/src/engine/keyman64-ver/Makefile rename windows/src/engine/{keyman64 => keyman64-ver}/TODO.TXT (100%) rename windows/src/engine/{keyman64/keyman64.rc => keyman64-ver/keyman64-ver.rc} (100%) rename windows/src/engine/{keyman64/keyman64.sln => keyman64-ver/keyman64-ver.sln} (87%) rename windows/src/engine/{keyman64/keyman64.vcxproj => keyman64-ver/keyman64-ver.vcxproj} (98%) rename windows/src/engine/{keyman64/keyman64.vcxproj.filters => keyman64-ver/keyman64-ver.vcxproj.filters} (98%) rename windows/src/engine/{keyman64 => keyman64-ver}/version.rc (88%) delete mode 100644 windows/src/engine/keyman64/Makefile diff --git a/windows/src/engine/.gitignore b/windows/src/engine/.gitignore index 13c59ae0a59..59d8082c95e 100644 --- a/windows/src/engine/.gitignore +++ b/windows/src/engine/.gitignore @@ -3,12 +3,12 @@ keyman32/keyman-debug-etw.h keyman32/keyman-debug-etw.rc keyman32/keyman-debug-etw.res keyman32/keyman-debug-etwTEMP.BIN -keyman64/MSG00001.bin -keyman64/keyman-debug-etw.h -keyman64/keyman-debug-etw.rc -keyman64/keyman-debug-etw.res -keyman64/keyman-debug-etwTEMP.BIN +keyman64-ver/MSG00001.bin +keyman64-ver/keyman-debug-etw.h +keyman64-ver/keyman-debug-etw.rc +keyman64-ver/keyman-debug-etw.res +keyman64-ver/keyman-debug-etwTEMP.BIN mcompile/Debug # Visual Studio packages for test -packages/ \ No newline at end of file +packages/ diff --git a/windows/src/engine/Makefile b/windows/src/engine/Makefile index b783c2faf92..b033753bcaf 100644 --- a/windows/src/engine/Makefile +++ b/windows/src/engine/Makefile @@ -5,9 +5,9 @@ # ---------------------------------------------------------------------- !ifdef NODELPHI -TARGETS=keymanmc keyman32 keyman64 keymanx64 mcompile kmtip kmrefresh +TARGETS=keymanmc keyman32 keyman64-ver keymanx64 mcompile kmtip kmrefresh !else -TARGETS=keymanmc keyman32 kmcomapi keyman tsysinfox64 tsysinfo keyman64 keymanx64 mcompile inst kmtip kmrefresh +TARGETS=keymanmc keyman32 kmcomapi keyman tsysinfox64 tsysinfo keyman64-ver keymanx64 mcompile inst kmtip kmrefresh !endif MANIFESTS=keyman tsysinfo tsysinfox64 keymanx64 mcompile CLEANS=clean-engine @@ -44,8 +44,8 @@ keymanx64: .virtual cd $(ROOT)\src\engine\keymanx64 $(MAKE) $(TARGET) -keyman64: .virtual - cd $(ROOT)\src\engine\keyman64 +keyman64-ver: .virtual + cd $(ROOT)\src\engine\keyman64-ver $(MAKE) $(TARGET) kmrefresh: .virtual @@ -76,16 +76,16 @@ keyman32-install: cd $(ROOT)\src\engine\keyman32 $(MAKE) install -keyman64-build: - cd $(ROOT)\src\engine\keyman64 +keyman64-ver-build: + cd $(ROOT)\src\engine\keyman64-ver $(MAKE) build -keyman64-signcode: - cd $(ROOT)\src\engine\keyman64 +keyman64-ver-signcode: + cd $(ROOT)\src\engine\keyman64-ver $(MAKE) signcode -keyman64-install: - cd $(ROOT)\src\engine\keyman64 +keyman64-ver-install: + cd $(ROOT)\src\engine\keyman64-ver $(MAKE) install # ---------------------------------------------------------------------- diff --git a/windows/src/engine/engine.sln b/windows/src/engine/engine.sln index 81da027de01..761f05a8d9c 100644 --- a/windows/src/engine/engine.sln +++ b/windows/src/engine/engine.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31313.79 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Keyman32", "keyman32\Keyman32.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman32", "keyman32\Keyman32.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64", "keyman64\keyman64.vcxproj", "{D1115FB2-230D-4FD8-90B9-982E49953D18}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64-ver", "keyman64-ver\keyman64-ver.vcxproj", "{D1115FB2-230D-4FD8-90B9-982E49953D18}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keymanx64", "keymanx64\keymanx64.vcxproj", "{A34650EA-D6E8-4229-8091-6BF1443565B5}" EndProject diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index 27824789e3b..793b36936ef 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -134,7 +134,11 @@ - + + + + + diff --git a/windows/src/engine/keyman64-ver/Keyman64-ver.res b/windows/src/engine/keyman64-ver/Keyman64-ver.res new file mode 100644 index 0000000000000000000000000000000000000000..7420582571b3743a2b009f8ce560f268b7587c29 GIT binary patch literal 884 zcma))&q@MO6vjW(jr50z7A;!1Xwgbc2B8R|v_Q0s3ZYdEX(ml7qd~q$FVREvHtly`xOdLI_dDl&=etLea?HsjnwUR^myYk3!KB<>LD@_U^3on=Q|G#3J=7Ui zRSli6ud*It+jz~qe@N!P#N5D${(E-Guz+*U`d*$nND*(OP+j%ZAzD{~+C=W@R(+rY zhbgG6g0`6+9E?##EBKbdJZK;v{1`SqyS7VUEbCNmkw%<_{C%u09%coguC-2#IA;aa zP&bat;0tNNYTS&8Y*}*TH>Sq7&F&O@A20JAVuhSNspL48G@ppy1QUXZ7+BmbPg}2Nn DIwO9) literal 0 HcmV?d00001 diff --git a/windows/src/engine/keyman64-ver/Makefile b/windows/src/engine/keyman64-ver/Makefile new file mode 100644 index 00000000000..175b80795d7 --- /dev/null +++ b/windows/src/engine/keyman64-ver/Makefile @@ -0,0 +1,26 @@ +# +# Keyman64-ver Makefile +# + +!include ..\..\Defines.mak + +build: version.res dirs + $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=$(__VERSION_WITH_TAG)" + $(COPY) $(X64_TARGET_PATH)\keyman64-ver$(__VERSION_WITH_TAG).dll $(PROGRAM)\engine + $(COPY) $(X64_TARGET_PATH)\keyman64-ver$(__VERSION_WITH_TAG).pdb $(DEBUGPATH)\engine +# $(COPY) keyman64-ver.lib $(OUTLIB) - already done + +clean: def-clean + $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=$(__VERSION_WITH_TAG)" + +signcode: + $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver$(__VERSION_WITH_TAG).dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver$(__VERSION_WITH_TAG).dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver$(__VERSION_WITH_TAG).pdb /t keyman-engine-windows + +install: + $(COPY) $(PROGRAM)\engine\keyman64-ver$(__VERSION_WITH_TAG).dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver$(__VERSION_WITH_TAG).dll" + +!include ..\..\Target.mak diff --git a/windows/src/engine/keyman64/TODO.TXT b/windows/src/engine/keyman64-ver/TODO.TXT similarity index 100% rename from windows/src/engine/keyman64/TODO.TXT rename to windows/src/engine/keyman64-ver/TODO.TXT diff --git a/windows/src/engine/keyman64/keyman64.rc b/windows/src/engine/keyman64-ver/keyman64-ver.rc similarity index 100% rename from windows/src/engine/keyman64/keyman64.rc rename to windows/src/engine/keyman64-ver/keyman64-ver.rc diff --git a/windows/src/engine/keyman64/keyman64.sln b/windows/src/engine/keyman64-ver/keyman64-ver.sln similarity index 87% rename from windows/src/engine/keyman64/keyman64.sln rename to windows/src/engine/keyman64-ver/keyman64-ver.sln index cbab00dba96..1246b4afe69 100644 --- a/windows/src/engine/keyman64/keyman64.sln +++ b/windows/src/engine/keyman64-ver/keyman64-ver.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64", "keyman64.vcxproj", "{D1115FB2-230D-4FD8-90B9-982E49953D18}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64-ver", "keyman64-ver.vcxproj", "{D1115FB2-230D-4FD8-90B9-982E49953D18}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj similarity index 98% rename from windows/src/engine/keyman64/keyman64.vcxproj rename to windows/src/engine/keyman64-ver/keyman64-ver.vcxproj index d70c0872edd..35d8b214be2 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj @@ -14,6 +14,7 @@ {D1115FB2-230D-4FD8-90B9-982E49953D18} Keyman32 10.0 + keyman64-ver @@ -56,10 +57,12 @@ $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) @@ -107,7 +110,7 @@ true Windows 0x1C800000 - ..\..\..\lib\Keyman64.lib + ..\..\..\lib\Keyman64-ver.lib MachineX64 true true @@ -164,7 +167,7 @@ true Windows 0x1C800000 - ..\..\..\lib\Keyman64.lib + ..\..\..\lib\Keyman64-ver.lib MachineX64 true true @@ -274,7 +277,7 @@ - + @@ -329,4 +332,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/keyman64/keyman64.vcxproj.filters b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters similarity index 98% rename from windows/src/engine/keyman64/keyman64.vcxproj.filters rename to windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters index 0b53bd96cba..964dc47605c 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj.filters +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters @@ -80,7 +80,7 @@ - + diff --git a/windows/src/engine/keyman64/version.rc b/windows/src/engine/keyman64-ver/version.rc similarity index 88% rename from windows/src/engine/keyman64/version.rc rename to windows/src/engine/keyman64-ver/version.rc index 9c30715b2b4..83b3e3f284f 100644 --- a/windows/src/engine/keyman64/version.rc +++ b/windows/src/engine/keyman64-ver/version.rc @@ -16,10 +16,10 @@ VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Processor x64\0" VALUE "FileVersion", KV_VERSION_STRING - VALUE "InternalName", "KEYMAN64\0" + VALUE "InternalName", "KEYMAN64-VER\0" VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS - VALUE "OriginalFilename", "KEYMAN64.DLL\0" + VALUE "OriginalFilename", "KEYMAN64-VER.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" diff --git a/windows/src/engine/keyman64/Makefile b/windows/src/engine/keyman64/Makefile deleted file mode 100644 index 6715191ee8d..00000000000 --- a/windows/src/engine/keyman64/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# -# Keyman64 Makefile -# - -!include ..\..\Defines.mak - -build: version.res dirs - $(MSBUILD) keyman64.sln $(MSBUILD_BUILD) "/p:Platform=x64" - $(COPY) $(X64_TARGET_PATH)\keyman64.dll $(PROGRAM)\engine - $(COPY) $(X64_TARGET_PATH)\keyman64.pdb $(DEBUGPATH)\engine -# $(COPY) keyman64.lib $(OUTLIB) - already done - -clean: def-clean - $(MSBUILD) keyman64.sln $(MSBUILD_CLEAN) "/p:Platform=x64" - -signcode: - $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64.dll - -wrap-symbols: - $(SYMSTORE) $(PROGRAM)\engine\keyman64.dll /t keyman-engine-windows - $(SYMSTORE) $(DEBUGPATH)\engine\keyman64.pdb /t keyman-engine-windows - -install: - $(COPY) $(PROGRAM)\engine\keyman64.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64.dll" - -!include ..\..\Target.mak diff --git a/windows/src/engine/keymanx64/keymanx64.vcxproj b/windows/src/engine/keymanx64/keymanx64.vcxproj index 82b3bcb59f1..3b58d5cb545 100644 --- a/windows/src/engine/keymanx64/keymanx64.vcxproj +++ b/windows/src/engine/keymanx64/keymanx64.vcxproj @@ -77,7 +77,7 @@ true - ..\..\..\..\common\windows\delphi\ext\sentry\sentry.x64.lib;keyman64.lib;libcmtd.lib;%(AdditionalDependencies) + ..\..\..\..\common\windows\delphi\ext\sentry\sentry.x64.lib;keyman64-ver.lib;libcmtd.lib;%(AdditionalDependencies) ..\..\..\lib;%(AdditionalLibraryDirectories) false true @@ -114,7 +114,7 @@ true - ..\..\..\..\common\windows\delphi\ext\sentry\sentry.x64.lib;keyman64.lib;libcmt.lib;%(AdditionalDependencies) + ..\..\..\..\common\windows\delphi\ext\sentry\sentry.x64.lib;keyman64-ver.lib;libcmt.lib;%(AdditionalDependencies) ..\..\..\lib;%(AdditionalLibraryDirectories) false true @@ -150,4 +150,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/kmtip/kmtip.vcxproj b/windows/src/engine/kmtip/kmtip.vcxproj index f3fb74116fb..0c01b8b9d44 100644 --- a/windows/src/engine/kmtip/kmtip.vcxproj +++ b/windows/src/engine/kmtip/kmtip.vcxproj @@ -177,7 +177,7 @@ 0x0c09 - ..\..\..\lib\keyman64.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) + ..\..\..\lib\keyman64-ver.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) true .\kmtip64.def true @@ -261,7 +261,7 @@ 0x0c09 - ..\..\..\lib\keyman64.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) + ..\..\..\lib\keyman64-ver.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) true .\kmtip64.def true @@ -429,4 +429,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/testhost/testhost.cpp b/windows/src/engine/testhost/testhost.cpp index 8942a14f710..76ba974755d 100644 --- a/windows/src/engine/testhost/testhost.cpp +++ b/windows/src/engine/testhost/testhost.cpp @@ -308,9 +308,9 @@ Fail(PCWSTR message) { } #ifdef _WIN64 -#define KEYMAN32 "keyman64.dll" -#define KEYMAN32_DEBUG "keyman64" / "bin" / "x64" / "Debug" / "keyman64.dll" -#define KEYMAN32_RELEASE "keyman64" / "bin" / "x64" / "Release" / "keyman64.dll" +#define KEYMAN32 "keyman64-ver.dll" +#define KEYMAN32_DEBUG "keyman64-ver" / "bin" / "x64" / "Debug" / "keyman64-ver.dll" +#define KEYMAN32_RELEASE "keyman64-ver" / "bin" / "x64" / "Release" / "keyman64-ver.dll" #else #define KEYMAN32 "keyman32.dll" #define KEYMAN32_DEBUG "keyman32" / "bin" / "Win32" / "Debug" / "keyman32.dll" From 39d36b7e5b205612e2299dd8fffa0bb2b03b5770 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 2 Mar 2023 14:39:52 +1000 Subject: [PATCH 02/40] feat(windows): use g_hInstance for module referance in InitHooks --- windows/src/engine/inst/components.wxs | 8 ++++---- windows/src/engine/inst/download.in | 2 +- windows/src/engine/keyman32/k32_dbg.cpp | 2 +- windows/src/engine/keyman32/keyman32.cpp | 7 ++----- windows/src/engine/keyman32/keyman64.h | 2 +- windows/src/engine/keyman64-ver/Makefile | 21 +++++++++++++-------- 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index 793b36936ef..beccf166549 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -133,12 +133,12 @@ - - - + - + diff --git a/windows/src/engine/inst/download.in b/windows/src/engine/inst/download.in index 7c4da0b5a18..f50af53bb70 100644 --- a/windows/src/engine/inst/download.in +++ b/windows/src/engine/inst/download.in @@ -18,4 +18,4 @@ clean: rem candle: - $(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -ext WixUtilExtension keymanengine.wxs components.wxs + $(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dVERSION_WITH_TAG=$VersionWithTag -ext WixUtilExtension keymanengine.wxs components.wxs diff --git a/windows/src/engine/keyman32/k32_dbg.cpp b/windows/src/engine/keyman32/k32_dbg.cpp index 9785bad5d77..08e3481139f 100644 --- a/windows/src/engine/keyman32/k32_dbg.cpp +++ b/windows/src/engine/keyman32/k32_dbg.cpp @@ -91,7 +91,7 @@ void InitDebugging() { SendDebugMessage(0, sdmKeyboard, 0, buf); delete buf; - GetModuleFileName(GetModuleHandle(LIBRARY_NAME), fname, 260); + GetModuleFileName(GetModuleHandle(LIBRARY_NAME ".dll"), fname, 260); sz = GetFileVersionInfoSize(fname, 0); if(sz > 0) { diff --git a/windows/src/engine/keyman32/keyman32.cpp b/windows/src/engine/keyman32/keyman32.cpp index ee6cd754b82..2aeec9113bb 100644 --- a/windows/src/engine/keyman32/keyman32.cpp +++ b/windows/src/engine/keyman32/keyman32.cpp @@ -331,7 +331,7 @@ extern "C" BOOL _declspec(dllexport) WINAPI Keyman_GetInitialised(BOOL *FSingleA BOOL InitHooks() { - HINSTANCE hinst = GetModuleHandle(LIBRARY_NAME); + HINSTANCE hinst = g_hInstance; *Globals::hhookGetMessage() = SetWindowsHookExW(WH_GETMESSAGE, (HOOKPROC) kmnGetMessageProc, hinst, Globals::get_FSingleThread()); *Globals::hhookCallWndProc() = SetWindowsHookExW(WH_CALLWNDPROC, (HOOKPROC) kmnCallWndProc, hinst, Globals::get_FSingleThread()); @@ -384,7 +384,6 @@ extern "C" BOOL _declspec(dllexport) WINAPI Keyman_ResetInitialisation() // I30 extern "C" BOOL _declspec(dllexport) WINAPI Keyman_Initialise(HWND Handle, BOOL FSingleApp) { - HINSTANCE hinst; Globals::LoadDebugSettings(); @@ -413,8 +412,6 @@ extern "C" BOOL _declspec(dllexport) WINAPI Keyman_Initialise(HWND Handle, BOOL *Globals::InitialisingThread() = GetCurrentThreadId(); // I4326 - hinst = GetModuleHandle(LIBRARY_NAME); - InitDebugging(); if (!Globals::InitSettings()) { @@ -456,7 +453,7 @@ extern "C" BOOL _declspec(dllexport) WINAPI Keyman_Initialise(HWND Handle, BOOL *Globals::Keyman_Initialised() = TRUE; RefreshKeyboards(TRUE); // I4786 - SendDebugMessageFormat(Handle, sdmGlobal, 0, "Keyman is now initialised"); + SendDebugMessageFormat(Handle, sdmGlobal, 0, "Keyman_Initialise: Keyman is now initialised"); return TRUE; } diff --git a/windows/src/engine/keyman32/keyman64.h b/windows/src/engine/keyman32/keyman64.h index 4a42bb3abd3..2a7ea915c6b 100644 --- a/windows/src/engine/keyman32/keyman64.h +++ b/windows/src/engine/keyman32/keyman64.h @@ -82,7 +82,7 @@ #include "../../../../common/windows/cpp/include/legacy_kmx_memory.h" #ifdef _WIN64 -#define LIBRARY_NAME "KEYMAN64" +#define LIBRARY_NAME "keyman64-ver17.0.48-alpha-local" #else #define LIBRARY_NAME "KEYMAN32" #endif diff --git a/windows/src/engine/keyman64-ver/Makefile b/windows/src/engine/keyman64-ver/Makefile index 175b80795d7..4e1c284ccf4 100644 --- a/windows/src/engine/keyman64-ver/Makefile +++ b/windows/src/engine/keyman64-ver/Makefile @@ -2,25 +2,30 @@ # Keyman64-ver Makefile # + + !include ..\..\Defines.mak build: version.res dirs - $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=$(__VERSION_WITH_TAG)" - $(COPY) $(X64_TARGET_PATH)\keyman64-ver$(__VERSION_WITH_TAG).dll $(PROGRAM)\engine - $(COPY) $(X64_TARGET_PATH)\keyman64-ver$(__VERSION_WITH_TAG).pdb $(DEBUGPATH)\engine + $(MKVER_U) download.in download.mak + $(MAKE) -fdownload.mak build + # $(COPY) keyman64-ver.lib $(OUTLIB) - already done clean: def-clean - $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=$(__VERSION_WITH_TAG)" + $(MKVER_U) download.in download.mak + $(MAKE) -fdownload.mak clean signcode: - $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver$(__VERSION_WITH_TAG).dll + $(MKVER_U) download.in download.mak + $(MAKE) -fdownload.mak signcode wrap-symbols: - $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver$(__VERSION_WITH_TAG).dll /t keyman-engine-windows - $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver$(__VERSION_WITH_TAG).pdb /t keyman-engine-windows + $(MKVER_U) download.in download.mak + $(MAKE) -fdownload.mak wrap-symbols install: - $(COPY) $(PROGRAM)\engine\keyman64-ver$(__VERSION_WITH_TAG).dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver$(__VERSION_WITH_TAG).dll" + $(MKVER_U) download.in download.mak + $(MAKE) -fdownload.mak install !include ..\..\Target.mak From d46daa7863e4627778022b9947f3254b1d92b7ee Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 13 Mar 2023 16:46:39 +1000 Subject: [PATCH 03/40] feat(windows): check in premake.in --- windows/src/engine/keyman64-ver/Makefile | 20 ++++++++-------- windows/src/engine/keyman64-ver/premake.in | 26 +++++++++++++++++++++ windows/src/engine/keyman64-ver/premake.mak | 26 +++++++++++++++++++++ 3 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 windows/src/engine/keyman64-ver/premake.in create mode 100644 windows/src/engine/keyman64-ver/premake.mak diff --git a/windows/src/engine/keyman64-ver/Makefile b/windows/src/engine/keyman64-ver/Makefile index 4e1c284ccf4..cc3ad5c9b9d 100644 --- a/windows/src/engine/keyman64-ver/Makefile +++ b/windows/src/engine/keyman64-ver/Makefile @@ -7,25 +7,25 @@ !include ..\..\Defines.mak build: version.res dirs - $(MKVER_U) download.in download.mak - $(MAKE) -fdownload.mak build + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak build # $(COPY) keyman64-ver.lib $(OUTLIB) - already done clean: def-clean - $(MKVER_U) download.in download.mak - $(MAKE) -fdownload.mak clean + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak clean signcode: - $(MKVER_U) download.in download.mak - $(MAKE) -fdownload.mak signcode + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak signcode wrap-symbols: - $(MKVER_U) download.in download.mak - $(MAKE) -fdownload.mak wrap-symbols + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak wrap-symbols install: - $(MKVER_U) download.in download.mak - $(MAKE) -fdownload.mak install + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak install !include ..\..\Target.mak diff --git a/windows/src/engine/keyman64-ver/premake.in b/windows/src/engine/keyman64-ver/premake.in new file mode 100644 index 00000000000..84ae86aa02e --- /dev/null +++ b/windows/src/engine/keyman64-ver/premake.in @@ -0,0 +1,26 @@ +# Copy files to correct names in \release; this file is munged by mkver to download.mak +# + +!include ..\..\defines.mak + +default: + echo Please don't call this file directly -- used by Makefile + +clean: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=$VersionWithTag" + +signcode: + $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver$VersionWithTag.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver$VersionWithTag.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver$VersionWithTag.pdb /t keyman-engine-windows + +install: + $(COPY) $(PROGRAM)\engine\keyman64-ver$VersionWithTag.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver$VersionWithTag.dll" + + +build: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=$VersionWithTag + $(COPY) $(X64_TARGET_PATH)\keyman64-ver$VersionWithTag.dll $(PROGRAM)\engine + $(COPY) $(X64_TARGET_PATH)\keyman64-ver$VersionWithTag.pdb $(DEBUGPATH)\engine diff --git a/windows/src/engine/keyman64-ver/premake.mak b/windows/src/engine/keyman64-ver/premake.mak new file mode 100644 index 00000000000..8501621fa06 --- /dev/null +++ b/windows/src/engine/keyman64-ver/premake.mak @@ -0,0 +1,26 @@ +# Copy files to correct names in \release; this file is munged by mkver to download.mak +# + +!include ..\..\defines.mak + +default: + echo Please don't call this file directly -- used by Makefile + +clean: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" + +signcode: + $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver17.0.48-alpha-local.pdb /t keyman-engine-windows + +install: + $(COPY) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver17.0.48-alpha-local.dll" + + +build: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local + $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.dll $(PROGRAM)\engine + $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.pdb $(DEBUGPATH)\engine From 3e718dda8622502c87bfadf2ae4a8455ceb720c3 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 16 Mar 2023 16:02:44 +1000 Subject: [PATCH 04/40] feat(windows): move keyman32 - keyman32-ver This change means the main keyman32.dll will now include the version number as part of its name. Then next step will be to add proxy keyman32.dll which will be needed for imx callback and will catch any legacy debug applications etc which have the keyman32.dll name hard coded. --- windows/src/engine/Makefile | 20 +-- windows/src/engine/README.md | 2 +- windows/src/engine/engine.sln | 6 +- windows/src/engine/inst/components.wxs | 6 +- .../CoreEnvironment.cpp | 0 .../DebugEventTrace.cpp | 0 .../{keyman32 => keyman32-ver}/K32_load.cpp | 0 .../engine/{keyman32 => keyman32-ver}/KBD.H | 0 windows/src/engine/keyman32-ver/Makefile | 51 ++++++ .../SharedBuffers.cpp | 0 .../SharedBuffers.h | 0 .../VKScanCodes.cpp | 0 .../{keyman32 => keyman32-ver}/addins.cpp | 0 .../{keyman32 => keyman32-ver}/addins.h | 0 .../appint/aiTIP.cpp | 0 .../{keyman32 => keyman32-ver}/appint/aiTIP.h | 0 .../appint/aiWin2000Unicode.cpp | 0 .../appint/aiWin2000Unicode.h | 0 .../appint/appint.cpp | 0 .../appint/appint.h | 0 .../{keyman32 => keyman32-ver}/calldll.cpp | 0 .../{keyman32 => keyman32-ver}/calldll.h | 0 .../{keyman32 => keyman32-ver}/capsstate.cpp | 0 .../{keyman32 => keyman32-ver}/capsstate.h | 0 .../{keyman32 => keyman32-ver}/globals.h | 0 .../{keyman32 => keyman32-ver}/glossary.cpp | 0 .../{keyman32 => keyman32-ver}/hookutils.cpp | 0 .../{keyman32 => keyman32-ver}/hotkeys.cpp | 0 .../{keyman32 => keyman32-ver}/hotkeys.h | 0 .../{keyman32 => keyman32-ver}/k32_dbg.cpp | 0 .../k32_globals.cpp | 0 .../k32_lowlevelkeyboardhook.cpp | 0 .../{keyman32 => keyman32-ver}/k32_res.h | 0 .../{keyman32 => keyman32-ver}/k32_tsf.cpp | 0 .../{keyman32 => keyman32-ver}/k32_tsf.h | 0 .../keybd_shift.cpp | 0 .../keyboardoptions.cpp | 0 .../keyboardoptions.h | 0 .../engine/keyman32-ver/keyman-debug-etw.h | 146 ++++++++++++++++++ .../keyman-debug-etw.man | 0 .../engine/keyman32-ver/keyman-debug-etw.rc | 3 + .../keyman-engine.vcxproj | 36 ++--- .../keyman-engine.vcxproj.filters | 6 +- .../src/engine/keyman32-ver/keyman32-ver.def | 48 ++++++ .../keyman32-ver.in} | 2 +- .../keyman32-ver.rc} | 0 .../keyman32-ver.sln} | 2 +- .../keyman32-ver.vcxproj} | 26 ++-- .../keyman32-ver.vcxproj.filters} | 10 +- .../{keyman32 => keyman32-ver}/keyman32.cpp | 0 .../keyman32-ver/keyman64-build-version.h | 66 ++++++++ .../keyman32-ver/keyman64-build-version.in | 66 ++++++++ .../{keyman32 => keyman32-ver}/keyman64.h | 7 +- .../keymancontrol.h | 0 .../{keyman32 => keyman32-ver}/keymanengine.h | 0 .../{keyman32 => keyman32-ver}/keystate.cpp | 0 .../{keyman32 => keyman32-ver}/keystate.h | 0 .../kmhook_callwndproc.cpp | 0 .../kmhook_getmessage.cpp | 0 .../kmhook_keyboard.cpp | 0 .../{keyman32 => keyman32-ver}/kmprocess.cpp | 0 .../kmprocessactions.cpp | 0 .../kmprocessactions.h | 0 .../message-analyzer/README.md | 10 +- .../message-analyzer/keyman-debug-etw.asset | 0 .../keyman-debug-etw.metadata | 0 .../engine/{keyman32 => keyman32-ver}/pch.cpp | 0 .../engine/{keyman32 => keyman32-ver}/pch.h | 0 windows/src/engine/keyman32-ver/premake.in | 30 ++++ windows/src/engine/keyman32-ver/premake.mak | 30 ++++ .../preservedkeymap.cpp | 0 .../{keyman32 => keyman32-ver}/security.cpp | 0 .../{keyman32 => keyman32-ver}/security.h | 0 .../selectkeyboard.cpp | 0 .../serialkeyeventclient.cpp | 0 .../serialkeyeventclient.h | 0 .../serialkeyeventcommon.h | 0 .../serialkeyeventserver.cpp | 0 .../serialkeyeventserver.h | 0 .../{keyman32 => keyman32-ver}/syskbd.cpp | 0 .../{keyman32 => keyman32-ver}/syskbd.h | 0 .../{keyman32 => keyman32-ver}/syskbdnt.cpp | 0 .../{keyman32 => keyman32-ver}/syskbdnt64.cpp | 0 .../testkeymanfunctioning.h | 0 .../tests/keyman-engine-tests/appinttests.cpp | 0 .../tests/keyman-engine-tests/gtest_main.cpp | 0 .../keyboardoptionstests.cpp | 0 .../keyman-engine-tests.vcxproj | 0 .../kmprocessactionstests.cpp | 0 .../tests/keyman-engine-tests/packages.config | 0 .../tests/keyman-engine-tests/pch.cpp | 0 .../tests/keyman-engine-tests/pch.h | 0 .../{keyman32 => keyman32-ver}/version.rc | 4 +- .../versioninfo.cpp | 0 .../{keyman32 => keyman32-ver}/vkscancodes.h | 0 windows/src/engine/keyman32/BuildLog.htm | Bin 7282 -> 0 bytes windows/src/engine/keyman32/Makefile | 51 ------ windows/src/engine/keyman64-ver/Makefile | 1 + .../engine/keyman64-ver/keyman64-ver.vcxproj | 138 ++++++++--------- .../keyman64-ver/keyman64-ver.vcxproj.filters | 126 +++++++-------- windows/src/engine/keyman64-ver/premake.in | 2 +- windows/src/engine/keyman64-ver/premake.mak | 2 +- windows/src/engine/kmtip/kmtip.vcxproj | 4 +- windows/src/engine/mcompile/mc_syskbdnt32.cpp | 2 +- windows/src/engine/mcompile/mc_syskbdnt64.cpp | 2 +- windows/src/engine/mcompile/mcompile.vcxproj | 4 +- .../engine/mcompile/mcompile.vcxproj.filters | 4 +- windows/src/engine/testhost/README.md | 4 +- windows/src/engine/testhost/testhost.cpp | 6 +- 109 files changed, 655 insertions(+), 268 deletions(-) rename windows/src/engine/{keyman32 => keyman32-ver}/CoreEnvironment.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/DebugEventTrace.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/K32_load.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/KBD.H (100%) create mode 100644 windows/src/engine/keyman32-ver/Makefile rename windows/src/engine/{keyman32 => keyman32-ver}/SharedBuffers.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/SharedBuffers.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/VKScanCodes.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/addins.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/addins.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/appint/aiTIP.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/appint/aiTIP.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/appint/aiWin2000Unicode.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/appint/aiWin2000Unicode.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/appint/appint.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/appint/appint.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/calldll.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/calldll.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/capsstate.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/capsstate.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/globals.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/glossary.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/hookutils.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/hotkeys.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/hotkeys.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/k32_dbg.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/k32_globals.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/k32_lowlevelkeyboardhook.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/k32_res.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/k32_tsf.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/k32_tsf.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/keybd_shift.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/keyboardoptions.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/keyboardoptions.h (100%) create mode 100644 windows/src/engine/keyman32-ver/keyman-debug-etw.h rename windows/src/engine/{keyman32 => keyman32-ver}/keyman-debug-etw.man (100%) create mode 100644 windows/src/engine/keyman32-ver/keyman-debug-etw.rc rename windows/src/engine/{keyman32 => keyman32-ver}/keyman-engine.vcxproj (96%) rename windows/src/engine/{keyman32 => keyman32-ver}/keyman-engine.vcxproj.filters (98%) create mode 100644 windows/src/engine/keyman32-ver/keyman32-ver.def rename windows/src/engine/{keyman32/keyman32.def => keyman32-ver/keyman32-ver.in} (96%) rename windows/src/engine/{keyman32/keyman32.rc => keyman32-ver/keyman32-ver.rc} (100%) rename windows/src/engine/{keyman32/keyman32.sln => keyman32-ver/keyman32-ver.sln} (88%) rename windows/src/engine/{keyman32/keyman32.vcxproj => keyman32-ver/keyman32-ver.vcxproj} (97%) rename windows/src/engine/{keyman32/keyman32.vcxproj.filters => keyman32-ver/keyman32-ver.vcxproj.filters} (99%) rename windows/src/engine/{keyman32 => keyman32-ver}/keyman32.cpp (100%) create mode 100644 windows/src/engine/keyman32-ver/keyman64-build-version.h create mode 100644 windows/src/engine/keyman32-ver/keyman64-build-version.in rename windows/src/engine/{keyman32 => keyman32-ver}/keyman64.h (98%) rename windows/src/engine/{keyman32 => keyman32-ver}/keymancontrol.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/keymanengine.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/keystate.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/keystate.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/kmhook_callwndproc.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/kmhook_getmessage.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/kmhook_keyboard.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/kmprocess.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/kmprocessactions.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/kmprocessactions.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/message-analyzer/README.md (72%) rename windows/src/engine/{keyman32 => keyman32-ver}/message-analyzer/keyman-debug-etw.asset (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/message-analyzer/keyman-debug-etw.metadata (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/pch.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/pch.h (100%) create mode 100644 windows/src/engine/keyman32-ver/premake.in create mode 100644 windows/src/engine/keyman32-ver/premake.mak rename windows/src/engine/{keyman32 => keyman32-ver}/preservedkeymap.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/security.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/security.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/selectkeyboard.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/serialkeyeventclient.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/serialkeyeventclient.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/serialkeyeventcommon.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/serialkeyeventserver.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/serialkeyeventserver.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/syskbd.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/syskbd.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/syskbdnt.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/syskbdnt64.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/testkeymanfunctioning.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/appinttests.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/gtest_main.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/keyboardoptionstests.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/keyman-engine-tests.vcxproj (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/kmprocessactionstests.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/packages.config (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/pch.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/tests/keyman-engine-tests/pch.h (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/version.rc (84%) rename windows/src/engine/{keyman32 => keyman32-ver}/versioninfo.cpp (100%) rename windows/src/engine/{keyman32 => keyman32-ver}/vkscancodes.h (100%) delete mode 100644 windows/src/engine/keyman32/BuildLog.htm delete mode 100644 windows/src/engine/keyman32/Makefile diff --git a/windows/src/engine/Makefile b/windows/src/engine/Makefile index b033753bcaf..12dc2f00ca0 100644 --- a/windows/src/engine/Makefile +++ b/windows/src/engine/Makefile @@ -5,9 +5,9 @@ # ---------------------------------------------------------------------- !ifdef NODELPHI -TARGETS=keymanmc keyman32 keyman64-ver keymanx64 mcompile kmtip kmrefresh +TARGETS=keymanmc keyman32-ver keyman64-ver keymanx64 mcompile kmtip kmrefresh !else -TARGETS=keymanmc keyman32 kmcomapi keyman tsysinfox64 tsysinfo keyman64-ver keymanx64 mcompile inst kmtip kmrefresh +TARGETS=keymanmc keyman32-ver kmcomapi keyman tsysinfox64 tsysinfo keyman64-ver keymanx64 mcompile inst kmtip kmrefresh !endif MANIFESTS=keyman tsysinfo tsysinfox64 keymanx64 mcompile CLEANS=clean-engine @@ -28,8 +28,8 @@ keymanmc: .virtual cd $(ROOT)\src\engine\keymanmc $(MAKE) $(TARGET) -keyman32: .virtual - cd $(ROOT)\src\engine\keyman32 +keyman32-ver: .virtual + cd $(ROOT)\src\engine\keyman32-ver $(MAKE) $(TARGET) tsysinfox64: .virtual @@ -64,16 +64,16 @@ kmtip: .virtual # Shorthand targets for debug builds # ---------------------------------------------------------------------- -keyman32-build: - cd $(ROOT)\src\engine\keyman32 +keyman32-ver-build: + cd $(ROOT)\src\engine\keyman32-ver $(MAKE) build -keyman32-signcode: - cd $(ROOT)\src\engine\keyman32 +keyman32-ver-signcode: + cd $(ROOT)\src\engine\keyman32-ver $(MAKE) signcode -keyman32-install: - cd $(ROOT)\src\engine\keyman32 +keyman32-ver-install: + cd $(ROOT)\src\engine\keyman32-ver $(MAKE) install keyman64-ver-build: diff --git a/windows/src/engine/README.md b/windows/src/engine/README.md index ab1202a5a43..194c287f9c0 100644 --- a/windows/src/engine/README.md +++ b/windows/src/engine/README.md @@ -12,7 +12,7 @@ Host application for the Keyman Engine. Shows the Keyman icon, Keyman menu, OSK, ## keymanx64 - keymanx64.exe -64-bit version of keyman.exe. All UI is in keyman.exe, so this is a thin wrapper around the keyman32 build. +64-bit version of keyman.exe. All UI is in keyman.exe, so this is a thin wrapper around the keyman32-ver build. ## kmcomapi - kmcomapi.dll | kmcomapi.x64.dll diff --git a/windows/src/engine/engine.sln b/windows/src/engine/engine.sln index 761f05a8d9c..464dace7cd3 100644 --- a/windows/src/engine/engine.sln +++ b/windows/src/engine/engine.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31313.79 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman32", "keyman32\Keyman32.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman32-ver", "keyman32-ver\Keyman32-ver.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64-ver", "keyman64-ver\keyman64-ver.vcxproj", "{D1115FB2-230D-4FD8-90B9-982E49953D18}" EndProject @@ -15,9 +15,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mcompile", "mcompile\mcompi EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kmrefresh", "kmrefresh\kmrefresh.vcxproj", "{A3B8F75F-E63E-434E-8A2A-034AD9B66571}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman-engine-tests", "keyman32\tests\keyman-engine-tests\keyman-engine-tests.vcxproj", "{46399ED7-79A1-4E7E-BD96-4B1AEEC838AE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman-engine-tests", "keyman32-ver\tests\keyman-engine-tests\keyman-engine-tests.vcxproj", "{46399ED7-79A1-4E7E-BD96-4B1AEEC838AE}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman-engine", "keyman32\keyman-engine.vcxproj", "{A7069186-5AE7-4504-8926-861B7A34BA9E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman-engine", "keyman32-ver\keyman-engine.vcxproj", "{A7069186-5AE7-4504-8926-861B7A34BA9E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testhost", "testhost\testhost.vcxproj", "{12818DA3-0472-49A5-96FC-A4808A1A77FA}" EndProject diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index beccf166549..be1ea89b4cd 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -101,7 +101,7 @@ - + @@ -240,8 +240,8 @@ - - + + diff --git a/windows/src/engine/keyman32/CoreEnvironment.cpp b/windows/src/engine/keyman32-ver/CoreEnvironment.cpp similarity index 100% rename from windows/src/engine/keyman32/CoreEnvironment.cpp rename to windows/src/engine/keyman32-ver/CoreEnvironment.cpp diff --git a/windows/src/engine/keyman32/DebugEventTrace.cpp b/windows/src/engine/keyman32-ver/DebugEventTrace.cpp similarity index 100% rename from windows/src/engine/keyman32/DebugEventTrace.cpp rename to windows/src/engine/keyman32-ver/DebugEventTrace.cpp diff --git a/windows/src/engine/keyman32/K32_load.cpp b/windows/src/engine/keyman32-ver/K32_load.cpp similarity index 100% rename from windows/src/engine/keyman32/K32_load.cpp rename to windows/src/engine/keyman32-ver/K32_load.cpp diff --git a/windows/src/engine/keyman32/KBD.H b/windows/src/engine/keyman32-ver/KBD.H similarity index 100% rename from windows/src/engine/keyman32/KBD.H rename to windows/src/engine/keyman32-ver/KBD.H diff --git a/windows/src/engine/keyman32-ver/Makefile b/windows/src/engine/keyman32-ver/Makefile new file mode 100644 index 00000000000..fadfd057efd --- /dev/null +++ b/windows/src/engine/keyman32-ver/Makefile @@ -0,0 +1,51 @@ +# +# Keyman32-ver Makefile +# + +!include ..\..\Defines.mak + +build: version.res dirs pull-core + $(MKVER_U) premake.in premake.mak + $(MKVER_U) keyman32-ver.in keyman32-ver.def + $(MAKE) -fpremake.mak build + +clean: def-clean + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak clean + +signcode: + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak signcode + +wrap-symbols: + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak wrap-symbols + +install: + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak install + +!ifdef DEBUG +CORE_DEBUG=--debug +MESON_TARGET=debug +!else +MESON_TARGET=release +!endif + +!ifdef GIT_BASH_FOR_KEYMAN +CALLER=$(GIT_BASH_FOR_KEYMAN) +!else +CALLER=start /wait +!endif +!ifdef DEBUG +BUILD_DEBUG=-d +!else +BUILD_DEBUG= +!endif + +pull-core: + cd $(ROOT)\..\core + $(CALLER) ./build.sh -p native $(BUILD_DEBUG) + cd $(ROOT)\src\engine\keyman32-ver + +!include ..\..\Target.mak diff --git a/windows/src/engine/keyman32/SharedBuffers.cpp b/windows/src/engine/keyman32-ver/SharedBuffers.cpp similarity index 100% rename from windows/src/engine/keyman32/SharedBuffers.cpp rename to windows/src/engine/keyman32-ver/SharedBuffers.cpp diff --git a/windows/src/engine/keyman32/SharedBuffers.h b/windows/src/engine/keyman32-ver/SharedBuffers.h similarity index 100% rename from windows/src/engine/keyman32/SharedBuffers.h rename to windows/src/engine/keyman32-ver/SharedBuffers.h diff --git a/windows/src/engine/keyman32/VKScanCodes.cpp b/windows/src/engine/keyman32-ver/VKScanCodes.cpp similarity index 100% rename from windows/src/engine/keyman32/VKScanCodes.cpp rename to windows/src/engine/keyman32-ver/VKScanCodes.cpp diff --git a/windows/src/engine/keyman32/addins.cpp b/windows/src/engine/keyman32-ver/addins.cpp similarity index 100% rename from windows/src/engine/keyman32/addins.cpp rename to windows/src/engine/keyman32-ver/addins.cpp diff --git a/windows/src/engine/keyman32/addins.h b/windows/src/engine/keyman32-ver/addins.h similarity index 100% rename from windows/src/engine/keyman32/addins.h rename to windows/src/engine/keyman32-ver/addins.h diff --git a/windows/src/engine/keyman32/appint/aiTIP.cpp b/windows/src/engine/keyman32-ver/appint/aiTIP.cpp similarity index 100% rename from windows/src/engine/keyman32/appint/aiTIP.cpp rename to windows/src/engine/keyman32-ver/appint/aiTIP.cpp diff --git a/windows/src/engine/keyman32/appint/aiTIP.h b/windows/src/engine/keyman32-ver/appint/aiTIP.h similarity index 100% rename from windows/src/engine/keyman32/appint/aiTIP.h rename to windows/src/engine/keyman32-ver/appint/aiTIP.h diff --git a/windows/src/engine/keyman32/appint/aiWin2000Unicode.cpp b/windows/src/engine/keyman32-ver/appint/aiWin2000Unicode.cpp similarity index 100% rename from windows/src/engine/keyman32/appint/aiWin2000Unicode.cpp rename to windows/src/engine/keyman32-ver/appint/aiWin2000Unicode.cpp diff --git a/windows/src/engine/keyman32/appint/aiWin2000Unicode.h b/windows/src/engine/keyman32-ver/appint/aiWin2000Unicode.h similarity index 100% rename from windows/src/engine/keyman32/appint/aiWin2000Unicode.h rename to windows/src/engine/keyman32-ver/appint/aiWin2000Unicode.h diff --git a/windows/src/engine/keyman32/appint/appint.cpp b/windows/src/engine/keyman32-ver/appint/appint.cpp similarity index 100% rename from windows/src/engine/keyman32/appint/appint.cpp rename to windows/src/engine/keyman32-ver/appint/appint.cpp diff --git a/windows/src/engine/keyman32/appint/appint.h b/windows/src/engine/keyman32-ver/appint/appint.h similarity index 100% rename from windows/src/engine/keyman32/appint/appint.h rename to windows/src/engine/keyman32-ver/appint/appint.h diff --git a/windows/src/engine/keyman32/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp similarity index 100% rename from windows/src/engine/keyman32/calldll.cpp rename to windows/src/engine/keyman32-ver/calldll.cpp diff --git a/windows/src/engine/keyman32/calldll.h b/windows/src/engine/keyman32-ver/calldll.h similarity index 100% rename from windows/src/engine/keyman32/calldll.h rename to windows/src/engine/keyman32-ver/calldll.h diff --git a/windows/src/engine/keyman32/capsstate.cpp b/windows/src/engine/keyman32-ver/capsstate.cpp similarity index 100% rename from windows/src/engine/keyman32/capsstate.cpp rename to windows/src/engine/keyman32-ver/capsstate.cpp diff --git a/windows/src/engine/keyman32/capsstate.h b/windows/src/engine/keyman32-ver/capsstate.h similarity index 100% rename from windows/src/engine/keyman32/capsstate.h rename to windows/src/engine/keyman32-ver/capsstate.h diff --git a/windows/src/engine/keyman32/globals.h b/windows/src/engine/keyman32-ver/globals.h similarity index 100% rename from windows/src/engine/keyman32/globals.h rename to windows/src/engine/keyman32-ver/globals.h diff --git a/windows/src/engine/keyman32/glossary.cpp b/windows/src/engine/keyman32-ver/glossary.cpp similarity index 100% rename from windows/src/engine/keyman32/glossary.cpp rename to windows/src/engine/keyman32-ver/glossary.cpp diff --git a/windows/src/engine/keyman32/hookutils.cpp b/windows/src/engine/keyman32-ver/hookutils.cpp similarity index 100% rename from windows/src/engine/keyman32/hookutils.cpp rename to windows/src/engine/keyman32-ver/hookutils.cpp diff --git a/windows/src/engine/keyman32/hotkeys.cpp b/windows/src/engine/keyman32-ver/hotkeys.cpp similarity index 100% rename from windows/src/engine/keyman32/hotkeys.cpp rename to windows/src/engine/keyman32-ver/hotkeys.cpp diff --git a/windows/src/engine/keyman32/hotkeys.h b/windows/src/engine/keyman32-ver/hotkeys.h similarity index 100% rename from windows/src/engine/keyman32/hotkeys.h rename to windows/src/engine/keyman32-ver/hotkeys.h diff --git a/windows/src/engine/keyman32/k32_dbg.cpp b/windows/src/engine/keyman32-ver/k32_dbg.cpp similarity index 100% rename from windows/src/engine/keyman32/k32_dbg.cpp rename to windows/src/engine/keyman32-ver/k32_dbg.cpp diff --git a/windows/src/engine/keyman32/k32_globals.cpp b/windows/src/engine/keyman32-ver/k32_globals.cpp similarity index 100% rename from windows/src/engine/keyman32/k32_globals.cpp rename to windows/src/engine/keyman32-ver/k32_globals.cpp diff --git a/windows/src/engine/keyman32/k32_lowlevelkeyboardhook.cpp b/windows/src/engine/keyman32-ver/k32_lowlevelkeyboardhook.cpp similarity index 100% rename from windows/src/engine/keyman32/k32_lowlevelkeyboardhook.cpp rename to windows/src/engine/keyman32-ver/k32_lowlevelkeyboardhook.cpp diff --git a/windows/src/engine/keyman32/k32_res.h b/windows/src/engine/keyman32-ver/k32_res.h similarity index 100% rename from windows/src/engine/keyman32/k32_res.h rename to windows/src/engine/keyman32-ver/k32_res.h diff --git a/windows/src/engine/keyman32/k32_tsf.cpp b/windows/src/engine/keyman32-ver/k32_tsf.cpp similarity index 100% rename from windows/src/engine/keyman32/k32_tsf.cpp rename to windows/src/engine/keyman32-ver/k32_tsf.cpp diff --git a/windows/src/engine/keyman32/k32_tsf.h b/windows/src/engine/keyman32-ver/k32_tsf.h similarity index 100% rename from windows/src/engine/keyman32/k32_tsf.h rename to windows/src/engine/keyman32-ver/k32_tsf.h diff --git a/windows/src/engine/keyman32/keybd_shift.cpp b/windows/src/engine/keyman32-ver/keybd_shift.cpp similarity index 100% rename from windows/src/engine/keyman32/keybd_shift.cpp rename to windows/src/engine/keyman32-ver/keybd_shift.cpp diff --git a/windows/src/engine/keyman32/keyboardoptions.cpp b/windows/src/engine/keyman32-ver/keyboardoptions.cpp similarity index 100% rename from windows/src/engine/keyman32/keyboardoptions.cpp rename to windows/src/engine/keyman32-ver/keyboardoptions.cpp diff --git a/windows/src/engine/keyman32/keyboardoptions.h b/windows/src/engine/keyman32-ver/keyboardoptions.h similarity index 100% rename from windows/src/engine/keyman32/keyboardoptions.h rename to windows/src/engine/keyman32-ver/keyboardoptions.h diff --git a/windows/src/engine/keyman32-ver/keyman-debug-etw.h b/windows/src/engine/keyman32-ver/keyman-debug-etw.h new file mode 100644 index 00000000000..e4c8fd159f7 --- /dev/null +++ b/windows/src/engine/keyman32-ver/keyman-debug-etw.h @@ -0,0 +1,146 @@ +//**********************************************************************` +//* This is an include file generated by Message Compiler. *` +//* *` +//* Copyright (c) Microsoft Corporation. All Rights Reserved. *` +//**********************************************************************` +#pragma once + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// Provider "Keyman-Debug-ETWProvider" event count 1 +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +// Provider GUID = da621615-e08b-4283-918e-d2502d3757ae +EXTERN_C __declspec(selectany) const GUID ProviderGuid = {0xda621615, 0xe08b, 0x4283, {0x91, 0x8e, 0xd2, 0x50, 0x2d, 0x37, 0x57, 0xae}}; + +#ifndef ProviderGuid_Traits +#define ProviderGuid_Traits NULL +#endif // ProviderGuid_Traits + +// +// Channel +// +#define ProviderGuid_CHANNEL_C1 0x10 + +// +// Event Descriptors +// +EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR DebugEvent = {0x1, 0x0, 0x10, 0x4, 0x0, 0x0, 0x8000000000000000}; +#define DebugEvent_value 0x1 + +#define MSG_Provider_Name 0x90000001L +#define MSG_EventMessage 0xB0000001L +#define MSG_Map_x86 0xD0000001L +#define MSG_Map_x64 0xD0000002L +#define MSG_Map_UNMODIFIED 0xD0000003L +#define MSG_Map_LCTRL 0xD0000004L +#define MSG_Map_RCTRL 0xD0000005L +#define MSG_Map_LALT 0xD0000006L +#define MSG_Map_LCTRL_LALT 0xD0000007L +#define MSG_Map_RALT 0xD0000008L +#define MSG_Map_LCTRL_RALT 0xD0000009L +#define MSG_Map_RCTRL_RALT 0xD000000AL +#define MSG_Map_SHIFT 0xD000000BL +#define MSG_Map_SHIFT_LCTRL 0xD000000CL +#define MSG_Map_SHIFT_RCTRL 0xD000000DL +#define MSG_Map_SHIFT_LALT 0xD000000EL +#define MSG_Map_SHIFT_LCTRL_LALT 0xD000000FL +#define MSG_Map_SHIFT_RALT 0xD0000010L +#define MSG_Map_SHIFT_RCTRL_RALT 0xD0000011L +#define MSG_Map_CAPS 0xD0000012L +#define MSG_Map_CAPS_LCTRL 0xD0000013L +#define MSG_Map_CAPS_RCTRL 0xD0000014L +#define MSG_Map_CAPS_LALT 0xD0000015L +#define MSG_Map_CAPS_LCTRL_LALT 0xD0000016L +#define MSG_Map_CAPS_RALT 0xD0000017L +#define MSG_Map_CAPS_RCTRL_RALT 0xD0000018L +#define MSG_Map_CAPS_SHIFT 0xD0000019L +#define MSG_Map_CAPS_SHIFT_LCTRL 0xD000001AL +#define MSG_Map_CAPS_SHIFT_RCTRL 0xD000001BL +#define MSG_Map_CAPS_SHIFT_LALT 0xD000001CL +#define MSG_Map_CAPS_SHIFT_LCTRL_LALT 0xD000001DL +#define MSG_Map_CAPS_SHIFT_RALT 0xD000001EL +#define MSG_Map_CAPS_SHIFT_RCTRL_RALT 0xD000001FL +#define MSG_Map_NUM 0xD0000020L +#define MSG_Map_NUM_LCTRL 0xD0000021L +#define MSG_Map_NUM_RCTRL 0xD0000022L +#define MSG_Map_NUM_LALT 0xD0000023L +#define MSG_Map_NUM_LCTRL_LALT 0xD0000024L +#define MSG_Map_NUM_RALT 0xD0000025L +#define MSG_Map_NUM_RCTRL_RALT 0xD0000026L +#define MSG_Map_NUM_SHIFT 0xD0000027L +#define MSG_Map_NUM_SHIFT_LCTRL 0xD0000028L +#define MSG_Map_NUM_SHIFT_RCTRL 0xD0000029L +#define MSG_Map_NUM_SHIFT_LALT 0xD000002AL +#define MSG_Map_NUM_SHIFT_LCTRL_LALT 0xD000002BL +#define MSG_Map_NUM_SHIFT_RALT 0xD000002CL +#define MSG_Map_NUM_SHIFT_RCTRL_RALT 0xD000002DL +#define MSG_Map_NUM_CAPS 0xD000002EL +#define MSG_Map_NUM_CAPS_LCTRL 0xD000002FL +#define MSG_Map_NUM_CAPS_RCTRL 0xD0000030L +#define MSG_Map_NUM_CAPS_LALT 0xD0000031L +#define MSG_Map_NUM_CAPS_LCTRL_LALT 0xD0000032L +#define MSG_Map_NUM_CAPS_RALT 0xD0000033L +#define MSG_Map_NUM_CAPS_RCTRL_RALT 0xD0000034L +#define MSG_Map_NUM_CAPS_SHIFT 0xD0000035L +#define MSG_Map_NUM_CAPS_SHIFT_LCTRL 0xD0000036L +#define MSG_Map_NUM_CAPS_SHIFT_RCTRL 0xD0000037L +#define MSG_Map_NUM_CAPS_SHIFT_LALT 0xD0000038L +#define MSG_Map_NUM_CAPS_SHIFT_LCTRL_LALT 0xD0000039L +#define MSG_Map_NUM_CAPS_SHIFT_RALT 0xD000003AL +#define MSG_Map_NUM_CAPS_SHIFT_RCTRL_RALT 0xD000003BL +#define MSG_Map_LSHIFT 0xD000003CL +#define MSG_Map_LSHIFT_LCTRL 0xD000003DL +#define MSG_Map_LSHIFT_RCTRL 0xD000003EL +#define MSG_Map_LSHIFT_LALT 0xD000003FL +#define MSG_Map_LSHIFT_LCTRL_LALT 0xD0000040L +#define MSG_Map_LSHIFT_RALT 0xD0000041L +#define MSG_Map_LSHIFT_RCTRL_RALT 0xD0000042L +#define MSG_Map_CAPS_LSHIFT 0xD0000043L +#define MSG_Map_CAPS_LSHIFT_LCTRL 0xD0000044L +#define MSG_Map_CAPS_LSHIFT_RCTRL 0xD0000045L +#define MSG_Map_CAPS_LSHIFT_LALT 0xD0000046L +#define MSG_Map_CAPS_LSHIFT_LCTRL_LALT 0xD0000047L +#define MSG_Map_CAPS_LSHIFT_RALT 0xD0000048L +#define MSG_Map_CAPS_LSHIFT_RCTRL_RALT 0xD0000049L +#define MSG_Map_NUM_LSHIFT 0xD000004AL +#define MSG_Map_NUM_LSHIFT_LCTRL 0xD000004BL +#define MSG_Map_NUM_LSHIFT_RCTRL 0xD000004CL +#define MSG_Map_NUM_LSHIFT_LALT 0xD000004DL +#define MSG_Map_NUM_LSHIFT_LCTRL_LALT 0xD000004EL +#define MSG_Map_NUM_LSHIFT_RALT 0xD000004FL +#define MSG_Map_NUM_LSHIFT_RCTRL_RALT 0xD0000050L +#define MSG_Map_NUM_CAPS_LSHIFT 0xD0000051L +#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL 0xD0000052L +#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL 0xD0000053L +#define MSG_Map_NUM_CAPS_LSHIFT_LALT 0xD0000054L +#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL_LALT 0xD0000055L +#define MSG_Map_NUM_CAPS_LSHIFT_RALT 0xD0000056L +#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL_RALT 0xD0000057L +#define MSG_Map_RSHIFT 0xD0000058L +#define MSG_Map_RSHIFT_LCTRL 0xD0000059L +#define MSG_Map_RSHIFT_RCTRL 0xD000005AL +#define MSG_Map_RSHIFT_LALT 0xD000005BL +#define MSG_Map_RSHIFT_LCTRL_LALT 0xD000005CL +#define MSG_Map_RSHIFT_RALT 0xD000005DL +#define MSG_Map_RSHIFT_RCTRL_RALT 0xD000005EL +#define MSG_Map_CAPS_RSHIFT 0xD000005FL +#define MSG_Map_CAPS_RSHIFT_LCTRL 0xD0000060L +#define MSG_Map_CAPS_RSHIFT_RCTRL 0xD0000061L +#define MSG_Map_CAPS_RSHIFT_LALT 0xD0000062L +#define MSG_Map_CAPS_RSHIFT_LCTRL_LALT 0xD0000063L +#define MSG_Map_CAPS_RSHIFT_RALT 0xD0000064L +#define MSG_Map_CAPS_RSHIFT_RCTRL_RALT 0xD0000065L +#define MSG_Map_NUM_RSHIFT 0xD0000066L +#define MSG_Map_NUM_RSHIFT_LCTRL 0xD0000067L +#define MSG_Map_NUM_RSHIFT_RCTRL 0xD0000068L +#define MSG_Map_NUM_RSHIFT_LALT 0xD0000069L +#define MSG_Map_NUM_RSHIFT_LCTRL_LALT 0xD000006AL +#define MSG_Map_NUM_RSHIFT_RALT 0xD000006BL +#define MSG_Map_NUM_RSHIFT_RCTRL_RALT 0xD000006CL +#define MSG_Map_NUM_CAPS_RSHIFT 0xD000006DL +#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL 0xD000006EL +#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL 0xD000006FL +#define MSG_Map_NUM_CAPS_RSHIFT_LALT 0xD0000070L +#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL_LALT 0xD0000071L +#define MSG_Map_NUM_CAPS_RSHIFT_RALT 0xD0000072L +#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL_RALT 0xD0000073L diff --git a/windows/src/engine/keyman32/keyman-debug-etw.man b/windows/src/engine/keyman32-ver/keyman-debug-etw.man similarity index 100% rename from windows/src/engine/keyman32/keyman-debug-etw.man rename to windows/src/engine/keyman32-ver/keyman-debug-etw.man diff --git a/windows/src/engine/keyman32-ver/keyman-debug-etw.rc b/windows/src/engine/keyman32-ver/keyman-debug-etw.rc new file mode 100644 index 00000000000..7beaac78043 --- /dev/null +++ b/windows/src/engine/keyman32-ver/keyman-debug-etw.rc @@ -0,0 +1,3 @@ +LANGUAGE 0x9,0x1 +1 11 "MSG00001.bin" +1 WEVT_TEMPLATE "keyman-debug-etwTEMP.BIN" diff --git a/windows/src/engine/keyman32/keyman-engine.vcxproj b/windows/src/engine/keyman32-ver/keyman-engine.vcxproj similarity index 96% rename from windows/src/engine/keyman32/keyman-engine.vcxproj rename to windows/src/engine/keyman32-ver/keyman-engine.vcxproj index 6869117fd9a..387dd0889c7 100644 --- a/windows/src/engine/keyman32/keyman-engine.vcxproj +++ b/windows/src/engine/keyman32-ver/keyman-engine.vcxproj @@ -12,7 +12,7 @@ {A7069186-5AE7-4504-8926-861B7A34BA9E} - Keyman32 + Keyman32-ver 10.0 @@ -67,7 +67,7 @@ true true Win32 - ./Keyman32.tlb + ./Keyman32-ver.tlb @@ -99,26 +99,26 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) kmnkbp0.lib;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) - ./Keyman32.dll + ./Keyman32-ver$(Version_with_tag).dll true - keyman32.def + keyman32-ver.def true - ./Keyman32.pdb + ./Keyman32-ver.pdb true - ./Keyman32.map + ./Keyman32-ver.map false Windows true true 0x1c100000 - ./Keyman32.lib + ./Keyman32-ver.lib MachineX86 true true true - ./Keyman32.bsc + ./Keyman32-ver.bsc @@ -131,7 +131,7 @@ true true Win32 - ./Keyman32.tlb + ./Keyman32-ver.tlb @@ -161,23 +161,23 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) kmnkbp0.lib;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) - ./Keyman32.dll + ./Keyman32-ver$(Version_with_tag).dll true - keyman32.def + keyman32-ver.def true - ./Keyman32.pdb + ./Keyman32-ver.pdb true - ./Keyman32.map + ./Keyman32-ver.map Windows 0x1C100000 - ./Keyman32.lib + ./Keyman32-ver.lib MachineX86 true true true - ./Keyman32.bsc + ./Keyman32-ver.bsc @@ -358,13 +358,13 @@ %(Filename).rc;%(Filename.h);MSG00001.bin Designer - + - + %(PreprocessorDefinitions) %(PreprocessorDefinitions) @@ -403,4 +403,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/keyman32/keyman-engine.vcxproj.filters b/windows/src/engine/keyman32-ver/keyman-engine.vcxproj.filters similarity index 98% rename from windows/src/engine/keyman32/keyman-engine.vcxproj.filters rename to windows/src/engine/keyman32-ver/keyman-engine.vcxproj.filters index 7cd4d906d1b..a7aea30f85b 100644 --- a/windows/src/engine/keyman32/keyman-engine.vcxproj.filters +++ b/windows/src/engine/keyman32-ver/keyman-engine.vcxproj.filters @@ -140,7 +140,7 @@ - + Source Files @@ -151,7 +151,7 @@ - + Source Files @@ -250,4 +250,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/keyman32-ver/keyman32-ver.def b/windows/src/engine/keyman32-ver/keyman32-ver.def new file mode 100644 index 00000000000..7c65c33605a --- /dev/null +++ b/windows/src/engine/keyman32-ver/keyman32-ver.def @@ -0,0 +1,48 @@ +LIBRARY keyman32-ver17.0.48-alpha-local + +EXPORTS + Keyman_GetInitialised + Keyman_Initialise + Keyman_Exit + Keyman_ForceKeyboard + Keyman_StopForcingKeyboard + Keyman_GetLastActiveWindow + Keyman_GetLastFocusWindow + KMSetOutput + KMGetContext + KMQueueAction + KMDisplayIM + KMHideIM + KMGetActiveKeyboard + KMGetKeyboardPath + + TIPActivateEx + TIPActivateKeyboard + TIPProcessKey + TIPIsKeymanRunning + GetKeyboardPreservedKeys + + GetActiveKeymanID + Keyman_RegisterControllerWindow + Keyman_UnregisterControllerWindow + Keyman_RestartEngine + + Keyman_SendMasterController + Keyman_PostControllers + Keyman_PostMasterController + + Keyman_StartExit + Keyman_ResetInitialisation + + Keyman_WriteDebugEvent + + Keyman_UpdateTouchPanelVisibility + + Keyman_Diagnostic + + Keyman_RegisterMasterController + Keyman_UnregisterMasterController + Keyman_RegisterControllerThread + Keyman_UnregisterControllerThread + + SetCustomPostKeyCallback diff --git a/windows/src/engine/keyman32/keyman32.def b/windows/src/engine/keyman32-ver/keyman32-ver.in similarity index 96% rename from windows/src/engine/keyman32/keyman32.def rename to windows/src/engine/keyman32-ver/keyman32-ver.in index 84f0f24a916..d0bee59459d 100644 --- a/windows/src/engine/keyman32/keyman32.def +++ b/windows/src/engine/keyman32-ver/keyman32-ver.in @@ -1,4 +1,4 @@ -LIBRARY KEYMAN32 +LIBRARY keyman32-ver$VersionWithTag EXPORTS Keyman_GetInitialised diff --git a/windows/src/engine/keyman32/keyman32.rc b/windows/src/engine/keyman32-ver/keyman32-ver.rc similarity index 100% rename from windows/src/engine/keyman32/keyman32.rc rename to windows/src/engine/keyman32-ver/keyman32-ver.rc diff --git a/windows/src/engine/keyman32/keyman32.sln b/windows/src/engine/keyman32-ver/keyman32-ver.sln similarity index 88% rename from windows/src/engine/keyman32/keyman32.sln rename to windows/src/engine/keyman32-ver/keyman32-ver.sln index c435faea645..9781954630a 100644 --- a/windows/src/engine/keyman32/keyman32.sln +++ b/windows/src/engine/keyman32-ver/keyman32-ver.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26430.12 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Keyman32", "Keyman32.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Keyman32-ver", "Keyman32-ver.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj similarity index 97% rename from windows/src/engine/keyman32/keyman32.vcxproj rename to windows/src/engine/keyman32-ver/keyman32-ver.vcxproj index 0d78d2c2927..e8fff106b8b 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj +++ b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj @@ -12,9 +12,9 @@ {BD5564FB-35A5-4A3C-B96A-4A6578E2B593} - Keyman32 + Keyman32-ver 10.0 - keyman32 + keyman32-ver @@ -57,10 +57,12 @@ $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) @@ -68,7 +70,7 @@ true true Win32 - ./Keyman32.tlb + ./Keyman32-ver.tlb @@ -98,7 +100,7 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true - keyman32.def + keyman32-ver.def true true false @@ -109,11 +111,11 @@ MachineX86 true true - ..\..\..\lib\keyman32.lib + ..\..\..\lib\keyman32-ver.lib true - ./Keyman32.bsc + ./Keyman32-ver.bsc @@ -126,7 +128,7 @@ true true Win32 - ./Keyman32.tlb + ./Keyman32-ver.tlb @@ -154,7 +156,7 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true - keyman32.def + keyman32-ver.def true true Windows @@ -162,11 +164,11 @@ MachineX86 true true - ..\..\..\lib\keyman32.lib + ..\..\..\lib\keyman32-ver.lib true - ./Keyman32.bsc + ./Keyman32-ver.bsc @@ -348,13 +350,13 @@ %(Filename).rc;%(Filename.h);MSG00001.bin Designer - + - + %(PreprocessorDefinitions) %(PreprocessorDefinitions) diff --git a/windows/src/engine/keyman32/keyman32.vcxproj.filters b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters similarity index 99% rename from windows/src/engine/keyman32/keyman32.vcxproj.filters rename to windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters index 8995c39a930..81f83348afa 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj.filters +++ b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters @@ -143,21 +143,21 @@ - - Source Files - Resource Files Resource Files + + Source Files + - + Source Files - + Source Files diff --git a/windows/src/engine/keyman32/keyman32.cpp b/windows/src/engine/keyman32-ver/keyman32.cpp similarity index 100% rename from windows/src/engine/keyman32/keyman32.cpp rename to windows/src/engine/keyman32-ver/keyman32.cpp diff --git a/windows/src/engine/keyman32-ver/keyman64-build-version.h b/windows/src/engine/keyman32-ver/keyman64-build-version.h new file mode 100644 index 00000000000..e6fd07f2ded --- /dev/null +++ b/windows/src/engine/keyman32-ver/keyman64-build-version.h @@ -0,0 +1,66 @@ +/* + Name: Keyman64 + Copyright: Copyright (C) SIL International. + Documentation: + Description: + Create Date: 1 Aug 2006 + + Modified Date: 9 Aug 2015 + Authors: mcdurdin + Related Files: + Dependencies: + + Bugs: + Todo: + Notes: + History: 01 Aug 2006 - mcdurdin - Remove HWND parameter from SelectKeyboard + 23 Aug 2006 - mcdurdin - Add version 7.0 system stores - VISUALKEYBOARD, KMW_RTL, KMW_HELPFILE, KMW_HELPTEXT, KMW_EMBEDJS + 14 Sep 2006 - mcdurdin - Add IsSysTrayWindow function + 30 May 2007 - mcdurdin - I864 - Log exceptions in hookprocs + 13 Jul 2007 - mcdurdin - I934 - Prep for x64 + 05 Nov 2007 - mcdurdin - I1087 - Add hotkeys to switch languages (Pro) + 27 Mar 2008 - mcdurdin - I1358 - Add TSS_WINDOWSLANGUAGES + 27 Mar 2008 - mcdurdin - I1287 - switch keyboard and language together + 14 Jun 2008 - mcdurdin - I1389 - BKSP single backspace for Vista+ + 27 Jan 2009 - mcdurdin - I1797 - AIWin2000 fallback + 30 Jan 2009 - mcdurdin - I1835 - Improve refresh, debug performance + 11 Dec 2009 - mcdurdin - I934 - x64 - Initial version + 12 Mar 2010 - mcdurdin - I934 - x64 - Complete + 12 Mar 2010 - mcdurdin - I2229 - Remove hints and warnings + 22 Mar 2010 - mcdurdin - Compiler tidyup + 29 Mar 2010 - mcdurdin - I1089 - One keyboard - all applications + 29 Mar 2010 - mcdurdin - I2265 - Keyboard switching reliability + 06 Apr 2010 - mcdurdin - I2271 - Select Keyboard tidy up + 04 May 2010 - mcdurdin - I2355 - Resolve deadlocks loading keyman32.dll + 04 May 2010 - mcdurdin - I2349 - Pause key for debug log switch + 04 May 2010 - mcdurdin - I2353 - DebugLastError function + 25 May 2010 - mcdurdin - I1632 - Keyboard Options + 01 Dec 2012 - mcdurdin - I3613 - V9.0 - System shadow keyboards obsolete, strip out remaining code + 01 Dec 2012 - mcdurdin - I3616 - V9.0 - Language association obsolete, strip out code + 07 Nov 2013 - mcdurdin - I3949 - V9.0 - Keyboard selection and notification needs consolidation + 17 Dec 2013 - mcdurdin - I4006 - V9.0 - Remove old aiDefault code + 06 Mar 2014 - mcdurdin - I4124 - V9.0 - Language switch dialog is not working in v9 + 16 Apr 2014 - mcdurdin - I4169 - V9.0 - Mnemonic layouts should be recompiled to positional based on user-selected base keyboard + 28 May 2014 - mcdurdin - I4220 - V9.0 - Remove references to LoadKeyboardLayout, Preload, Substitutes, etc. and use only TSF + 16 Jun 2014 - mcdurdin - I4271 - V9.0 - Switch language for all applications is not working + 23 Jun 2014 - mcdurdin - I4287 - V9.0 - Remove extraneous AppIntegration class type tests + 03 Aug 2014 - mcdurdin - I4326 - V9.0 - Switch-off hotkey not working, then keyboard hotkey stopped working (win 8.1 jeremy) [High] + 13 Aug 2014 - mcdurdin - I4370 - Deadkeys are still not working in Winword TIP mode + 14 Aug 2014 - mcdurdin - I4379 - V9.0 - kmtip should use the Keyman debug logging framework + 16 Oct 2014 - mcdurdin - I4462 - V9.0 - Keyman had a mismatch between KEYBOARDINFO and INTKEYBOARDINFO + 03 Feb 2015 - mcdurdin - I4582 - V9.0 - Most underlying layout code in Keyman32 is now obsolete and needs to be removed + 09 Aug 2015 - mcdurdin - I4844 - Tidy up PostDummyKeyEvent calls +*/ +/***************************************************************************/ // I4006 // I4169 + +#ifndef _KEYMAN64_BUILD_VERSION_H +#define _KEYMAN64_BUILD_VERSION_H + +#ifdef _WIN64 +#define LIBRARY_NAME "keyman64-ver17.0.48-alpha-local" +#else +#define LIBRARY_NAME "keyman32-ver17.0.48-alpha-local" +#endif + + +#endif // _KEYMAN64_BUILD_VERSION_H diff --git a/windows/src/engine/keyman32-ver/keyman64-build-version.in b/windows/src/engine/keyman32-ver/keyman64-build-version.in new file mode 100644 index 00000000000..e6fd07f2ded --- /dev/null +++ b/windows/src/engine/keyman32-ver/keyman64-build-version.in @@ -0,0 +1,66 @@ +/* + Name: Keyman64 + Copyright: Copyright (C) SIL International. + Documentation: + Description: + Create Date: 1 Aug 2006 + + Modified Date: 9 Aug 2015 + Authors: mcdurdin + Related Files: + Dependencies: + + Bugs: + Todo: + Notes: + History: 01 Aug 2006 - mcdurdin - Remove HWND parameter from SelectKeyboard + 23 Aug 2006 - mcdurdin - Add version 7.0 system stores - VISUALKEYBOARD, KMW_RTL, KMW_HELPFILE, KMW_HELPTEXT, KMW_EMBEDJS + 14 Sep 2006 - mcdurdin - Add IsSysTrayWindow function + 30 May 2007 - mcdurdin - I864 - Log exceptions in hookprocs + 13 Jul 2007 - mcdurdin - I934 - Prep for x64 + 05 Nov 2007 - mcdurdin - I1087 - Add hotkeys to switch languages (Pro) + 27 Mar 2008 - mcdurdin - I1358 - Add TSS_WINDOWSLANGUAGES + 27 Mar 2008 - mcdurdin - I1287 - switch keyboard and language together + 14 Jun 2008 - mcdurdin - I1389 - BKSP single backspace for Vista+ + 27 Jan 2009 - mcdurdin - I1797 - AIWin2000 fallback + 30 Jan 2009 - mcdurdin - I1835 - Improve refresh, debug performance + 11 Dec 2009 - mcdurdin - I934 - x64 - Initial version + 12 Mar 2010 - mcdurdin - I934 - x64 - Complete + 12 Mar 2010 - mcdurdin - I2229 - Remove hints and warnings + 22 Mar 2010 - mcdurdin - Compiler tidyup + 29 Mar 2010 - mcdurdin - I1089 - One keyboard - all applications + 29 Mar 2010 - mcdurdin - I2265 - Keyboard switching reliability + 06 Apr 2010 - mcdurdin - I2271 - Select Keyboard tidy up + 04 May 2010 - mcdurdin - I2355 - Resolve deadlocks loading keyman32.dll + 04 May 2010 - mcdurdin - I2349 - Pause key for debug log switch + 04 May 2010 - mcdurdin - I2353 - DebugLastError function + 25 May 2010 - mcdurdin - I1632 - Keyboard Options + 01 Dec 2012 - mcdurdin - I3613 - V9.0 - System shadow keyboards obsolete, strip out remaining code + 01 Dec 2012 - mcdurdin - I3616 - V9.0 - Language association obsolete, strip out code + 07 Nov 2013 - mcdurdin - I3949 - V9.0 - Keyboard selection and notification needs consolidation + 17 Dec 2013 - mcdurdin - I4006 - V9.0 - Remove old aiDefault code + 06 Mar 2014 - mcdurdin - I4124 - V9.0 - Language switch dialog is not working in v9 + 16 Apr 2014 - mcdurdin - I4169 - V9.0 - Mnemonic layouts should be recompiled to positional based on user-selected base keyboard + 28 May 2014 - mcdurdin - I4220 - V9.0 - Remove references to LoadKeyboardLayout, Preload, Substitutes, etc. and use only TSF + 16 Jun 2014 - mcdurdin - I4271 - V9.0 - Switch language for all applications is not working + 23 Jun 2014 - mcdurdin - I4287 - V9.0 - Remove extraneous AppIntegration class type tests + 03 Aug 2014 - mcdurdin - I4326 - V9.0 - Switch-off hotkey not working, then keyboard hotkey stopped working (win 8.1 jeremy) [High] + 13 Aug 2014 - mcdurdin - I4370 - Deadkeys are still not working in Winword TIP mode + 14 Aug 2014 - mcdurdin - I4379 - V9.0 - kmtip should use the Keyman debug logging framework + 16 Oct 2014 - mcdurdin - I4462 - V9.0 - Keyman had a mismatch between KEYBOARDINFO and INTKEYBOARDINFO + 03 Feb 2015 - mcdurdin - I4582 - V9.0 - Most underlying layout code in Keyman32 is now obsolete and needs to be removed + 09 Aug 2015 - mcdurdin - I4844 - Tidy up PostDummyKeyEvent calls +*/ +/***************************************************************************/ // I4006 // I4169 + +#ifndef _KEYMAN64_BUILD_VERSION_H +#define _KEYMAN64_BUILD_VERSION_H + +#ifdef _WIN64 +#define LIBRARY_NAME "keyman64-ver17.0.48-alpha-local" +#else +#define LIBRARY_NAME "keyman32-ver17.0.48-alpha-local" +#endif + + +#endif // _KEYMAN64_BUILD_VERSION_H diff --git a/windows/src/engine/keyman32/keyman64.h b/windows/src/engine/keyman32-ver/keyman64.h similarity index 98% rename from windows/src/engine/keyman32/keyman64.h rename to windows/src/engine/keyman32-ver/keyman64.h index 2a7ea915c6b..93723407287 100644 --- a/windows/src/engine/keyman32/keyman64.h +++ b/windows/src/engine/keyman32-ver/keyman64.h @@ -75,18 +75,13 @@ #include #include #include +#include "keyman64-build-version.h" #include "../../../../common/windows/cpp/include/legacy_kmx_file.h" #include "../../../../common/windows/cpp/include/registry.h" #include "../../../../common/windows/cpp/include/unicode.h" #include "../../../../common/windows/cpp/include/xstring.h" #include "../../../../common/windows/cpp/include/legacy_kmx_memory.h" -#ifdef _WIN64 -#define LIBRARY_NAME "keyman64-ver17.0.48-alpha-local" -#else -#define LIBRARY_NAME "KEYMAN32" -#endif - #define NOT_IMPLEMENTED assert(FALSE) diff --git a/windows/src/engine/keyman32/keymancontrol.h b/windows/src/engine/keyman32-ver/keymancontrol.h similarity index 100% rename from windows/src/engine/keyman32/keymancontrol.h rename to windows/src/engine/keyman32-ver/keymancontrol.h diff --git a/windows/src/engine/keyman32/keymanengine.h b/windows/src/engine/keyman32-ver/keymanengine.h similarity index 100% rename from windows/src/engine/keyman32/keymanengine.h rename to windows/src/engine/keyman32-ver/keymanengine.h diff --git a/windows/src/engine/keyman32/keystate.cpp b/windows/src/engine/keyman32-ver/keystate.cpp similarity index 100% rename from windows/src/engine/keyman32/keystate.cpp rename to windows/src/engine/keyman32-ver/keystate.cpp diff --git a/windows/src/engine/keyman32/keystate.h b/windows/src/engine/keyman32-ver/keystate.h similarity index 100% rename from windows/src/engine/keyman32/keystate.h rename to windows/src/engine/keyman32-ver/keystate.h diff --git a/windows/src/engine/keyman32/kmhook_callwndproc.cpp b/windows/src/engine/keyman32-ver/kmhook_callwndproc.cpp similarity index 100% rename from windows/src/engine/keyman32/kmhook_callwndproc.cpp rename to windows/src/engine/keyman32-ver/kmhook_callwndproc.cpp diff --git a/windows/src/engine/keyman32/kmhook_getmessage.cpp b/windows/src/engine/keyman32-ver/kmhook_getmessage.cpp similarity index 100% rename from windows/src/engine/keyman32/kmhook_getmessage.cpp rename to windows/src/engine/keyman32-ver/kmhook_getmessage.cpp diff --git a/windows/src/engine/keyman32/kmhook_keyboard.cpp b/windows/src/engine/keyman32-ver/kmhook_keyboard.cpp similarity index 100% rename from windows/src/engine/keyman32/kmhook_keyboard.cpp rename to windows/src/engine/keyman32-ver/kmhook_keyboard.cpp diff --git a/windows/src/engine/keyman32/kmprocess.cpp b/windows/src/engine/keyman32-ver/kmprocess.cpp similarity index 100% rename from windows/src/engine/keyman32/kmprocess.cpp rename to windows/src/engine/keyman32-ver/kmprocess.cpp diff --git a/windows/src/engine/keyman32/kmprocessactions.cpp b/windows/src/engine/keyman32-ver/kmprocessactions.cpp similarity index 100% rename from windows/src/engine/keyman32/kmprocessactions.cpp rename to windows/src/engine/keyman32-ver/kmprocessactions.cpp diff --git a/windows/src/engine/keyman32/kmprocessactions.h b/windows/src/engine/keyman32-ver/kmprocessactions.h similarity index 100% rename from windows/src/engine/keyman32/kmprocessactions.h rename to windows/src/engine/keyman32-ver/kmprocessactions.h diff --git a/windows/src/engine/keyman32/message-analyzer/README.md b/windows/src/engine/keyman32-ver/message-analyzer/README.md similarity index 72% rename from windows/src/engine/keyman32/message-analyzer/README.md rename to windows/src/engine/keyman32-ver/message-analyzer/README.md index 3bdbaa99156..c1a358c28c4 100644 --- a/windows/src/engine/keyman32/message-analyzer/README.md +++ b/windows/src/engine/keyman32-ver/message-analyzer/README.md @@ -1,7 +1,7 @@ # Event tracing -keyman-debug-etw.man will be installed with Keyman Engine so that debug log files can be analyzed in Event Viewer or -Microsoft Message Analyzer. You can import the layout file keyman-debug-etw.asset into Microsoft Message Analyzer +keyman-debug-etw.man will be installed with Keyman Engine so that debug log files can be analyzed in Event Viewer or +Microsoft Message Analyzer. You can import the layout file keyman-debug-etw.asset into Microsoft Message Analyzer to provide a good default layout for Keyman log files. To manually install the provider, run: @@ -11,9 +11,9 @@ To manually install the provider, run: To uninstall it (a good idea often before installing): wevtutil um keyman-debug-etw.man - -You may need to manually edit the file to add the paths for keyman32.dll, e.g.: - +You may need to manually edit the file to add the paths for keyman32-ver.dll, e.g.: + + Debug log files are written to %LOCAL_APP_DATA%\Keyman\Diag. diff --git a/windows/src/engine/keyman32/message-analyzer/keyman-debug-etw.asset b/windows/src/engine/keyman32-ver/message-analyzer/keyman-debug-etw.asset similarity index 100% rename from windows/src/engine/keyman32/message-analyzer/keyman-debug-etw.asset rename to windows/src/engine/keyman32-ver/message-analyzer/keyman-debug-etw.asset diff --git a/windows/src/engine/keyman32/message-analyzer/keyman-debug-etw.metadata b/windows/src/engine/keyman32-ver/message-analyzer/keyman-debug-etw.metadata similarity index 100% rename from windows/src/engine/keyman32/message-analyzer/keyman-debug-etw.metadata rename to windows/src/engine/keyman32-ver/message-analyzer/keyman-debug-etw.metadata diff --git a/windows/src/engine/keyman32/pch.cpp b/windows/src/engine/keyman32-ver/pch.cpp similarity index 100% rename from windows/src/engine/keyman32/pch.cpp rename to windows/src/engine/keyman32-ver/pch.cpp diff --git a/windows/src/engine/keyman32/pch.h b/windows/src/engine/keyman32-ver/pch.h similarity index 100% rename from windows/src/engine/keyman32/pch.h rename to windows/src/engine/keyman32-ver/pch.h diff --git a/windows/src/engine/keyman32-ver/premake.in b/windows/src/engine/keyman32-ver/premake.in new file mode 100644 index 00000000000..944fad28e28 --- /dev/null +++ b/windows/src/engine/keyman32-ver/premake.in @@ -0,0 +1,30 @@ +# Copy files to correct names in \release; this file is munged by mkver to premake.mak +# + +!include ..\..\defines.mak + +default: + echo Please don't call this file directly -- used by Makefile + +clean: + $(MSBUILD) $(MSBUILD_CLEAN) keyman32-ver.vcxproj + +signcode: + $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman32-ver$VersionWithTag.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman32-ver$VersionWithTag.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman32-ver$VersionWithTag.pdb /t keyman-engine-windows + + + +install: + $(COPY) $(PROGRAM)\engine\keyman32-ver$VersionWithTag.dll "$(INSTALLPATH_KEYMANENGINE)\keyman32-ver$VersionWithTag.dll" + echo You may want to manually tweak keyman-debug-etw.man and fill in $(INSTALLPATH_KEYMANENGINE)\keyman32-ver$VersionWithTag.dll + echo and then run wevtutil im keyman-debug-etw.man to get the latest event tracing + +build: + $(MSBUILD) keyman32-ver.vcxproj $(MSBUILD_BUILD) "/p:VersionWithTag=$VersionWithTag;LIBRARY=keyman32-ver17.0.48-alpha-local" + $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver$VersionWithTag.dll $(PROGRAM)\engine + $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver$VersionWithTag.pdb $(DEBUGPATH)\engine +# $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver.lib $(OUTLIB) done by vcxproj diff --git a/windows/src/engine/keyman32-ver/premake.mak b/windows/src/engine/keyman32-ver/premake.mak new file mode 100644 index 00000000000..5b0b3b23ea1 --- /dev/null +++ b/windows/src/engine/keyman32-ver/premake.mak @@ -0,0 +1,30 @@ +# Copy files to correct names in \release; this file is munged by mkver to premake.mak +# + +!include ..\..\defines.mak + +default: + echo Please don't call this file directly -- used by Makefile + +clean: + $(MSBUILD) $(MSBUILD_CLEAN) keyman32-ver.vcxproj + +signcode: + $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman32-ver17.0.48-alpha-local.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman32-ver17.0.48-alpha-local.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman32-ver17.0.48-alpha-local.pdb /t keyman-engine-windows + + + +install: + $(COPY) $(PROGRAM)\engine\keyman32-ver17.0.48-alpha-local.dll "$(INSTALLPATH_KEYMANENGINE)\keyman32-ver17.0.48-alpha-local.dll" + echo You may want to manually tweak keyman-debug-etw.man and fill in $(INSTALLPATH_KEYMANENGINE)\keyman32-ver17.0.48-alpha-local.dll + echo and then run wevtutil im keyman-debug-etw.man to get the latest event tracing + +build: + $(MSBUILD) keyman32-ver.vcxproj $(MSBUILD_BUILD) "/p:VersionWithTag=17.0.48-alpha-local;LIBRARY=keyman32-ver17.0.48-alpha-local" + $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver17.0.48-alpha-local.dll $(PROGRAM)\engine + $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver17.0.48-alpha-local.pdb $(DEBUGPATH)\engine +# $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver.lib $(OUTLIB) done by vcxproj diff --git a/windows/src/engine/keyman32/preservedkeymap.cpp b/windows/src/engine/keyman32-ver/preservedkeymap.cpp similarity index 100% rename from windows/src/engine/keyman32/preservedkeymap.cpp rename to windows/src/engine/keyman32-ver/preservedkeymap.cpp diff --git a/windows/src/engine/keyman32/security.cpp b/windows/src/engine/keyman32-ver/security.cpp similarity index 100% rename from windows/src/engine/keyman32/security.cpp rename to windows/src/engine/keyman32-ver/security.cpp diff --git a/windows/src/engine/keyman32/security.h b/windows/src/engine/keyman32-ver/security.h similarity index 100% rename from windows/src/engine/keyman32/security.h rename to windows/src/engine/keyman32-ver/security.h diff --git a/windows/src/engine/keyman32/selectkeyboard.cpp b/windows/src/engine/keyman32-ver/selectkeyboard.cpp similarity index 100% rename from windows/src/engine/keyman32/selectkeyboard.cpp rename to windows/src/engine/keyman32-ver/selectkeyboard.cpp diff --git a/windows/src/engine/keyman32/serialkeyeventclient.cpp b/windows/src/engine/keyman32-ver/serialkeyeventclient.cpp similarity index 100% rename from windows/src/engine/keyman32/serialkeyeventclient.cpp rename to windows/src/engine/keyman32-ver/serialkeyeventclient.cpp diff --git a/windows/src/engine/keyman32/serialkeyeventclient.h b/windows/src/engine/keyman32-ver/serialkeyeventclient.h similarity index 100% rename from windows/src/engine/keyman32/serialkeyeventclient.h rename to windows/src/engine/keyman32-ver/serialkeyeventclient.h diff --git a/windows/src/engine/keyman32/serialkeyeventcommon.h b/windows/src/engine/keyman32-ver/serialkeyeventcommon.h similarity index 100% rename from windows/src/engine/keyman32/serialkeyeventcommon.h rename to windows/src/engine/keyman32-ver/serialkeyeventcommon.h diff --git a/windows/src/engine/keyman32/serialkeyeventserver.cpp b/windows/src/engine/keyman32-ver/serialkeyeventserver.cpp similarity index 100% rename from windows/src/engine/keyman32/serialkeyeventserver.cpp rename to windows/src/engine/keyman32-ver/serialkeyeventserver.cpp diff --git a/windows/src/engine/keyman32/serialkeyeventserver.h b/windows/src/engine/keyman32-ver/serialkeyeventserver.h similarity index 100% rename from windows/src/engine/keyman32/serialkeyeventserver.h rename to windows/src/engine/keyman32-ver/serialkeyeventserver.h diff --git a/windows/src/engine/keyman32/syskbd.cpp b/windows/src/engine/keyman32-ver/syskbd.cpp similarity index 100% rename from windows/src/engine/keyman32/syskbd.cpp rename to windows/src/engine/keyman32-ver/syskbd.cpp diff --git a/windows/src/engine/keyman32/syskbd.h b/windows/src/engine/keyman32-ver/syskbd.h similarity index 100% rename from windows/src/engine/keyman32/syskbd.h rename to windows/src/engine/keyman32-ver/syskbd.h diff --git a/windows/src/engine/keyman32/syskbdnt.cpp b/windows/src/engine/keyman32-ver/syskbdnt.cpp similarity index 100% rename from windows/src/engine/keyman32/syskbdnt.cpp rename to windows/src/engine/keyman32-ver/syskbdnt.cpp diff --git a/windows/src/engine/keyman32/syskbdnt64.cpp b/windows/src/engine/keyman32-ver/syskbdnt64.cpp similarity index 100% rename from windows/src/engine/keyman32/syskbdnt64.cpp rename to windows/src/engine/keyman32-ver/syskbdnt64.cpp diff --git a/windows/src/engine/keyman32/testkeymanfunctioning.h b/windows/src/engine/keyman32-ver/testkeymanfunctioning.h similarity index 100% rename from windows/src/engine/keyman32/testkeymanfunctioning.h rename to windows/src/engine/keyman32-ver/testkeymanfunctioning.h diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/appinttests.cpp b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/appinttests.cpp similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/appinttests.cpp rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/appinttests.cpp diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/gtest_main.cpp b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/gtest_main.cpp similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/gtest_main.cpp rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/gtest_main.cpp diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/keyboardoptionstests.cpp b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/keyboardoptionstests.cpp similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/keyboardoptionstests.cpp rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/keyboardoptionstests.cpp diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/keyman-engine-tests.vcxproj b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/keyman-engine-tests.vcxproj similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/keyman-engine-tests.vcxproj rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/keyman-engine-tests.vcxproj diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/kmprocessactionstests.cpp b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/kmprocessactionstests.cpp similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/kmprocessactionstests.cpp rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/kmprocessactionstests.cpp diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/packages.config b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/packages.config similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/packages.config rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/packages.config diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/pch.cpp b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/pch.cpp similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/pch.cpp rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/pch.cpp diff --git a/windows/src/engine/keyman32/tests/keyman-engine-tests/pch.h b/windows/src/engine/keyman32-ver/tests/keyman-engine-tests/pch.h similarity index 100% rename from windows/src/engine/keyman32/tests/keyman-engine-tests/pch.h rename to windows/src/engine/keyman32-ver/tests/keyman-engine-tests/pch.h diff --git a/windows/src/engine/keyman32/version.rc b/windows/src/engine/keyman32-ver/version.rc similarity index 84% rename from windows/src/engine/keyman32/version.rc rename to windows/src/engine/keyman32-ver/version.rc index 188f1e3fbde..2257b12f9d1 100644 --- a/windows/src/engine/keyman32/version.rc +++ b/windows/src/engine/keyman32-ver/version.rc @@ -16,10 +16,10 @@ VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Processor x86\0" VALUE "FileVersion", KV_VERSION_STRING - VALUE "InternalName", "KEYMAN32\0" + VALUE "InternalName", "KEYMAN32-VER$(var.VERSION_WITH_TAG)\0" VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS - VALUE "OriginalFilename", "KEYMAN32.DLL\0" + VALUE "OriginalFilename", "KEYMAN32-VER$(var.VERSION_WITH_TAG).DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" diff --git a/windows/src/engine/keyman32/versioninfo.cpp b/windows/src/engine/keyman32-ver/versioninfo.cpp similarity index 100% rename from windows/src/engine/keyman32/versioninfo.cpp rename to windows/src/engine/keyman32-ver/versioninfo.cpp diff --git a/windows/src/engine/keyman32/vkscancodes.h b/windows/src/engine/keyman32-ver/vkscancodes.h similarity index 100% rename from windows/src/engine/keyman32/vkscancodes.h rename to windows/src/engine/keyman32-ver/vkscancodes.h diff --git a/windows/src/engine/keyman32/BuildLog.htm b/windows/src/engine/keyman32/BuildLog.htm deleted file mode 100644 index 37078bd338040fad24b7359f9383bccec847f0e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7282 zcmeI1ZEqS!5Xa|rqzyEb`JT_J-p5aU1(i0i8AM{oQ4 z&)xwCIK87%+ZWM^<8F87asM+ryZ7fGkF9M(yRfc(Yd7tN>Ah(ub~=84Ze^?5Q!Ci_ z{8#P3?$Ppty|5j7X;18yJ+q#@gG5m$j7yj8rgu} zAzVk?&ycig51~nP6HQvXI{Z(OmyGDcqd9&X!n2NTO(a}ehmk`#Jb~*9*Qd1Bt>rp) z;SOsC2ax4XLzc`Ohxn!c^0xoap=Al_Jq*i?3H^|w3@S^ zMTnmgvk@?ueKtRYM|oYpG#-Pu<@G#RT#KkQ!BKbtB9vW}A+Bf>#zIa~?p(KHa;Z?I?00O>Y1^dbko)gss-kD#m-IY^ zPoGxtKjB?jq`^~{=PLA)a}3=Ph*y5oRVII~g3<@vh1Lh~lbpV1XGOj;;%uG{IQY@g zP_lirsiNm?`2U?d?bseR9iofYl0CPl0>3>ttA7(qD*p5w z8}}G5v>!1}y|Zmw^jGMg)#vzHeTp8d$_EiXQdUr&)_XCIfev#b^bhBBSKixND64F5 zV%_A|B35YRtnF&uz<=9r%K@V{=D02LWFIZ-bKK;MgG}_wZT)NLH6L5}ejVLj!*8Ft zsp4;W`v_e(xW94#YsS{eb)wj0+^cxhK2$=4=5)*Hl9nB2I<#z{>k<9wd0JuZUj?-x z;{}Y)`fLZO2h8zKMqhQA&&9raM$IDKrNwLehFB=rd&hxRXyx`IcontQY*ij3ye7|e zrg}QOw;8vnM_Dw?f5NBXQQn7Fx?QoRDk(ySkT#LraTKLhBi>)pc2p6eaf^z4*v=!T{UzJfjv-DONw!^<6L&zGcD z-WYn_5W#6V4OHQ(_RyL+;3-dRwApV2`)kl9IafAi*Jan^zUHgxb`HApm@dp;o#@o= zDZgCBhbrX!l){ZNQg+JVt2#9DR~tW_<;o|!jp~ALg=iwB(APu7~qyw)gJak>}FovHgZ(8pP>~_PmR!yBhs_i=@{a3qh?X|T3t?=9Cr}r}ZsY9N1 zFOTpZDdd!j0KBqubAOPzFPKcD%xPnq_;#_#*R5TBTxGPjpw8$O;gWjjYrpE6Y( z)#rY1foEMp#dW)#0w@nB)jBuQ`Lr^w){%(k3OL+lKdx)dM_zdRY2TtKQ8YEY?g)`I zBrEE4zhHNWBju<&JS*~46NL;vWX%uf%HecLawA_ghkwH{?9%Uy5%T{>`60d-#JjwY z=chW?U;a#g`W#=CvQAJh!H&>0;9qN%^14p%l+%-w)OE6F2@EQmhczgy0mt?=QL#en z0Q@!hSM8x{Kv+(X)k(rJCr-&%8lA2xy2AIdkau^Xn*MH3;0slOxS5Wq&ye-Ge^Jo4 z6lotJO%huc`toJ)f^%8)?Mi1Z`dT3kpP>EXZ#Rp-XZ^G92U>GJl)FpROv!gSjh%dB F{0nPkuZ#cy diff --git a/windows/src/engine/keyman32/Makefile b/windows/src/engine/keyman32/Makefile deleted file mode 100644 index 325302e1ac9..00000000000 --- a/windows/src/engine/keyman32/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Keyman32 Makefile -# - -!include ..\..\Defines.mak - -build: version.res dirs pull-core - $(MSBUILD) keyman32.vcxproj $(MSBUILD_BUILD) - $(COPY) $(WIN32_TARGET_PATH)\keyman32.dll $(PROGRAM)\engine - $(COPY) $(WIN32_TARGET_PATH)\keyman32.pdb $(DEBUGPATH)\engine -# $(COPY) $(WIN32_TARGET_PATH)\keyman32.lib $(OUTLIB) done by vcxproj - -clean: def-clean - $(MSBUILD) $(MSBUILD_CLEAN) keyman32.vcxproj - -signcode: - $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman32.dll - -wrap-symbols: - $(SYMSTORE) $(PROGRAM)\engine\keyman32.dll /t keyman-engine-windows - $(SYMSTORE) $(DEBUGPATH)\engine\keyman32.pdb /t keyman-engine-windows - -install: - $(COPY) $(PROGRAM)\engine\keyman32.dll "$(INSTALLPATH_KEYMANENGINE)\keyman32.dll" - echo You may want to manually tweak keyman-debug-etw.man and fill in $(INSTALLPATH_KEYMANENGINE)\keyman32.dll - echo and then run wevtutil im keyman-debug-etw.man to get the latest event tracing - -!ifdef DEBUG -CORE_DEBUG=--debug -MESON_TARGET=debug -!else -MESON_TARGET=release -!endif - -!ifdef GIT_BASH_FOR_KEYMAN -CALLER=$(GIT_BASH_FOR_KEYMAN) -!else -CALLER=start /wait -!endif -!ifdef DEBUG -BUILD_DEBUG=-d -!else -BUILD_DEBUG= -!endif - -pull-core: - cd $(ROOT)\..\core - $(CALLER) ./build.sh -p native $(BUILD_DEBUG) - cd $(ROOT)\src\engine\keyman32 - -!include ..\..\Target.mak diff --git a/windows/src/engine/keyman64-ver/Makefile b/windows/src/engine/keyman64-ver/Makefile index cc3ad5c9b9d..7ae8fda9ff4 100644 --- a/windows/src/engine/keyman64-ver/Makefile +++ b/windows/src/engine/keyman64-ver/Makefile @@ -8,6 +8,7 @@ build: version.res dirs $(MKVER_U) premake.in premake.mak + $(MKVER_U) $(ROOT)\src\engine\keyman32-ver\keyman64-build-version.in $(ROOT)\src\engine\keyman32-ver\keyman64-build-version.h $(MAKE) -fpremake.mak build # $(COPY) keyman64-ver.lib $(OUTLIB) - already done diff --git a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj index 35d8b214be2..c1a4299ffd4 100644 --- a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj @@ -12,7 +12,7 @@ {D1115FB2-230D-4FD8-90B9-982E49953D18} - Keyman32 + Keyman32-ver 10.0 keyman64-ver @@ -70,14 +70,14 @@ true true X64 - ./Keyman32.tlb + ./Keyman32-ver.tlb MaxSpeed OnlyExplicitInline - ..\keyman32;..\..\global\inc;%(AdditionalIncludeDirectories) + ..\keyman32-ver;..\..\global\inc;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) false true @@ -117,7 +117,7 @@ true - ./Keyman32.bsc + ./Keyman32-ver.bsc @@ -126,13 +126,13 @@ true true X64 - ./Keyman32.tlb + ./Keyman32-ver.tlb Disabled - ..\keyman32;..\..\global\inc;%(AdditionalIncludeDirectories) + ..\keyman32-ver;..\..\global\inc;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) false true @@ -174,101 +174,101 @@ true - ./Keyman32.bsc + ./Keyman32-ver.bsc - - - - - + + + + + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - - - + + + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - - - - - - + + + + + + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - - + + - + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - - + + Create Create - - - - - - - - + + + + + + + + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc - + $(IntDir)%(Filename)1.obj $(IntDir)%(Filename)1.xdc $(IntDir)%(Filename)1.obj @@ -276,48 +276,48 @@ - + - + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - + - + Document false false diff --git a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters index 964dc47605c..881a1967a4e 100644 --- a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters @@ -2,88 +2,88 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - + - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - + + + - + - + - \ No newline at end of file + diff --git a/windows/src/engine/keyman64-ver/premake.in b/windows/src/engine/keyman64-ver/premake.in index 84ae86aa02e..bdf841d192a 100644 --- a/windows/src/engine/keyman64-ver/premake.in +++ b/windows/src/engine/keyman64-ver/premake.in @@ -21,6 +21,6 @@ install: build: - $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=$VersionWithTag + $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=$VersionWithTag" $(COPY) $(X64_TARGET_PATH)\keyman64-ver$VersionWithTag.dll $(PROGRAM)\engine $(COPY) $(X64_TARGET_PATH)\keyman64-ver$VersionWithTag.pdb $(DEBUGPATH)\engine diff --git a/windows/src/engine/keyman64-ver/premake.mak b/windows/src/engine/keyman64-ver/premake.mak index 8501621fa06..df34a25e213 100644 --- a/windows/src/engine/keyman64-ver/premake.mak +++ b/windows/src/engine/keyman64-ver/premake.mak @@ -21,6 +21,6 @@ install: build: - $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local + $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.dll $(PROGRAM)\engine $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.pdb $(DEBUGPATH)\engine diff --git a/windows/src/engine/kmtip/kmtip.vcxproj b/windows/src/engine/kmtip/kmtip.vcxproj index 0c01b8b9d44..102613e923d 100644 --- a/windows/src/engine/kmtip/kmtip.vcxproj +++ b/windows/src/engine/kmtip/kmtip.vcxproj @@ -134,7 +134,7 @@ 0x0c09 - ..\..\..\lib\keyman32.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) + ..\..\..\lib\keyman32-ver.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) true .\kmtip.def true @@ -219,7 +219,7 @@ 0x0c09 - ..\..\..\lib\keyman32.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) + ..\..\..\lib\keyman32-ver.lib;version.lib;wintrust.lib;crypt32.lib;imagehlp.lib;%(AdditionalDependencies) true .\kmtip.def true diff --git a/windows/src/engine/mcompile/mc_syskbdnt32.cpp b/windows/src/engine/mcompile/mc_syskbdnt32.cpp index a5cc83d347d..67cae396a0b 100644 --- a/windows/src/engine/mcompile/mc_syskbdnt32.cpp +++ b/windows/src/engine/mcompile/mc_syskbdnt32.cpp @@ -28,7 +28,7 @@ //////////////////////////////////////////////////////////////////////////// #include "pch.h" -#include "../../engine/keyman32/kbd.h" /* DDK kbdlayout */ +#include "../../engine/keyman32-ver/kbd.h" /* DDK kbdlayout */ typedef PKBDTABLES (WINAPI *PKBDLAYERDESCRIPTORFUNC)(VOID); diff --git a/windows/src/engine/mcompile/mc_syskbdnt64.cpp b/windows/src/engine/mcompile/mc_syskbdnt64.cpp index 2034af6ec9c..c9308ad647b 100644 --- a/windows/src/engine/mcompile/mc_syskbdnt64.cpp +++ b/windows/src/engine/mcompile/mc_syskbdnt64.cpp @@ -28,7 +28,7 @@ //////////////////////////////////////////////////////////////////////////// #include "pch.h" -#include "../../engine/keyman32/kbd.h" /* DDK kbdlayout */ +#include "../../engine/keyman32-ver/kbd.h" /* DDK kbdlayout */ typedef struct { PVK_TO_BIT pVkToBit; // Virtual Keys -> Mod bits diff --git a/windows/src/engine/mcompile/mcompile.vcxproj b/windows/src/engine/mcompile/mcompile.vcxproj index d68b08883d8..42bb8bb92ad 100644 --- a/windows/src/engine/mcompile/mcompile.vcxproj +++ b/windows/src/engine/mcompile/mcompile.vcxproj @@ -96,7 +96,7 @@ - + @@ -132,4 +132,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/mcompile/mcompile.vcxproj.filters b/windows/src/engine/mcompile/mcompile.vcxproj.filters index a29fc0e01df..8ebfc3ebff2 100644 --- a/windows/src/engine/mcompile/mcompile.vcxproj.filters +++ b/windows/src/engine/mcompile/mcompile.vcxproj.filters @@ -24,7 +24,7 @@ Header Files - + Header Files @@ -86,4 +86,4 @@ Resource Files - \ No newline at end of file + diff --git a/windows/src/engine/testhost/README.md b/windows/src/engine/testhost/README.md index 0f7c5590104..b6f007f52f3 100644 --- a/windows/src/engine/testhost/README.md +++ b/windows/src/engine/testhost/README.md @@ -1,10 +1,10 @@ # Testhost -This project is a debug host for keyman32 (and keyman64). It is setup to run a single-threaded test mode of keyman32 keystroke processing. It depends on having Keyman correctly installed, but not currently running. Keyboards must be installed as normal. +This project is a debug host for keyman32-ver (and keyman64). It is setup to run a single-threaded test mode of keyman32-ver keystroke processing. It depends on having Keyman correctly installed, but not currently running. Keyboards must be installed as normal. The primary use of testhost is in interactive debugging of Keyman Core, and intermediate Engine code around Core. The final stage of characters reaching the document will not be identical to Keyman Engine in normal use, and there may be other interactive limitations as well. -Before trying to run, make sure you have built keyman32 in Debug configuration. Testhost will attempt to load keyman32.dll from ../keyman32/bin/Win32/Debug/keyman32.dll, and if that is not present, from ../keyman32/bin/Win32/Release/keyman32.dll, and finally, from a hardcoded "C:\\Program Files (x86)\\Common Files\\Keyman\\Keyman Engine\\keyman32.dll" (which is hacky but probably suffices for now). +Before trying to run, make sure you have built keyman32-ver in Debug configuration. Testhost will attempt to load keyman32-ver.dll from ../keyman32-ver/bin/Win32/Debug/keyman32-ver.dll, and if that is not present, from ../keyman32-ver/bin/Win32/Release/keyman32-ver.dll, and finally, from a hardcoded "C:\\Program Files (x86)\\Common Files\\Keyman\\Keyman Engine\\keyman32-ver.dll" (which is hacky but probably suffices for now). The work flow that works well using testhost. With Visual Studio(VS) diff --git a/windows/src/engine/testhost/testhost.cpp b/windows/src/engine/testhost/testhost.cpp index 76ba974755d..ee578461b35 100644 --- a/windows/src/engine/testhost/testhost.cpp +++ b/windows/src/engine/testhost/testhost.cpp @@ -312,9 +312,9 @@ Fail(PCWSTR message) { #define KEYMAN32_DEBUG "keyman64-ver" / "bin" / "x64" / "Debug" / "keyman64-ver.dll" #define KEYMAN32_RELEASE "keyman64-ver" / "bin" / "x64" / "Release" / "keyman64-ver.dll" #else -#define KEYMAN32 "keyman32.dll" -#define KEYMAN32_DEBUG "keyman32" / "bin" / "Win32" / "Debug" / "keyman32.dll" -#define KEYMAN32_RELEASE "keyman32" / "bin" / "Win32" / "Release" / "keyman32.dll" +#define KEYMAN32 "keyman32-ver.dll" +#define KEYMAN32_DEBUG "keyman32-ver" / "bin" / "Win32" / "Debug" / "keyman32-ver.dll" +#define KEYMAN32_RELEASE "keyman32-ver" / "bin" / "Win32" / "Release" / "keyman32-ver.dll" #endif bool From d0b9103d62e3134132b1cf943ee55fda65e8db84 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 27 Mar 2023 10:46:00 +1000 Subject: [PATCH 05/40] feat(windows): keyman32 proxy take 1 --- windows/src/engine/inst/components.wxs | 4 +- windows/src/engine/keyman32/Makefile | 51 +++++ windows/src/engine/keyman32/exports.h | 78 +++++++ windows/src/engine/keyman32/keyman32.rc | 12 ++ windows/src/engine/keyman32/keyman32.sln | 26 +++ windows/src/engine/keyman32/keyman32.vcxproj | 191 ++++++++++++++++++ .../engine/keyman32/keyman32.vcxproj.filters | 35 ++++ windows/src/engine/keyman32/pch.cpp | 6 + windows/src/engine/keyman32/pch.h | 6 + windows/src/engine/keyman32/version.rc | 32 +++ windows/src/engine/keyman32/versioninfo.cpp | 128 ++++++++++++ 11 files changed, 567 insertions(+), 2 deletions(-) create mode 100644 windows/src/engine/keyman32/Makefile create mode 100644 windows/src/engine/keyman32/exports.h create mode 100644 windows/src/engine/keyman32/keyman32.rc create mode 100644 windows/src/engine/keyman32/keyman32.sln create mode 100644 windows/src/engine/keyman32/keyman32.vcxproj create mode 100644 windows/src/engine/keyman32/keyman32.vcxproj.filters create mode 100644 windows/src/engine/keyman32/pch.cpp create mode 100644 windows/src/engine/keyman32/pch.h create mode 100644 windows/src/engine/keyman32/version.rc create mode 100644 windows/src/engine/keyman32/versioninfo.cpp diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index be1ea89b4cd..711bc02937c 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -101,7 +101,7 @@ - + @@ -241,7 +241,7 @@ - + diff --git a/windows/src/engine/keyman32/Makefile b/windows/src/engine/keyman32/Makefile new file mode 100644 index 00000000000..4c2370ae8a9 --- /dev/null +++ b/windows/src/engine/keyman32/Makefile @@ -0,0 +1,51 @@ +# +# Keyman32 Makefile +# + +!include ..\..\Defines.mak + +build: version.res dirs + $(MSBUILD) keyman32.vcxproj $(MSBUILD_BUILD) + $(COPY) $(WIN32_TARGET_PATH)\keyman32.dll $(PROGRAM)\engine + $(COPY) $(WIN32_TARGET_PATH)\keyman32.pdb $(DEBUGPATH)\engine +# $(COPY) $(WIN32_TARGET_PATH)\keyman32.lib $(OUTLIB) done by vcxproj + +clean: def-clean + $(MSBUILD) $(MSBUILD_CLEAN) keyman32.vcxproj + +signcode: + $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman32.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman32.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman32.pdb /t keyman-engine-windows + +install: + $(COPY) $(PROGRAM)\engine\keyman32.dll "$(INSTALLPATH_KEYMANENGINE)\keyman32.dll" + echo You may want to manually tweak keyman-debug-etw.man and fill in $(INSTALLPATH_KEYMANENGINE)\keyman32.dll + echo and then run wevtutil im keyman-debug-etw.man to get the latest event tracing + +!ifdef DEBUG +CORE_DEBUG=--debug +MESON_TARGET=debug +!else +MESON_TARGET=release +!endif + +!ifdef GIT_BASH_FOR_KEYMAN +CALLER=$(GIT_BASH_FOR_KEYMAN) +!else +CALLER=start /wait +!endif +!ifdef DEBUG +BUILD_DEBUG=-d +!else +BUILD_DEBUG= +!endif + +pull-core: + cd $(ROOT)\..\core + $(CALLER) ./build.sh --no-tests clean:x86 configure:x86 build:x86 clean:x64 configure:x64 build:x64 $(BUILD_DEBUG) + cd $(ROOT)\src\engine\keyman32 + +!include ..\..\Target.mak diff --git a/windows/src/engine/keyman32/exports.h b/windows/src/engine/keyman32/exports.h new file mode 100644 index 00000000000..5f328f0f3ad --- /dev/null +++ b/windows/src/engine/keyman32/exports.h @@ -0,0 +1,78 @@ +// exports.h +// +// Header file to export all the functions to a versioned keyman32{version_tag}.dll +// + +#pragma comment(linker,"/export:GetActiveKeymanID=KEYMAN32_orig.GetActiveKeymanID,@4") +#pragma comment(linker,"/export:GetKeyboardPreservedKeys=KEYMAN32_orig.GetKeyboardPreservedKeys,@5") +#pragma comment(linker,"/export:KMDisplayIM=KEYMAN32_orig.KMDisplayIM,@6") +#pragma comment(linker,"/export:KMGetActiveKeyboard=KEYMAN32_orig.KMGetActiveKeyboard,@7") +#pragma comment(linker,"/export:KMGetContext=KEYMAN32_orig.KMGetContext,@8") +#pragma comment(linker,"/export:KMGetKeyboardPath=KEYMAN32_orig.KMGetKeyboardPath,@9") +#pragma comment(linker,"/export:KMHideIM=KEYMAN32_orig.KMHideIM,@10") +#pragma comment(linker,"/export:KMQueueAction=KEYMAN32_orig.KMQueueAction,@11") +#pragma comment(linker,"/export:KMSetOutput=KEYMAN32_orig.KMSetOutput,@12") +#pragma comment(linker,"/export:Keyman_Diagnostic=KEYMAN32_orig.Keyman_Diagnostic,@1") +#pragma comment(linker,"/export:Keyman_Exit=KEYMAN32_orig.Keyman_Exit,@13") +#pragma comment(linker,"/export:Keyman_ForceKeyboard=KEYMAN32_orig.Keyman_ForceKeyboard,@14") +#pragma comment(linker,"/export:Keyman_GetInitialised=KEYMAN32_orig.Keyman_GetInitialised,@15") +#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=KEYMAN32_orig.Keyman_GetLastActiveWindow,@16") +#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=KEYMAN32_orig.Keyman_GetLastFocusWindow,@17") +#pragma comment(linker,"/export:Keyman_Initialise=KEYMAN32_orig.Keyman_Initialise,@18") +#pragma comment(linker,"/export:Keyman_PostControllers=KEYMAN32_orig.Keyman_PostControllers,@19") +#pragma comment(linker,"/export:Keyman_PostMasterController=KEYMAN32_orig.Keyman_PostMasterController,@20") +#pragma comment(linker,"/export:Keyman_RegisterControllerThread=KEYMAN32_orig.Keyman_RegisterControllerThread,@21") +#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=KEYMAN32_orig.Keyman_RegisterControllerWindow,@22") +#pragma comment(linker,"/export:Keyman_RegisterMasterController=KEYMAN32_orig.Keyman_RegisterMasterController,@23") +#pragma comment(linker,"/export:Keyman_ResetInitialisation=KEYMAN32_orig.Keyman_ResetInitialisation,@24") +#pragma comment(linker,"/export:Keyman_RestartEngine=KEYMAN32_orig.Keyman_RestartEngine,@25") +#pragma comment(linker,"/export:Keyman_SendMasterController=KEYMAN32_orig.Keyman_SendMasterController,@26") +#pragma comment(linker,"/export:Keyman_StartExit=KEYMAN32_orig.Keyman_StartExit,@27") +#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=KEYMAN32_orig.Keyman_StopForcingKeyboard,@28") +#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=KEYMAN32_orig.Keyman_UnregisterControllerThread,@29") +#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=KEYMAN32_orig.Keyman_UnregisterControllerWindow,@30") +#pragma comment(linker,"/export:Keyman_UnregisterMasterController=KEYMAN32_orig.Keyman_UnregisterMasterController,@31") +#pragma comment(linker,"/export:Keyman_UpdateTouchPanelVisibility=KEYMAN32_orig.Keyman_UpdateTouchPanelVisibility,@2") +#pragma comment(linker,"/export:Keyman_WriteDebugEvent=KEYMAN32_orig.Keyman_WriteDebugEvent,@32") +#pragma comment(linker,"/export:SetCustomPostKeyCallback=KEYMAN32_orig.SetCustomPostKeyCallback,@3") +#pragma comment(linker,"/export:TIPActivateEx=KEYMAN32_orig.TIPActivateEx,@33") +#pragma comment(linker,"/export:TIPActivateKeyboard=KEYMAN32_orig.TIPActivateKeyboard,@34") +#pragma comment(linker,"/export:TIPIsKeymanRunning=KEYMAN32_orig.TIPIsKeymanRunning,@35") +#pragma comment(linker,"/export:TIPProcessKey=KEYMAN32_orig.TIPProcessKey,@36") +#pragma comment(linker,"/export:kbp_state_get_intermediate_context=KEYMAN32_orig.kbp_state_get_intermediate_context,@37") +#pragma comment(linker,"/export:km_kbp_context_append=KEYMAN32_orig.km_kbp_context_append,@38") +#pragma comment(linker,"/export:km_kbp_context_clear=KEYMAN32_orig.km_kbp_context_clear,@39") +#pragma comment(linker,"/export:km_kbp_context_get=KEYMAN32_orig.km_kbp_context_get,@40") +#pragma comment(linker,"/export:km_kbp_context_item_list_size=KEYMAN32_orig.km_kbp_context_item_list_size,@41") +#pragma comment(linker,"/export:km_kbp_context_items_dispose=KEYMAN32_orig.km_kbp_context_items_dispose,@42") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=KEYMAN32_orig.km_kbp_context_items_from_utf16,@43") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=KEYMAN32_orig.km_kbp_context_items_from_utf8,@44") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=KEYMAN32_orig.km_kbp_context_items_to_utf16,@45") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=KEYMAN32_orig.km_kbp_context_items_to_utf8,@46") +#pragma comment(linker,"/export:km_kbp_context_length=KEYMAN32_orig.km_kbp_context_length,@47") +#pragma comment(linker,"/export:km_kbp_context_set=KEYMAN32_orig.km_kbp_context_set,@48") +#pragma comment(linker,"/export:km_kbp_context_shrink=KEYMAN32_orig.km_kbp_context_shrink,@49") +#pragma comment(linker,"/export:km_kbp_event=KEYMAN32_orig.km_kbp_event,@50") +#pragma comment(linker,"/export:km_kbp_get_engine_attrs=KEYMAN32_orig.km_kbp_get_engine_attrs,@51") +#pragma comment(linker,"/export:km_kbp_keyboard_dispose=KEYMAN32_orig.km_kbp_keyboard_dispose,@52") +#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=KEYMAN32_orig.km_kbp_keyboard_get_attrs,@53") +#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=KEYMAN32_orig.km_kbp_keyboard_get_imx_list,@54") +#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=KEYMAN32_orig.km_kbp_keyboard_get_key_list,@55") +#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=KEYMAN32_orig.km_kbp_keyboard_imx_list_dispose,@56") +#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=KEYMAN32_orig.km_kbp_keyboard_key_list_dispose,@57") +#pragma comment(linker,"/export:km_kbp_keyboard_load=KEYMAN32_orig.km_kbp_keyboard_load,@58") +#pragma comment(linker,"/export:km_kbp_options_list_size=KEYMAN32_orig.km_kbp_options_list_size,@59") +#pragma comment(linker,"/export:km_kbp_process_event=KEYMAN32_orig.km_kbp_process_event,@60") +#pragma comment(linker,"/export:km_kbp_process_queued_actions=KEYMAN32_orig.km_kbp_process_queued_actions,@61") +#pragma comment(linker,"/export:km_kbp_state_action_items=KEYMAN32_orig.km_kbp_state_action_items,@62") +#pragma comment(linker,"/export:km_kbp_state_clone=KEYMAN32_orig.km_kbp_state_clone,@63") +#pragma comment(linker,"/export:km_kbp_state_context=KEYMAN32_orig.km_kbp_state_context,@64") +#pragma comment(linker,"/export:km_kbp_state_create=KEYMAN32_orig.km_kbp_state_create,@65") +#pragma comment(linker,"/export:km_kbp_state_dispose=KEYMAN32_orig.km_kbp_state_dispose,@66") +#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=KEYMAN32_orig.km_kbp_state_imx_deregister_callback,@67") +#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=KEYMAN32_orig.km_kbp_state_imx_register_callback,@68") +#pragma comment(linker,"/export:km_kbp_state_option_lookup=KEYMAN32_orig.km_kbp_state_option_lookup,@69") +#pragma comment(linker,"/export:km_kbp_state_options_to_json=KEYMAN32_orig.km_kbp_state_options_to_json,@70") +#pragma comment(linker,"/export:km_kbp_state_options_update=KEYMAN32_orig.km_kbp_state_options_update,@71") +#pragma comment(linker,"/export:km_kbp_state_queue_action_items=KEYMAN32_orig.km_kbp_state_queue_action_items,@72") +#pragma comment(linker,"/export:km_kbp_state_to_json=KEYMAN32_orig.km_kbp_state_to_json,@73") diff --git a/windows/src/engine/keyman32/keyman32.rc b/windows/src/engine/keyman32/keyman32.rc new file mode 100644 index 00000000000..06a3db3fef1 --- /dev/null +++ b/windows/src/engine/keyman32/keyman32.rc @@ -0,0 +1,12 @@ + +#include "version.rc" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +MASK BITMAP DISCARDABLE "..\\..\\..\\..\\common\\resources\\bitmaps\\mask.bmp" +ARROW BITMAP DISCARDABLE "..\\..\\..\\..\\common\\resources\\bitmaps\\arrow.bmp" + +///////////////////////////////////////////////////////////////////////////// diff --git a/windows/src/engine/keyman32/keyman32.sln b/windows/src/engine/keyman32/keyman32.sln new file mode 100644 index 00000000000..c435faea645 --- /dev/null +++ b/windows/src/engine/keyman32/keyman32.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Keyman32", "Keyman32.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593}.Debug|Win32.ActiveCfg = Debug|Win32 + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593}.Debug|Win32.Build.0 = Debug|Win32 + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593}.Debug|x64.ActiveCfg = Debug|Win32 + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593}.Release|Win32.ActiveCfg = Release|Win32 + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593}.Release|Win32.Build.0 = Release|Win32 + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32/keyman32.vcxproj new file mode 100644 index 00000000000..357db239ddb --- /dev/null +++ b/windows/src/engine/keyman32/keyman32.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E} + Keyman32 + 10.0 + keyman32 + + + + DynamicLibrary + false + v142 + + + DynamicLibrary + false + v142 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ + false + $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ + true + AllRules.ruleset + + + AllRules.ruleset + + + + + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + + + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + ./Keyman32.tlb + + + + + MaxSpeed + OnlyExplicitInline + .\;..\..\global\inc;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + MultiThreaded + true + Use + pch.h + All + Level4 + true + true + ProgramDatabase + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalDependencies) + true + true + true + false + Windows + true + true + 0x1c100000 + MachineX86 + true + true + ..\..\..\lib\keyman32.lib + + + true + ./Keyman32.bsc + + + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + ./Keyman32.tlb + + + + + Disabled + .\;..\..\global\inc;.;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + + + MultiThreadedDebug + Use + pch.h + All + true + Level4 + true + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalDependencies) + true + true + true + Windows + 0x1C100000 + MachineX86 + true + true + ..\..\..\lib\keyman32.lib + + + true + ./Keyman32.bsc + + + + + + + + + Create + Create + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + diff --git a/windows/src/engine/keyman32/keyman32.vcxproj.filters b/windows/src/engine/keyman32/keyman32.vcxproj.filters new file mode 100644 index 00000000000..46cbc1ddc8f --- /dev/null +++ b/windows/src/engine/keyman32/keyman32.vcxproj.filters @@ -0,0 +1,35 @@ + + + + + {2dc5904b-4033-47e6-88ac-ebe442c06c2e} + cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 + + + {27baf0f2-3926-4720-b5f9-045e47cd975c} + h;hpp;hxx;hm;inl;fi;fd + + + {088a2b68-c9db-41f4-9f45-37fdf758931e} + ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe + + + + + Source Files + + + + + Source Files + + + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/windows/src/engine/keyman32/pch.cpp b/windows/src/engine/keyman32/pch.cpp new file mode 100644 index 00000000000..e9431ca84bb --- /dev/null +++ b/windows/src/engine/keyman32/pch.cpp @@ -0,0 +1,6 @@ +// pch.cpp: source file corresponding to pre-compiled header; necessary for compilation to succeed + +#include "pch.h" +#include "exports.h" + +// In general, ignore this file, but keep it around if you are using pre-compiled headers. diff --git a/windows/src/engine/keyman32/pch.h b/windows/src/engine/keyman32/pch.h new file mode 100644 index 00000000000..d085793290e --- /dev/null +++ b/windows/src/engine/keyman32/pch.h @@ -0,0 +1,6 @@ +#ifndef PCH_H +#define PCH_H + + + +#endif //PCH_H diff --git a/windows/src/engine/keyman32/version.rc b/windows/src/engine/keyman32/version.rc new file mode 100644 index 00000000000..188f1e3fbde --- /dev/null +++ b/windows/src/engine/keyman32/version.rc @@ -0,0 +1,32 @@ +#include "../../../../common/windows/cpp/include/keymanversion.h" + +1 VERSIONINFO + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0904E4" + BEGIN + VALUE "CompanyName", KV_COMPANY_NAME + VALUE "FileDescription", "Keyman Engine Processor x86\0" + VALUE "FileVersion", KV_VERSION_STRING + VALUE "InternalName", "KEYMAN32\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS + VALUE "OriginalFilename", "KEYMAN32.DLL\0" + VALUE "ProductName", "Keyman Engine\0" + VALUE "ProductVersion", KV_VERSION_STRING + VALUE "Comments", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0xc09, 1252 + END + END diff --git a/windows/src/engine/keyman32/versioninfo.cpp b/windows/src/engine/keyman32/versioninfo.cpp new file mode 100644 index 00000000000..07734f58b57 --- /dev/null +++ b/windows/src/engine/keyman32/versioninfo.cpp @@ -0,0 +1,128 @@ +/* + Name: versioninfo + Copyright: Copyright (C) SIL International. + Documentation: + Description: + Create Date: 11 Dec 2009 + + Modified Date: 4 May 2010 + Authors: mcdurdin + Related Files: + Dependencies: + + Bugs: + Todo: + Notes: + History: 11 Dec 2009 - mcdurdin - I934 - x64 - Initial version + 12 Mar 2010 - mcdurdin - I934 - x64 - Complete + 12 Mar 2010 - mcdurdin - I2229 - Remove hints and warnings + 04 May 2010 - mcdurdin - I2357 - Version info update for Windows 7 +*/ + +#include "pch.h" + +#pragma warning(disable: 4996) +void GetWindowsVersion(char *buf) +{ + OSVERSIONINFOEX osvi; + + char *pplatform = "unknown", *pos = "unknown", *pextra = ""; + char verinfo[256]; + verinfo[0] = 0; + + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + GetVersionEx((OSVERSIONINFO *)&osvi); + + switch(osvi.dwPlatformId) + { + case VER_PLATFORM_WIN32_NT: + pplatform = "NT"; + if ( osvi.dwMajorVersion <= 4 ) + pos = "Microsoft Windows NT"; + + if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 ) + pos = "Microsoft Windows 2000"; + + if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 ) + pos = "Microsoft Windows XP"; + + if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) + pos = "Microsoft Windows Vista"; + + if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 ) + pos = "Microsoft Windows 7"; + + // TODO: Update this for Win8, Win10, etc + + // Test for product type. + + if ( osvi.wProductType == VER_NT_WORKSTATION ) + { + if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) + pextra = "Personal"; + else + pextra = "Professional"; + } + + else if ( osvi.wProductType == VER_NT_SERVER ) + { + if( osvi.wSuiteMask & VER_SUITE_DATACENTER ) + pextra = "DataCenter Server"; + else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE ) + pextra = "Advanced Server"; + else + pextra = "Server"; + } + + // Display version, service pack (if any), and build number. + + if ( osvi.dwMajorVersion <= 4 ) + { + wsprintf (verinfo, "version %d.%d %s (Build %d)", + (int) osvi.dwMajorVersion, + (int) osvi.dwMinorVersion, + osvi.szCSDVersion, + (int)(osvi.dwBuildNumber & 0xFFFF)); + } + else + { + wsprintf (verinfo, "version %s (Build %d)", + osvi.szCSDVersion, + (int)(osvi.dwBuildNumber & 0xFFFF)); + } + break; + + case VER_PLATFORM_WIN32_WINDOWS: + + pplatform = "9x"; + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) + { + pos = "Microsoft Windows 95"; + if ( osvi.szCSDVersion[1] == 'C' || osvi.szCSDVersion[1] == 'B' ) + pextra = "OSR2"; + } + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) + { + pos = "Microsoft Windows 98"; + if ( osvi.szCSDVersion[1] == 'A' ) + pextra = "SE"; + } + + if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) + { + pos = "Microsoft Windows Me"; + } + break; + + case VER_PLATFORM_WIN32s: + + pplatform = "Win32s"; + pos = "Microsoft Win32s"; + break; + } + + wsprintf(buf, "Platform %s OS %s %s %s", pplatform, pos, *pextra ? " " : "", pextra, verinfo); +} +#pragma warning(default: 4996) From 8c33d8a212e8f627ae74e1614adcdbc9a47b611e Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 28 Mar 2023 20:13:33 +1000 Subject: [PATCH 06/40] feat(windows): hard coded load library version dll --- ...n.Configuration.UI.UfrmDiagnosticTests.pas | 2 +- windows/src/engine/engine.sln | 10 ++++++ windows/src/engine/inst/components.wxs | 8 +++-- .../kmcomapi/com/system/keymancontrol.pas | 2 +- .../src/engine/kmcomapi/util/utilkeyman.pas | 18 +++++----- .../global/delphi/general/keyman32_int.pas | 36 +++++++++---------- .../flex_integration_km9_main.pas | 6 ++-- windows/src/support/kdebug/kdebug.cpp | 20 +++++------ 8 files changed, 58 insertions(+), 44 deletions(-) diff --git a/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas b/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas index 3055ab2fb33..e1b13f5f9ae 100644 --- a/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas +++ b/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas @@ -62,7 +62,7 @@ procedure TfrmDiagnosticTests.cmdSendTestKeyman32ExceptionClick( h: THandle; Keyman_Diagnostic: TKeyman_Diagnostic; begin - h := GetModuleHandle('keyman32.dll'); + h := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); if h = 0 then begin ShowMessage('keyman32.dll is not loaded. Make sure Keyman is running.'); diff --git a/windows/src/engine/engine.sln b/windows/src/engine/engine.sln index 464dace7cd3..a88a5d48ff0 100644 --- a/windows/src/engine/engine.sln +++ b/windows/src/engine/engine.sln @@ -21,6 +21,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman-engine", "keyman32-v EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testhost", "testhost\testhost.vcxproj", "{12818DA3-0472-49A5-96FC-A4808A1A77FA}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman32", "keyman32\keyman32.vcxproj", "{7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -91,6 +93,14 @@ Global {12818DA3-0472-49A5-96FC-A4808A1A77FA}.Release|Win32.Build.0 = Release|Win32 {12818DA3-0472-49A5-96FC-A4808A1A77FA}.Release|x64.ActiveCfg = Release|x64 {12818DA3-0472-49A5-96FC-A4808A1A77FA}.Release|x64.Build.0 = Release|x64 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|Win32.Build.0 = Debug|Win32 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|x64.ActiveCfg = Debug|x64 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|x64.Build.0 = Debug|x64 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|Win32.ActiveCfg = Release|Win32 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|Win32.Build.0 = Release|Win32 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|x64.ActiveCfg = Release|x64 + {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index 711bc02937c..7877a0b2f99 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -101,7 +101,11 @@ - + + + + + @@ -133,7 +137,7 @@ - diff --git a/windows/src/engine/kmcomapi/com/system/keymancontrol.pas b/windows/src/engine/kmcomapi/com/system/keymancontrol.pas index b3f89585962..cafbeffe908 100644 --- a/windows/src/engine/kmcomapi/com/system/keymancontrol.pas +++ b/windows/src/engine/kmcomapi/com/system/keymancontrol.pas @@ -196,7 +196,7 @@ implementation {$IFNDEF WIN64} const - SKeyman32Filename = 'keyman32.dll'; + SKeyman32Filename = 'keyman32-ver17.0.48-alpha-local.dll'; {$ENDIF} const diff --git a/windows/src/engine/kmcomapi/util/utilkeyman.pas b/windows/src/engine/kmcomapi/util/utilkeyman.pas index 62e87acaa6d..9666ec5efa2 100644 --- a/windows/src/engine/kmcomapi/util/utilkeyman.pas +++ b/windows/src/engine/kmcomapi/util/utilkeyman.pas @@ -1,18 +1,18 @@ (* Name: utilkeyman Copyright: Copyright (C) SIL International. - Documentation: - Description: + Documentation: + Description: Create Date: 20 Jun 2006 Modified Date: 13 Mar 2015 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 20 Jun 2006 - mcdurdin - Initial version 01 Jun 2009 - mcdurdin - I2001 - use current user not local machine when testing root keyboard path 03 May 2011 - mcdurdin - I2890 - Record diagnostic data when encountering registry errors @@ -291,8 +291,8 @@ function GetKeymanInstallPath: string; end; Result := IncludeTrailingPathDelimiter(RootPath); - if not FileExists(Result + 'keyman32.dll') then - raise EKeymanNotInstalled.Create( 'The executable keyman32.dll could not '+ + if not FileExists(Result + 'keyman32-ver17.0.48-alpha-local.dll') then + raise EKeymanNotInstalled.Create( 'The executable keyman32-ver17.0.48-alpha-local.dll could not '+ 'be found. You should reinstall.'); end; diff --git a/windows/src/global/delphi/general/keyman32_int.pas b/windows/src/global/delphi/general/keyman32_int.pas index decebd7bdb7..4cef7f33a3f 100644 --- a/windows/src/global/delphi/general/keyman32_int.pas +++ b/windows/src/global/delphi/general/keyman32_int.pas @@ -1,18 +1,18 @@ (* Name: keyman32_int Copyright: Copyright (C) SIL International. - Documentation: - Description: + Documentation: + Description: Create Date: 1 Aug 2006 Modified Date: 17 Aug 2012 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 01 Aug 2006 - mcdurdin - Add GetKeymanInstallPath function 14 Sep 2006 - mcdurdin - Retrieve Debug_Keyman32 path if assigned 18 Mar 2011 - mcdurdin - I2825 - Debug_Keyman32 override not working correctly @@ -63,11 +63,11 @@ function GetKeymanInstallPath: string; begin RootPath := ExtractFilePath(ParamStr(0)); end; - + Result := IncludeTrailingPathDelimiter(RootPath); - if not FileExists(Result + 'keyman32.dll') then - raise Exception.Create( 'The executable keyman32.dll could not '+ + if not FileExists(Result + 'keyman32-ver17.0.48-alpha-local.dll') then + raise Exception.Create( 'The executable keyman32-ver17.0.48-alpha-local.dll could not '+ 'be found. You should reinstall.'); end; @@ -80,17 +80,17 @@ function Keyman_Initialise(Handle: HWND; FSingleApp: Boolean): Boolean; begin Result := False; FLoad := False; - hkeyman := GetModuleHandle('keyman32.dll'); + hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); if hkeyman = 0 then begin s := GetKeymanInstallPath; - hkeyman := LoadLibrary(PChar(s+'keyman32.dll')); + hkeyman := LoadLibrary(PChar(s+'keyman32-ver17.0.48-alpha-local')); if hkeyman = 0 then begin - KL.LogError('Keyman_Initialise: Unable to load '+s+'keyman32.dll: '+SysErrorMessage(GetLastError)); + KL.LogError('Keyman_Initialise: Unable to load '+s+'keyman32-ver17.0.48-alpha-local: '+SysErrorMessage(GetLastError)); Exit; end; - KL.Log('Keyman_Initialise: Loaded keyman32.dll'); + KL.Log('Keyman_Initialise: Loaded keyman32-ver17.0.48-alpha-local'); FLoad := True; end else @@ -125,7 +125,7 @@ function Keyman_Exit: Boolean; Exit; end; Result := False; - hkeyman := GetModuleHandle('keyman32.dll'); + hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); if hkeyman = 0 then Exit; ke := TKeyman_Exit(GetProcAddress(hkeyman, 'Keyman_Exit')); if not Assigned(@ke) then Exit; @@ -141,7 +141,7 @@ function Keyman_ForceKeyboard(const s: string): Boolean; fk: TKeyman_ForceKeyboard; begin Result := False; - hkeyman := GetModuleHandle('keyman32.dll'); + hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); if hkeyman = 0 then begin KL.Log('Keyman_ForceKeyboard: Attempting to load keyman32.dll'); @@ -150,7 +150,7 @@ function Keyman_ForceKeyboard(const s: string): Boolean; KL.LogError('Keyman_ForceKeyboard: Unable to load keyman32.dll'); Exit; end; - hkeyman := GetModuleHandle('keyman32.dll'); + hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); if hkeyman = 0 then Exit; end; fk := TKeyman_ForceKeyboard(GetProcAddress(hkeyman, 'Keyman_ForceKeyboard')); @@ -170,7 +170,7 @@ function Keyman_StopForcingKeyboard: Boolean; sfk: TKeyman_StopForcingKeyboard; begin Result := False; - hkeyman := GetModuleHandle('keyman32.dll'); + hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); if hkeyman = 0 then Exit; sfk := TKeyman_StopForcingKeyboard(GetProcAddress(hkeyman, 'Keyman_StopForcingKeyboard')); if(Assigned(@sfk)) then diff --git a/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas b/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas index 004f63d43bc..80c1d314c21 100644 --- a/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas +++ b/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas @@ -43,7 +43,7 @@ procedure TForm1.Button1Click(Sender: TObject); nActiveKeymanId: Integer; iki: Integer; begin - hKeyman := GetModuleHandle('keyman32.dll'); + hKeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); if hKeyman = 0 then begin ShowMessage('No keyman32.dll loaded'); @@ -108,7 +108,7 @@ procedure TForm1.Button2Click(Sender: TObject); begin FKeyboards := TObjectList.Create; - hKeyman := GetModuleHandle('keyman32.dll'); + hKeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); if hKeyman = 0 then Exit; pKeyman_BuildKeyboardList := GetProcAddress(hKeyman, 'Keyman_BuildKeyboardList'); if @pKeyman_BuildKeyboardList = nil then @@ -143,7 +143,7 @@ procedure TForm1.FormCreate(Sender: TObject); begin FKeyboards := TObjectList.Create; - hKeyman := GetModuleHandle('keyman32.dll'); + hKeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); if hKeyman = 0 then Exit; pKeyman_BuildKeyboardList := GetProcAddress(hKeyman, 'Keyman_BuildKeyboardList'); if @pKeyman_BuildKeyboardList = nil then diff --git a/windows/src/support/kdebug/kdebug.cpp b/windows/src/support/kdebug/kdebug.cpp index 155ac08ed5f..898a67b58a4 100644 --- a/windows/src/support/kdebug/kdebug.cpp +++ b/windows/src/support/kdebug/kdebug.cpp @@ -15,7 +15,7 @@ BOOL Keyman_ForceKeyboard(PSTR s); BOOL Keyman_StopForcingKeyboard(); /************************************************************************************************************ - * DLL entry functions + * DLL entry functions ************************************************************************************************************/ int PASCAL WinMain(HINSTANCE hinstance, HINSTANCE hprevinst, LPSTR cmdline, int nCmdShow) @@ -37,7 +37,7 @@ int PASCAL WinMain(HINSTANCE hinstance, HINSTANCE hprevinst, LPSTR cmdline, int wc.lpszClassName = L"KeymanDebug"; if(!RegisterClassW(&wc)) return FALSE; - hwnd = CreateWindowW(L"KeymanDebug", L"Keyman Debugger", + hwnd = CreateWindowW(L"KeymanDebug", L"Keyman Debugger", WS_OVERLAPPEDWINDOW | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, NULL, hinst, NULL); if(!hwnd) return FALSE; @@ -68,7 +68,7 @@ void CreateFont() font.lfHeight = -MulDiv(36, lfpixelsy, 72); font.lfWidth = 0; - font.lfEscapement = 0; + font.lfEscapement = 0; font.lfOrientation = 0; font.lfWeight = FW_NORMAL; font.lfItalic = FALSE; @@ -168,11 +168,11 @@ BOOL Keyman_Initialise(HWND hwnd, BOOL FSingleApp) Keyman_InitialiseProc ki; FLoad = FALSE; - - hkeyman = GetModuleHandle("keyman32.dll"); + + hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); if(!hkeyman) { - hkeyman = LoadLibrary("c:\\keyman\\5.0\\bin\\dist\\keyman32.dll"); + hkeyman = LoadLibrary("c:\\keyman\\5.0\\bin\\dist\\keyman32-ver17.0.48-alpha-local.dll"); if(!hkeyman) return FALSE; FLoad = TRUE; } @@ -195,7 +195,7 @@ BOOL Keyman_Exit() Keyman_ExitProc ke; if(!FInitKeyman) return TRUE; - hkeyman = GetModuleHandle("keyman32.dll"); + hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); if(!hkeyman) return FALSE; ke = (Keyman_ExitProc) GetProcAddress(hkeyman, "Keyman_Exit"); @@ -212,9 +212,9 @@ BOOL Keyman_ForceKeyboard(PSTR s) HINSTANCE hkeyman; Keyman_ForceKeyboardProc fk; - hkeyman = GetModuleHandle("keyman32.dll"); + hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); if(!hkeyman) return FALSE; - + fk = (Keyman_ForceKeyboardProc) GetProcAddress(hkeyman, "Keyman_ForceKeyboard"); if(!fk) return FALSE; @@ -226,7 +226,7 @@ BOOL Keyman_StopForcingKeyboard() HINSTANCE hkeyman; Keyman_StopForcingKeyboardProc sfk; - hkeyman = GetModuleHandle("keyman32.dll"); + hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); if(!hkeyman) return FALSE; sfk = (Keyman_StopForcingKeyboardProc) GetProcAddress(hkeyman, "Keyman_StopForcingKeyboard"); From ea98bd6c905253fff35845d9156c443171fbe937 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 5 Apr 2023 16:46:52 +1000 Subject: [PATCH 07/40] feat(windows): use win regsitry to store dll name Use the windows registry to store the name for the versioned keyman32??.dll and the keyman64??.dll. LoadLibrary calls have been updated to read the name to load from the registry value. --- windows/src/engine/inst/components.wxs | 6 ++ .../keyman32-ver/keyman64-build-version.in | 4 +- .../kmcomapi/com/system/keymancontrol.pas | 35 +++++++--- .../src/engine/kmcomapi/util/utilkeyman.pas | 30 ++++++++- .../global/delphi/general/keyman32_int.pas | 67 ++++++++++++++----- .../flex_integration_km9_main.pas | 6 +- windows/src/support/kdebug/kdebug.cpp | 10 +-- 7 files changed, 120 insertions(+), 38 deletions(-) diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index 7877a0b2f99..629856f9014 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -149,6 +149,12 @@ + + + + + + diff --git a/windows/src/engine/keyman32-ver/keyman64-build-version.in b/windows/src/engine/keyman32-ver/keyman64-build-version.in index e6fd07f2ded..79e1d3e1846 100644 --- a/windows/src/engine/keyman32-ver/keyman64-build-version.in +++ b/windows/src/engine/keyman32-ver/keyman64-build-version.in @@ -57,9 +57,9 @@ #define _KEYMAN64_BUILD_VERSION_H #ifdef _WIN64 -#define LIBRARY_NAME "keyman64-ver17.0.48-alpha-local" +#define LIBRARY_NAME "keyman64-ver$VersionWithTag.dll" #else -#define LIBRARY_NAME "keyman32-ver17.0.48-alpha-local" +#define LIBRARY_NAME "keyman32-ver$VersionWithTag.dll" #endif diff --git a/windows/src/engine/kmcomapi/com/system/keymancontrol.pas b/windows/src/engine/kmcomapi/com/system/keymancontrol.pas index cafbeffe908..81c75116f86 100644 --- a/windows/src/engine/kmcomapi/com/system/keymancontrol.pas +++ b/windows/src/engine/kmcomapi/com/system/keymancontrol.pas @@ -194,11 +194,6 @@ implementation var wm_keyman: Integer = 0; -{$IFNDEF WIN64} -const - SKeyman32Filename = 'keyman32-ver17.0.48-alpha-local.dll'; -{$ENDIF} - const SWnd_MasterController = 'TfrmKeyman7Main'; SWnd_VisualKeyboard = 'TfrmVisualKeyboard'; @@ -690,6 +685,29 @@ procedure TKeymanControl.Do_Keyman_Exit; procedure TKeymanControl.LoadKeyman32; + function GetKeyman32Name: string; + var + Keyman32Name: string; + begin + Keyman32Name := ''; + with TRegistryErrorControlled.Create do // I2890 + try + RootKey := HKEY_LOCAL_MACHINE; + if OpenKeyReadOnly(SRegKey_KeymanEngine_LM) and ValueExists(SRegValue_Keyman32_Name) then + Keyman32Name := ReadString(SRegValue_Keyman32_Name); + finally + Free; + end; + + if Keyman32Name = '' then + begin + Keyman32Name := 'keyman32.dll'; + end; + + Result := Keyman32Name; + + end; + function GetKeymanInstallPath: string; // I3598 var buf: array[0..260] of char; @@ -724,13 +742,14 @@ procedure TKeymanControl.LoadKeyman32; end; var s: string; + Keyman32Name: string; begin if hlibKeyman32 = 0 then begin - - s := GetKeymanInstallPath+SKeyman32Filename; // I3598 + Keyman32Name := GetKeyman32Name; + s := GetKeymanInstallPath+Keyman32Name; // I3598 if not FileExists(s) then - ErrorFmt(KMN_E_KeymanControl_CannotLoadKeyman32, VarArrayOf([Integer(GetLastError), 'Failed to find '+SKeyman32Filename+' at "'+s+'", '+SysErrorMessage(GetLastError)])); + ErrorFmt(KMN_E_KeymanControl_CannotLoadKeyman32, VarArrayOf([Integer(GetLastError), 'Failed to find '+Keyman32Name+' at "'+s+'", '+SysErrorMessage(GetLastError)])); hlibKeyman32 := LoadLibrary(PChar(s)); if hlibKeyman32 = 0 then diff --git a/windows/src/engine/kmcomapi/util/utilkeyman.pas b/windows/src/engine/kmcomapi/util/utilkeyman.pas index 9666ec5efa2..43cd03a271b 100644 --- a/windows/src/engine/kmcomapi/util/utilkeyman.pas +++ b/windows/src/engine/kmcomapi/util/utilkeyman.pas @@ -275,9 +275,33 @@ function PackageInstalled(const PackageName: string; var FIsAdmin: Boolean): Boo end; end; +function GetKeyman32Name: string; +var + Keyman32Name: string; +begin + Keyman32Name := ''; + with TRegistryErrorControlled.Create do // I2890 + try + RootKey := HKEY_LOCAL_MACHINE; + if OpenKeyReadOnly(SRegKey_KeymanEngine_LM) and ValueExists(SRegValue_Keyman32_Name) then + Keyman32Name := ReadString(SRegValue_Keyman32_Name); + finally + Free; + end; + + if Keyman32Name = '' then + begin + Keyman32Name := 'keyman32.dll'; + end; + + Result := Keyman32Name; + +end; + function GetKeymanInstallPath: string; var RootPath: string; + Keyman32Name: string; begin RootPath := ExtractFilePath(ParamStr(0)); with TRegistryErrorControlled.Create do // I2890 @@ -290,9 +314,9 @@ function GetKeymanInstallPath: string; Free; end; Result := IncludeTrailingPathDelimiter(RootPath); - - if not FileExists(Result + 'keyman32-ver17.0.48-alpha-local.dll') then - raise EKeymanNotInstalled.Create( 'The executable keyman32-ver17.0.48-alpha-local.dll could not '+ + Keyman32Name := GetKeyman32Name; + if not FileExists(Result + Keyman32Name) then + raise EKeymanNotInstalled.Create( 'The executable '+Keyman32Name+' could not '+ 'be found. You should reinstall.'); end; diff --git a/windows/src/global/delphi/general/keyman32_int.pas b/windows/src/global/delphi/general/keyman32_int.pas index 4cef7f33a3f..6937af969a2 100644 --- a/windows/src/global/delphi/general/keyman32_int.pas +++ b/windows/src/global/delphi/general/keyman32_int.pas @@ -43,9 +43,33 @@ implementation FInitKeyman: Boolean = False; FKeyman32Path: string = ''; +function GetKeyman32Name: string; +var + Keyman32Name: string; +begin + Keyman32Name := ''; + with TRegistryErrorControlled.Create do // I2890 + try + RootKey := HKEY_LOCAL_MACHINE; + if OpenKeyReadOnly(SRegKey_KeymanEngine_LM) and ValueExists(SRegValue_Keyman32_Name) then + Keyman32Name := ReadString(SRegValue_Keyman32_Name); + finally + Free; + end; + + if Keyman32Name = '' then + begin + Keyman32Name := 'keyman32.dll'; + end; + + Result := Keyman32Name; + +end; + function GetKeymanInstallPath: string; var RootPath: string; + Keyman32Name: string; begin RootPath := ''; with TRegistryErrorControlled.Create do // I2890 @@ -66,8 +90,9 @@ function GetKeymanInstallPath: string; Result := IncludeTrailingPathDelimiter(RootPath); - if not FileExists(Result + 'keyman32-ver17.0.48-alpha-local.dll') then - raise Exception.Create( 'The executable keyman32-ver17.0.48-alpha-local.dll could not '+ + Keyman32Name := GetKeyman32Name; + if not FileExists(Result + Keyman32Name) then + raise Exception.Create( 'The executable' + Keyman32Name + ' could not '+ 'be found. You should reinstall.'); end; @@ -77,34 +102,36 @@ function Keyman_Initialise(Handle: HWND; FSingleApp: Boolean): Boolean; FLoad: Boolean; ki: TKeyman_Initialise; s: string; + keyman32Name: string; begin Result := False; FLoad := False; - hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); + keyman32Name := GetKeyman32Name; + hkeyman := GetModuleHandle(keyman32Name); if hkeyman = 0 then begin s := GetKeymanInstallPath; - hkeyman := LoadLibrary(PChar(s+'keyman32-ver17.0.48-alpha-local')); + hkeyman := LoadLibrary(PChar(s+keyman32Name)); if hkeyman = 0 then begin - KL.LogError('Keyman_Initialise: Unable to load '+s+'keyman32-ver17.0.48-alpha-local: '+SysErrorMessage(GetLastError)); + KL.LogError('Keyman_Initialise: Unable to load '+s+keyman32Name+': '+SysErrorMessage(GetLastError)); Exit; end; - KL.Log('Keyman_Initialise: Loaded keyman32-ver17.0.48-alpha-local'); + KL.Log('Keyman_Initialise: Loaded '+keyman32Name); FLoad := True; end else - KL.Log('Keyman_Initialise: Found keyman32.dll already loaded'); + KL.Log('Keyman_Initialise: Found '+keyman32Name+' already loaded'); ki := TKeyman_Initialise(GetProcAddress(hkeyman, 'Keyman_Initialise')); if not Assigned(@ki) then begin - KL.LogError('Keyman_Initialise: Unable to find Keyman_Initialise in '+s+'keyman32.dll: '+SysErrorMessage(GetLastError)); + KL.LogError('Keyman_Initialise: Unable to find Keyman_Initialise in '+s+keyman32Name+': '+SysErrorMessage(GetLastError)); if FLoad then FreeLibrary(hkeyman); Exit; end; if not ki(Handle, FSingleApp) then begin - KL.LogError('Keyman_Initialise: Call to Keyman_Initialise in '+s+'keyman32.dll failed: '+SysErrorMessage(GetLastError)); + KL.LogError('Keyman_Initialise: Call to Keyman_Initialise in '+s+keyman32Name+' failed: '+SysErrorMessage(GetLastError)); if FLoad then FreeLibrary(hkeyman); Exit; end; @@ -118,6 +145,7 @@ function Keyman_Exit: Boolean; var hkeyman: THandle; ke: TKeyman_Exit; + keyman32Name: string; begin if not FInitKeyman then begin @@ -125,7 +153,8 @@ function Keyman_Exit: Boolean; Exit; end; Result := False; - hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); + keyman32Name := GetKeyman32Name; + hkeyman := GetModuleHandle(keyman32Name); if hkeyman = 0 then Exit; ke := TKeyman_Exit(GetProcAddress(hkeyman, 'Keyman_Exit')); if not Assigned(@ke) then Exit; @@ -139,38 +168,42 @@ function Keyman_ForceKeyboard(const s: string): Boolean; var hkeyman: THandle; fk: TKeyman_ForceKeyboard; + keyman32Name: string; begin Result := False; - hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); + keyman32Name := GetKeyman32Name; + hkeyman := GetModuleHandle(keyman32Name); if hkeyman = 0 then begin - KL.Log('Keyman_ForceKeyboard: Attempting to load keyman32.dll'); + KL.Log('Keyman_ForceKeyboard: Attempting to load '+keyman32Name); if not Keyman_Initialise(Application.MainForm.Handle, True) then begin - KL.LogError('Keyman_ForceKeyboard: Unable to load keyman32.dll'); + KL.LogError('Keyman_ForceKeyboard: Unable to load '+keyman32Name); Exit; end; - hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); + hkeyman := GetModuleHandle(keyman32Name); if hkeyman = 0 then Exit; end; fk := TKeyman_ForceKeyboard(GetProcAddress(hkeyman, 'Keyman_ForceKeyboard')); if(Assigned(@fk)) then begin Result := fk(PAnsiChar(AnsiString(s))); // todo: k9: unicode // I3310 - if not Result then KL.LogError('Keyman_ForceKeyboard in keyman32.dll failed: '+s) + if not Result then KL.LogError('Keyman_ForceKeyboard in '+keyman32Name+' failed: '+s) else KL.Log('Keyman_ForceKeyboard: success'); end else - KL.LogError('Keyman_ForceKeyboard: failed to find Keyman_ForceKeyboard in keyman32.dll'); + KL.LogError('Keyman_ForceKeyboard: failed to find Keyman_ForceKeyboard in '+keyman32Name); end; function Keyman_StopForcingKeyboard: Boolean; var hkeyman: THandle; sfk: TKeyman_StopForcingKeyboard; + keyman32Name: string; begin Result := False; - hkeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); + keyman32Name := GetKeyman32Name; + hkeyman := GetModuleHandle(keyman32Name); if hkeyman = 0 then Exit; sfk := TKeyman_StopForcingKeyboard(GetProcAddress(hkeyman, 'Keyman_StopForcingKeyboard')); if(Assigned(@sfk)) then diff --git a/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas b/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas index 80c1d314c21..004f63d43bc 100644 --- a/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas +++ b/windows/src/support/flex_integration_km9/flex_integration_km9_main.pas @@ -43,7 +43,7 @@ procedure TForm1.Button1Click(Sender: TObject); nActiveKeymanId: Integer; iki: Integer; begin - hKeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); + hKeyman := GetModuleHandle('keyman32.dll'); if hKeyman = 0 then begin ShowMessage('No keyman32.dll loaded'); @@ -108,7 +108,7 @@ procedure TForm1.Button2Click(Sender: TObject); begin FKeyboards := TObjectList.Create; - hKeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); + hKeyman := GetModuleHandle('keyman32.dll'); if hKeyman = 0 then Exit; pKeyman_BuildKeyboardList := GetProcAddress(hKeyman, 'Keyman_BuildKeyboardList'); if @pKeyman_BuildKeyboardList = nil then @@ -143,7 +143,7 @@ procedure TForm1.FormCreate(Sender: TObject); begin FKeyboards := TObjectList.Create; - hKeyman := GetModuleHandle('keyman32-ver17.0.48-alpha-local.dll'); + hKeyman := GetModuleHandle('keyman32.dll'); if hKeyman = 0 then Exit; pKeyman_BuildKeyboardList := GetProcAddress(hKeyman, 'Keyman_BuildKeyboardList'); if @pKeyman_BuildKeyboardList = nil then diff --git a/windows/src/support/kdebug/kdebug.cpp b/windows/src/support/kdebug/kdebug.cpp index 898a67b58a4..b1919278e0a 100644 --- a/windows/src/support/kdebug/kdebug.cpp +++ b/windows/src/support/kdebug/kdebug.cpp @@ -169,10 +169,10 @@ BOOL Keyman_Initialise(HWND hwnd, BOOL FSingleApp) FLoad = FALSE; - hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); + hkeyman = GetModuleHandle("keyman32.dll"); if(!hkeyman) { - hkeyman = LoadLibrary("c:\\keyman\\5.0\\bin\\dist\\keyman32-ver17.0.48-alpha-local.dll"); + hkeyman = LoadLibrary("c:\\keyman\\5.0\\bin\\dist\\keyman32.dll"); if(!hkeyman) return FALSE; FLoad = TRUE; } @@ -195,7 +195,7 @@ BOOL Keyman_Exit() Keyman_ExitProc ke; if(!FInitKeyman) return TRUE; - hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); + hkeyman = GetModuleHandle("keyman32.dll"); if(!hkeyman) return FALSE; ke = (Keyman_ExitProc) GetProcAddress(hkeyman, "Keyman_Exit"); @@ -212,7 +212,7 @@ BOOL Keyman_ForceKeyboard(PSTR s) HINSTANCE hkeyman; Keyman_ForceKeyboardProc fk; - hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); + hkeyman = GetModuleHandle("keyman32.dll"); if(!hkeyman) return FALSE; fk = (Keyman_ForceKeyboardProc) GetProcAddress(hkeyman, "Keyman_ForceKeyboard"); @@ -226,7 +226,7 @@ BOOL Keyman_StopForcingKeyboard() HINSTANCE hkeyman; Keyman_StopForcingKeyboardProc sfk; - hkeyman = GetModuleHandle("keyman32-ver17.0.48-alpha-local.dll"); + hkeyman = GetModuleHandle("keyman32.dll"); if(!hkeyman) return FALSE; sfk = (Keyman_StopForcingKeyboardProc) GetProcAddress(hkeyman, "Keyman_StopForcingKeyboard"); From ccc4ff9026263ab8f9ad87fa24b73cc65b036a91 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 6 Apr 2023 11:07:23 +1000 Subject: [PATCH 08/40] feat(windows): add registry keyname for keyman32 --- common/windows/delphi/general/RegistryKeys.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/windows/delphi/general/RegistryKeys.pas b/common/windows/delphi/general/RegistryKeys.pas index fcb51ec7d0a..78e2d2c0cf0 100644 --- a/common/windows/delphi/general/RegistryKeys.pas +++ b/common/windows/delphi/general/RegistryKeys.pas @@ -435,6 +435,8 @@ interface SRegValue_RootPath = 'root path'; // LM SRegValue_RegistrationKey = 'registration key'; // LM + SRegValue_Keyman32_Name = 'keyman32 name'; // LM + SRegValue_Keyman64_Name = 'keyman64 name'; // LM { Uninstall feedback keyboard list } From 7fb7f065f3c6aae7a9b8ecca566e2c2289da0821 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 12 Apr 2023 11:14:04 +1000 Subject: [PATCH 09/40] feat(windows): keyman64 project files --- windows/src/engine/keyman64/Makefile | 29 +++ windows/src/engine/keyman64/exports.h | 75 +++++++ windows/src/engine/keyman64/exports.in | 75 +++++++ .../src/engine/keyman64/keyman-debug-etw.h | 146 +++++++++++++ .../src/engine/keyman64/keyman-debug-etw.rc | 3 + .../src/engine/keyman64/keyman-debug-etw.res | Bin 0 -> 7916 bytes windows/src/engine/keyman64/keyman64.rc | 3 + windows/src/engine/keyman64/keyman64.sln | 20 ++ windows/src/engine/keyman64/keyman64.vcxproj | 191 ++++++++++++++++++ .../engine/keyman64/keyman64.vcxproj.filters | 11 + .../src/engine/keyman64/keyman64_proxy.cpp | 20 ++ windows/src/engine/keyman64/pch.cpp | 5 + windows/src/engine/keyman64/pch.h | 8 + windows/src/engine/keyman64/premake.in | 26 +++ windows/src/engine/keyman64/premake.mak | 26 +++ windows/src/engine/keyman64/version.rc | 32 +++ 16 files changed, 670 insertions(+) create mode 100644 windows/src/engine/keyman64/Makefile create mode 100644 windows/src/engine/keyman64/exports.h create mode 100644 windows/src/engine/keyman64/exports.in create mode 100644 windows/src/engine/keyman64/keyman-debug-etw.h create mode 100644 windows/src/engine/keyman64/keyman-debug-etw.rc create mode 100644 windows/src/engine/keyman64/keyman-debug-etw.res create mode 100644 windows/src/engine/keyman64/keyman64.rc create mode 100644 windows/src/engine/keyman64/keyman64.sln create mode 100644 windows/src/engine/keyman64/keyman64.vcxproj create mode 100644 windows/src/engine/keyman64/keyman64.vcxproj.filters create mode 100644 windows/src/engine/keyman64/keyman64_proxy.cpp create mode 100644 windows/src/engine/keyman64/pch.cpp create mode 100644 windows/src/engine/keyman64/pch.h create mode 100644 windows/src/engine/keyman64/premake.in create mode 100644 windows/src/engine/keyman64/premake.mak create mode 100644 windows/src/engine/keyman64/version.rc diff --git a/windows/src/engine/keyman64/Makefile b/windows/src/engine/keyman64/Makefile new file mode 100644 index 00000000000..926681fe2ce --- /dev/null +++ b/windows/src/engine/keyman64/Makefile @@ -0,0 +1,29 @@ +# +# Keyman64 Makefile +# + +!include ..\..\Defines.mak + +build: version.res dirs + $(MKVER_U) exports.in exports.h + $(MSBUILD) keyman64.vcxproj $(MSBUILD_BUILD) "/p:Platform=x64" + $(COPY) $(X64_TARGET_PATH)\keyman64.dll $(PROGRAM)\engine + $(COPY) $(X64_TARGET_PATH)\keyman64.pdb $(DEBUGPATH)\engine +# $(COPY) $(X64_TARGET_PATH)\keyman64.lib $(OUTLIB) done by vcxproj + +clean: def-clean + $(MSBUILD) $(MSBUILD_CLEAN) keyman64.vcxproj "/p:Platform=x64" + +signcode: + $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman64.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman64.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman64.pdb /t keyman-engine-windows + +install: + $(COPY) $(PROGRAM)\engine\keyman64.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64.dll" + echo You may want to manually tweak keyman-debug-etw.man and fill in $(INSTALLPATH_KEYMANENGINE)\keyman64.dll + echo and then run wevtutil im keyman-debug-etw.man to get the latest event tracing + +!include ..\..\Target.mak diff --git a/windows/src/engine/keyman64/exports.h b/windows/src/engine/keyman64/exports.h new file mode 100644 index 00000000000..3a01bad63c6 --- /dev/null +++ b/windows/src/engine/keyman64/exports.h @@ -0,0 +1,75 @@ +// exports.h +// +// Simple header to instruct the linker to forward function exports to another library. +// + +#pragma comment(linker,"/export:GetActiveKeymanID=keyman64-ver17.0.48-alpha-local.dll.GetActiveKeymanID,@1") +#pragma comment(linker,"/export:GetKeyboardPreservedKeys=keyman64-ver17.0.48-alpha-local.dll.GetKeyboardPreservedKeys,@2") +#pragma comment(linker,"/export:KMDisplayIM=keyman64-ver17.0.48-alpha-local.dll.KMDisplayIM,@3") +#pragma comment(linker,"/export:KMGetActiveKeyboard=keyman64-ver17.0.48-alpha-local.dll.KMGetActiveKeyboard,@4") +#pragma comment(linker,"/export:KMGetContext=keyman64-ver17.0.48-alpha-local.dll.KMGetContext,@5") +#pragma comment(linker,"/export:KMGetKeyboardPath=keyman64-ver17.0.48-alpha-local.dll.KMGetKeyboardPath,@6") +#pragma comment(linker,"/export:KMHideIM=keyman64-ver17.0.48-alpha-local.dll.KMHideIM,@7") +#pragma comment(linker,"/export:KMQueueAction=keyman64-ver17.0.48-alpha-local.dll.KMQueueAction,@8") +#pragma comment(linker,"/export:KMSetOutput=keyman64-ver17.0.48-alpha-local.dll.KMSetOutput,@9") +#pragma comment(linker,"/export:Keyman_Exit=keyman64-ver17.0.48-alpha-local.dll.Keyman_Exit,@10") +#pragma comment(linker,"/export:Keyman_ForceKeyboard=keyman64-ver17.0.48-alpha-local.dll.Keyman_ForceKeyboard,@11") +#pragma comment(linker,"/export:Keyman_GetInitialised=keyman64-ver17.0.48-alpha-local.dll.Keyman_GetInitialised,@12") +#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_GetLastActiveWindow,@13") +#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_GetLastFocusWindow,@14") +#pragma comment(linker,"/export:Keyman_Initialise=keyman64-ver17.0.48-alpha-local.dll.Keyman_Initialise,@15") +#pragma comment(linker,"/export:Keyman_PostControllers=keyman64-ver17.0.48-alpha-local.dll.Keyman_PostControllers,@16") +#pragma comment(linker,"/export:Keyman_PostMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_PostMasterController,@17") +#pragma comment(linker,"/export:Keyman_RegisterControllerThread=keyman64-ver17.0.48-alpha-local.dll.Keyman_RegisterControllerThread,@18") +#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_RegisterControllerWindow,@19") +#pragma comment(linker,"/export:Keyman_RegisterMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_RegisterMasterController,@20") +#pragma comment(linker,"/export:Keyman_ResetInitialisation=keyman64-ver17.0.48-alpha-local.dll.Keyman_ResetInitialisation,@21") +#pragma comment(linker,"/export:Keyman_RestartEngine=keyman64-ver17.0.48-alpha-local.dll.Keyman_RestartEngine,@22") +#pragma comment(linker,"/export:Keyman_SendMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_SendMasterController,@23") +#pragma comment(linker,"/export:Keyman_StartExit=keyman64-ver17.0.48-alpha-local.dll.Keyman_StartExit,@24") +#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=keyman64-ver17.0.48-alpha-local.dll.Keyman_StopForcingKeyboard,@25") +#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=keyman64-ver17.0.48-alpha-local.dll.Keyman_UnregisterControllerThread,@26") +#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_UnregisterControllerWindow,@27") +#pragma comment(linker,"/export:Keyman_UnregisterMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_UnregisterMasterController,@28") +#pragma comment(linker,"/export:Keyman_WriteDebugEvent=keyman64-ver17.0.48-alpha-local.dll.Keyman_WriteDebugEvent,@29") +#pragma comment(linker,"/export:TIPActivateEx=keyman64-ver17.0.48-alpha-local.dll.TIPActivateEx,@30") +#pragma comment(linker,"/export:TIPActivateKeyboard=keyman64-ver17.0.48-alpha-local.dll.TIPActivateKeyboard,@31") +#pragma comment(linker,"/export:TIPIsKeymanRunning=keyman64-ver17.0.48-alpha-local.dll.TIPIsKeymanRunning,@32") +#pragma comment(linker,"/export:TIPProcessKey=keyman64-ver17.0.48-alpha-local.dll.TIPProcessKey,@33") +#pragma comment(linker,"/export:kbp_state_get_intermediate_context=keyman64-ver17.0.48-alpha-local.dll.kbp_state_get_intermediate_context,@34") +#pragma comment(linker,"/export:km_kbp_context_append=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_append,@35") +#pragma comment(linker,"/export:km_kbp_context_clear=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_clear,@36") +#pragma comment(linker,"/export:km_kbp_context_get=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_get,@37") +#pragma comment(linker,"/export:km_kbp_context_item_list_size=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_item_list_size,@38") +#pragma comment(linker,"/export:km_kbp_context_items_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_dispose,@39") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_from_utf16,@40") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_from_utf8,@41") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_to_utf16,@42") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_to_utf8,@43") +#pragma comment(linker,"/export:km_kbp_context_length=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_length,@44") +#pragma comment(linker,"/export:km_kbp_context_set=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_set,@45") +#pragma comment(linker,"/export:km_kbp_context_shrink=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_shrink,@46") +#pragma comment(linker,"/export:km_kbp_event=keyman64-ver17.0.48-alpha-local.dll.km_kbp_event,@47") +#pragma comment(linker,"/export:km_kbp_get_engine_attrs=keyman64-ver17.0.48-alpha-local.dll.km_kbp_get_engine_attrs,@48") +#pragma comment(linker,"/export:km_kbp_keyboard_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_dispose,@49") +#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_attrs,@50") +#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_imx_list,@51") +#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_key_list,@52") +#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_imx_list_dispose,@53") +#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_key_list_dispose,@54") +#pragma comment(linker,"/export:km_kbp_keyboard_load=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_load,@55") +#pragma comment(linker,"/export:km_kbp_options_list_size=keyman64-ver17.0.48-alpha-local.dll.km_kbp_options_list_size,@56") +#pragma comment(linker,"/export:km_kbp_process_event=keyman64-ver17.0.48-alpha-local.dll.km_kbp_process_event,@57") +#pragma comment(linker,"/export:km_kbp_process_queued_actions=keyman64-ver17.0.48-alpha-local.dll.km_kbp_process_queued_actions,@58") +#pragma comment(linker,"/export:km_kbp_state_action_items=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_action_items,@59") +#pragma comment(linker,"/export:km_kbp_state_clone=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_clone,@60") +#pragma comment(linker,"/export:km_kbp_state_context=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_context,@61") +#pragma comment(linker,"/export:km_kbp_state_create=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_create,@62") +#pragma comment(linker,"/export:km_kbp_state_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_dispose,@63") +#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_imx_deregister_callback,@64") +#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_imx_register_callback,@65") +#pragma comment(linker,"/export:km_kbp_state_option_lookup=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_option_lookup,@66") +#pragma comment(linker,"/export:km_kbp_state_options_to_json=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_options_to_json,@67") +#pragma comment(linker,"/export:km_kbp_state_options_update=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_options_update,@68") +#pragma comment(linker,"/export:km_kbp_state_queue_action_items=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_queue_action_items,@69") +#pragma comment(linker,"/export:km_kbp_state_to_json=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_to_json,@70") diff --git a/windows/src/engine/keyman64/exports.in b/windows/src/engine/keyman64/exports.in new file mode 100644 index 00000000000..d147bec3328 --- /dev/null +++ b/windows/src/engine/keyman64/exports.in @@ -0,0 +1,75 @@ +// exports.h +// +// Simple header to instruct the linker to forward function exports to another library. +// + +#pragma comment(linker,"/export:GetActiveKeymanID=keyman64-ver$VersionWithTag.dll.GetActiveKeymanID,@1") +#pragma comment(linker,"/export:GetKeyboardPreservedKeys=keyman64-ver$VersionWithTag.dll.GetKeyboardPreservedKeys,@2") +#pragma comment(linker,"/export:KMDisplayIM=keyman64-ver$VersionWithTag.dll.KMDisplayIM,@3") +#pragma comment(linker,"/export:KMGetActiveKeyboard=keyman64-ver$VersionWithTag.dll.KMGetActiveKeyboard,@4") +#pragma comment(linker,"/export:KMGetContext=keyman64-ver$VersionWithTag.dll.KMGetContext,@5") +#pragma comment(linker,"/export:KMGetKeyboardPath=keyman64-ver$VersionWithTag.dll.KMGetKeyboardPath,@6") +#pragma comment(linker,"/export:KMHideIM=keyman64-ver$VersionWithTag.dll.KMHideIM,@7") +#pragma comment(linker,"/export:KMQueueAction=keyman64-ver$VersionWithTag.dll.KMQueueAction,@8") +#pragma comment(linker,"/export:KMSetOutput=keyman64-ver$VersionWithTag.dll.KMSetOutput,@9") +#pragma comment(linker,"/export:Keyman_Exit=keyman64-ver$VersionWithTag.dll.Keyman_Exit,@10") +#pragma comment(linker,"/export:Keyman_ForceKeyboard=keyman64-ver$VersionWithTag.dll.Keyman_ForceKeyboard,@11") +#pragma comment(linker,"/export:Keyman_GetInitialised=keyman64-ver$VersionWithTag.dll.Keyman_GetInitialised,@12") +#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=keyman64-ver$VersionWithTag.dll.Keyman_GetLastActiveWindow,@13") +#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=keyman64-ver$VersionWithTag.dll.Keyman_GetLastFocusWindow,@14") +#pragma comment(linker,"/export:Keyman_Initialise=keyman64-ver$VersionWithTag.dll.Keyman_Initialise,@15") +#pragma comment(linker,"/export:Keyman_PostControllers=keyman64-ver$VersionWithTag.dll.Keyman_PostControllers,@16") +#pragma comment(linker,"/export:Keyman_PostMasterController=keyman64-ver$VersionWithTag.dll.Keyman_PostMasterController,@17") +#pragma comment(linker,"/export:Keyman_RegisterControllerThread=keyman64-ver$VersionWithTag.dll.Keyman_RegisterControllerThread,@18") +#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=keyman64-ver$VersionWithTag.dll.Keyman_RegisterControllerWindow,@19") +#pragma comment(linker,"/export:Keyman_RegisterMasterController=keyman64-ver$VersionWithTag.dll.Keyman_RegisterMasterController,@20") +#pragma comment(linker,"/export:Keyman_ResetInitialisation=keyman64-ver$VersionWithTag.dll.Keyman_ResetInitialisation,@21") +#pragma comment(linker,"/export:Keyman_RestartEngine=keyman64-ver$VersionWithTag.dll.Keyman_RestartEngine,@22") +#pragma comment(linker,"/export:Keyman_SendMasterController=keyman64-ver$VersionWithTag.dll.Keyman_SendMasterController,@23") +#pragma comment(linker,"/export:Keyman_StartExit=keyman64-ver$VersionWithTag.dll.Keyman_StartExit,@24") +#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=keyman64-ver$VersionWithTag.dll.Keyman_StopForcingKeyboard,@25") +#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=keyman64-ver$VersionWithTag.dll.Keyman_UnregisterControllerThread,@26") +#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=keyman64-ver$VersionWithTag.dll.Keyman_UnregisterControllerWindow,@27") +#pragma comment(linker,"/export:Keyman_UnregisterMasterController=keyman64-ver$VersionWithTag.dll.Keyman_UnregisterMasterController,@28") +#pragma comment(linker,"/export:Keyman_WriteDebugEvent=keyman64-ver$VersionWithTag.dll.Keyman_WriteDebugEvent,@29") +#pragma comment(linker,"/export:TIPActivateEx=keyman64-ver$VersionWithTag.dll.TIPActivateEx,@30") +#pragma comment(linker,"/export:TIPActivateKeyboard=keyman64-ver$VersionWithTag.dll.TIPActivateKeyboard,@31") +#pragma comment(linker,"/export:TIPIsKeymanRunning=keyman64-ver$VersionWithTag.dll.TIPIsKeymanRunning,@32") +#pragma comment(linker,"/export:TIPProcessKey=keyman64-ver$VersionWithTag.dll.TIPProcessKey,@33") +#pragma comment(linker,"/export:kbp_state_get_intermediate_context=keyman64-ver$VersionWithTag.dll.kbp_state_get_intermediate_context,@34") +#pragma comment(linker,"/export:km_kbp_context_append=keyman64-ver$VersionWithTag.dll.km_kbp_context_append,@35") +#pragma comment(linker,"/export:km_kbp_context_clear=keyman64-ver$VersionWithTag.dll.km_kbp_context_clear,@36") +#pragma comment(linker,"/export:km_kbp_context_get=keyman64-ver$VersionWithTag.dll.km_kbp_context_get,@37") +#pragma comment(linker,"/export:km_kbp_context_item_list_size=keyman64-ver$VersionWithTag.dll.km_kbp_context_item_list_size,@38") +#pragma comment(linker,"/export:km_kbp_context_items_dispose=keyman64-ver$VersionWithTag.dll.km_kbp_context_items_dispose,@39") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=keyman64-ver$VersionWithTag.dll.km_kbp_context_items_from_utf16,@40") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=keyman64-ver$VersionWithTag.dll.km_kbp_context_items_from_utf8,@41") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=keyman64-ver$VersionWithTag.dll.km_kbp_context_items_to_utf16,@42") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=keyman64-ver$VersionWithTag.dll.km_kbp_context_items_to_utf8,@43") +#pragma comment(linker,"/export:km_kbp_context_length=keyman64-ver$VersionWithTag.dll.km_kbp_context_length,@44") +#pragma comment(linker,"/export:km_kbp_context_set=keyman64-ver$VersionWithTag.dll.km_kbp_context_set,@45") +#pragma comment(linker,"/export:km_kbp_context_shrink=keyman64-ver$VersionWithTag.dll.km_kbp_context_shrink,@46") +#pragma comment(linker,"/export:km_kbp_event=keyman64-ver$VersionWithTag.dll.km_kbp_event,@47") +#pragma comment(linker,"/export:km_kbp_get_engine_attrs=keyman64-ver$VersionWithTag.dll.km_kbp_get_engine_attrs,@48") +#pragma comment(linker,"/export:km_kbp_keyboard_dispose=keyman64-ver$VersionWithTag.dll.km_kbp_keyboard_dispose,@49") +#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=keyman64-ver$VersionWithTag.dll.km_kbp_keyboard_get_attrs,@50") +#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=keyman64-ver$VersionWithTag.dll.km_kbp_keyboard_get_imx_list,@51") +#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=keyman64-ver$VersionWithTag.dll.km_kbp_keyboard_get_key_list,@52") +#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=keyman64-ver$VersionWithTag.dll.km_kbp_keyboard_imx_list_dispose,@53") +#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=keyman64-ver$VersionWithTag.dll.km_kbp_keyboard_key_list_dispose,@54") +#pragma comment(linker,"/export:km_kbp_keyboard_load=keyman64-ver$VersionWithTag.dll.km_kbp_keyboard_load,@55") +#pragma comment(linker,"/export:km_kbp_options_list_size=keyman64-ver$VersionWithTag.dll.km_kbp_options_list_size,@56") +#pragma comment(linker,"/export:km_kbp_process_event=keyman64-ver$VersionWithTag.dll.km_kbp_process_event,@57") +#pragma comment(linker,"/export:km_kbp_process_queued_actions=keyman64-ver$VersionWithTag.dll.km_kbp_process_queued_actions,@58") +#pragma comment(linker,"/export:km_kbp_state_action_items=keyman64-ver$VersionWithTag.dll.km_kbp_state_action_items,@59") +#pragma comment(linker,"/export:km_kbp_state_clone=keyman64-ver$VersionWithTag.dll.km_kbp_state_clone,@60") +#pragma comment(linker,"/export:km_kbp_state_context=keyman64-ver$VersionWithTag.dll.km_kbp_state_context,@61") +#pragma comment(linker,"/export:km_kbp_state_create=keyman64-ver$VersionWithTag.dll.km_kbp_state_create,@62") +#pragma comment(linker,"/export:km_kbp_state_dispose=keyman64-ver$VersionWithTag.dll.km_kbp_state_dispose,@63") +#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=keyman64-ver$VersionWithTag.dll.km_kbp_state_imx_deregister_callback,@64") +#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=keyman64-ver$VersionWithTag.dll.km_kbp_state_imx_register_callback,@65") +#pragma comment(linker,"/export:km_kbp_state_option_lookup=keyman64-ver$VersionWithTag.dll.km_kbp_state_option_lookup,@66") +#pragma comment(linker,"/export:km_kbp_state_options_to_json=keyman64-ver$VersionWithTag.dll.km_kbp_state_options_to_json,@67") +#pragma comment(linker,"/export:km_kbp_state_options_update=keyman64-ver$VersionWithTag.dll.km_kbp_state_options_update,@68") +#pragma comment(linker,"/export:km_kbp_state_queue_action_items=keyman64-ver$VersionWithTag.dll.km_kbp_state_queue_action_items,@69") +#pragma comment(linker,"/export:km_kbp_state_to_json=keyman64-ver$VersionWithTag.dll.km_kbp_state_to_json,@70") diff --git a/windows/src/engine/keyman64/keyman-debug-etw.h b/windows/src/engine/keyman64/keyman-debug-etw.h new file mode 100644 index 00000000000..e4c8fd159f7 --- /dev/null +++ b/windows/src/engine/keyman64/keyman-debug-etw.h @@ -0,0 +1,146 @@ +//**********************************************************************` +//* This is an include file generated by Message Compiler. *` +//* *` +//* Copyright (c) Microsoft Corporation. All Rights Reserved. *` +//**********************************************************************` +#pragma once + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// Provider "Keyman-Debug-ETWProvider" event count 1 +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +// Provider GUID = da621615-e08b-4283-918e-d2502d3757ae +EXTERN_C __declspec(selectany) const GUID ProviderGuid = {0xda621615, 0xe08b, 0x4283, {0x91, 0x8e, 0xd2, 0x50, 0x2d, 0x37, 0x57, 0xae}}; + +#ifndef ProviderGuid_Traits +#define ProviderGuid_Traits NULL +#endif // ProviderGuid_Traits + +// +// Channel +// +#define ProviderGuid_CHANNEL_C1 0x10 + +// +// Event Descriptors +// +EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR DebugEvent = {0x1, 0x0, 0x10, 0x4, 0x0, 0x0, 0x8000000000000000}; +#define DebugEvent_value 0x1 + +#define MSG_Provider_Name 0x90000001L +#define MSG_EventMessage 0xB0000001L +#define MSG_Map_x86 0xD0000001L +#define MSG_Map_x64 0xD0000002L +#define MSG_Map_UNMODIFIED 0xD0000003L +#define MSG_Map_LCTRL 0xD0000004L +#define MSG_Map_RCTRL 0xD0000005L +#define MSG_Map_LALT 0xD0000006L +#define MSG_Map_LCTRL_LALT 0xD0000007L +#define MSG_Map_RALT 0xD0000008L +#define MSG_Map_LCTRL_RALT 0xD0000009L +#define MSG_Map_RCTRL_RALT 0xD000000AL +#define MSG_Map_SHIFT 0xD000000BL +#define MSG_Map_SHIFT_LCTRL 0xD000000CL +#define MSG_Map_SHIFT_RCTRL 0xD000000DL +#define MSG_Map_SHIFT_LALT 0xD000000EL +#define MSG_Map_SHIFT_LCTRL_LALT 0xD000000FL +#define MSG_Map_SHIFT_RALT 0xD0000010L +#define MSG_Map_SHIFT_RCTRL_RALT 0xD0000011L +#define MSG_Map_CAPS 0xD0000012L +#define MSG_Map_CAPS_LCTRL 0xD0000013L +#define MSG_Map_CAPS_RCTRL 0xD0000014L +#define MSG_Map_CAPS_LALT 0xD0000015L +#define MSG_Map_CAPS_LCTRL_LALT 0xD0000016L +#define MSG_Map_CAPS_RALT 0xD0000017L +#define MSG_Map_CAPS_RCTRL_RALT 0xD0000018L +#define MSG_Map_CAPS_SHIFT 0xD0000019L +#define MSG_Map_CAPS_SHIFT_LCTRL 0xD000001AL +#define MSG_Map_CAPS_SHIFT_RCTRL 0xD000001BL +#define MSG_Map_CAPS_SHIFT_LALT 0xD000001CL +#define MSG_Map_CAPS_SHIFT_LCTRL_LALT 0xD000001DL +#define MSG_Map_CAPS_SHIFT_RALT 0xD000001EL +#define MSG_Map_CAPS_SHIFT_RCTRL_RALT 0xD000001FL +#define MSG_Map_NUM 0xD0000020L +#define MSG_Map_NUM_LCTRL 0xD0000021L +#define MSG_Map_NUM_RCTRL 0xD0000022L +#define MSG_Map_NUM_LALT 0xD0000023L +#define MSG_Map_NUM_LCTRL_LALT 0xD0000024L +#define MSG_Map_NUM_RALT 0xD0000025L +#define MSG_Map_NUM_RCTRL_RALT 0xD0000026L +#define MSG_Map_NUM_SHIFT 0xD0000027L +#define MSG_Map_NUM_SHIFT_LCTRL 0xD0000028L +#define MSG_Map_NUM_SHIFT_RCTRL 0xD0000029L +#define MSG_Map_NUM_SHIFT_LALT 0xD000002AL +#define MSG_Map_NUM_SHIFT_LCTRL_LALT 0xD000002BL +#define MSG_Map_NUM_SHIFT_RALT 0xD000002CL +#define MSG_Map_NUM_SHIFT_RCTRL_RALT 0xD000002DL +#define MSG_Map_NUM_CAPS 0xD000002EL +#define MSG_Map_NUM_CAPS_LCTRL 0xD000002FL +#define MSG_Map_NUM_CAPS_RCTRL 0xD0000030L +#define MSG_Map_NUM_CAPS_LALT 0xD0000031L +#define MSG_Map_NUM_CAPS_LCTRL_LALT 0xD0000032L +#define MSG_Map_NUM_CAPS_RALT 0xD0000033L +#define MSG_Map_NUM_CAPS_RCTRL_RALT 0xD0000034L +#define MSG_Map_NUM_CAPS_SHIFT 0xD0000035L +#define MSG_Map_NUM_CAPS_SHIFT_LCTRL 0xD0000036L +#define MSG_Map_NUM_CAPS_SHIFT_RCTRL 0xD0000037L +#define MSG_Map_NUM_CAPS_SHIFT_LALT 0xD0000038L +#define MSG_Map_NUM_CAPS_SHIFT_LCTRL_LALT 0xD0000039L +#define MSG_Map_NUM_CAPS_SHIFT_RALT 0xD000003AL +#define MSG_Map_NUM_CAPS_SHIFT_RCTRL_RALT 0xD000003BL +#define MSG_Map_LSHIFT 0xD000003CL +#define MSG_Map_LSHIFT_LCTRL 0xD000003DL +#define MSG_Map_LSHIFT_RCTRL 0xD000003EL +#define MSG_Map_LSHIFT_LALT 0xD000003FL +#define MSG_Map_LSHIFT_LCTRL_LALT 0xD0000040L +#define MSG_Map_LSHIFT_RALT 0xD0000041L +#define MSG_Map_LSHIFT_RCTRL_RALT 0xD0000042L +#define MSG_Map_CAPS_LSHIFT 0xD0000043L +#define MSG_Map_CAPS_LSHIFT_LCTRL 0xD0000044L +#define MSG_Map_CAPS_LSHIFT_RCTRL 0xD0000045L +#define MSG_Map_CAPS_LSHIFT_LALT 0xD0000046L +#define MSG_Map_CAPS_LSHIFT_LCTRL_LALT 0xD0000047L +#define MSG_Map_CAPS_LSHIFT_RALT 0xD0000048L +#define MSG_Map_CAPS_LSHIFT_RCTRL_RALT 0xD0000049L +#define MSG_Map_NUM_LSHIFT 0xD000004AL +#define MSG_Map_NUM_LSHIFT_LCTRL 0xD000004BL +#define MSG_Map_NUM_LSHIFT_RCTRL 0xD000004CL +#define MSG_Map_NUM_LSHIFT_LALT 0xD000004DL +#define MSG_Map_NUM_LSHIFT_LCTRL_LALT 0xD000004EL +#define MSG_Map_NUM_LSHIFT_RALT 0xD000004FL +#define MSG_Map_NUM_LSHIFT_RCTRL_RALT 0xD0000050L +#define MSG_Map_NUM_CAPS_LSHIFT 0xD0000051L +#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL 0xD0000052L +#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL 0xD0000053L +#define MSG_Map_NUM_CAPS_LSHIFT_LALT 0xD0000054L +#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL_LALT 0xD0000055L +#define MSG_Map_NUM_CAPS_LSHIFT_RALT 0xD0000056L +#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL_RALT 0xD0000057L +#define MSG_Map_RSHIFT 0xD0000058L +#define MSG_Map_RSHIFT_LCTRL 0xD0000059L +#define MSG_Map_RSHIFT_RCTRL 0xD000005AL +#define MSG_Map_RSHIFT_LALT 0xD000005BL +#define MSG_Map_RSHIFT_LCTRL_LALT 0xD000005CL +#define MSG_Map_RSHIFT_RALT 0xD000005DL +#define MSG_Map_RSHIFT_RCTRL_RALT 0xD000005EL +#define MSG_Map_CAPS_RSHIFT 0xD000005FL +#define MSG_Map_CAPS_RSHIFT_LCTRL 0xD0000060L +#define MSG_Map_CAPS_RSHIFT_RCTRL 0xD0000061L +#define MSG_Map_CAPS_RSHIFT_LALT 0xD0000062L +#define MSG_Map_CAPS_RSHIFT_LCTRL_LALT 0xD0000063L +#define MSG_Map_CAPS_RSHIFT_RALT 0xD0000064L +#define MSG_Map_CAPS_RSHIFT_RCTRL_RALT 0xD0000065L +#define MSG_Map_NUM_RSHIFT 0xD0000066L +#define MSG_Map_NUM_RSHIFT_LCTRL 0xD0000067L +#define MSG_Map_NUM_RSHIFT_RCTRL 0xD0000068L +#define MSG_Map_NUM_RSHIFT_LALT 0xD0000069L +#define MSG_Map_NUM_RSHIFT_LCTRL_LALT 0xD000006AL +#define MSG_Map_NUM_RSHIFT_RALT 0xD000006BL +#define MSG_Map_NUM_RSHIFT_RCTRL_RALT 0xD000006CL +#define MSG_Map_NUM_CAPS_RSHIFT 0xD000006DL +#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL 0xD000006EL +#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL 0xD000006FL +#define MSG_Map_NUM_CAPS_RSHIFT_LALT 0xD0000070L +#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL_LALT 0xD0000071L +#define MSG_Map_NUM_CAPS_RSHIFT_RALT 0xD0000072L +#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL_RALT 0xD0000073L diff --git a/windows/src/engine/keyman64/keyman-debug-etw.rc b/windows/src/engine/keyman64/keyman-debug-etw.rc new file mode 100644 index 00000000000..7beaac78043 --- /dev/null +++ b/windows/src/engine/keyman64/keyman-debug-etw.rc @@ -0,0 +1,3 @@ +LANGUAGE 0x9,0x1 +1 11 "MSG00001.bin" +1 WEVT_TEMPLATE "keyman-debug-etwTEMP.BIN" diff --git a/windows/src/engine/keyman64/keyman-debug-etw.res b/windows/src/engine/keyman64/keyman-debug-etw.res new file mode 100644 index 0000000000000000000000000000000000000000..e27bbd5c346570bcd14ce449e2d7070491c051c4 GIT binary patch literal 7916 zcmbW6O>i7X6@cH4SN2M_$nIu0ESmrdk%NQdM0On8F$OG4Yh=7qHqs*JAO9pIN`&Mn zaR^l$DBzF+igGGNl@B>`h4PgRB@ro2ac%{-<#f1|IEy4l}WX}p6=JL z-+TSKXVVrDnWAiOn?lup?oay@@O1L`O!D`cjOE%Xk)i|KP4vz?}zB08PprpyE2FE%h1Sc+j34@S7wpv52S>7 z-LXgM^ZSh+zbzcI9E{O^JNHrQ{&>~7A`7h3#T`p@jBQgpe1F1ztKaw=_J@8vUZ_9o zbEqq{Kh$My$@g^*|9g06ER`hYXbH9y6HiVfcGTffg=diYi(Uau&NqR21mZj^iHstkZqi5{R zm$eq8dfjuuoi~hvyT?PhqWmh>?dMssZfkECF;}-er(Da7hpz5?xoiYS8DlNm%RGLr zoOjlAciX}h@xQx8IoTdMmY z>@Ui{tS&zqSzXqi&~w#gW9(XBEced{w?7++VY1eOQS|!xvsB!s&ldv7+kd};9}W5>v2?QK4A{qMj2*Do%7^xMDoj-9^p$7$NG zbXNOaWaz&=&ifeUr!FB>W{8XA%61UZC;(4XWN2z2%saH}LsP7>G$*peAyGpdVvPxLh%1m1Yn&*thJg~RU$`9C;2~It#4B#VFTf_e z54Iq(aT_8Vt6|8-CCC+M96`p!WyqL#3_buW@QZK)q9d-tFTol_S6qh=LXE>iunE5m zTktEe4ZjN2xhYtJ55ow44VK{}a12hv3Oo!a;G?h#zYc5g2&}`$U;};wHsMj&f{(*C zJO(wHo`5CzB#ht;EW_h)44!}$_!OLg-0#L!_%y7+Q?L$C!v8f?JpunBL#7JLo1;p?zkj<`Qp z{~~V1)xSvIgbla`oA52zf^Wk%T!+=Mh+B2_FXFyk{foFqSN|fp37ha8*n(TI4fWoh z+$3(B*s#XDYssDa3itMUcaJ@q`^0ZOc~9^4X_9{bLiZDLprrNAV(&I}_F+R6x<$j+jHkfEWQBQazn%&+et>jmm zWvBHKTJ~T5U73}=hL>vBSgDe+E8+mCl+i$<1{xmD({KO{`mYT)(D*L@MU&X4Xy2A=HPhBttIZ*E*RJO^%x^`CMAMXxT`#Oc+~6&eg?1 zmR{prP%92%1&2OQh5dFfsfk?WBdHHtZRh!5(57)PTQZIHY3IS zIc*g_)cUydP7T^z`_AOZ^>gHI(pGdH>384X&E_mJJJi(8t`nI;cG#K6_jJVFVeH9f zylKy7v1!j{X7U>%H`_2pe_wcgX%1BxZ;nr> zdAgm|?s=-JQ?riJyNBK*)PJ1h^jXfdynp-E^M!B3>c cAGOzHb@KW%-tYcz(D3g;P9#12`EXGAKlZ}EQ2+n{ literal 0 HcmV?d00001 diff --git a/windows/src/engine/keyman64/keyman64.rc b/windows/src/engine/keyman64/keyman64.rc new file mode 100644 index 00000000000..176ac081470 --- /dev/null +++ b/windows/src/engine/keyman64/keyman64.rc @@ -0,0 +1,3 @@ + +#include "version.rc" + diff --git a/windows/src/engine/keyman64/keyman64.sln b/windows/src/engine/keyman64/keyman64.sln new file mode 100644 index 00000000000..219744cdeab --- /dev/null +++ b/windows/src/engine/keyman64/keyman64.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64", "keyman64.vcxproj", "{D1115FB2-230D-4FD8-90B9-982E49953D18}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D1115FB2-230D-4FD8-90B9-982E49953D18}.Debug|x64.ActiveCfg = Debug|x64 + {D1115FB2-230D-4FD8-90B9-982E49953D18}.Debug|x64.Build.0 = Debug|x64 + {D1115FB2-230D-4FD8-90B9-982E49953D18}.Release|x64.ActiveCfg = Release|x64 + {D1115FB2-230D-4FD8-90B9-982E49953D18}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64/keyman64.vcxproj new file mode 100644 index 00000000000..5d0966a077a --- /dev/null +++ b/windows/src/engine/keyman64/keyman64.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {19C64F3E-4D3C-4BE5-BA15-B4385FA8F369} + Keyman32-ver + 10.0 + keyman64 + + + + DynamicLibrary + false + v142 + + + DynamicLibrary + false + v142 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ + false + $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ + true + AllRules.ruleset + + + AllRules.ruleset + + + + + $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) + + + $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + ./Keyman32-ver.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\keyman32-ver;..\..\global\inc;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + true + + + MultiThreaded + true + Use + pch.h + All + Level4 + true + true + ProgramDatabase + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalOptions) + libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) + true + C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)lib;%(AdditionalLibraryDirectories) + false + + + true + true + true + Windows + 0x1C800000 + ..\..\..\lib\Keyman64-ver.lib + MachineX64 + true + true + + + true + ./Keyman32-ver.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + ./Keyman32-ver.tlb + + + + + Disabled + ..\keyman32-ver;..\..\global\inc;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + false + true + + + MultiThreadedDebug + Use + pch.h + All + true + Level4 + true + true + ProgramDatabase + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalOptions) + %(AdditionalDependencies) + true + C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)lib;%(AdditionalLibraryDirectories) + false + + + + + true + true + Windows + 0x1C800000 + ..\..\..\lib\Keyman64-ver.lib + MachineX64 + true + true + + + true + ./Keyman32-ver.bsc + + + + + + + + + + + + + + \ No newline at end of file diff --git a/windows/src/engine/keyman64/keyman64.vcxproj.filters b/windows/src/engine/keyman64/keyman64.vcxproj.filters new file mode 100644 index 00000000000..ae5632ff49a --- /dev/null +++ b/windows/src/engine/keyman64/keyman64.vcxproj.filters @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/windows/src/engine/keyman64/keyman64_proxy.cpp b/windows/src/engine/keyman64/keyman64_proxy.cpp new file mode 100644 index 00000000000..609ff25cd50 --- /dev/null +++ b/windows/src/engine/keyman64/keyman64_proxy.cpp @@ -0,0 +1,20 @@ +#include "pch.h" +#include "exports.h" + + +BOOL __stdcall DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID reserved) { + UNREFERENCED_PARAMETER(reserved); + UNREFERENCED_PARAMETER(hinstDll); + + switch (fdwReason) { + case DLL_PROCESS_ATTACH: { + // OutputThreadDebugString("DLL_PROCESS_ATTACH"); + break; + } + case DLL_PROCESS_DETACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + break; + } + return TRUE; +} diff --git a/windows/src/engine/keyman64/pch.cpp b/windows/src/engine/keyman64/pch.cpp new file mode 100644 index 00000000000..3a3d12b5a71 --- /dev/null +++ b/windows/src/engine/keyman64/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: source file corresponding to pre-compiled header; necessary for compilation to succeed + +#include "pch.h" + +// In general, ignore this file, but keep it around if you are using pre-compiled headers. diff --git a/windows/src/engine/keyman64/pch.h b/windows/src/engine/keyman64/pch.h new file mode 100644 index 00000000000..2f748e7d287 --- /dev/null +++ b/windows/src/engine/keyman64/pch.h @@ -0,0 +1,8 @@ +#ifndef PCH_H +#define PCH_H +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files +#include + + +#endif //PCH_H diff --git a/windows/src/engine/keyman64/premake.in b/windows/src/engine/keyman64/premake.in new file mode 100644 index 00000000000..bdf841d192a --- /dev/null +++ b/windows/src/engine/keyman64/premake.in @@ -0,0 +1,26 @@ +# Copy files to correct names in \release; this file is munged by mkver to download.mak +# + +!include ..\..\defines.mak + +default: + echo Please don't call this file directly -- used by Makefile + +clean: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=$VersionWithTag" + +signcode: + $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver$VersionWithTag.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver$VersionWithTag.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver$VersionWithTag.pdb /t keyman-engine-windows + +install: + $(COPY) $(PROGRAM)\engine\keyman64-ver$VersionWithTag.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver$VersionWithTag.dll" + + +build: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=$VersionWithTag" + $(COPY) $(X64_TARGET_PATH)\keyman64-ver$VersionWithTag.dll $(PROGRAM)\engine + $(COPY) $(X64_TARGET_PATH)\keyman64-ver$VersionWithTag.pdb $(DEBUGPATH)\engine diff --git a/windows/src/engine/keyman64/premake.mak b/windows/src/engine/keyman64/premake.mak new file mode 100644 index 00000000000..df34a25e213 --- /dev/null +++ b/windows/src/engine/keyman64/premake.mak @@ -0,0 +1,26 @@ +# Copy files to correct names in \release; this file is munged by mkver to download.mak +# + +!include ..\..\defines.mak + +default: + echo Please don't call this file directly -- used by Makefile + +clean: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" + +signcode: + $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll + +wrap-symbols: + $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll /t keyman-engine-windows + $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver17.0.48-alpha-local.pdb /t keyman-engine-windows + +install: + $(COPY) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver17.0.48-alpha-local.dll" + + +build: + $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" + $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.dll $(PROGRAM)\engine + $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.pdb $(DEBUGPATH)\engine diff --git a/windows/src/engine/keyman64/version.rc b/windows/src/engine/keyman64/version.rc new file mode 100644 index 00000000000..83b3e3f284f --- /dev/null +++ b/windows/src/engine/keyman64/version.rc @@ -0,0 +1,32 @@ +#include "../../../../common/windows/cpp/include/keymanversion.h" + +1 VERSIONINFO + FILEVERSION KV_FILEVERSION + PRODUCTVERSION KV_PRODUCTVERSION + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0C0904E4" + BEGIN + VALUE "CompanyName", KV_COMPANY_NAME + VALUE "FileDescription", "Keyman Engine Processor x64\0" + VALUE "FileVersion", KV_VERSION_STRING + VALUE "InternalName", "KEYMAN64-VER\0" + VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT + VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS + VALUE "OriginalFilename", "KEYMAN64-VER.DLL\0" + VALUE "ProductName", "Keyman Engine\0" + VALUE "ProductVersion", KV_VERSION_STRING + VALUE "Comments", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0xc09, 1252 + END + END From 72776f7ccf0eb19b72c6ce841e3c537aa3e040c9 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 13 Apr 2023 13:45:43 +1000 Subject: [PATCH 10/40] feat(windows): proxy dll and load free dll --- windows/src/engine/keyman32-ver/calldll.cpp | 21 + windows/src/engine/keyman32-ver/calldll.h | 6 + windows/src/engine/keyman32/Makefile | 1 + windows/src/engine/keyman32/exports.h | 146 +++---- windows/src/engine/keyman32/exports.in | 78 ++++ .../src/engine/keyman32/keyman-debug-etw.man | 342 +++++++++++++++ .../src/engine/keyman32/keyman-engine.vcxproj | 406 ++++++++++++++++++ .../keyman32/keyman-engine.vcxproj.filters | 253 +++++++++++ windows/src/engine/keyman32/keyman32.vcxproj | 39 +- .../engine/keyman32/keyman32.vcxproj.filters | 25 +- .../src/engine/keyman32/keyman32_proxy.cpp | 21 + windows/src/engine/keyman32/pch.cpp | 1 - windows/src/engine/keyman32/pch.h | 4 +- windows/src/engine/keyman32/version.rc | 4 +- windows/src/engine/keyman64/keyman64.sln | 4 + windows/src/engine/keyman64/keyman64.vcxproj | 27 +- .../engine/keyman64/keyman64.vcxproj.filters | 24 +- 17 files changed, 1285 insertions(+), 117 deletions(-) create mode 100644 windows/src/engine/keyman32/exports.in create mode 100644 windows/src/engine/keyman32/keyman-debug-etw.man create mode 100644 windows/src/engine/keyman32/keyman-engine.vcxproj create mode 100644 windows/src/engine/keyman32/keyman-engine.vcxproj.filters create mode 100644 windows/src/engine/keyman32/keyman32_proxy.cpp diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 142db01747c..f6defa320cc 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -304,6 +304,16 @@ BOOL UnloadDLLs(LPINTKEYBOARDINFO lpkbi) if (Globals::get_CoreIntegration() && lpkbi->lpCoreKeyboardState) { km_kbp_state_imx_deregister_callback(lpkbi->lpCoreKeyboardState); + // Need to UnLoad the keyman32 or keyman64 dll proxy keyboard as the third-party dlls + // will use this rather than the versioned dll. + #ifdef _WIN64 + HMODULE hModule = GetModuleHandle("keyman64.dll"); + #else + HMODULE hModule = GetModuleHandle("keyman32.dll"); + #endif + if (hModule){ + FreeLibrary(hModule); + } } return TRUE; } @@ -689,6 +699,17 @@ LoadDLLsCore(LPINTKEYBOARDINFO lpkbi) { if ((!lpkbi->lpCoreKeyboard) || (!lpkbi->lpCoreKeyboard)){ return FALSE; } + // Need to Load the keyman32 or keyman64 dll proxy keyboard as the third-party dlls + // will use this rather than the versioned dll. + #ifdef _WIN64 + HMODULE hModule = LoadLibrary("keyman64.dll"); + #else + HMODULE hModule = LoadLibrary("keyman32.dll"); + #endif + if (!hModule) { + SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: keyman32/64.dll not loaded"); + return FALSE; + } km_kbp_keyboard_imx *imx_list = lpkbi->lpIMXList; BOOL result = false; diff --git a/windows/src/engine/keyman32-ver/calldll.h b/windows/src/engine/keyman32-ver/calldll.h index 9eb1a7ade41..669a43c0fb6 100644 --- a/windows/src/engine/keyman32-ver/calldll.h +++ b/windows/src/engine/keyman32-ver/calldll.h @@ -24,6 +24,12 @@ BOOL UnloadDLLs(LPINTKEYBOARDINFO lpkbi); BOOL DeactivateDLLs(LPINTKEYBOARDINFO lpkbi); BOOL ActivateDLLs(LPINTKEYBOARDINFO lpkbi); +/* Before keyman32/64 started using versioned dll names the IMX keyboard framework was written +Third party developers will have used the name "keyman32/64dll" so we need to honor that for these +keyboards. We do this by having a proxy dll that forwards to version keyman dll opened for this process +We only want and need to do this if there is imx keyboard */ + + // TODO: 5444 This will become the only LoadDLLs function /** * Load the all the dlls used by the current keyboard diff --git a/windows/src/engine/keyman32/Makefile b/windows/src/engine/keyman32/Makefile index 4c2370ae8a9..a53db9aa84f 100644 --- a/windows/src/engine/keyman32/Makefile +++ b/windows/src/engine/keyman32/Makefile @@ -5,6 +5,7 @@ !include ..\..\Defines.mak build: version.res dirs + $(MKVER_U) exports.in exports.h $(MSBUILD) keyman32.vcxproj $(MSBUILD_BUILD) $(COPY) $(WIN32_TARGET_PATH)\keyman32.dll $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\keyman32.pdb $(DEBUGPATH)\engine diff --git a/windows/src/engine/keyman32/exports.h b/windows/src/engine/keyman32/exports.h index 5f328f0f3ad..001cc0d4507 100644 --- a/windows/src/engine/keyman32/exports.h +++ b/windows/src/engine/keyman32/exports.h @@ -3,76 +3,76 @@ // Header file to export all the functions to a versioned keyman32{version_tag}.dll // -#pragma comment(linker,"/export:GetActiveKeymanID=KEYMAN32_orig.GetActiveKeymanID,@4") -#pragma comment(linker,"/export:GetKeyboardPreservedKeys=KEYMAN32_orig.GetKeyboardPreservedKeys,@5") -#pragma comment(linker,"/export:KMDisplayIM=KEYMAN32_orig.KMDisplayIM,@6") -#pragma comment(linker,"/export:KMGetActiveKeyboard=KEYMAN32_orig.KMGetActiveKeyboard,@7") -#pragma comment(linker,"/export:KMGetContext=KEYMAN32_orig.KMGetContext,@8") -#pragma comment(linker,"/export:KMGetKeyboardPath=KEYMAN32_orig.KMGetKeyboardPath,@9") -#pragma comment(linker,"/export:KMHideIM=KEYMAN32_orig.KMHideIM,@10") -#pragma comment(linker,"/export:KMQueueAction=KEYMAN32_orig.KMQueueAction,@11") -#pragma comment(linker,"/export:KMSetOutput=KEYMAN32_orig.KMSetOutput,@12") -#pragma comment(linker,"/export:Keyman_Diagnostic=KEYMAN32_orig.Keyman_Diagnostic,@1") -#pragma comment(linker,"/export:Keyman_Exit=KEYMAN32_orig.Keyman_Exit,@13") -#pragma comment(linker,"/export:Keyman_ForceKeyboard=KEYMAN32_orig.Keyman_ForceKeyboard,@14") -#pragma comment(linker,"/export:Keyman_GetInitialised=KEYMAN32_orig.Keyman_GetInitialised,@15") -#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=KEYMAN32_orig.Keyman_GetLastActiveWindow,@16") -#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=KEYMAN32_orig.Keyman_GetLastFocusWindow,@17") -#pragma comment(linker,"/export:Keyman_Initialise=KEYMAN32_orig.Keyman_Initialise,@18") -#pragma comment(linker,"/export:Keyman_PostControllers=KEYMAN32_orig.Keyman_PostControllers,@19") -#pragma comment(linker,"/export:Keyman_PostMasterController=KEYMAN32_orig.Keyman_PostMasterController,@20") -#pragma comment(linker,"/export:Keyman_RegisterControllerThread=KEYMAN32_orig.Keyman_RegisterControllerThread,@21") -#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=KEYMAN32_orig.Keyman_RegisterControllerWindow,@22") -#pragma comment(linker,"/export:Keyman_RegisterMasterController=KEYMAN32_orig.Keyman_RegisterMasterController,@23") -#pragma comment(linker,"/export:Keyman_ResetInitialisation=KEYMAN32_orig.Keyman_ResetInitialisation,@24") -#pragma comment(linker,"/export:Keyman_RestartEngine=KEYMAN32_orig.Keyman_RestartEngine,@25") -#pragma comment(linker,"/export:Keyman_SendMasterController=KEYMAN32_orig.Keyman_SendMasterController,@26") -#pragma comment(linker,"/export:Keyman_StartExit=KEYMAN32_orig.Keyman_StartExit,@27") -#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=KEYMAN32_orig.Keyman_StopForcingKeyboard,@28") -#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=KEYMAN32_orig.Keyman_UnregisterControllerThread,@29") -#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=KEYMAN32_orig.Keyman_UnregisterControllerWindow,@30") -#pragma comment(linker,"/export:Keyman_UnregisterMasterController=KEYMAN32_orig.Keyman_UnregisterMasterController,@31") -#pragma comment(linker,"/export:Keyman_UpdateTouchPanelVisibility=KEYMAN32_orig.Keyman_UpdateTouchPanelVisibility,@2") -#pragma comment(linker,"/export:Keyman_WriteDebugEvent=KEYMAN32_orig.Keyman_WriteDebugEvent,@32") -#pragma comment(linker,"/export:SetCustomPostKeyCallback=KEYMAN32_orig.SetCustomPostKeyCallback,@3") -#pragma comment(linker,"/export:TIPActivateEx=KEYMAN32_orig.TIPActivateEx,@33") -#pragma comment(linker,"/export:TIPActivateKeyboard=KEYMAN32_orig.TIPActivateKeyboard,@34") -#pragma comment(linker,"/export:TIPIsKeymanRunning=KEYMAN32_orig.TIPIsKeymanRunning,@35") -#pragma comment(linker,"/export:TIPProcessKey=KEYMAN32_orig.TIPProcessKey,@36") -#pragma comment(linker,"/export:kbp_state_get_intermediate_context=KEYMAN32_orig.kbp_state_get_intermediate_context,@37") -#pragma comment(linker,"/export:km_kbp_context_append=KEYMAN32_orig.km_kbp_context_append,@38") -#pragma comment(linker,"/export:km_kbp_context_clear=KEYMAN32_orig.km_kbp_context_clear,@39") -#pragma comment(linker,"/export:km_kbp_context_get=KEYMAN32_orig.km_kbp_context_get,@40") -#pragma comment(linker,"/export:km_kbp_context_item_list_size=KEYMAN32_orig.km_kbp_context_item_list_size,@41") -#pragma comment(linker,"/export:km_kbp_context_items_dispose=KEYMAN32_orig.km_kbp_context_items_dispose,@42") -#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=KEYMAN32_orig.km_kbp_context_items_from_utf16,@43") -#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=KEYMAN32_orig.km_kbp_context_items_from_utf8,@44") -#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=KEYMAN32_orig.km_kbp_context_items_to_utf16,@45") -#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=KEYMAN32_orig.km_kbp_context_items_to_utf8,@46") -#pragma comment(linker,"/export:km_kbp_context_length=KEYMAN32_orig.km_kbp_context_length,@47") -#pragma comment(linker,"/export:km_kbp_context_set=KEYMAN32_orig.km_kbp_context_set,@48") -#pragma comment(linker,"/export:km_kbp_context_shrink=KEYMAN32_orig.km_kbp_context_shrink,@49") -#pragma comment(linker,"/export:km_kbp_event=KEYMAN32_orig.km_kbp_event,@50") -#pragma comment(linker,"/export:km_kbp_get_engine_attrs=KEYMAN32_orig.km_kbp_get_engine_attrs,@51") -#pragma comment(linker,"/export:km_kbp_keyboard_dispose=KEYMAN32_orig.km_kbp_keyboard_dispose,@52") -#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=KEYMAN32_orig.km_kbp_keyboard_get_attrs,@53") -#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=KEYMAN32_orig.km_kbp_keyboard_get_imx_list,@54") -#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=KEYMAN32_orig.km_kbp_keyboard_get_key_list,@55") -#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=KEYMAN32_orig.km_kbp_keyboard_imx_list_dispose,@56") -#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=KEYMAN32_orig.km_kbp_keyboard_key_list_dispose,@57") -#pragma comment(linker,"/export:km_kbp_keyboard_load=KEYMAN32_orig.km_kbp_keyboard_load,@58") -#pragma comment(linker,"/export:km_kbp_options_list_size=KEYMAN32_orig.km_kbp_options_list_size,@59") -#pragma comment(linker,"/export:km_kbp_process_event=KEYMAN32_orig.km_kbp_process_event,@60") -#pragma comment(linker,"/export:km_kbp_process_queued_actions=KEYMAN32_orig.km_kbp_process_queued_actions,@61") -#pragma comment(linker,"/export:km_kbp_state_action_items=KEYMAN32_orig.km_kbp_state_action_items,@62") -#pragma comment(linker,"/export:km_kbp_state_clone=KEYMAN32_orig.km_kbp_state_clone,@63") -#pragma comment(linker,"/export:km_kbp_state_context=KEYMAN32_orig.km_kbp_state_context,@64") -#pragma comment(linker,"/export:km_kbp_state_create=KEYMAN32_orig.km_kbp_state_create,@65") -#pragma comment(linker,"/export:km_kbp_state_dispose=KEYMAN32_orig.km_kbp_state_dispose,@66") -#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=KEYMAN32_orig.km_kbp_state_imx_deregister_callback,@67") -#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=KEYMAN32_orig.km_kbp_state_imx_register_callback,@68") -#pragma comment(linker,"/export:km_kbp_state_option_lookup=KEYMAN32_orig.km_kbp_state_option_lookup,@69") -#pragma comment(linker,"/export:km_kbp_state_options_to_json=KEYMAN32_orig.km_kbp_state_options_to_json,@70") -#pragma comment(linker,"/export:km_kbp_state_options_update=KEYMAN32_orig.km_kbp_state_options_update,@71") -#pragma comment(linker,"/export:km_kbp_state_queue_action_items=KEYMAN32_orig.km_kbp_state_queue_action_items,@72") -#pragma comment(linker,"/export:km_kbp_state_to_json=KEYMAN32_orig.km_kbp_state_to_json,@73") +#pragma comment(linker,"/export:GetActiveKeymanID=keyman32-ver17.0.48-alpha-local.dll.GetActiveKeymanID,@4") +#pragma comment(linker,"/export:GetKeyboardPreservedKeys=keyman32-ver17.0.48-alpha-local.dll.GetKeyboardPreservedKeys,@5") +#pragma comment(linker,"/export:KMDisplayIM=keyman32-ver17.0.48-alpha-local.dll.KMDisplayIM,@6") +#pragma comment(linker,"/export:KMGetActiveKeyboard=keyman32-ver17.0.48-alpha-local.dll.KMGetActiveKeyboard,@7") +#pragma comment(linker,"/export:KMGetContext=keyman32-ver17.0.48-alpha-local.dll.KMGetContext,@8") +#pragma comment(linker,"/export:KMGetKeyboardPath=keyman32-ver17.0.48-alpha-local.dll.KMGetKeyboardPath,@9") +#pragma comment(linker,"/export:KMHideIM=keyman32-ver17.0.48-alpha-local.dll.KMHideIM,@10") +#pragma comment(linker,"/export:KMQueueAction=keyman32-ver17.0.48-alpha-local.dll.KMQueueAction,@11") +#pragma comment(linker,"/export:KMSetOutput=keyman32-ver17.0.48-alpha-local.dll.KMSetOutput,@12") +#pragma comment(linker,"/export:Keyman_Diagnostic=keyman32-ver17.0.48-alpha-local.dll.Keyman_Diagnostic,@1") +#pragma comment(linker,"/export:Keyman_Exit=keyman32-ver17.0.48-alpha-local.dll.Keyman_Exit,@13") +#pragma comment(linker,"/export:Keyman_ForceKeyboard=keyman32-ver17.0.48-alpha-local.dll.Keyman_ForceKeyboard,@14") +#pragma comment(linker,"/export:Keyman_GetInitialised=keyman32-ver17.0.48-alpha-local.dll.Keyman_GetInitialised,@15") +#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=keyman32-ver17.0.48-alpha-local.dll.Keyman_GetLastActiveWindow,@16") +#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=keyman32-ver17.0.48-alpha-local.dll.Keyman_GetLastFocusWindow,@17") +#pragma comment(linker,"/export:Keyman_Initialise=keyman32-ver17.0.48-alpha-local.dll.Keyman_Initialise,@18") +#pragma comment(linker,"/export:Keyman_PostControllers=keyman32-ver17.0.48-alpha-local.dll.Keyman_PostControllers,@19") +#pragma comment(linker,"/export:Keyman_PostMasterController=keyman32-ver17.0.48-alpha-local.dll.Keyman_PostMasterController,@20") +#pragma comment(linker,"/export:Keyman_RegisterControllerThread=keyman32-ver17.0.48-alpha-local.dll.Keyman_RegisterControllerThread,@21") +#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=keyman32-ver17.0.48-alpha-local.dll.Keyman_RegisterControllerWindow,@22") +#pragma comment(linker,"/export:Keyman_RegisterMasterController=keyman32-ver17.0.48-alpha-local.dll.Keyman_RegisterMasterController,@23") +#pragma comment(linker,"/export:Keyman_ResetInitialisation=keyman32-ver17.0.48-alpha-local.dll.Keyman_ResetInitialisation,@24") +#pragma comment(linker,"/export:Keyman_RestartEngine=keyman32-ver17.0.48-alpha-local.dll.Keyman_RestartEngine,@25") +#pragma comment(linker,"/export:Keyman_SendMasterController=keyman32-ver17.0.48-alpha-local.dll.Keyman_SendMasterController,@26") +#pragma comment(linker,"/export:Keyman_StartExit=keyman32-ver17.0.48-alpha-local.dll.Keyman_StartExit,@27") +#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=keyman32-ver17.0.48-alpha-local.dll.Keyman_StopForcingKeyboard,@28") +#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=keyman32-ver17.0.48-alpha-local.dll.Keyman_UnregisterControllerThread,@29") +#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=keyman32-ver17.0.48-alpha-local.dll.Keyman_UnregisterControllerWindow,@30") +#pragma comment(linker,"/export:Keyman_UnregisterMasterController=keyman32-ver17.0.48-alpha-local.dll.Keyman_UnregisterMasterController,@31") +#pragma comment(linker,"/export:Keyman_UpdateTouchPanelVisibility=keyman32-ver17.0.48-alpha-local.dll.Keyman_UpdateTouchPanelVisibility,@2") +#pragma comment(linker,"/export:Keyman_WriteDebugEvent=keyman32-ver17.0.48-alpha-local.dll.Keyman_WriteDebugEvent,@32") +#pragma comment(linker,"/export:SetCustomPostKeyCallback=keyman32-ver17.0.48-alpha-local.dll.SetCustomPostKeyCallback,@3") +#pragma comment(linker,"/export:TIPActivateEx=keyman32-ver17.0.48-alpha-local.dll.TIPActivateEx,@33") +#pragma comment(linker,"/export:TIPActivateKeyboard=keyman32-ver17.0.48-alpha-local.dll.TIPActivateKeyboard,@34") +#pragma comment(linker,"/export:TIPIsKeymanRunning=keyman32-ver17.0.48-alpha-local.dll.TIPIsKeymanRunning,@35") +#pragma comment(linker,"/export:TIPProcessKey=keyman32-ver17.0.48-alpha-local.dll.TIPProcessKey,@36") +#pragma comment(linker,"/export:kbp_state_get_intermediate_context=keyman32-ver17.0.48-alpha-local.dll.kbp_state_get_intermediate_context,@37") +#pragma comment(linker,"/export:km_kbp_context_append=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_append,@38") +#pragma comment(linker,"/export:km_kbp_context_clear=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_clear,@39") +#pragma comment(linker,"/export:km_kbp_context_get=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_get,@40") +#pragma comment(linker,"/export:km_kbp_context_item_list_size=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_item_list_size,@41") +#pragma comment(linker,"/export:km_kbp_context_items_dispose=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_items_dispose,@42") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_items_from_utf16,@43") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_items_from_utf8,@44") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_items_to_utf16,@45") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_items_to_utf8,@46") +#pragma comment(linker,"/export:km_kbp_context_length=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_length,@47") +#pragma comment(linker,"/export:km_kbp_context_set=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_set,@48") +#pragma comment(linker,"/export:km_kbp_context_shrink=keyman32-ver17.0.48-alpha-local.dll.km_kbp_context_shrink,@49") +#pragma comment(linker,"/export:km_kbp_event=keyman32-ver17.0.48-alpha-local.dll.km_kbp_event,@50") +#pragma comment(linker,"/export:km_kbp_get_engine_attrs=keyman32-ver17.0.48-alpha-local.dll.km_kbp_get_engine_attrs,@51") +#pragma comment(linker,"/export:km_kbp_keyboard_dispose=keyman32-ver17.0.48-alpha-local.dll.km_kbp_keyboard_dispose,@52") +#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=keyman32-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_attrs,@53") +#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=keyman32-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_imx_list,@54") +#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=keyman32-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_key_list,@55") +#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=keyman32-ver17.0.48-alpha-local.dll.km_kbp_keyboard_imx_list_dispose,@56") +#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=keyman32-ver17.0.48-alpha-local.dll.km_kbp_keyboard_key_list_dispose,@57") +#pragma comment(linker,"/export:km_kbp_keyboard_load=keyman32-ver17.0.48-alpha-local.dll.km_kbp_keyboard_load,@58") +#pragma comment(linker,"/export:km_kbp_options_list_size=keyman32-ver17.0.48-alpha-local.dll.km_kbp_options_list_size,@59") +#pragma comment(linker,"/export:km_kbp_process_event=keyman32-ver17.0.48-alpha-local.dll.km_kbp_process_event,@60") +#pragma comment(linker,"/export:km_kbp_process_queued_actions=keyman32-ver17.0.48-alpha-local.dll.km_kbp_process_queued_actions,@61") +#pragma comment(linker,"/export:km_kbp_state_action_items=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_action_items,@62") +#pragma comment(linker,"/export:km_kbp_state_clone=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_clone,@63") +#pragma comment(linker,"/export:km_kbp_state_context=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_context,@64") +#pragma comment(linker,"/export:km_kbp_state_create=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_create,@65") +#pragma comment(linker,"/export:km_kbp_state_dispose=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_dispose,@66") +#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_imx_deregister_callback,@67") +#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_imx_register_callback,@68") +#pragma comment(linker,"/export:km_kbp_state_option_lookup=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_option_lookup,@69") +#pragma comment(linker,"/export:km_kbp_state_options_to_json=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_options_to_json,@70") +#pragma comment(linker,"/export:km_kbp_state_options_update=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_options_update,@71") +#pragma comment(linker,"/export:km_kbp_state_queue_action_items=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_queue_action_items,@72") +#pragma comment(linker,"/export:km_kbp_state_to_json=keyman32-ver17.0.48-alpha-local.dll.km_kbp_state_to_json,@73") diff --git a/windows/src/engine/keyman32/exports.in b/windows/src/engine/keyman32/exports.in new file mode 100644 index 00000000000..935c4a665f6 --- /dev/null +++ b/windows/src/engine/keyman32/exports.in @@ -0,0 +1,78 @@ +// exports.h +// +// Header file to export all the functions to a versioned keyman32{version_tag}.dll +// + +#pragma comment(linker,"/export:GetActiveKeymanID=keyman32-ver$VersionWithTag.dll.GetActiveKeymanID,@4") +#pragma comment(linker,"/export:GetKeyboardPreservedKeys=keyman32-ver$VersionWithTag.dll.GetKeyboardPreservedKeys,@5") +#pragma comment(linker,"/export:KMDisplayIM=keyman32-ver$VersionWithTag.dll.KMDisplayIM,@6") +#pragma comment(linker,"/export:KMGetActiveKeyboard=keyman32-ver$VersionWithTag.dll.KMGetActiveKeyboard,@7") +#pragma comment(linker,"/export:KMGetContext=keyman32-ver$VersionWithTag.dll.KMGetContext,@8") +#pragma comment(linker,"/export:KMGetKeyboardPath=keyman32-ver$VersionWithTag.dll.KMGetKeyboardPath,@9") +#pragma comment(linker,"/export:KMHideIM=keyman32-ver$VersionWithTag.dll.KMHideIM,@10") +#pragma comment(linker,"/export:KMQueueAction=keyman32-ver$VersionWithTag.dll.KMQueueAction,@11") +#pragma comment(linker,"/export:KMSetOutput=keyman32-ver$VersionWithTag.dll.KMSetOutput,@12") +#pragma comment(linker,"/export:Keyman_Diagnostic=keyman32-ver$VersionWithTag.dll.Keyman_Diagnostic,@1") +#pragma comment(linker,"/export:Keyman_Exit=keyman32-ver$VersionWithTag.dll.Keyman_Exit,@13") +#pragma comment(linker,"/export:Keyman_ForceKeyboard=keyman32-ver$VersionWithTag.dll.Keyman_ForceKeyboard,@14") +#pragma comment(linker,"/export:Keyman_GetInitialised=keyman32-ver$VersionWithTag.dll.Keyman_GetInitialised,@15") +#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=keyman32-ver$VersionWithTag.dll.Keyman_GetLastActiveWindow,@16") +#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=keyman32-ver$VersionWithTag.dll.Keyman_GetLastFocusWindow,@17") +#pragma comment(linker,"/export:Keyman_Initialise=keyman32-ver$VersionWithTag.dll.Keyman_Initialise,@18") +#pragma comment(linker,"/export:Keyman_PostControllers=keyman32-ver$VersionWithTag.dll.Keyman_PostControllers,@19") +#pragma comment(linker,"/export:Keyman_PostMasterController=keyman32-ver$VersionWithTag.dll.Keyman_PostMasterController,@20") +#pragma comment(linker,"/export:Keyman_RegisterControllerThread=keyman32-ver$VersionWithTag.dll.Keyman_RegisterControllerThread,@21") +#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=keyman32-ver$VersionWithTag.dll.Keyman_RegisterControllerWindow,@22") +#pragma comment(linker,"/export:Keyman_RegisterMasterController=keyman32-ver$VersionWithTag.dll.Keyman_RegisterMasterController,@23") +#pragma comment(linker,"/export:Keyman_ResetInitialisation=keyman32-ver$VersionWithTag.dll.Keyman_ResetInitialisation,@24") +#pragma comment(linker,"/export:Keyman_RestartEngine=keyman32-ver$VersionWithTag.dll.Keyman_RestartEngine,@25") +#pragma comment(linker,"/export:Keyman_SendMasterController=keyman32-ver$VersionWithTag.dll.Keyman_SendMasterController,@26") +#pragma comment(linker,"/export:Keyman_StartExit=keyman32-ver$VersionWithTag.dll.Keyman_StartExit,@27") +#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=keyman32-ver$VersionWithTag.dll.Keyman_StopForcingKeyboard,@28") +#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=keyman32-ver$VersionWithTag.dll.Keyman_UnregisterControllerThread,@29") +#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=keyman32-ver$VersionWithTag.dll.Keyman_UnregisterControllerWindow,@30") +#pragma comment(linker,"/export:Keyman_UnregisterMasterController=keyman32-ver$VersionWithTag.dll.Keyman_UnregisterMasterController,@31") +#pragma comment(linker,"/export:Keyman_UpdateTouchPanelVisibility=keyman32-ver$VersionWithTag.dll.Keyman_UpdateTouchPanelVisibility,@2") +#pragma comment(linker,"/export:Keyman_WriteDebugEvent=keyman32-ver$VersionWithTag.dll.Keyman_WriteDebugEvent,@32") +#pragma comment(linker,"/export:SetCustomPostKeyCallback=keyman32-ver$VersionWithTag.dll.SetCustomPostKeyCallback,@3") +#pragma comment(linker,"/export:TIPActivateEx=keyman32-ver$VersionWithTag.dll.TIPActivateEx,@33") +#pragma comment(linker,"/export:TIPActivateKeyboard=keyman32-ver$VersionWithTag.dll.TIPActivateKeyboard,@34") +#pragma comment(linker,"/export:TIPIsKeymanRunning=keyman32-ver$VersionWithTag.dll.TIPIsKeymanRunning,@35") +#pragma comment(linker,"/export:TIPProcessKey=keyman32-ver$VersionWithTag.dll.TIPProcessKey,@36") +#pragma comment(linker,"/export:kbp_state_get_intermediate_context=keyman32-ver$VersionWithTag.dll.kbp_state_get_intermediate_context,@37") +#pragma comment(linker,"/export:km_kbp_context_append=keyman32-ver$VersionWithTag.dll.km_kbp_context_append,@38") +#pragma comment(linker,"/export:km_kbp_context_clear=keyman32-ver$VersionWithTag.dll.km_kbp_context_clear,@39") +#pragma comment(linker,"/export:km_kbp_context_get=keyman32-ver$VersionWithTag.dll.km_kbp_context_get,@40") +#pragma comment(linker,"/export:km_kbp_context_item_list_size=keyman32-ver$VersionWithTag.dll.km_kbp_context_item_list_size,@41") +#pragma comment(linker,"/export:km_kbp_context_items_dispose=keyman32-ver$VersionWithTag.dll.km_kbp_context_items_dispose,@42") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=keyman32-ver$VersionWithTag.dll.km_kbp_context_items_from_utf16,@43") +#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=keyman32-ver$VersionWithTag.dll.km_kbp_context_items_from_utf8,@44") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=keyman32-ver$VersionWithTag.dll.km_kbp_context_items_to_utf16,@45") +#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=keyman32-ver$VersionWithTag.dll.km_kbp_context_items_to_utf8,@46") +#pragma comment(linker,"/export:km_kbp_context_length=keyman32-ver$VersionWithTag.dll.km_kbp_context_length,@47") +#pragma comment(linker,"/export:km_kbp_context_set=keyman32-ver$VersionWithTag.dll.km_kbp_context_set,@48") +#pragma comment(linker,"/export:km_kbp_context_shrink=keyman32-ver$VersionWithTag.dll.km_kbp_context_shrink,@49") +#pragma comment(linker,"/export:km_kbp_event=keyman32-ver$VersionWithTag.dll.km_kbp_event,@50") +#pragma comment(linker,"/export:km_kbp_get_engine_attrs=keyman32-ver$VersionWithTag.dll.km_kbp_get_engine_attrs,@51") +#pragma comment(linker,"/export:km_kbp_keyboard_dispose=keyman32-ver$VersionWithTag.dll.km_kbp_keyboard_dispose,@52") +#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=keyman32-ver$VersionWithTag.dll.km_kbp_keyboard_get_attrs,@53") +#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=keyman32-ver$VersionWithTag.dll.km_kbp_keyboard_get_imx_list,@54") +#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=keyman32-ver$VersionWithTag.dll.km_kbp_keyboard_get_key_list,@55") +#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=keyman32-ver$VersionWithTag.dll.km_kbp_keyboard_imx_list_dispose,@56") +#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=keyman32-ver$VersionWithTag.dll.km_kbp_keyboard_key_list_dispose,@57") +#pragma comment(linker,"/export:km_kbp_keyboard_load=keyman32-ver$VersionWithTag.dll.km_kbp_keyboard_load,@58") +#pragma comment(linker,"/export:km_kbp_options_list_size=keyman32-ver$VersionWithTag.dll.km_kbp_options_list_size,@59") +#pragma comment(linker,"/export:km_kbp_process_event=keyman32-ver$VersionWithTag.dll.km_kbp_process_event,@60") +#pragma comment(linker,"/export:km_kbp_process_queued_actions=keyman32-ver$VersionWithTag.dll.km_kbp_process_queued_actions,@61") +#pragma comment(linker,"/export:km_kbp_state_action_items=keyman32-ver$VersionWithTag.dll.km_kbp_state_action_items,@62") +#pragma comment(linker,"/export:km_kbp_state_clone=keyman32-ver$VersionWithTag.dll.km_kbp_state_clone,@63") +#pragma comment(linker,"/export:km_kbp_state_context=keyman32-ver$VersionWithTag.dll.km_kbp_state_context,@64") +#pragma comment(linker,"/export:km_kbp_state_create=keyman32-ver$VersionWithTag.dll.km_kbp_state_create,@65") +#pragma comment(linker,"/export:km_kbp_state_dispose=keyman32-ver$VersionWithTag.dll.km_kbp_state_dispose,@66") +#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=keyman32-ver$VersionWithTag.dll.km_kbp_state_imx_deregister_callback,@67") +#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=keyman32-ver$VersionWithTag.dll.km_kbp_state_imx_register_callback,@68") +#pragma comment(linker,"/export:km_kbp_state_option_lookup=keyman32-ver$VersionWithTag.dll.km_kbp_state_option_lookup,@69") +#pragma comment(linker,"/export:km_kbp_state_options_to_json=keyman32-ver$VersionWithTag.dll.km_kbp_state_options_to_json,@70") +#pragma comment(linker,"/export:km_kbp_state_options_update=keyman32-ver$VersionWithTag.dll.km_kbp_state_options_update,@71") +#pragma comment(linker,"/export:km_kbp_state_queue_action_items=keyman32-ver$VersionWithTag.dll.km_kbp_state_queue_action_items,@72") +#pragma comment(linker,"/export:km_kbp_state_to_json=keyman32-ver$VersionWithTag.dll.km_kbp_state_to_json,@73") diff --git a/windows/src/engine/keyman32/keyman-debug-etw.man b/windows/src/engine/keyman32/keyman-debug-etw.man new file mode 100644 index 00000000000..e8c7331d3f8 --- /dev/null +++ b/windows/src/engine/keyman32/keyman-debug-etw.man @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/windows/src/engine/keyman32/keyman-engine.vcxproj b/windows/src/engine/keyman32/keyman-engine.vcxproj new file mode 100644 index 00000000000..4a3755a4b12 --- /dev/null +++ b/windows/src/engine/keyman32/keyman-engine.vcxproj @@ -0,0 +1,406 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {A7069186-5AE7-4504-8926-861B7A34BA9E} + Keyman32 + 10.0 + + + + StaticLibrary + false + v142 + + + StaticLibrary + false + v142 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ + false + $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ + true + AllRules.ruleset + + + AllRules.ruleset + + + + + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) + + + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + ./Keyman32.tlb + + + + + MaxSpeed + OnlyExplicitInline + .\;..\..\global\inc;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + MultiThreaded + true + Use + pch.h + All + ./ + ./ + ./ + Level4 + true + true + ProgramDatabase + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) + kmnkbp0.lib;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + ./Keyman32$(Version_with_tag).dll + true + keyman32-ver.def + true + ./Keyman32.pdb + true + ./Keyman32.map + false + Windows + true + true + 0x1c100000 + ./Keyman32.lib + MachineX86 + true + true + + + true + ./Keyman32.bsc + + + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + ./Keyman32.tlb + + + + + Disabled + .\;..\..\global\inc;.;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + + + MultiThreadedDebug + Use + pch.h + All + ./ + ./ + ./ + true + Level4 + true + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) + kmnkbp0.lib;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + ./Keyman32$(Version_with_tag).dll + true + keyman32-ver.def + true + ./Keyman32.pdb + true + ./Keyman32.map + Windows + 0x1C100000 + ./Keyman32.lib + MachineX86 + true + true + + + true + ./Keyman32.bsc + + + + + + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Create + Create + + + + + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + Document + false + false + mc %(FullPath) + Compiling keyman-debug-etw + %(Filename).rc;%(Filename.h);MSG00001.bin + mc %(FullPath) + Compiling keyman-debug-etw + %(Filename).rc;%(Filename.h);MSG00001.bin + Designer + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/windows/src/engine/keyman32/keyman-engine.vcxproj.filters b/windows/src/engine/keyman32/keyman-engine.vcxproj.filters new file mode 100644 index 00000000000..a7aea30f85b --- /dev/null +++ b/windows/src/engine/keyman32/keyman-engine.vcxproj.filters @@ -0,0 +1,253 @@ + + + + + {2dc5904b-4033-47e6-88ac-ebe442c06c2e} + cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 + + + {27baf0f2-3926-4720-b5f9-045e47cd975c} + h;hpp;hxx;hm;inl;fi;fd + + + {088a2b68-c9db-41f4-9f45-37fdf758931e} + ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + + Resource Files + + + Resource Files + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Source Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32/keyman32.vcxproj index 357db239ddb..0adfa408fbd 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj +++ b/windows/src/engine/keyman32/keyman32.vcxproj @@ -11,7 +11,7 @@ - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E} + {FA6F9217-E2BB-4586-ACD3-0DFB6C13A257} Keyman32 10.0 keyman32 @@ -57,10 +57,12 @@ $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + $(ProjectName)$(VersionWithTag) @@ -82,7 +84,6 @@ MultiThreaded true - Use pch.h All Level4 @@ -95,7 +96,8 @@ 0x0409 - %(AdditionalDependencies) + %(AdditionalOptions) + libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true true true @@ -149,7 +151,8 @@ 0x0409 - %(AdditionalDependencies) + %(AdditionalOptions) + libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true true true @@ -170,21 +173,29 @@ - - Create - Create - - - - - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - + + Document + false + false + mc %(FullPath) + Compiling keyman-debug-etw + %(Filename).rc;%(Filename.h);MSG00001.bin + mc %(FullPath) + Compiling keyman-debug-etw + %(Filename).rc;%(Filename.h);MSG00001.bin + Designer + + + + + + + diff --git a/windows/src/engine/keyman32/keyman32.vcxproj.filters b/windows/src/engine/keyman32/keyman32.vcxproj.filters index 46cbc1ddc8f..2ff70f76614 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj.filters +++ b/windows/src/engine/keyman32/keyman32.vcxproj.filters @@ -15,21 +15,30 @@ - - Source Files - + + Resource Files + + + Resource Files + - - Source Files - + - + Header Files - + Header Files + + + Source Files + + + Source Files + + \ No newline at end of file diff --git a/windows/src/engine/keyman32/keyman32_proxy.cpp b/windows/src/engine/keyman32/keyman32_proxy.cpp new file mode 100644 index 00000000000..68ae0a7b2aa --- /dev/null +++ b/windows/src/engine/keyman32/keyman32_proxy.cpp @@ -0,0 +1,21 @@ +#include "pch.h" +#include "exports.h" + + +BOOL __stdcall DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID reserved) { + UNREFERENCED_PARAMETER(reserved); + UNREFERENCED_PARAMETER(hinstDll); + + switch (fdwReason) { + case DLL_PROCESS_ATTACH: { + // OutputThreadDebugString("DLL_PROCESS_ATTACH"); + + break; + } + case DLL_PROCESS_DETACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + break; + } + return TRUE; +} diff --git a/windows/src/engine/keyman32/pch.cpp b/windows/src/engine/keyman32/pch.cpp index e9431ca84bb..3a3d12b5a71 100644 --- a/windows/src/engine/keyman32/pch.cpp +++ b/windows/src/engine/keyman32/pch.cpp @@ -1,6 +1,5 @@ // pch.cpp: source file corresponding to pre-compiled header; necessary for compilation to succeed #include "pch.h" -#include "exports.h" // In general, ignore this file, but keep it around if you are using pre-compiled headers. diff --git a/windows/src/engine/keyman32/pch.h b/windows/src/engine/keyman32/pch.h index d085793290e..2f748e7d287 100644 --- a/windows/src/engine/keyman32/pch.h +++ b/windows/src/engine/keyman32/pch.h @@ -1,6 +1,8 @@ #ifndef PCH_H #define PCH_H - +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files +#include #endif //PCH_H diff --git a/windows/src/engine/keyman32/version.rc b/windows/src/engine/keyman32/version.rc index 188f1e3fbde..2257b12f9d1 100644 --- a/windows/src/engine/keyman32/version.rc +++ b/windows/src/engine/keyman32/version.rc @@ -16,10 +16,10 @@ VALUE "CompanyName", KV_COMPANY_NAME VALUE "FileDescription", "Keyman Engine Processor x86\0" VALUE "FileVersion", KV_VERSION_STRING - VALUE "InternalName", "KEYMAN32\0" + VALUE "InternalName", "KEYMAN32-VER$(var.VERSION_WITH_TAG)\0" VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS - VALUE "OriginalFilename", "KEYMAN32.DLL\0" + VALUE "OriginalFilename", "KEYMAN32-VER$(var.VERSION_WITH_TAG).DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" diff --git a/windows/src/engine/keyman64/keyman64.sln b/windows/src/engine/keyman64/keyman64.sln index 219744cdeab..cbab00dba96 100644 --- a/windows/src/engine/keyman64/keyman64.sln +++ b/windows/src/engine/keyman64/keyman64.sln @@ -5,12 +5,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64", "keyman64.vcxpro EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D1115FB2-230D-4FD8-90B9-982E49953D18}.Debug|Win32.ActiveCfg = Debug|x64 {D1115FB2-230D-4FD8-90B9-982E49953D18}.Debug|x64.ActiveCfg = Debug|x64 {D1115FB2-230D-4FD8-90B9-982E49953D18}.Debug|x64.Build.0 = Debug|x64 + {D1115FB2-230D-4FD8-90B9-982E49953D18}.Release|Win32.ActiveCfg = Release|x64 {D1115FB2-230D-4FD8-90B9-982E49953D18}.Release|x64.ActiveCfg = Release|x64 {D1115FB2-230D-4FD8-90B9-982E49953D18}.Release|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64/keyman64.vcxproj index 5d0966a077a..a5e26df8e28 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj +++ b/windows/src/engine/keyman64/keyman64.vcxproj @@ -10,8 +10,16 @@ x64 + + + + + + + + - {19C64F3E-4D3C-4BE5-BA15-B4385FA8F369} + {CE480BDD-E112-488D-8684-ECBA8F46FF87} Keyman32-ver 10.0 keyman64 @@ -85,7 +93,6 @@ MultiThreaded true - Use pch.h All Level4 @@ -110,7 +117,7 @@ true Windows 0x1C800000 - ..\..\..\lib\Keyman64-ver.lib + ..\..\..\lib\Keyman64.lib MachineX64 true true @@ -155,7 +162,7 @@ %(AdditionalOptions) - %(AdditionalDependencies) + libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) true C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)lib;%(AdditionalLibraryDirectories) false @@ -167,7 +174,7 @@ true Windows 0x1C800000 - ..\..\..\lib\Keyman64-ver.lib + ..\..\..\lib\Keyman64.lib MachineX64 true true @@ -177,15 +184,7 @@ ./Keyman32-ver.bsc - - - - - - - - - \ No newline at end of file + diff --git a/windows/src/engine/keyman64/keyman64.vcxproj.filters b/windows/src/engine/keyman64/keyman64.vcxproj.filters index ae5632ff49a..3e0f11b68f5 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj.filters +++ b/windows/src/engine/keyman64/keyman64.vcxproj.filters @@ -1,11 +1,27 @@  - - + + {c3cdbd13-bd99-413d-ae3b-d0eeff72b863} + + + {e6eb0432-0f01-4663-baaa-504e5c047d09} + - - + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + \ No newline at end of file From 5ec547a18ca54dcee1e1a5a70e58979a3be9cde2 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 13 Apr 2023 13:50:37 +1000 Subject: [PATCH 11/40] feat(windows): check in missed updates --- windows/src/engine/engine.sln | 24 +++++++++++++++--------- windows/src/engine/inst/components.wxs | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/windows/src/engine/engine.sln b/windows/src/engine/engine.sln index a88a5d48ff0..00d7c14401c 100644 --- a/windows/src/engine/engine.sln +++ b/windows/src/engine/engine.sln @@ -21,7 +21,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman-engine", "keyman32-v EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testhost", "testhost\testhost.vcxproj", "{12818DA3-0472-49A5-96FC-A4808A1A77FA}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman32", "keyman32\keyman32.vcxproj", "{7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64", "keyman64\keyman64.vcxproj", "{CE480BDD-E112-488D-8684-ECBA8F46FF87}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman32", "keyman32\keyman32.vcxproj", "{FA6F9217-E2BB-4586-ACD3-0DFB6C13A257}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -93,14 +95,18 @@ Global {12818DA3-0472-49A5-96FC-A4808A1A77FA}.Release|Win32.Build.0 = Release|Win32 {12818DA3-0472-49A5-96FC-A4808A1A77FA}.Release|x64.ActiveCfg = Release|x64 {12818DA3-0472-49A5-96FC-A4808A1A77FA}.Release|x64.Build.0 = Release|x64 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|Win32.ActiveCfg = Debug|Win32 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|Win32.Build.0 = Debug|Win32 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|x64.ActiveCfg = Debug|x64 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Debug|x64.Build.0 = Debug|x64 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|Win32.ActiveCfg = Release|Win32 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|Win32.Build.0 = Release|Win32 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|x64.ActiveCfg = Release|x64 - {7F83D46E-EB65-4E4C-97C0-0FF2C7BDD52E}.Release|x64.Build.0 = Release|x64 + {CE480BDD-E112-488D-8684-ECBA8F46FF87}.Debug|Win32.ActiveCfg = Debug|x64 + {CE480BDD-E112-488D-8684-ECBA8F46FF87}.Debug|x64.ActiveCfg = Debug|x64 + {CE480BDD-E112-488D-8684-ECBA8F46FF87}.Debug|x64.Build.0 = Debug|x64 + {CE480BDD-E112-488D-8684-ECBA8F46FF87}.Release|Win32.ActiveCfg = Release|x64 + {CE480BDD-E112-488D-8684-ECBA8F46FF87}.Release|x64.ActiveCfg = Release|x64 + {CE480BDD-E112-488D-8684-ECBA8F46FF87}.Release|x64.Build.0 = Release|x64 + {FA6F9217-E2BB-4586-ACD3-0DFB6C13A257}.Debug|Win32.ActiveCfg = Debug|Win32 + {FA6F9217-E2BB-4586-ACD3-0DFB6C13A257}.Debug|Win32.Build.0 = Debug|Win32 + {FA6F9217-E2BB-4586-ACD3-0DFB6C13A257}.Debug|x64.ActiveCfg = Debug|Win32 + {FA6F9217-E2BB-4586-ACD3-0DFB6C13A257}.Release|Win32.ActiveCfg = Release|Win32 + {FA6F9217-E2BB-4586-ACD3-0DFB6C13A257}.Release|Win32.Build.0 = Release|Win32 + {FA6F9217-E2BB-4586-ACD3-0DFB6C13A257}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index 629856f9014..2721683300d 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -137,9 +137,9 @@ - + From 4f3a91b2c2d3a0f28e100b7d0dbb11e33c48a98f Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 18 Apr 2023 14:48:26 +1000 Subject: [PATCH 12/40] feat(windows): hard code load proxy plus registry look up --- windows/src/engine/keyman32-ver/calldll.cpp | 14 +++++++------- windows/src/engine/keyman32-ver/k32_globals.cpp | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index f6defa320cc..0ba95ae04ee 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -701,13 +701,13 @@ LoadDLLsCore(LPINTKEYBOARDINFO lpkbi) { } // Need to Load the keyman32 or keyman64 dll proxy keyboard as the third-party dlls // will use this rather than the versioned dll. - #ifdef _WIN64 - HMODULE hModule = LoadLibrary("keyman64.dll"); - #else - HMODULE hModule = LoadLibrary("keyman32.dll"); - #endif - if (!hModule) { - SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: keyman32/64.dll not loaded"); +// #ifdef _WIN64 +// HMODULE hModule = LoadLibrary("keyman64.dll"); +// #else +// HMODULE hModule = LoadLibrary("keyman32.dll"); +// #endif + if (!LoadLibrary("C:\\Program Files (x86)\\Common Files\\Keyman\\Keyman Engine\\keyman64.dll")){ + SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: keyman64.dll not loaded with error:[%d]", GetLastError()); return FALSE; } diff --git a/windows/src/engine/keyman32-ver/k32_globals.cpp b/windows/src/engine/keyman32-ver/k32_globals.cpp index 054945b8129..419df35a925 100644 --- a/windows/src/engine/keyman32-ver/k32_globals.cpp +++ b/windows/src/engine/keyman32-ver/k32_globals.cpp @@ -275,6 +275,7 @@ static char static wchar_t f_BaseKeyboardName[256] = L"", // I4583 f_BaseKeyboardNameAlt[64] = L""; // I4583 +// f_KMEngine_Rootpath[256] = L""; __declspec(align(8)) static UINT f_vk_prefix = 0; @@ -367,6 +368,9 @@ BOOL Globals::get_debug_ToConsole() { return f_debug_ToConsole; } BOOL Globals::get_CoreIntegration() { return f_CoreIntegration; } +//wchar_t *Globals::get_KeymanEngineRootPath() { return f_KMEngine_Rootpath; } + + void Globals::SetBaseKeyboardName(wchar_t *baseKeyboardName, wchar_t *baseKeyboardNameAlt) { // I4583 wcscpy_s(f_BaseKeyboardName, baseKeyboardName); wcscpy_s(f_BaseKeyboardNameAlt, baseKeyboardNameAlt); @@ -396,6 +400,16 @@ BOOL Globals::InitSettings() { reg.CloseKey(); SendDebugMessageFormat(0, sdmAIDefault, 0, "Globals::InitSettings - vk_prefix set in '" REGSZ_ZapVirtualKeyCode "' to %x" , f_vk_prefix); } + + // Read Keyman Root path will combine with above in the future just quickly hack in. + if (reg.OpenKeyReadOnly(REGSZ_KeymanLM) && + reg.ValueExists(REGSZ_RootPath)) { + + if(reg.ReadString(REGSZ_RootPath, f_KMEngine_Rootpath, sizeof(f_KMEngine_Rootpath) / sizeof(f_KMEngine_Rootpath[0]))) + reg.CloseKey(); + SendDebugMessageFormat(0, sdmAIDefault, 0, "Globals::InitSettings - KMEngine_Rootpath is %s" , f_KMEngine_Rootpath); + } + return TRUE; } From 2872f032c01464e0424b5e265c92cfaf0df4000d Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 19 Apr 2023 11:21:44 +1000 Subject: [PATCH 13/40] feat(windows): get proxy library install path pt1 --- windows/src/engine/keyman32-ver/calldll.cpp | 30 +++++++++++++++++-- .../src/engine/keyman32-ver/k32_globals.cpp | 12 ++++---- .../keyman32-ver/keyman64-build-version.h | 4 +-- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 0ba95ae04ee..b1ac67f856c 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -699,6 +699,30 @@ LoadDLLsCore(LPINTKEYBOARDINFO lpkbi) { if ((!lpkbi->lpCoreKeyboard) || (!lpkbi->lpCoreKeyboard)){ return FALSE; } + + char versioned_filename[260]; + char test_library_name[260]; + char proxy_modulename[260]; + + #ifdef _WIN64 + char keyman_name[] = "keyman64.dll"; + #else + char keyman_name[] = "keyman32.dll"; + #endif + + //GetModuleFileName(GetModuleHandle(LIBRARY_NAME), buf, 260); + + GetModuleFileName(g_hInstance, test_library_name, 260); + + char *p = strrchr(versioned_filename, '\\'); // find last occurrence of '\' + if (p != NULL) { + int64_t len = p - versioned_filename + 1; + strncpy(proxy_modulename, versioned_filename, (size_t)len); + strncat(proxy_modulename, keyman_name, 13); + } + + SendDebugMessageFormat( + 0, sdmKeyboard, 0, "Testing methods to get library name test lib name:[%s], versioned_filename:[%s]", test_library_name, versioned_filename); // Need to Load the keyman32 or keyman64 dll proxy keyboard as the third-party dlls // will use this rather than the versioned dll. // #ifdef _WIN64 @@ -706,8 +730,10 @@ LoadDLLsCore(LPINTKEYBOARDINFO lpkbi) { // #else // HMODULE hModule = LoadLibrary("keyman32.dll"); // #endif - if (!LoadLibrary("C:\\Program Files (x86)\\Common Files\\Keyman\\Keyman Engine\\keyman64.dll")){ - SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: keyman64.dll not loaded with error:[%d]", GetLastError()); + + + if (!LoadLibrary(proxy_modulename)) { + SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", proxy_modulename, GetLastError()); return FALSE; } diff --git a/windows/src/engine/keyman32-ver/k32_globals.cpp b/windows/src/engine/keyman32-ver/k32_globals.cpp index 419df35a925..0e9f3d5bca1 100644 --- a/windows/src/engine/keyman32-ver/k32_globals.cpp +++ b/windows/src/engine/keyman32-ver/k32_globals.cpp @@ -402,13 +402,13 @@ BOOL Globals::InitSettings() { } // Read Keyman Root path will combine with above in the future just quickly hack in. - if (reg.OpenKeyReadOnly(REGSZ_KeymanLM) && - reg.ValueExists(REGSZ_RootPath)) { + // if (reg.OpenKeyReadOnly(REGSZ_KeymanLM) && + // reg.ValueExists(REGSZ_RootPath)) { - if(reg.ReadString(REGSZ_RootPath, f_KMEngine_Rootpath, sizeof(f_KMEngine_Rootpath) / sizeof(f_KMEngine_Rootpath[0]))) - reg.CloseKey(); - SendDebugMessageFormat(0, sdmAIDefault, 0, "Globals::InitSettings - KMEngine_Rootpath is %s" , f_KMEngine_Rootpath); - } + // if(reg.ReadString(REGSZ_RootPath, f_KMEngine_Rootpath, sizeof(f_KMEngine_Rootpath) / sizeof(f_KMEngine_Rootpath[0]))) + // reg.CloseKey(); + // SendDebugMessageFormat(0, sdmAIDefault, 0, "Globals::InitSettings - KMEngine_Rootpath is %s" , f_KMEngine_Rootpath); + // } return TRUE; } diff --git a/windows/src/engine/keyman32-ver/keyman64-build-version.h b/windows/src/engine/keyman32-ver/keyman64-build-version.h index e6fd07f2ded..7fd2d884d7a 100644 --- a/windows/src/engine/keyman32-ver/keyman64-build-version.h +++ b/windows/src/engine/keyman32-ver/keyman64-build-version.h @@ -57,9 +57,9 @@ #define _KEYMAN64_BUILD_VERSION_H #ifdef _WIN64 -#define LIBRARY_NAME "keyman64-ver17.0.48-alpha-local" +#define LIBRARY_NAME "keyman64-ver17.0.48-alpha-local.dll" #else -#define LIBRARY_NAME "keyman32-ver17.0.48-alpha-local" +#define LIBRARY_NAME "keyman32-ver17.0.48-alpha-local.dll" #endif From a5c427fc80a3a1ef866d664ad33078b6bb22d136 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 18 May 2023 14:00:45 +1000 Subject: [PATCH 14/40] feat(windows): only load proxy dll if imx --- windows/src/engine/keyman32-ver/calldll.cpp | 37 ++++++++++----------- windows/src/engine/keyman32-ver/premake.in | 2 +- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index b1ac67f856c..2a9f85db56d 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -696,7 +696,13 @@ LoadDLLsCore(LPINTKEYBOARDINFO lpkbi) { if (!GetKeyboardFileName(lpkbi->Name, fullname, _MAX_PATH)) return FALSE; - if ((!lpkbi->lpCoreKeyboard) || (!lpkbi->lpCoreKeyboard)){ + if (!lpkbi->lpCoreKeyboard){ + return FALSE; + } + + km_kbp_keyboard_imx *imx_list = lpkbi->lpIMXList; + // return early if the list empty avoiding loading the proxy dll into memory + if (!imx_list->library_name) { return FALSE; } @@ -712,32 +718,23 @@ LoadDLLsCore(LPINTKEYBOARDINFO lpkbi) { //GetModuleFileName(GetModuleHandle(LIBRARY_NAME), buf, 260); - GetModuleFileName(g_hInstance, test_library_name, 260); + GetModuleFileName(g_hInstance, versioned_filename, 260); - char *p = strrchr(versioned_filename, '\\'); // find last occurrence of '\' - if (p != NULL) { - int64_t len = p - versioned_filename + 1; - strncpy(proxy_modulename, versioned_filename, (size_t)len); - strncat(proxy_modulename, keyman_name, 13); - } - - SendDebugMessageFormat( - 0, sdmKeyboard, 0, "Testing methods to get library name test lib name:[%s], versioned_filename:[%s]", test_library_name, versioned_filename); - // Need to Load the keyman32 or keyman64 dll proxy keyboard as the third-party dlls - // will use this rather than the versioned dll. -// #ifdef _WIN64 -// HMODULE hModule = LoadLibrary("keyman64.dll"); -// #else -// HMODULE hModule = LoadLibrary("keyman32.dll"); -// #endif + char *p = strrchr(versioned_filename, '\\'); // find last occurrence of '\' + if (p != NULL) { + int64_t len = p - versioned_filename + 1; + strncpy(proxy_modulename, versioned_filename, (size_t)len); + strncat(proxy_modulename, keyman_name, 13); + } + SendDebugMessageFormat( + 0, sdmKeyboard, 0, "Testing methods to get library name test lib name:[%s], versioned_filename:[%s]", test_library_name, versioned_filename); if (!LoadLibrary(proxy_modulename)) { - SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", proxy_modulename, GetLastError()); + SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", proxy_modulename, GetLastError()); return FALSE; } - km_kbp_keyboard_imx *imx_list = lpkbi->lpIMXList; BOOL result = false; for (; imx_list->library_name; ++imx_list) { LPIMDLL imd = AddIMDLL(lpkbi, fullname, wstrtostr(reinterpret_cast(imx_list->library_name))); diff --git a/windows/src/engine/keyman32-ver/premake.in b/windows/src/engine/keyman32-ver/premake.in index 944fad28e28..7ffd24dcdbd 100644 --- a/windows/src/engine/keyman32-ver/premake.in +++ b/windows/src/engine/keyman32-ver/premake.in @@ -24,7 +24,7 @@ install: echo and then run wevtutil im keyman-debug-etw.man to get the latest event tracing build: - $(MSBUILD) keyman32-ver.vcxproj $(MSBUILD_BUILD) "/p:VersionWithTag=$VersionWithTag;LIBRARY=keyman32-ver17.0.48-alpha-local" + $(MSBUILD) keyman32-ver.vcxproj $(MSBUILD_BUILD) "/p:VersionWithTag=$VersionWithTag;LIBRARY=keyman32-ver$VersionWithTag" $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver$VersionWithTag.dll $(PROGRAM)\engine $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver$VersionWithTag.pdb $(DEBUGPATH)\engine # $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver.lib $(OUTLIB) done by vcxproj From 269b60d5580f745d4b0749161ff62243efdebce3 Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 20 Jun 2023 15:54:48 +1000 Subject: [PATCH 15/40] feat: remove etw.man from versioned dll --- windows/src/engine/Makefile | 8 ++++++++ .../src/engine/keyman32-ver/keyman32-ver.vcxproj | 15 +-------------- .../keyman32-ver/keyman32-ver.vcxproj.filters | 8 +------- windows/src/engine/keyman32/keyman-debug-etw.man | 8 ++++---- .../src/engine/keyman64-ver/keyman64-ver.vcxproj | 14 +------------- .../keyman64-ver/keyman64-ver.vcxproj.filters | 6 +----- 6 files changed, 16 insertions(+), 43 deletions(-) diff --git a/windows/src/engine/Makefile b/windows/src/engine/Makefile index 12dc2f00ca0..3826c83acf8 100644 --- a/windows/src/engine/Makefile +++ b/windows/src/engine/Makefile @@ -28,6 +28,10 @@ keymanmc: .virtual cd $(ROOT)\src\engine\keymanmc $(MAKE) $(TARGET) +keyman32: .virtual + cd $(ROOT)\src\engine\keyman32 + $(MAKE) $(TARGET) + keyman32-ver: .virtual cd $(ROOT)\src\engine\keyman32-ver $(MAKE) $(TARGET) @@ -44,6 +48,10 @@ keymanx64: .virtual cd $(ROOT)\src\engine\keymanx64 $(MAKE) $(TARGET) +keyman64: .virtual + cd $(ROOT)\src\engine\keyman64 + $(MAKE) $(TARGET) + keyman64-ver: .virtual cd $(ROOT)\src\engine\keyman64-ver $(MAKE) $(TARGET) diff --git a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj index b0f5bce5489..b0a6f8ba71a 100644 --- a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj +++ b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj @@ -332,24 +332,11 @@ - - Document - false - false - mc %(FullPath) - Compiling keyman-debug-etw - %(Filename).rc;%(Filename.h);MSG00001.bin - mc %(FullPath) - Compiling keyman-debug-etw - %(Filename).rc;%(Filename.h);MSG00001.bin - Designer - - %(PreprocessorDefinitions) %(PreprocessorDefinitions) @@ -389,4 +376,4 @@ - + \ No newline at end of file diff --git a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters index 323c1bb1109..d7e81152bb5 100644 --- a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters +++ b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters @@ -151,9 +151,6 @@ - - Source Files - Source Files @@ -247,7 +244,4 @@ Header Files - - - - + \ No newline at end of file diff --git a/windows/src/engine/keyman32/keyman-debug-etw.man b/windows/src/engine/keyman32/keyman-debug-etw.man index e8c7331d3f8..b621fe62b9b 100644 --- a/windows/src/engine/keyman32/keyman-debug-etw.man +++ b/windows/src/engine/keyman32/keyman-debug-etw.man @@ -1,4 +1,4 @@ - + @@ -339,4 +339,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj index b3be870be8f..c4901c58c2b 100644 --- a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj @@ -275,7 +275,6 @@ - @@ -315,19 +314,8 @@ - - Document - false - false - mc %(FullPath) - %(Filename).rc;%(Filename).h;MSG00001.bin - mc %(FullPath) - %(Filename).rc;%(Filename).h;MSG00001.bin - Compiling %(Filename).man - Compiling %(Filename).man - - + \ No newline at end of file diff --git a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters index 4b65e15886a..8aa72d3cecd 100644 --- a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters @@ -74,14 +74,10 @@ - - - - - + \ No newline at end of file From 92ad026b8c2af2a85811e418aaa7aa2569254f0a Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 20 Jun 2023 16:28:48 +1000 Subject: [PATCH 16/40] feat: etw.rc --- windows/src/engine/keyman32/keyman32.vcxproj | 5 ++- .../engine/keyman32/keyman32.vcxproj.filters | 39 ++++--------------- 2 files changed, 12 insertions(+), 32 deletions(-) diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32/keyman32.vcxproj index 0adfa408fbd..c9662fa6440 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj +++ b/windows/src/engine/keyman32/keyman32.vcxproj @@ -196,7 +196,10 @@ + + + - + \ No newline at end of file diff --git a/windows/src/engine/keyman32/keyman32.vcxproj.filters b/windows/src/engine/keyman32/keyman32.vcxproj.filters index 6163ef30306..9bf753f25ba 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj.filters +++ b/windows/src/engine/keyman32/keyman32.vcxproj.filters @@ -1,44 +1,21 @@  - - {2dc5904b-4033-47e6-88ac-ebe442c06c2e} - cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90 - - - {27baf0f2-3926-4720-b5f9-045e47cd975c} - h;hpp;hxx;hm;inl;fi;fd - - - {088a2b68-c9db-41f4-9f45-37fdf758931e} - ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe - + + - - Resource Files - - - Resource Files - + + - - Header Files - - - Header Files - + + - - Source Files - - - Source Files - + - + \ No newline at end of file From bad871277be84fe736d19598999a71e15088b78f Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 22 Jun 2023 12:29:16 +1000 Subject: [PATCH 17/40] feat: update components.wxs with correct etl man file --- windows/src/engine/inst/components.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index a32502522e2..0bffd510753 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -250,7 +250,7 @@ - + From 24abdee1674044f3119da0f84fd60cb09e3463ed Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 6 Jul 2023 14:07:40 +1000 Subject: [PATCH 18/40] feat(windows): some minor tidy up --- ...n.Configuration.UI.UfrmDiagnosticTests.pas | 2 +- windows/src/engine/keyman32-ver/calldll.cpp | 8 +- windows/src/engine/keyman32-ver/calldll.h | 6 +- .../src/engine/keyman32-ver/k32_globals.cpp | 11 - .../engine/keyman32-ver/keyman-debug-etw.man | 342 ------------------ .../engine/keyman32-ver/keyman-debug-etw.rc | 3 - 6 files changed, 5 insertions(+), 367 deletions(-) delete mode 100644 windows/src/engine/keyman32-ver/keyman-debug-etw.man delete mode 100644 windows/src/engine/keyman32-ver/keyman-debug-etw.rc diff --git a/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas b/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas index e1b13f5f9ae..3055ab2fb33 100644 --- a/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas +++ b/windows/src/desktop/kmshell/util/Keyman.Configuration.UI.UfrmDiagnosticTests.pas @@ -62,7 +62,7 @@ procedure TfrmDiagnosticTests.cmdSendTestKeyman32ExceptionClick( h: THandle; Keyman_Diagnostic: TKeyman_Diagnostic; begin - h := GetModuleHandle('keyman32-ver17.0.48-alpha-local'); + h := GetModuleHandle('keyman32.dll'); if h = 0 then begin ShowMessage('keyman32.dll is not loaded. Make sure Keyman is running.'); diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 8a849819d54..3da5e05b23b 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -227,7 +227,7 @@ BOOL UnloadDLLs(LPINTKEYBOARDINFO lpkbi) if (lpkbi->lpCoreKeyboardState) { km_kbp_state_imx_deregister_callback(lpkbi->lpCoreKeyboardState); - // Need to UnLoad the keyman32 or keyman64 dll proxy keyboard as the third-party dlls + // Need to Load the keyman32 or keyman64 dll proxy keyboard as the third-party dlls // will use this rather than the versioned dll. #ifdef _WIN64 HMODULE hModule = GetModuleHandle("keyman64.dll"); @@ -596,7 +596,6 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { } char versioned_filename[260]; - char test_library_name[260]; char proxy_modulename[260]; #ifdef _WIN64 @@ -605,8 +604,6 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { char keyman_name[] = "keyman32.dll"; #endif - //GetModuleFileName(GetModuleHandle(LIBRARY_NAME), buf, 260); - GetModuleFileName(g_hInstance, versioned_filename, 260); char *p = strrchr(versioned_filename, '\\'); // find last occurrence of '\' @@ -616,9 +613,6 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { strncat(proxy_modulename, keyman_name, 13); } - SendDebugMessageFormat( - 0, sdmKeyboard, 0, "Testing methods to get library name test lib name:[%s], versioned_filename:[%s]", test_library_name, versioned_filename); - if (!LoadLibrary(proxy_modulename)) { SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", proxy_modulename, GetLastError()); return FALSE; diff --git a/windows/src/engine/keyman32-ver/calldll.h b/windows/src/engine/keyman32-ver/calldll.h index 8d951d34cc8..d3c38a93673 100644 --- a/windows/src/engine/keyman32-ver/calldll.h +++ b/windows/src/engine/keyman32-ver/calldll.h @@ -29,10 +29,10 @@ BOOL UnloadDLLs(LPINTKEYBOARDINFO lpkbi); BOOL DeactivateDLLs(LPINTKEYBOARDINFO lpkbi); BOOL ActivateDLLs(LPINTKEYBOARDINFO lpkbi); -/* Before keyman32/64 started using versioned dll names the IMX keyboard framework was written +/* The IMX keyboard framework was written before keyman32/64 started using versioned dll names. Third party developers will have used the name "keyman32/64dll" so we need to honor that for these -keyboards. We do this by having a proxy dll that forwards to the versioned keyman dll opened for this process -We only want and need to do this if there is imx keyboard */ +keyboards. This is done by having a proxy dll that forwards to the versioned keyman dll opened for this process +This is only needed if there is imx keyboard */ BOOL IsIMWindow(HWND hwnd); diff --git a/windows/src/engine/keyman32-ver/k32_globals.cpp b/windows/src/engine/keyman32-ver/k32_globals.cpp index 2c7f0cfb047..989a787f959 100644 --- a/windows/src/engine/keyman32-ver/k32_globals.cpp +++ b/windows/src/engine/keyman32-ver/k32_globals.cpp @@ -275,7 +275,6 @@ static char static wchar_t f_BaseKeyboardName[256] = L"", // I4583 f_BaseKeyboardNameAlt[64] = L""; // I4583 -// f_KMEngine_Rootpath[256] = L""; __declspec(align(8)) static UINT f_vk_prefix = 0; @@ -389,16 +388,6 @@ BOOL Globals::InitSettings() { reg.CloseKey(); SendDebugMessageFormat(0, sdmAIDefault, 0, "Globals::InitSettings - vk_prefix set in '" REGSZ_ZapVirtualKeyCode "' to %x" , f_vk_prefix); } - - // Read Keyman Root path will combine with above in the future just quickly hack in. - // if (reg.OpenKeyReadOnly(REGSZ_KeymanLM) && - // reg.ValueExists(REGSZ_RootPath)) { - - // if(reg.ReadString(REGSZ_RootPath, f_KMEngine_Rootpath, sizeof(f_KMEngine_Rootpath) / sizeof(f_KMEngine_Rootpath[0]))) - // reg.CloseKey(); - // SendDebugMessageFormat(0, sdmAIDefault, 0, "Globals::InitSettings - KMEngine_Rootpath is %s" , f_KMEngine_Rootpath); - // } - return TRUE; } diff --git a/windows/src/engine/keyman32-ver/keyman-debug-etw.man b/windows/src/engine/keyman32-ver/keyman-debug-etw.man deleted file mode 100644 index e8c7331d3f8..00000000000 --- a/windows/src/engine/keyman32-ver/keyman-debug-etw.man +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/windows/src/engine/keyman32-ver/keyman-debug-etw.rc b/windows/src/engine/keyman32-ver/keyman-debug-etw.rc deleted file mode 100644 index 7beaac78043..00000000000 --- a/windows/src/engine/keyman32-ver/keyman-debug-etw.rc +++ /dev/null @@ -1,3 +0,0 @@ -LANGUAGE 0x9,0x1 -1 11 "MSG00001.bin" -1 WEVT_TEMPLATE "keyman-debug-etwTEMP.BIN" From d26b804399167b7a02c7fdac6b6eda9010e9cb81 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 6 Jul 2023 14:12:34 +1000 Subject: [PATCH 19/40] feat(windows): untrack support files --- .../src/engine/keyman32-ver/keyman32-ver.def | 46 ----------- .../keyman32-ver/keyman64-build-version.h | 66 ---------------- windows/src/engine/keyman32-ver/premake.mak | 30 ------- windows/src/engine/keyman32/exports.h | 78 ------------------- windows/src/engine/keyman64-ver/TODO.TXT | 2 - windows/src/engine/keyman64-ver/premake.mak | 26 ------- windows/src/engine/keyman64/exports.h | 75 ------------------ windows/src/engine/keyman64/premake.mak | 26 ------- 8 files changed, 349 deletions(-) delete mode 100644 windows/src/engine/keyman32-ver/keyman32-ver.def delete mode 100644 windows/src/engine/keyman32-ver/keyman64-build-version.h delete mode 100644 windows/src/engine/keyman32-ver/premake.mak delete mode 100644 windows/src/engine/keyman32/exports.h delete mode 100644 windows/src/engine/keyman64-ver/TODO.TXT delete mode 100644 windows/src/engine/keyman64-ver/premake.mak delete mode 100644 windows/src/engine/keyman64/exports.h delete mode 100644 windows/src/engine/keyman64/premake.mak diff --git a/windows/src/engine/keyman32-ver/keyman32-ver.def b/windows/src/engine/keyman32-ver/keyman32-ver.def deleted file mode 100644 index 4d3316906da..00000000000 --- a/windows/src/engine/keyman32-ver/keyman32-ver.def +++ /dev/null @@ -1,46 +0,0 @@ -LIBRARY keyman32-ver17.0.110-alpha-local - -EXPORTS - Keyman_GetInitialised - Keyman_Initialise - Keyman_Exit - Keyman_GetLastActiveWindow - Keyman_GetLastFocusWindow - KMSetOutput - KMGetContext - KMQueueAction - KMDisplayIM - KMHideIM - KMGetActiveKeyboard - KMGetKeyboardPath - - TIPActivateEx - TIPActivateKeyboard - TIPProcessKey - TIPIsKeymanRunning - GetKeyboardPreservedKeys - - GetActiveKeymanID - Keyman_RegisterControllerWindow - Keyman_UnregisterControllerWindow - Keyman_RestartEngine - - Keyman_SendMasterController - Keyman_PostControllers - Keyman_PostMasterController - - Keyman_StartExit - Keyman_ResetInitialisation - - Keyman_WriteDebugEvent - - Keyman_UpdateTouchPanelVisibility - - Keyman_Diagnostic - - Keyman_RegisterMasterController - Keyman_UnregisterMasterController - Keyman_RegisterControllerThread - Keyman_UnregisterControllerThread - - SetCustomPostKeyCallback diff --git a/windows/src/engine/keyman32-ver/keyman64-build-version.h b/windows/src/engine/keyman32-ver/keyman64-build-version.h deleted file mode 100644 index 5c52e4b9950..00000000000 --- a/windows/src/engine/keyman32-ver/keyman64-build-version.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - Name: Keyman64 - Copyright: Copyright (C) SIL International. - Documentation: - Description: - Create Date: 1 Aug 2006 - - Modified Date: 9 Aug 2015 - Authors: mcdurdin - Related Files: - Dependencies: - - Bugs: - Todo: - Notes: - History: 01 Aug 2006 - mcdurdin - Remove HWND parameter from SelectKeyboard - 23 Aug 2006 - mcdurdin - Add version 7.0 system stores - VISUALKEYBOARD, KMW_RTL, KMW_HELPFILE, KMW_HELPTEXT, KMW_EMBEDJS - 14 Sep 2006 - mcdurdin - Add IsSysTrayWindow function - 30 May 2007 - mcdurdin - I864 - Log exceptions in hookprocs - 13 Jul 2007 - mcdurdin - I934 - Prep for x64 - 05 Nov 2007 - mcdurdin - I1087 - Add hotkeys to switch languages (Pro) - 27 Mar 2008 - mcdurdin - I1358 - Add TSS_WINDOWSLANGUAGES - 27 Mar 2008 - mcdurdin - I1287 - switch keyboard and language together - 14 Jun 2008 - mcdurdin - I1389 - BKSP single backspace for Vista+ - 27 Jan 2009 - mcdurdin - I1797 - AIWin2000 fallback - 30 Jan 2009 - mcdurdin - I1835 - Improve refresh, debug performance - 11 Dec 2009 - mcdurdin - I934 - x64 - Initial version - 12 Mar 2010 - mcdurdin - I934 - x64 - Complete - 12 Mar 2010 - mcdurdin - I2229 - Remove hints and warnings - 22 Mar 2010 - mcdurdin - Compiler tidyup - 29 Mar 2010 - mcdurdin - I1089 - One keyboard - all applications - 29 Mar 2010 - mcdurdin - I2265 - Keyboard switching reliability - 06 Apr 2010 - mcdurdin - I2271 - Select Keyboard tidy up - 04 May 2010 - mcdurdin - I2355 - Resolve deadlocks loading keyman32.dll - 04 May 2010 - mcdurdin - I2349 - Pause key for debug log switch - 04 May 2010 - mcdurdin - I2353 - DebugLastError function - 25 May 2010 - mcdurdin - I1632 - Keyboard Options - 01 Dec 2012 - mcdurdin - I3613 - V9.0 - System shadow keyboards obsolete, strip out remaining code - 01 Dec 2012 - mcdurdin - I3616 - V9.0 - Language association obsolete, strip out code - 07 Nov 2013 - mcdurdin - I3949 - V9.0 - Keyboard selection and notification needs consolidation - 17 Dec 2013 - mcdurdin - I4006 - V9.0 - Remove old aiDefault code - 06 Mar 2014 - mcdurdin - I4124 - V9.0 - Language switch dialog is not working in v9 - 16 Apr 2014 - mcdurdin - I4169 - V9.0 - Mnemonic layouts should be recompiled to positional based on user-selected base keyboard - 28 May 2014 - mcdurdin - I4220 - V9.0 - Remove references to LoadKeyboardLayout, Preload, Substitutes, etc. and use only TSF - 16 Jun 2014 - mcdurdin - I4271 - V9.0 - Switch language for all applications is not working - 23 Jun 2014 - mcdurdin - I4287 - V9.0 - Remove extraneous AppIntegration class type tests - 03 Aug 2014 - mcdurdin - I4326 - V9.0 - Switch-off hotkey not working, then keyboard hotkey stopped working (win 8.1 jeremy) [High] - 13 Aug 2014 - mcdurdin - I4370 - Deadkeys are still not working in Winword TIP mode - 14 Aug 2014 - mcdurdin - I4379 - V9.0 - kmtip should use the Keyman debug logging framework - 16 Oct 2014 - mcdurdin - I4462 - V9.0 - Keyman had a mismatch between KEYBOARDINFO and INTKEYBOARDINFO - 03 Feb 2015 - mcdurdin - I4582 - V9.0 - Most underlying layout code in Keyman32 is now obsolete and needs to be removed - 09 Aug 2015 - mcdurdin - I4844 - Tidy up PostDummyKeyEvent calls -*/ -/***************************************************************************/ // I4006 // I4169 - -#ifndef _KEYMAN64_BUILD_VERSION_H -#define _KEYMAN64_BUILD_VERSION_H - -#ifdef _WIN64 -#define LIBRARY_NAME "keyman64-ver17.0.110-alpha-local.dll" -#else -#define LIBRARY_NAME "keyman32-ver17.0.110-alpha-local.dll" -#endif - - -#endif // _KEYMAN64_BUILD_VERSION_H diff --git a/windows/src/engine/keyman32-ver/premake.mak b/windows/src/engine/keyman32-ver/premake.mak deleted file mode 100644 index 5b0b3b23ea1..00000000000 --- a/windows/src/engine/keyman32-ver/premake.mak +++ /dev/null @@ -1,30 +0,0 @@ -# Copy files to correct names in \release; this file is munged by mkver to premake.mak -# - -!include ..\..\defines.mak - -default: - echo Please don't call this file directly -- used by Makefile - -clean: - $(MSBUILD) $(MSBUILD_CLEAN) keyman32-ver.vcxproj - -signcode: - $(SIGNCODE) /d "Keyman Engine" $(PROGRAM)\engine\keyman32-ver17.0.48-alpha-local.dll - -wrap-symbols: - $(SYMSTORE) $(PROGRAM)\engine\keyman32-ver17.0.48-alpha-local.dll /t keyman-engine-windows - $(SYMSTORE) $(DEBUGPATH)\engine\keyman32-ver17.0.48-alpha-local.pdb /t keyman-engine-windows - - - -install: - $(COPY) $(PROGRAM)\engine\keyman32-ver17.0.48-alpha-local.dll "$(INSTALLPATH_KEYMANENGINE)\keyman32-ver17.0.48-alpha-local.dll" - echo You may want to manually tweak keyman-debug-etw.man and fill in $(INSTALLPATH_KEYMANENGINE)\keyman32-ver17.0.48-alpha-local.dll - echo and then run wevtutil im keyman-debug-etw.man to get the latest event tracing - -build: - $(MSBUILD) keyman32-ver.vcxproj $(MSBUILD_BUILD) "/p:VersionWithTag=17.0.48-alpha-local;LIBRARY=keyman32-ver17.0.48-alpha-local" - $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver17.0.48-alpha-local.dll $(PROGRAM)\engine - $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver17.0.48-alpha-local.pdb $(DEBUGPATH)\engine -# $(COPY) $(WIN32_TARGET_PATH)\keyman32-ver.lib $(OUTLIB) done by vcxproj diff --git a/windows/src/engine/keyman32/exports.h b/windows/src/engine/keyman32/exports.h deleted file mode 100644 index cafbfee8101..00000000000 --- a/windows/src/engine/keyman32/exports.h +++ /dev/null @@ -1,78 +0,0 @@ -// exports.h -// -// Header file to export all the functions to a versioned keyman32{version_tag}.dll -// - -#pragma comment(linker,"/export:GetActiveKeymanID=keyman32-ver17.0.110-alpha-local.dll.GetActiveKeymanID,@4") -#pragma comment(linker,"/export:GetKeyboardPreservedKeys=keyman32-ver17.0.110-alpha-local.dll.GetKeyboardPreservedKeys,@5") -#pragma comment(linker,"/export:KMDisplayIM=keyman32-ver17.0.110-alpha-local.dll.KMDisplayIM,@6") -#pragma comment(linker,"/export:KMGetActiveKeyboard=keyman32-ver17.0.110-alpha-local.dll.KMGetActiveKeyboard,@7") -#pragma comment(linker,"/export:KMGetContext=keyman32-ver17.0.110-alpha-local.dll.KMGetContext,@8") -#pragma comment(linker,"/export:KMGetKeyboardPath=keyman32-ver17.0.110-alpha-local.dll.KMGetKeyboardPath,@9") -#pragma comment(linker,"/export:KMHideIM=keyman32-ver17.0.110-alpha-local.dll.KMHideIM,@10") -#pragma comment(linker,"/export:KMQueueAction=keyman32-ver17.0.110-alpha-local.dll.KMQueueAction,@11") -#pragma comment(linker,"/export:KMSetOutput=keyman32-ver17.0.110-alpha-local.dll.KMSetOutput,@12") -#pragma comment(linker,"/export:Keyman_Diagnostic=keyman32-ver17.0.110-alpha-local.dll.Keyman_Diagnostic,@1") -#pragma comment(linker,"/export:Keyman_Exit=keyman32-ver17.0.110-alpha-local.dll.Keyman_Exit,@13") -#pragma comment(linker,"/export:Keyman_ForceKeyboard=keyman32-ver17.0.110-alpha-local.dll.Keyman_ForceKeyboard,@14") -#pragma comment(linker,"/export:Keyman_GetInitialised=keyman32-ver17.0.110-alpha-local.dll.Keyman_GetInitialised,@15") -#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=keyman32-ver17.0.110-alpha-local.dll.Keyman_GetLastActiveWindow,@16") -#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=keyman32-ver17.0.110-alpha-local.dll.Keyman_GetLastFocusWindow,@17") -#pragma comment(linker,"/export:Keyman_Initialise=keyman32-ver17.0.110-alpha-local.dll.Keyman_Initialise,@18") -#pragma comment(linker,"/export:Keyman_PostControllers=keyman32-ver17.0.110-alpha-local.dll.Keyman_PostControllers,@19") -#pragma comment(linker,"/export:Keyman_PostMasterController=keyman32-ver17.0.110-alpha-local.dll.Keyman_PostMasterController,@20") -#pragma comment(linker,"/export:Keyman_RegisterControllerThread=keyman32-ver17.0.110-alpha-local.dll.Keyman_RegisterControllerThread,@21") -#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=keyman32-ver17.0.110-alpha-local.dll.Keyman_RegisterControllerWindow,@22") -#pragma comment(linker,"/export:Keyman_RegisterMasterController=keyman32-ver17.0.110-alpha-local.dll.Keyman_RegisterMasterController,@23") -#pragma comment(linker,"/export:Keyman_ResetInitialisation=keyman32-ver17.0.110-alpha-local.dll.Keyman_ResetInitialisation,@24") -#pragma comment(linker,"/export:Keyman_RestartEngine=keyman32-ver17.0.110-alpha-local.dll.Keyman_RestartEngine,@25") -#pragma comment(linker,"/export:Keyman_SendMasterController=keyman32-ver17.0.110-alpha-local.dll.Keyman_SendMasterController,@26") -#pragma comment(linker,"/export:Keyman_StartExit=keyman32-ver17.0.110-alpha-local.dll.Keyman_StartExit,@27") -#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=keyman32-ver17.0.110-alpha-local.dll.Keyman_StopForcingKeyboard,@28") -#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=keyman32-ver17.0.110-alpha-local.dll.Keyman_UnregisterControllerThread,@29") -#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=keyman32-ver17.0.110-alpha-local.dll.Keyman_UnregisterControllerWindow,@30") -#pragma comment(linker,"/export:Keyman_UnregisterMasterController=keyman32-ver17.0.110-alpha-local.dll.Keyman_UnregisterMasterController,@31") -#pragma comment(linker,"/export:Keyman_UpdateTouchPanelVisibility=keyman32-ver17.0.110-alpha-local.dll.Keyman_UpdateTouchPanelVisibility,@2") -#pragma comment(linker,"/export:Keyman_WriteDebugEvent=keyman32-ver17.0.110-alpha-local.dll.Keyman_WriteDebugEvent,@32") -#pragma comment(linker,"/export:SetCustomPostKeyCallback=keyman32-ver17.0.110-alpha-local.dll.SetCustomPostKeyCallback,@3") -#pragma comment(linker,"/export:TIPActivateEx=keyman32-ver17.0.110-alpha-local.dll.TIPActivateEx,@33") -#pragma comment(linker,"/export:TIPActivateKeyboard=keyman32-ver17.0.110-alpha-local.dll.TIPActivateKeyboard,@34") -#pragma comment(linker,"/export:TIPIsKeymanRunning=keyman32-ver17.0.110-alpha-local.dll.TIPIsKeymanRunning,@35") -#pragma comment(linker,"/export:TIPProcessKey=keyman32-ver17.0.110-alpha-local.dll.TIPProcessKey,@36") -#pragma comment(linker,"/export:kbp_state_get_intermediate_context=keyman32-ver17.0.110-alpha-local.dll.kbp_state_get_intermediate_context,@37") -#pragma comment(linker,"/export:km_kbp_context_append=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_append,@38") -#pragma comment(linker,"/export:km_kbp_context_clear=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_clear,@39") -#pragma comment(linker,"/export:km_kbp_context_get=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_get,@40") -#pragma comment(linker,"/export:km_kbp_context_item_list_size=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_item_list_size,@41") -#pragma comment(linker,"/export:km_kbp_context_items_dispose=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_items_dispose,@42") -#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_items_from_utf16,@43") -#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_items_from_utf8,@44") -#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_items_to_utf16,@45") -#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_items_to_utf8,@46") -#pragma comment(linker,"/export:km_kbp_context_length=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_length,@47") -#pragma comment(linker,"/export:km_kbp_context_set=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_set,@48") -#pragma comment(linker,"/export:km_kbp_context_shrink=keyman32-ver17.0.110-alpha-local.dll.km_kbp_context_shrink,@49") -#pragma comment(linker,"/export:km_kbp_event=keyman32-ver17.0.110-alpha-local.dll.km_kbp_event,@50") -#pragma comment(linker,"/export:km_kbp_get_engine_attrs=keyman32-ver17.0.110-alpha-local.dll.km_kbp_get_engine_attrs,@51") -#pragma comment(linker,"/export:km_kbp_keyboard_dispose=keyman32-ver17.0.110-alpha-local.dll.km_kbp_keyboard_dispose,@52") -#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=keyman32-ver17.0.110-alpha-local.dll.km_kbp_keyboard_get_attrs,@53") -#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=keyman32-ver17.0.110-alpha-local.dll.km_kbp_keyboard_get_imx_list,@54") -#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=keyman32-ver17.0.110-alpha-local.dll.km_kbp_keyboard_get_key_list,@55") -#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=keyman32-ver17.0.110-alpha-local.dll.km_kbp_keyboard_imx_list_dispose,@56") -#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=keyman32-ver17.0.110-alpha-local.dll.km_kbp_keyboard_key_list_dispose,@57") -#pragma comment(linker,"/export:km_kbp_keyboard_load=keyman32-ver17.0.110-alpha-local.dll.km_kbp_keyboard_load,@58") -#pragma comment(linker,"/export:km_kbp_options_list_size=keyman32-ver17.0.110-alpha-local.dll.km_kbp_options_list_size,@59") -#pragma comment(linker,"/export:km_kbp_process_event=keyman32-ver17.0.110-alpha-local.dll.km_kbp_process_event,@60") -#pragma comment(linker,"/export:km_kbp_process_queued_actions=keyman32-ver17.0.110-alpha-local.dll.km_kbp_process_queued_actions,@61") -#pragma comment(linker,"/export:km_kbp_state_action_items=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_action_items,@62") -#pragma comment(linker,"/export:km_kbp_state_clone=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_clone,@63") -#pragma comment(linker,"/export:km_kbp_state_context=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_context,@64") -#pragma comment(linker,"/export:km_kbp_state_create=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_create,@65") -#pragma comment(linker,"/export:km_kbp_state_dispose=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_dispose,@66") -#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_imx_deregister_callback,@67") -#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_imx_register_callback,@68") -#pragma comment(linker,"/export:km_kbp_state_option_lookup=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_option_lookup,@69") -#pragma comment(linker,"/export:km_kbp_state_options_to_json=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_options_to_json,@70") -#pragma comment(linker,"/export:km_kbp_state_options_update=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_options_update,@71") -#pragma comment(linker,"/export:km_kbp_state_queue_action_items=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_queue_action_items,@72") -#pragma comment(linker,"/export:km_kbp_state_to_json=keyman32-ver17.0.110-alpha-local.dll.km_kbp_state_to_json,@73") diff --git a/windows/src/engine/keyman64-ver/TODO.TXT b/windows/src/engine/keyman64-ver/TODO.TXT deleted file mode 100644 index 85c2d719f36..00000000000 --- a/windows/src/engine/keyman64-ver/TODO.TXT +++ /dev/null @@ -1,2 +0,0 @@ -1. Check all code completely & cleanup any new portions -2. Fully comment diff --git a/windows/src/engine/keyman64-ver/premake.mak b/windows/src/engine/keyman64-ver/premake.mak deleted file mode 100644 index df34a25e213..00000000000 --- a/windows/src/engine/keyman64-ver/premake.mak +++ /dev/null @@ -1,26 +0,0 @@ -# Copy files to correct names in \release; this file is munged by mkver to download.mak -# - -!include ..\..\defines.mak - -default: - echo Please don't call this file directly -- used by Makefile - -clean: - $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" - -signcode: - $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll - -wrap-symbols: - $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll /t keyman-engine-windows - $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver17.0.48-alpha-local.pdb /t keyman-engine-windows - -install: - $(COPY) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver17.0.48-alpha-local.dll" - - -build: - $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" - $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.dll $(PROGRAM)\engine - $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.pdb $(DEBUGPATH)\engine diff --git a/windows/src/engine/keyman64/exports.h b/windows/src/engine/keyman64/exports.h deleted file mode 100644 index 3a01bad63c6..00000000000 --- a/windows/src/engine/keyman64/exports.h +++ /dev/null @@ -1,75 +0,0 @@ -// exports.h -// -// Simple header to instruct the linker to forward function exports to another library. -// - -#pragma comment(linker,"/export:GetActiveKeymanID=keyman64-ver17.0.48-alpha-local.dll.GetActiveKeymanID,@1") -#pragma comment(linker,"/export:GetKeyboardPreservedKeys=keyman64-ver17.0.48-alpha-local.dll.GetKeyboardPreservedKeys,@2") -#pragma comment(linker,"/export:KMDisplayIM=keyman64-ver17.0.48-alpha-local.dll.KMDisplayIM,@3") -#pragma comment(linker,"/export:KMGetActiveKeyboard=keyman64-ver17.0.48-alpha-local.dll.KMGetActiveKeyboard,@4") -#pragma comment(linker,"/export:KMGetContext=keyman64-ver17.0.48-alpha-local.dll.KMGetContext,@5") -#pragma comment(linker,"/export:KMGetKeyboardPath=keyman64-ver17.0.48-alpha-local.dll.KMGetKeyboardPath,@6") -#pragma comment(linker,"/export:KMHideIM=keyman64-ver17.0.48-alpha-local.dll.KMHideIM,@7") -#pragma comment(linker,"/export:KMQueueAction=keyman64-ver17.0.48-alpha-local.dll.KMQueueAction,@8") -#pragma comment(linker,"/export:KMSetOutput=keyman64-ver17.0.48-alpha-local.dll.KMSetOutput,@9") -#pragma comment(linker,"/export:Keyman_Exit=keyman64-ver17.0.48-alpha-local.dll.Keyman_Exit,@10") -#pragma comment(linker,"/export:Keyman_ForceKeyboard=keyman64-ver17.0.48-alpha-local.dll.Keyman_ForceKeyboard,@11") -#pragma comment(linker,"/export:Keyman_GetInitialised=keyman64-ver17.0.48-alpha-local.dll.Keyman_GetInitialised,@12") -#pragma comment(linker,"/export:Keyman_GetLastActiveWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_GetLastActiveWindow,@13") -#pragma comment(linker,"/export:Keyman_GetLastFocusWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_GetLastFocusWindow,@14") -#pragma comment(linker,"/export:Keyman_Initialise=keyman64-ver17.0.48-alpha-local.dll.Keyman_Initialise,@15") -#pragma comment(linker,"/export:Keyman_PostControllers=keyman64-ver17.0.48-alpha-local.dll.Keyman_PostControllers,@16") -#pragma comment(linker,"/export:Keyman_PostMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_PostMasterController,@17") -#pragma comment(linker,"/export:Keyman_RegisterControllerThread=keyman64-ver17.0.48-alpha-local.dll.Keyman_RegisterControllerThread,@18") -#pragma comment(linker,"/export:Keyman_RegisterControllerWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_RegisterControllerWindow,@19") -#pragma comment(linker,"/export:Keyman_RegisterMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_RegisterMasterController,@20") -#pragma comment(linker,"/export:Keyman_ResetInitialisation=keyman64-ver17.0.48-alpha-local.dll.Keyman_ResetInitialisation,@21") -#pragma comment(linker,"/export:Keyman_RestartEngine=keyman64-ver17.0.48-alpha-local.dll.Keyman_RestartEngine,@22") -#pragma comment(linker,"/export:Keyman_SendMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_SendMasterController,@23") -#pragma comment(linker,"/export:Keyman_StartExit=keyman64-ver17.0.48-alpha-local.dll.Keyman_StartExit,@24") -#pragma comment(linker,"/export:Keyman_StopForcingKeyboard=keyman64-ver17.0.48-alpha-local.dll.Keyman_StopForcingKeyboard,@25") -#pragma comment(linker,"/export:Keyman_UnregisterControllerThread=keyman64-ver17.0.48-alpha-local.dll.Keyman_UnregisterControllerThread,@26") -#pragma comment(linker,"/export:Keyman_UnregisterControllerWindow=keyman64-ver17.0.48-alpha-local.dll.Keyman_UnregisterControllerWindow,@27") -#pragma comment(linker,"/export:Keyman_UnregisterMasterController=keyman64-ver17.0.48-alpha-local.dll.Keyman_UnregisterMasterController,@28") -#pragma comment(linker,"/export:Keyman_WriteDebugEvent=keyman64-ver17.0.48-alpha-local.dll.Keyman_WriteDebugEvent,@29") -#pragma comment(linker,"/export:TIPActivateEx=keyman64-ver17.0.48-alpha-local.dll.TIPActivateEx,@30") -#pragma comment(linker,"/export:TIPActivateKeyboard=keyman64-ver17.0.48-alpha-local.dll.TIPActivateKeyboard,@31") -#pragma comment(linker,"/export:TIPIsKeymanRunning=keyman64-ver17.0.48-alpha-local.dll.TIPIsKeymanRunning,@32") -#pragma comment(linker,"/export:TIPProcessKey=keyman64-ver17.0.48-alpha-local.dll.TIPProcessKey,@33") -#pragma comment(linker,"/export:kbp_state_get_intermediate_context=keyman64-ver17.0.48-alpha-local.dll.kbp_state_get_intermediate_context,@34") -#pragma comment(linker,"/export:km_kbp_context_append=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_append,@35") -#pragma comment(linker,"/export:km_kbp_context_clear=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_clear,@36") -#pragma comment(linker,"/export:km_kbp_context_get=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_get,@37") -#pragma comment(linker,"/export:km_kbp_context_item_list_size=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_item_list_size,@38") -#pragma comment(linker,"/export:km_kbp_context_items_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_dispose,@39") -#pragma comment(linker,"/export:km_kbp_context_items_from_utf16=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_from_utf16,@40") -#pragma comment(linker,"/export:km_kbp_context_items_from_utf8=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_from_utf8,@41") -#pragma comment(linker,"/export:km_kbp_context_items_to_utf16=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_to_utf16,@42") -#pragma comment(linker,"/export:km_kbp_context_items_to_utf8=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_items_to_utf8,@43") -#pragma comment(linker,"/export:km_kbp_context_length=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_length,@44") -#pragma comment(linker,"/export:km_kbp_context_set=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_set,@45") -#pragma comment(linker,"/export:km_kbp_context_shrink=keyman64-ver17.0.48-alpha-local.dll.km_kbp_context_shrink,@46") -#pragma comment(linker,"/export:km_kbp_event=keyman64-ver17.0.48-alpha-local.dll.km_kbp_event,@47") -#pragma comment(linker,"/export:km_kbp_get_engine_attrs=keyman64-ver17.0.48-alpha-local.dll.km_kbp_get_engine_attrs,@48") -#pragma comment(linker,"/export:km_kbp_keyboard_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_dispose,@49") -#pragma comment(linker,"/export:km_kbp_keyboard_get_attrs=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_attrs,@50") -#pragma comment(linker,"/export:km_kbp_keyboard_get_imx_list=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_imx_list,@51") -#pragma comment(linker,"/export:km_kbp_keyboard_get_key_list=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_get_key_list,@52") -#pragma comment(linker,"/export:km_kbp_keyboard_imx_list_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_imx_list_dispose,@53") -#pragma comment(linker,"/export:km_kbp_keyboard_key_list_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_key_list_dispose,@54") -#pragma comment(linker,"/export:km_kbp_keyboard_load=keyman64-ver17.0.48-alpha-local.dll.km_kbp_keyboard_load,@55") -#pragma comment(linker,"/export:km_kbp_options_list_size=keyman64-ver17.0.48-alpha-local.dll.km_kbp_options_list_size,@56") -#pragma comment(linker,"/export:km_kbp_process_event=keyman64-ver17.0.48-alpha-local.dll.km_kbp_process_event,@57") -#pragma comment(linker,"/export:km_kbp_process_queued_actions=keyman64-ver17.0.48-alpha-local.dll.km_kbp_process_queued_actions,@58") -#pragma comment(linker,"/export:km_kbp_state_action_items=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_action_items,@59") -#pragma comment(linker,"/export:km_kbp_state_clone=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_clone,@60") -#pragma comment(linker,"/export:km_kbp_state_context=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_context,@61") -#pragma comment(linker,"/export:km_kbp_state_create=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_create,@62") -#pragma comment(linker,"/export:km_kbp_state_dispose=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_dispose,@63") -#pragma comment(linker,"/export:km_kbp_state_imx_deregister_callback=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_imx_deregister_callback,@64") -#pragma comment(linker,"/export:km_kbp_state_imx_register_callback=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_imx_register_callback,@65") -#pragma comment(linker,"/export:km_kbp_state_option_lookup=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_option_lookup,@66") -#pragma comment(linker,"/export:km_kbp_state_options_to_json=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_options_to_json,@67") -#pragma comment(linker,"/export:km_kbp_state_options_update=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_options_update,@68") -#pragma comment(linker,"/export:km_kbp_state_queue_action_items=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_queue_action_items,@69") -#pragma comment(linker,"/export:km_kbp_state_to_json=keyman64-ver17.0.48-alpha-local.dll.km_kbp_state_to_json,@70") diff --git a/windows/src/engine/keyman64/premake.mak b/windows/src/engine/keyman64/premake.mak deleted file mode 100644 index df34a25e213..00000000000 --- a/windows/src/engine/keyman64/premake.mak +++ /dev/null @@ -1,26 +0,0 @@ -# Copy files to correct names in \release; this file is munged by mkver to download.mak -# - -!include ..\..\defines.mak - -default: - echo Please don't call this file directly -- used by Makefile - -clean: - $(MSBUILD) keyman64-ver.sln $(MSBUILD_CLEAN) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" - -signcode: - $(SIGNCODE) /d "Keyman Engine x64" $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll - -wrap-symbols: - $(SYMSTORE) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll /t keyman-engine-windows - $(SYMSTORE) $(DEBUGPATH)\engine\keyman64-ver17.0.48-alpha-local.pdb /t keyman-engine-windows - -install: - $(COPY) $(PROGRAM)\engine\keyman64-ver17.0.48-alpha-local.dll "$(INSTALLPATH_KEYMANENGINE)\keyman64-ver17.0.48-alpha-local.dll" - - -build: - $(MSBUILD) keyman64-ver.sln $(MSBUILD_BUILD) "/p:Platform=x64;VersionWithTag=17.0.48-alpha-local" - $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.dll $(PROGRAM)\engine - $(COPY) $(X64_TARGET_PATH)\keyman64-ver17.0.48-alpha-local.pdb $(DEBUGPATH)\engine From d2f79f33ea827a587d2f166cbb7d372a511dd921 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 6 Jul 2023 14:31:18 +1000 Subject: [PATCH 20/40] feat(windows): update gitignore --- .gitignore | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index 0abec10c3b1..ab1e5c1f09b 100644 --- a/.gitignore +++ b/.gitignore @@ -198,3 +198,20 @@ lcov.info # /developer/src/test/auto/kmcomp/*.kvk # /developer/src/test/auto/kmcomp/*.kvk* # /developer/src/test/auto/kmcomp/*.txt +windows/src/engine/keyman32/exports.h +.gitignore +windows/src/engine/keyman32/premake.mak +windows/src/engine/keyman32-ver/keyman32-ver.def +windows/src/engine/keyman32-ver/keyman64-build-version.h +windows/src/engine/keyman32-ver/keyman-debug-etwTEMP.BIN +windows/src/engine/keyman32-ver/keyman-engine.pdb +windows/src/engine/keyman32-ver/MSG00001.bin +windows/src/engine/keyman32-ver/KEYMAN32-ver.res +windows/src/engine/keyman32-ver/premake.mak +windows/src/engine/keyman64/exports.h +windows/src/engine/keyman64/keyman-debug-etwTEMP.BIN +windows/src/engine/keyman64/MSG00001.bin +windows/src/engine/keyman64/premake.mak +windows/src/engine/keyman64-ver/premake.mak +windows/src/engine/keyman64-ver/TODO.TXT +windows/src/global/inc/keymanversion_build.h From c19300a309ff6c4ce7fc48feae60a80bb02f083f Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Tue, 11 Jul 2023 16:09:38 +1000 Subject: [PATCH 21/40] feat(windows): commit review suggestions Co-authored-by: Marc Durdin --- windows/src/engine/keyman32-ver/calldll.cpp | 4 ++-- windows/src/engine/keyman64-ver/Makefile | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 3da5e05b23b..fb2043892c1 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -595,8 +595,8 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { return FALSE; } - char versioned_filename[260]; - char proxy_modulename[260]; + char versioned_filename[_MAX_PATH]; + char proxy_modulename[_MAX_PATH]; #ifdef _WIN64 char keyman_name[] = "keyman64.dll"; diff --git a/windows/src/engine/keyman64-ver/Makefile b/windows/src/engine/keyman64-ver/Makefile index 7ae8fda9ff4..9644915857c 100644 --- a/windows/src/engine/keyman64-ver/Makefile +++ b/windows/src/engine/keyman64-ver/Makefile @@ -13,20 +13,19 @@ build: version.res dirs # $(COPY) keyman64-ver.lib $(OUTLIB) - already done -clean: def-clean - $(MKVER_U) premake.in premake.mak +clean: def-clean premake.mak $(MAKE) -fpremake.mak clean -signcode: - $(MKVER_U) premake.in premake.mak +signcode: premake.mak $(MAKE) -fpremake.mak signcode -wrap-symbols: - $(MKVER_U) premake.in premake.mak +wrap-symbols: premake.mak $(MAKE) -fpremake.mak wrap-symbols -install: - $(MKVER_U) premake.in premake.mak +install: premake.mak $(MAKE) -fpremake.mak install + +premake.mak: + $(MKVER_U) premake.in premake.mak !include ..\..\Target.mak From 086c14a973d84480e27275c4b40a4581ffe81d2c Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 11 Jul 2023 16:04:09 +1000 Subject: [PATCH 22/40] feat(windows): Address review comments step1 --- windows/src/engine/inst/components.wxs | 1 - windows/src/engine/keyman32-ver/Makefile | 2 +- windows/src/engine/keyman32/version.rc | 6 ++--- .../src/engine/keyman64/keyman64_proxy.cpp | 10 -------- windows/src/engine/keyman64/version.rc | 6 ++--- .../kmcomapi/com/system/keymancontrol.pas | 23 ------------------- .../src/engine/kmcomapi/util/utilkeyman.pas | 16 ++++--------- 7 files changed, 12 insertions(+), 52 deletions(-) diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index 0bffd510753..865ab9261ff 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -152,7 +152,6 @@ - diff --git a/windows/src/engine/keyman32-ver/Makefile b/windows/src/engine/keyman32-ver/Makefile index c3be262ab4a..e60e9fdfb52 100644 --- a/windows/src/engine/keyman32-ver/Makefile +++ b/windows/src/engine/keyman32-ver/Makefile @@ -6,11 +6,11 @@ build: version.res dirs pull-core $(MKVER_U) premake.in premake.mak + $(MKVER_U) $(ROOT)\src\engine\keyman32-ver\keyman64-build-version.in $(ROOT)\src\engine\keyman32-ver\keyman64-build-version.h $(MKVER_U) keyman32-ver.in keyman32-ver.def $(MAKE) -fpremake.mak build clean: def-clean - $(MKVER_U) premake.in premake.mak $(MAKE) -fpremake.mak clean signcode: diff --git a/windows/src/engine/keyman32/version.rc b/windows/src/engine/keyman32/version.rc index 2257b12f9d1..6b0c73ac2b7 100644 --- a/windows/src/engine/keyman32/version.rc +++ b/windows/src/engine/keyman32/version.rc @@ -14,12 +14,12 @@ BLOCK "0C0904E4" BEGIN VALUE "CompanyName", KV_COMPANY_NAME - VALUE "FileDescription", "Keyman Engine Processor x86\0" + VALUE "FileDescription", "Keyman Engine Processor x86 Proxy\0" VALUE "FileVersion", KV_VERSION_STRING - VALUE "InternalName", "KEYMAN32-VER$(var.VERSION_WITH_TAG)\0" + VALUE "InternalName", "KEYMAN32\0" VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS - VALUE "OriginalFilename", "KEYMAN32-VER$(var.VERSION_WITH_TAG).DLL\0" + VALUE "OriginalFilename", "KEYMAN32.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" diff --git a/windows/src/engine/keyman64/keyman64_proxy.cpp b/windows/src/engine/keyman64/keyman64_proxy.cpp index 609ff25cd50..8f99c4acdb6 100644 --- a/windows/src/engine/keyman64/keyman64_proxy.cpp +++ b/windows/src/engine/keyman64/keyman64_proxy.cpp @@ -6,15 +6,5 @@ BOOL __stdcall DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID reserved) { UNREFERENCED_PARAMETER(reserved); UNREFERENCED_PARAMETER(hinstDll); - switch (fdwReason) { - case DLL_PROCESS_ATTACH: { - // OutputThreadDebugString("DLL_PROCESS_ATTACH"); - break; - } - case DLL_PROCESS_DETACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - break; - } return TRUE; } diff --git a/windows/src/engine/keyman64/version.rc b/windows/src/engine/keyman64/version.rc index 83b3e3f284f..1b4bb0033f5 100644 --- a/windows/src/engine/keyman64/version.rc +++ b/windows/src/engine/keyman64/version.rc @@ -14,12 +14,12 @@ BLOCK "0C0904E4" BEGIN VALUE "CompanyName", KV_COMPANY_NAME - VALUE "FileDescription", "Keyman Engine Processor x64\0" + VALUE "FileDescription", "Keyman Engine Processor x64 Proxy\0" VALUE "FileVersion", KV_VERSION_STRING - VALUE "InternalName", "KEYMAN64-VER\0" + VALUE "InternalName", "KEYMAN64\0" VALUE "LegalCopyright", KV_LEGAL_COPYRIGHT VALUE "LegalTrademarks", KV_LEGAL_TRADEMARKS - VALUE "OriginalFilename", "KEYMAN64-VER.DLL\0" + VALUE "OriginalFilename", "KEYMAN64.DLL\0" VALUE "ProductName", "Keyman Engine\0" VALUE "ProductVersion", KV_VERSION_STRING VALUE "Comments", "\0" diff --git a/windows/src/engine/kmcomapi/com/system/keymancontrol.pas b/windows/src/engine/kmcomapi/com/system/keymancontrol.pas index 81c75116f86..d58ec75d4db 100644 --- a/windows/src/engine/kmcomapi/com/system/keymancontrol.pas +++ b/windows/src/engine/kmcomapi/com/system/keymancontrol.pas @@ -685,29 +685,6 @@ procedure TKeymanControl.Do_Keyman_Exit; procedure TKeymanControl.LoadKeyman32; - function GetKeyman32Name: string; - var - Keyman32Name: string; - begin - Keyman32Name := ''; - with TRegistryErrorControlled.Create do // I2890 - try - RootKey := HKEY_LOCAL_MACHINE; - if OpenKeyReadOnly(SRegKey_KeymanEngine_LM) and ValueExists(SRegValue_Keyman32_Name) then - Keyman32Name := ReadString(SRegValue_Keyman32_Name); - finally - Free; - end; - - if Keyman32Name = '' then - begin - Keyman32Name := 'keyman32.dll'; - end; - - Result := Keyman32Name; - - end; - function GetKeymanInstallPath: string; // I3598 var buf: array[0..260] of char; diff --git a/windows/src/engine/kmcomapi/util/utilkeyman.pas b/windows/src/engine/kmcomapi/util/utilkeyman.pas index 43cd03a271b..f94718c87ec 100644 --- a/windows/src/engine/kmcomapi/util/utilkeyman.pas +++ b/windows/src/engine/kmcomapi/util/utilkeyman.pas @@ -54,6 +54,8 @@ function PackageInstalled(const PackageName: string; var FIsAdmin: Boolean): Boo function GetKeyboardIconFileName(const KeyboardFileName: string): string; // I3599 +function GetKeyman32Name: string; + function GetKeymanInstallPath: string; function GetDefaultHKL: HKL; // I3581 // I3619 // I3619 @@ -276,26 +278,18 @@ function PackageInstalled(const PackageName: string; var FIsAdmin: Boolean): Boo end; function GetKeyman32Name: string; -var - Keyman32Name: string; + begin - Keyman32Name := ''; + Result := ''; with TRegistryErrorControlled.Create do // I2890 try RootKey := HKEY_LOCAL_MACHINE; if OpenKeyReadOnly(SRegKey_KeymanEngine_LM) and ValueExists(SRegValue_Keyman32_Name) then - Keyman32Name := ReadString(SRegValue_Keyman32_Name); + Result := ReadString(SRegValue_Keyman32_Name); finally Free; end; - if Keyman32Name = '' then - begin - Keyman32Name := 'keyman32.dll'; - end; - - Result := Keyman32Name; - end; function GetKeymanInstallPath: string; From c0b3a18f8df0963060d1f4f9569988113e74c7a3 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 12 Jul 2023 13:51:49 +1000 Subject: [PATCH 23/40] feat(windows): address review comments step2 --- windows/src/engine/keyman32-ver/calldll.cpp | 49 ++++++++++++------- windows/src/engine/keyman32-ver/globals.h | 3 ++ .../src/engine/keyman32/keyman32_proxy.cpp | 12 +---- .../src/engine/keyman64/keyman64_proxy.cpp | 1 + 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index fb2043892c1..7ae41bf8d7d 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -30,6 +30,12 @@ typedef BOOL (WINAPI *InitDllFunction)(PSTR name); +#ifdef _WIN64 + const char keyman_engine_arch[] = "keyman64.dll"; +#else + const char keyman_engine_arch[] = "keyman32.dll"; +#endif + /* Add a dll to the list of dlls associated with the keyboard */ // core processor implementation also uses this function static LPIMDLL AddIMDLL(LPINTKEYBOARDINFO lpkbi, LPSTR kbdpath, LPSTR dllfilename) @@ -227,15 +233,11 @@ BOOL UnloadDLLs(LPINTKEYBOARDINFO lpkbi) if (lpkbi->lpCoreKeyboardState) { km_kbp_state_imx_deregister_callback(lpkbi->lpCoreKeyboardState); - // Need to Load the keyman32 or keyman64 dll proxy keyboard as the third-party dlls - // will use this rather than the versioned dll. - #ifdef _WIN64 - HMODULE hModule = GetModuleHandle("keyman64.dll"); - #else - HMODULE hModule = GetModuleHandle("keyman32.dll"); - #endif - if (hModule){ - FreeLibrary(hModule); + PKEYMAN64THREADDATA _td = ThreadGlobals(); + if (!_td) + return FALSE; + if (_td->hModuleProxy){ + FreeLibrary(_td->hModuleProxy); } } return TRUE; @@ -589,6 +591,11 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { return FALSE; } + PKEYMAN64THREADDATA _td = ThreadGlobals(); + if (!_td){ + return FALSE; + } + km_kbp_keyboard_imx *imx_list = lpkbi->lpIMXList; // return early if the list empty avoiding loading the proxy dll into memory if (!imx_list->library_name) { @@ -597,23 +604,29 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { char versioned_filename[_MAX_PATH]; char proxy_modulename[_MAX_PATH]; + char check_modulename[_MAX_PATH]; - #ifdef _WIN64 - char keyman_name[] = "keyman64.dll"; - #else - char keyman_name[] = "keyman32.dll"; - #endif - - GetModuleFileName(g_hInstance, versioned_filename, 260); + GetModuleFileName(g_hInstance, versioned_filename, _MAX_PATH); char *p = strrchr(versioned_filename, '\\'); // find last occurrence of '\' if (p != NULL) { int64_t len = p - versioned_filename + 1; strncpy(proxy_modulename, versioned_filename, (size_t)len); - strncat(proxy_modulename, keyman_name, 13); + strncat(proxy_modulename, keyman_engine_arch, 13); + } + if (_td->hModuleProxy){ // Not sure I need this check + GetModuleFileName(_td->hModuleProxy, check_modulename, _MAX_PATH); + if (!strstr(check_modulename, proxy_modulename)) + { + FreeLibrary(_td->hModuleProxy); + _td->hModuleProxy = LoadLibrary(proxy_modulename); + } + } + else { + _td->hModuleProxy = LoadLibrary(proxy_modulename); } + if (!_td->hModuleProxy) { - if (!LoadLibrary(proxy_modulename)) { SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", proxy_modulename, GetLastError()); return FALSE; } diff --git a/windows/src/engine/keyman32-ver/globals.h b/windows/src/engine/keyman32-ver/globals.h index 320ef811de4..5bc75495f79 100644 --- a/windows/src/engine/keyman32-ver/globals.h +++ b/windows/src/engine/keyman32-ver/globals.h @@ -255,6 +255,9 @@ typedef struct tagKEYMAN64THREADDATA ISerialKeyEventClient *pSerialKeyEventClient; ISharedBufferManager *pSharedBufferManager; + /* Module handle for IMX Callback */ + + HMODULE hModuleProxy; /* Test host integration */ CUSTOMPOSTKEYCALLBACKPROC CustomPostKeyCallback; diff --git a/windows/src/engine/keyman32/keyman32_proxy.cpp b/windows/src/engine/keyman32/keyman32_proxy.cpp index 68ae0a7b2aa..d3e6b2a7a20 100644 --- a/windows/src/engine/keyman32/keyman32_proxy.cpp +++ b/windows/src/engine/keyman32/keyman32_proxy.cpp @@ -5,17 +5,7 @@ BOOL __stdcall DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID reserved) { UNREFERENCED_PARAMETER(reserved); UNREFERENCED_PARAMETER(hinstDll); + UNREFERENCED_PARAMETER(fdwReason); - switch (fdwReason) { - case DLL_PROCESS_ATTACH: { - // OutputThreadDebugString("DLL_PROCESS_ATTACH"); - - break; - } - case DLL_PROCESS_DETACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - break; - } return TRUE; } diff --git a/windows/src/engine/keyman64/keyman64_proxy.cpp b/windows/src/engine/keyman64/keyman64_proxy.cpp index 8f99c4acdb6..d3e6b2a7a20 100644 --- a/windows/src/engine/keyman64/keyman64_proxy.cpp +++ b/windows/src/engine/keyman64/keyman64_proxy.cpp @@ -5,6 +5,7 @@ BOOL __stdcall DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID reserved) { UNREFERENCED_PARAMETER(reserved); UNREFERENCED_PARAMETER(hinstDll); + UNREFERENCED_PARAMETER(fdwReason); return TRUE; } From ce8fe6e5c2a240fc77bff0936dd16c8e7a1d338e Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 12 Jul 2023 14:14:12 +1000 Subject: [PATCH 24/40] feat(windows): remove files from tracking --- .../engine/keyman32-ver/keyman-debug-etw.h | 146 ------------------ .../src/engine/keyman64-ver/Keyman64-ver.res | Bin 884 -> 0 bytes .../src/engine/keyman64/keyman-debug-etw.h | 146 ------------------ .../src/engine/keyman64/keyman-debug-etw.res | Bin 7916 -> 0 bytes 4 files changed, 292 deletions(-) delete mode 100644 windows/src/engine/keyman32-ver/keyman-debug-etw.h delete mode 100644 windows/src/engine/keyman64-ver/Keyman64-ver.res delete mode 100644 windows/src/engine/keyman64/keyman-debug-etw.h delete mode 100644 windows/src/engine/keyman64/keyman-debug-etw.res diff --git a/windows/src/engine/keyman32-ver/keyman-debug-etw.h b/windows/src/engine/keyman32-ver/keyman-debug-etw.h deleted file mode 100644 index e4c8fd159f7..00000000000 --- a/windows/src/engine/keyman32-ver/keyman-debug-etw.h +++ /dev/null @@ -1,146 +0,0 @@ -//**********************************************************************` -//* This is an include file generated by Message Compiler. *` -//* *` -//* Copyright (c) Microsoft Corporation. All Rights Reserved. *` -//**********************************************************************` -#pragma once - -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// Provider "Keyman-Debug-ETWProvider" event count 1 -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -// Provider GUID = da621615-e08b-4283-918e-d2502d3757ae -EXTERN_C __declspec(selectany) const GUID ProviderGuid = {0xda621615, 0xe08b, 0x4283, {0x91, 0x8e, 0xd2, 0x50, 0x2d, 0x37, 0x57, 0xae}}; - -#ifndef ProviderGuid_Traits -#define ProviderGuid_Traits NULL -#endif // ProviderGuid_Traits - -// -// Channel -// -#define ProviderGuid_CHANNEL_C1 0x10 - -// -// Event Descriptors -// -EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR DebugEvent = {0x1, 0x0, 0x10, 0x4, 0x0, 0x0, 0x8000000000000000}; -#define DebugEvent_value 0x1 - -#define MSG_Provider_Name 0x90000001L -#define MSG_EventMessage 0xB0000001L -#define MSG_Map_x86 0xD0000001L -#define MSG_Map_x64 0xD0000002L -#define MSG_Map_UNMODIFIED 0xD0000003L -#define MSG_Map_LCTRL 0xD0000004L -#define MSG_Map_RCTRL 0xD0000005L -#define MSG_Map_LALT 0xD0000006L -#define MSG_Map_LCTRL_LALT 0xD0000007L -#define MSG_Map_RALT 0xD0000008L -#define MSG_Map_LCTRL_RALT 0xD0000009L -#define MSG_Map_RCTRL_RALT 0xD000000AL -#define MSG_Map_SHIFT 0xD000000BL -#define MSG_Map_SHIFT_LCTRL 0xD000000CL -#define MSG_Map_SHIFT_RCTRL 0xD000000DL -#define MSG_Map_SHIFT_LALT 0xD000000EL -#define MSG_Map_SHIFT_LCTRL_LALT 0xD000000FL -#define MSG_Map_SHIFT_RALT 0xD0000010L -#define MSG_Map_SHIFT_RCTRL_RALT 0xD0000011L -#define MSG_Map_CAPS 0xD0000012L -#define MSG_Map_CAPS_LCTRL 0xD0000013L -#define MSG_Map_CAPS_RCTRL 0xD0000014L -#define MSG_Map_CAPS_LALT 0xD0000015L -#define MSG_Map_CAPS_LCTRL_LALT 0xD0000016L -#define MSG_Map_CAPS_RALT 0xD0000017L -#define MSG_Map_CAPS_RCTRL_RALT 0xD0000018L -#define MSG_Map_CAPS_SHIFT 0xD0000019L -#define MSG_Map_CAPS_SHIFT_LCTRL 0xD000001AL -#define MSG_Map_CAPS_SHIFT_RCTRL 0xD000001BL -#define MSG_Map_CAPS_SHIFT_LALT 0xD000001CL -#define MSG_Map_CAPS_SHIFT_LCTRL_LALT 0xD000001DL -#define MSG_Map_CAPS_SHIFT_RALT 0xD000001EL -#define MSG_Map_CAPS_SHIFT_RCTRL_RALT 0xD000001FL -#define MSG_Map_NUM 0xD0000020L -#define MSG_Map_NUM_LCTRL 0xD0000021L -#define MSG_Map_NUM_RCTRL 0xD0000022L -#define MSG_Map_NUM_LALT 0xD0000023L -#define MSG_Map_NUM_LCTRL_LALT 0xD0000024L -#define MSG_Map_NUM_RALT 0xD0000025L -#define MSG_Map_NUM_RCTRL_RALT 0xD0000026L -#define MSG_Map_NUM_SHIFT 0xD0000027L -#define MSG_Map_NUM_SHIFT_LCTRL 0xD0000028L -#define MSG_Map_NUM_SHIFT_RCTRL 0xD0000029L -#define MSG_Map_NUM_SHIFT_LALT 0xD000002AL -#define MSG_Map_NUM_SHIFT_LCTRL_LALT 0xD000002BL -#define MSG_Map_NUM_SHIFT_RALT 0xD000002CL -#define MSG_Map_NUM_SHIFT_RCTRL_RALT 0xD000002DL -#define MSG_Map_NUM_CAPS 0xD000002EL -#define MSG_Map_NUM_CAPS_LCTRL 0xD000002FL -#define MSG_Map_NUM_CAPS_RCTRL 0xD0000030L -#define MSG_Map_NUM_CAPS_LALT 0xD0000031L -#define MSG_Map_NUM_CAPS_LCTRL_LALT 0xD0000032L -#define MSG_Map_NUM_CAPS_RALT 0xD0000033L -#define MSG_Map_NUM_CAPS_RCTRL_RALT 0xD0000034L -#define MSG_Map_NUM_CAPS_SHIFT 0xD0000035L -#define MSG_Map_NUM_CAPS_SHIFT_LCTRL 0xD0000036L -#define MSG_Map_NUM_CAPS_SHIFT_RCTRL 0xD0000037L -#define MSG_Map_NUM_CAPS_SHIFT_LALT 0xD0000038L -#define MSG_Map_NUM_CAPS_SHIFT_LCTRL_LALT 0xD0000039L -#define MSG_Map_NUM_CAPS_SHIFT_RALT 0xD000003AL -#define MSG_Map_NUM_CAPS_SHIFT_RCTRL_RALT 0xD000003BL -#define MSG_Map_LSHIFT 0xD000003CL -#define MSG_Map_LSHIFT_LCTRL 0xD000003DL -#define MSG_Map_LSHIFT_RCTRL 0xD000003EL -#define MSG_Map_LSHIFT_LALT 0xD000003FL -#define MSG_Map_LSHIFT_LCTRL_LALT 0xD0000040L -#define MSG_Map_LSHIFT_RALT 0xD0000041L -#define MSG_Map_LSHIFT_RCTRL_RALT 0xD0000042L -#define MSG_Map_CAPS_LSHIFT 0xD0000043L -#define MSG_Map_CAPS_LSHIFT_LCTRL 0xD0000044L -#define MSG_Map_CAPS_LSHIFT_RCTRL 0xD0000045L -#define MSG_Map_CAPS_LSHIFT_LALT 0xD0000046L -#define MSG_Map_CAPS_LSHIFT_LCTRL_LALT 0xD0000047L -#define MSG_Map_CAPS_LSHIFT_RALT 0xD0000048L -#define MSG_Map_CAPS_LSHIFT_RCTRL_RALT 0xD0000049L -#define MSG_Map_NUM_LSHIFT 0xD000004AL -#define MSG_Map_NUM_LSHIFT_LCTRL 0xD000004BL -#define MSG_Map_NUM_LSHIFT_RCTRL 0xD000004CL -#define MSG_Map_NUM_LSHIFT_LALT 0xD000004DL -#define MSG_Map_NUM_LSHIFT_LCTRL_LALT 0xD000004EL -#define MSG_Map_NUM_LSHIFT_RALT 0xD000004FL -#define MSG_Map_NUM_LSHIFT_RCTRL_RALT 0xD0000050L -#define MSG_Map_NUM_CAPS_LSHIFT 0xD0000051L -#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL 0xD0000052L -#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL 0xD0000053L -#define MSG_Map_NUM_CAPS_LSHIFT_LALT 0xD0000054L -#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL_LALT 0xD0000055L -#define MSG_Map_NUM_CAPS_LSHIFT_RALT 0xD0000056L -#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL_RALT 0xD0000057L -#define MSG_Map_RSHIFT 0xD0000058L -#define MSG_Map_RSHIFT_LCTRL 0xD0000059L -#define MSG_Map_RSHIFT_RCTRL 0xD000005AL -#define MSG_Map_RSHIFT_LALT 0xD000005BL -#define MSG_Map_RSHIFT_LCTRL_LALT 0xD000005CL -#define MSG_Map_RSHIFT_RALT 0xD000005DL -#define MSG_Map_RSHIFT_RCTRL_RALT 0xD000005EL -#define MSG_Map_CAPS_RSHIFT 0xD000005FL -#define MSG_Map_CAPS_RSHIFT_LCTRL 0xD0000060L -#define MSG_Map_CAPS_RSHIFT_RCTRL 0xD0000061L -#define MSG_Map_CAPS_RSHIFT_LALT 0xD0000062L -#define MSG_Map_CAPS_RSHIFT_LCTRL_LALT 0xD0000063L -#define MSG_Map_CAPS_RSHIFT_RALT 0xD0000064L -#define MSG_Map_CAPS_RSHIFT_RCTRL_RALT 0xD0000065L -#define MSG_Map_NUM_RSHIFT 0xD0000066L -#define MSG_Map_NUM_RSHIFT_LCTRL 0xD0000067L -#define MSG_Map_NUM_RSHIFT_RCTRL 0xD0000068L -#define MSG_Map_NUM_RSHIFT_LALT 0xD0000069L -#define MSG_Map_NUM_RSHIFT_LCTRL_LALT 0xD000006AL -#define MSG_Map_NUM_RSHIFT_RALT 0xD000006BL -#define MSG_Map_NUM_RSHIFT_RCTRL_RALT 0xD000006CL -#define MSG_Map_NUM_CAPS_RSHIFT 0xD000006DL -#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL 0xD000006EL -#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL 0xD000006FL -#define MSG_Map_NUM_CAPS_RSHIFT_LALT 0xD0000070L -#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL_LALT 0xD0000071L -#define MSG_Map_NUM_CAPS_RSHIFT_RALT 0xD0000072L -#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL_RALT 0xD0000073L diff --git a/windows/src/engine/keyman64-ver/Keyman64-ver.res b/windows/src/engine/keyman64-ver/Keyman64-ver.res deleted file mode 100644 index 7420582571b3743a2b009f8ce560f268b7587c29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 884 zcma))&q@MO6vjW(jr50z7A;!1Xwgbc2B8R|v_Q0s3ZYdEX(ml7qd~q$FVREvHtly`xOdLI_dDl&=etLea?HsjnwUR^myYk3!KB<>LD@_U^3on=Q|G#3J=7Ui zRSli6ud*It+jz~qe@N!P#N5D${(E-Guz+*U`d*$nND*(OP+j%ZAzD{~+C=W@R(+rY zhbgG6g0`6+9E?##EBKbdJZK;v{1`SqyS7VUEbCNmkw%<_{C%u09%coguC-2#IA;aa zP&bat;0tNNYTS&8Y*}*TH>Sq7&F&O@A20JAVuhSNspL48G@ppy1QUXZ7+BmbPg}2Nn DIwO9) diff --git a/windows/src/engine/keyman64/keyman-debug-etw.h b/windows/src/engine/keyman64/keyman-debug-etw.h deleted file mode 100644 index e4c8fd159f7..00000000000 --- a/windows/src/engine/keyman64/keyman-debug-etw.h +++ /dev/null @@ -1,146 +0,0 @@ -//**********************************************************************` -//* This is an include file generated by Message Compiler. *` -//* *` -//* Copyright (c) Microsoft Corporation. All Rights Reserved. *` -//**********************************************************************` -#pragma once - -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// Provider "Keyman-Debug-ETWProvider" event count 1 -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -// Provider GUID = da621615-e08b-4283-918e-d2502d3757ae -EXTERN_C __declspec(selectany) const GUID ProviderGuid = {0xda621615, 0xe08b, 0x4283, {0x91, 0x8e, 0xd2, 0x50, 0x2d, 0x37, 0x57, 0xae}}; - -#ifndef ProviderGuid_Traits -#define ProviderGuid_Traits NULL -#endif // ProviderGuid_Traits - -// -// Channel -// -#define ProviderGuid_CHANNEL_C1 0x10 - -// -// Event Descriptors -// -EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR DebugEvent = {0x1, 0x0, 0x10, 0x4, 0x0, 0x0, 0x8000000000000000}; -#define DebugEvent_value 0x1 - -#define MSG_Provider_Name 0x90000001L -#define MSG_EventMessage 0xB0000001L -#define MSG_Map_x86 0xD0000001L -#define MSG_Map_x64 0xD0000002L -#define MSG_Map_UNMODIFIED 0xD0000003L -#define MSG_Map_LCTRL 0xD0000004L -#define MSG_Map_RCTRL 0xD0000005L -#define MSG_Map_LALT 0xD0000006L -#define MSG_Map_LCTRL_LALT 0xD0000007L -#define MSG_Map_RALT 0xD0000008L -#define MSG_Map_LCTRL_RALT 0xD0000009L -#define MSG_Map_RCTRL_RALT 0xD000000AL -#define MSG_Map_SHIFT 0xD000000BL -#define MSG_Map_SHIFT_LCTRL 0xD000000CL -#define MSG_Map_SHIFT_RCTRL 0xD000000DL -#define MSG_Map_SHIFT_LALT 0xD000000EL -#define MSG_Map_SHIFT_LCTRL_LALT 0xD000000FL -#define MSG_Map_SHIFT_RALT 0xD0000010L -#define MSG_Map_SHIFT_RCTRL_RALT 0xD0000011L -#define MSG_Map_CAPS 0xD0000012L -#define MSG_Map_CAPS_LCTRL 0xD0000013L -#define MSG_Map_CAPS_RCTRL 0xD0000014L -#define MSG_Map_CAPS_LALT 0xD0000015L -#define MSG_Map_CAPS_LCTRL_LALT 0xD0000016L -#define MSG_Map_CAPS_RALT 0xD0000017L -#define MSG_Map_CAPS_RCTRL_RALT 0xD0000018L -#define MSG_Map_CAPS_SHIFT 0xD0000019L -#define MSG_Map_CAPS_SHIFT_LCTRL 0xD000001AL -#define MSG_Map_CAPS_SHIFT_RCTRL 0xD000001BL -#define MSG_Map_CAPS_SHIFT_LALT 0xD000001CL -#define MSG_Map_CAPS_SHIFT_LCTRL_LALT 0xD000001DL -#define MSG_Map_CAPS_SHIFT_RALT 0xD000001EL -#define MSG_Map_CAPS_SHIFT_RCTRL_RALT 0xD000001FL -#define MSG_Map_NUM 0xD0000020L -#define MSG_Map_NUM_LCTRL 0xD0000021L -#define MSG_Map_NUM_RCTRL 0xD0000022L -#define MSG_Map_NUM_LALT 0xD0000023L -#define MSG_Map_NUM_LCTRL_LALT 0xD0000024L -#define MSG_Map_NUM_RALT 0xD0000025L -#define MSG_Map_NUM_RCTRL_RALT 0xD0000026L -#define MSG_Map_NUM_SHIFT 0xD0000027L -#define MSG_Map_NUM_SHIFT_LCTRL 0xD0000028L -#define MSG_Map_NUM_SHIFT_RCTRL 0xD0000029L -#define MSG_Map_NUM_SHIFT_LALT 0xD000002AL -#define MSG_Map_NUM_SHIFT_LCTRL_LALT 0xD000002BL -#define MSG_Map_NUM_SHIFT_RALT 0xD000002CL -#define MSG_Map_NUM_SHIFT_RCTRL_RALT 0xD000002DL -#define MSG_Map_NUM_CAPS 0xD000002EL -#define MSG_Map_NUM_CAPS_LCTRL 0xD000002FL -#define MSG_Map_NUM_CAPS_RCTRL 0xD0000030L -#define MSG_Map_NUM_CAPS_LALT 0xD0000031L -#define MSG_Map_NUM_CAPS_LCTRL_LALT 0xD0000032L -#define MSG_Map_NUM_CAPS_RALT 0xD0000033L -#define MSG_Map_NUM_CAPS_RCTRL_RALT 0xD0000034L -#define MSG_Map_NUM_CAPS_SHIFT 0xD0000035L -#define MSG_Map_NUM_CAPS_SHIFT_LCTRL 0xD0000036L -#define MSG_Map_NUM_CAPS_SHIFT_RCTRL 0xD0000037L -#define MSG_Map_NUM_CAPS_SHIFT_LALT 0xD0000038L -#define MSG_Map_NUM_CAPS_SHIFT_LCTRL_LALT 0xD0000039L -#define MSG_Map_NUM_CAPS_SHIFT_RALT 0xD000003AL -#define MSG_Map_NUM_CAPS_SHIFT_RCTRL_RALT 0xD000003BL -#define MSG_Map_LSHIFT 0xD000003CL -#define MSG_Map_LSHIFT_LCTRL 0xD000003DL -#define MSG_Map_LSHIFT_RCTRL 0xD000003EL -#define MSG_Map_LSHIFT_LALT 0xD000003FL -#define MSG_Map_LSHIFT_LCTRL_LALT 0xD0000040L -#define MSG_Map_LSHIFT_RALT 0xD0000041L -#define MSG_Map_LSHIFT_RCTRL_RALT 0xD0000042L -#define MSG_Map_CAPS_LSHIFT 0xD0000043L -#define MSG_Map_CAPS_LSHIFT_LCTRL 0xD0000044L -#define MSG_Map_CAPS_LSHIFT_RCTRL 0xD0000045L -#define MSG_Map_CAPS_LSHIFT_LALT 0xD0000046L -#define MSG_Map_CAPS_LSHIFT_LCTRL_LALT 0xD0000047L -#define MSG_Map_CAPS_LSHIFT_RALT 0xD0000048L -#define MSG_Map_CAPS_LSHIFT_RCTRL_RALT 0xD0000049L -#define MSG_Map_NUM_LSHIFT 0xD000004AL -#define MSG_Map_NUM_LSHIFT_LCTRL 0xD000004BL -#define MSG_Map_NUM_LSHIFT_RCTRL 0xD000004CL -#define MSG_Map_NUM_LSHIFT_LALT 0xD000004DL -#define MSG_Map_NUM_LSHIFT_LCTRL_LALT 0xD000004EL -#define MSG_Map_NUM_LSHIFT_RALT 0xD000004FL -#define MSG_Map_NUM_LSHIFT_RCTRL_RALT 0xD0000050L -#define MSG_Map_NUM_CAPS_LSHIFT 0xD0000051L -#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL 0xD0000052L -#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL 0xD0000053L -#define MSG_Map_NUM_CAPS_LSHIFT_LALT 0xD0000054L -#define MSG_Map_NUM_CAPS_LSHIFT_LCTRL_LALT 0xD0000055L -#define MSG_Map_NUM_CAPS_LSHIFT_RALT 0xD0000056L -#define MSG_Map_NUM_CAPS_LSHIFT_RCTRL_RALT 0xD0000057L -#define MSG_Map_RSHIFT 0xD0000058L -#define MSG_Map_RSHIFT_LCTRL 0xD0000059L -#define MSG_Map_RSHIFT_RCTRL 0xD000005AL -#define MSG_Map_RSHIFT_LALT 0xD000005BL -#define MSG_Map_RSHIFT_LCTRL_LALT 0xD000005CL -#define MSG_Map_RSHIFT_RALT 0xD000005DL -#define MSG_Map_RSHIFT_RCTRL_RALT 0xD000005EL -#define MSG_Map_CAPS_RSHIFT 0xD000005FL -#define MSG_Map_CAPS_RSHIFT_LCTRL 0xD0000060L -#define MSG_Map_CAPS_RSHIFT_RCTRL 0xD0000061L -#define MSG_Map_CAPS_RSHIFT_LALT 0xD0000062L -#define MSG_Map_CAPS_RSHIFT_LCTRL_LALT 0xD0000063L -#define MSG_Map_CAPS_RSHIFT_RALT 0xD0000064L -#define MSG_Map_CAPS_RSHIFT_RCTRL_RALT 0xD0000065L -#define MSG_Map_NUM_RSHIFT 0xD0000066L -#define MSG_Map_NUM_RSHIFT_LCTRL 0xD0000067L -#define MSG_Map_NUM_RSHIFT_RCTRL 0xD0000068L -#define MSG_Map_NUM_RSHIFT_LALT 0xD0000069L -#define MSG_Map_NUM_RSHIFT_LCTRL_LALT 0xD000006AL -#define MSG_Map_NUM_RSHIFT_RALT 0xD000006BL -#define MSG_Map_NUM_RSHIFT_RCTRL_RALT 0xD000006CL -#define MSG_Map_NUM_CAPS_RSHIFT 0xD000006DL -#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL 0xD000006EL -#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL 0xD000006FL -#define MSG_Map_NUM_CAPS_RSHIFT_LALT 0xD0000070L -#define MSG_Map_NUM_CAPS_RSHIFT_LCTRL_LALT 0xD0000071L -#define MSG_Map_NUM_CAPS_RSHIFT_RALT 0xD0000072L -#define MSG_Map_NUM_CAPS_RSHIFT_RCTRL_RALT 0xD0000073L diff --git a/windows/src/engine/keyman64/keyman-debug-etw.res b/windows/src/engine/keyman64/keyman-debug-etw.res deleted file mode 100644 index e27bbd5c346570bcd14ce449e2d7070491c051c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7916 zcmbW6O>i7X6@cH4SN2M_$nIu0ESmrdk%NQdM0On8F$OG4Yh=7qHqs*JAO9pIN`&Mn zaR^l$DBzF+igGGNl@B>`h4PgRB@ro2ac%{-<#f1|IEy4l}WX}p6=JL z-+TSKXVVrDnWAiOn?lup?oay@@O1L`O!D`cjOE%Xk)i|KP4vz?}zB08PprpyE2FE%h1Sc+j34@S7wpv52S>7 z-LXgM^ZSh+zbzcI9E{O^JNHrQ{&>~7A`7h3#T`p@jBQgpe1F1ztKaw=_J@8vUZ_9o zbEqq{Kh$My$@g^*|9g06ER`hYXbH9y6HiVfcGTffg=diYi(Uau&NqR21mZj^iHstkZqi5{R zm$eq8dfjuuoi~hvyT?PhqWmh>?dMssZfkECF;}-er(Da7hpz5?xoiYS8DlNm%RGLr zoOjlAciX}h@xQx8IoTdMmY z>@Ui{tS&zqSzXqi&~w#gW9(XBEced{w?7++VY1eOQS|!xvsB!s&ldv7+kd};9}W5>v2?QK4A{qMj2*Do%7^xMDoj-9^p$7$NG zbXNOaWaz&=&ifeUr!FB>W{8XA%61UZC;(4XWN2z2%saH}LsP7>G$*peAyGpdVvPxLh%1m1Yn&*thJg~RU$`9C;2~It#4B#VFTf_e z54Iq(aT_8Vt6|8-CCC+M96`p!WyqL#3_buW@QZK)q9d-tFTol_S6qh=LXE>iunE5m zTktEe4ZjN2xhYtJ55ow44VK{}a12hv3Oo!a;G?h#zYc5g2&}`$U;};wHsMj&f{(*C zJO(wHo`5CzB#ht;EW_h)44!}$_!OLg-0#L!_%y7+Q?L$C!v8f?JpunBL#7JLo1;p?zkj<`Qp z{~~V1)xSvIgbla`oA52zf^Wk%T!+=Mh+B2_FXFyk{foFqSN|fp37ha8*n(TI4fWoh z+$3(B*s#XDYssDa3itMUcaJ@q`^0ZOc~9^4X_9{bLiZDLprrNAV(&I}_F+R6x<$j+jHkfEWQBQazn%&+et>jmm zWvBHKTJ~T5U73}=hL>vBSgDe+E8+mCl+i$<1{xmD({KO{`mYT)(D*L@MU&X4Xy2A=HPhBttIZ*E*RJO^%x^`CMAMXxT`#Oc+~6&eg?1 zmR{prP%92%1&2OQh5dFfsfk?WBdHHtZRh!5(57)PTQZIHY3IS zIc*g_)cUydP7T^z`_AOZ^>gHI(pGdH>384X&E_mJJJi(8t`nI;cG#K6_jJVFVeH9f zylKy7v1!j{X7U>%H`_2pe_wcgX%1BxZ;nr> zdAgm|?s=-JQ?riJyNBK*)PJ1h^jXfdynp-E^M!B3>c cAGOzHb@KW%-tYcz(D3g;P9#12`EXGAKlZ}EQ2+n{ From ee334dedfec7d776a4dccd16ac10facf9b444098 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 12 Jul 2023 14:23:15 +1000 Subject: [PATCH 25/40] feat(windows): add files to gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index ab1e5c1f09b..1dcebb88ea5 100644 --- a/.gitignore +++ b/.gitignore @@ -215,3 +215,9 @@ windows/src/engine/keyman64/premake.mak windows/src/engine/keyman64-ver/premake.mak windows/src/engine/keyman64-ver/TODO.TXT windows/src/global/inc/keymanversion_build.h +common/windows/cpp/include/keymanversion_build.h +windows/src/engine/keyman32-ver/keyman-debug-etw.h +windows/src/engine/keyman64-ver/Keyman64-ver.res +windows/src/engine/keyman64-ver/premake_version.mak +windows/src/engine/keyman64/keyman-debug-etw.h +windows/src/engine/keyman64/keyman-debug-etw.res From e792de984d2ffa22fb4734f94ea1469ad9acb40a Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 12 Jul 2023 14:38:34 +1000 Subject: [PATCH 26/40] feat(windows): add refcount --- windows/src/engine/inst/components.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/src/engine/inst/components.wxs b/windows/src/engine/inst/components.wxs index 865ab9261ff..da9518bd586 100644 --- a/windows/src/engine/inst/components.wxs +++ b/windows/src/engine/inst/components.wxs @@ -141,7 +141,7 @@ - + From a36fc55b32f02fa678deb91294827fea6a54f7e1 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Fri, 14 Jul 2023 11:06:11 +1000 Subject: [PATCH 27/40] feat:(windows) apply suggestions from code review Co-authored-by: Marc Durdin --- windows/src/engine/keyman32-ver/calldll.cpp | 1 + windows/src/engine/kmcomapi/util/utilkeyman.pas | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 7ae41bf8d7d..fcc30d4701f 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -238,6 +238,7 @@ BOOL UnloadDLLs(LPINTKEYBOARDINFO lpkbi) return FALSE; if (_td->hModuleProxy){ FreeLibrary(_td->hModuleProxy); + _td->hModuleProxy = NULL; } } return TRUE; diff --git a/windows/src/engine/kmcomapi/util/utilkeyman.pas b/windows/src/engine/kmcomapi/util/utilkeyman.pas index f94718c87ec..3bd707a0600 100644 --- a/windows/src/engine/kmcomapi/util/utilkeyman.pas +++ b/windows/src/engine/kmcomapi/util/utilkeyman.pas @@ -309,7 +309,7 @@ function GetKeymanInstallPath: string; end; Result := IncludeTrailingPathDelimiter(RootPath); Keyman32Name := GetKeyman32Name; - if not FileExists(Result + Keyman32Name) then + if (Keyman32Name = '') or not FileExists(Result + Keyman32Name) then raise EKeymanNotInstalled.Create( 'The executable '+Keyman32Name+' could not '+ 'be found. You should reinstall.'); end; From 131c36e8ee0c3c95f9f432b603e0e6070f1f0322 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 14 Jul 2023 16:09:57 +1000 Subject: [PATCH 28/40] feat(windows): updated loading of the proxy dll Using the review comments plus some tweaking have updated determining the location of the the keyman versioned dll and then loading the proxy dll using the same path. --- windows/src/engine/keyman32-ver/calldll.cpp | 47 +++++++++------------ 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index fcc30d4701f..26f5dff61f4 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -603,33 +603,28 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { return FALSE; } - char versioned_filename[_MAX_PATH]; - char proxy_modulename[_MAX_PATH]; - char check_modulename[_MAX_PATH]; - - GetModuleFileName(g_hInstance, versioned_filename, _MAX_PATH); - - char *p = strrchr(versioned_filename, '\\'); // find last occurrence of '\' - if (p != NULL) { - int64_t len = p - versioned_filename + 1; - strncpy(proxy_modulename, versioned_filename, (size_t)len); - strncat(proxy_modulename, keyman_engine_arch, 13); - } - if (_td->hModuleProxy){ // Not sure I need this check - GetModuleFileName(_td->hModuleProxy, check_modulename, _MAX_PATH); - if (!strstr(check_modulename, proxy_modulename)) - { - FreeLibrary(_td->hModuleProxy); - _td->hModuleProxy = LoadLibrary(proxy_modulename); + if (!_td->hModuleProxy) { + char module_filename[_MAX_PATH]; + if(!GetModuleFileName(g_hInstance, module_filename, _MAX_PATH)){ + SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: unable to get handle for loaded keyman versioned dll; error:[%d]", GetLastError()); + return FALSE; + } + char *p = strrchr(module_filename, '\\'); // find last occurrence of '\' + if (p != NULL) { + int64_t len = strnlen(keyman_engine_arch,_MAX_PATH); + // We know that the arch filename is shorter than the versioned filename so this + // should always be safe, just insure we insert the null character + strncpy(p, keyman_engine_arch, len + 1); // +1 ensure null padding terminates the string + _td->hModuleProxy = LoadLibrary(module_filename); + if (!_td->hModuleProxy) { + SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", module_filename, GetLastError()); + return FALSE; + } + } + else { + SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: unable to find path for keyman versioned dll"); + return FALSE; } - } - else { - _td->hModuleProxy = LoadLibrary(proxy_modulename); - } - if (!_td->hModuleProxy) { - - SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", proxy_modulename, GetLastError()); - return FALSE; } BOOL result = false; From 4236ca74b6bf84b538d8d0cf3efde64b5206d77b Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 24 Jul 2023 10:52:18 +1000 Subject: [PATCH 29/40] feat(windows): update gitignore --- .gitignore | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 1dcebb88ea5..3d86844b7a5 100644 --- a/.gitignore +++ b/.gitignore @@ -110,6 +110,32 @@ /windows/src/engine/keyman32/*.obj /windows/src/engine/keyman32/*.cod /windows/src/engine/keyman32/*.pdb +/windows/src/engine/keyman32/exports.h +/windows/src/engine/keyman32/premake.mak + +# /engine/keyman32-ver +windows/src/engine/keyman32-ver/keyman32-ver.def +windows/src/engine/keyman32-ver/keyman64-build-version.h +windows/src/engine/keyman32-ver/keyman-debug-etwTEMP.BIN +windows/src/engine/keyman32-ver/keyman-engine.pdb +windows/src/engine/keyman32-ver/MSG00001.bin +windows/src/engine/keyman32-ver/KEYMAN32-ver.res +windows/src/engine/keyman32-ver/premake.mak + +# /engine/keyman64 +windows/src/engine/keyman64/exports.h +windows/src/engine/keyman64/keyman-debug-etwTEMP.BIN +windows/src/engine/keyman64/MSG00001.bin +windows/src/engine/keyman64/premake.mak +windows/src/engine/keyman64/keyman-debug-etw.h +windows/src/engine/keyman64/keyman-debug-etw.res + +# /engine/keyman64-ver +windows/src/engine/keyman64-ver/premake.mak +windows/src/engine/keyman64-ver/TODO.TXT +windows/src/engine/keyman32-ver/keyman-debug-etw.h +windows/src/engine/keyman64-ver/Keyman64-ver.res +windows/src/engine/keyman64-ver/premake_version.mak # /engine/keymanx64/ /windows/src/engine/keymanx64/x64 @@ -198,26 +224,4 @@ lcov.info # /developer/src/test/auto/kmcomp/*.kvk # /developer/src/test/auto/kmcomp/*.kvk* # /developer/src/test/auto/kmcomp/*.txt -windows/src/engine/keyman32/exports.h -.gitignore -windows/src/engine/keyman32/premake.mak -windows/src/engine/keyman32-ver/keyman32-ver.def -windows/src/engine/keyman32-ver/keyman64-build-version.h -windows/src/engine/keyman32-ver/keyman-debug-etwTEMP.BIN -windows/src/engine/keyman32-ver/keyman-engine.pdb -windows/src/engine/keyman32-ver/MSG00001.bin -windows/src/engine/keyman32-ver/KEYMAN32-ver.res -windows/src/engine/keyman32-ver/premake.mak -windows/src/engine/keyman64/exports.h -windows/src/engine/keyman64/keyman-debug-etwTEMP.BIN -windows/src/engine/keyman64/MSG00001.bin -windows/src/engine/keyman64/premake.mak -windows/src/engine/keyman64-ver/premake.mak -windows/src/engine/keyman64-ver/TODO.TXT -windows/src/global/inc/keymanversion_build.h -common/windows/cpp/include/keymanversion_build.h -windows/src/engine/keyman32-ver/keyman-debug-etw.h -windows/src/engine/keyman64-ver/Keyman64-ver.res -windows/src/engine/keyman64-ver/premake_version.mak -windows/src/engine/keyman64/keyman-debug-etw.h -windows/src/engine/keyman64/keyman-debug-etw.res + From 1e80b4dffe4fbdd11f8ab13a5ee9d8f480f6076f Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 24 Jul 2023 13:51:26 +1000 Subject: [PATCH 30/40] feat(windows): update reference to keyman-debug-etw.h It turns out the previous build was only working because a old copy of keyman-debug-etw.h was in the keyman32-ver and keyman64-ver directories. I also replaced the depricated strncpy with strncpy_s. --- windows/src/engine/keyman32-ver/DebugEventTrace.cpp | 2 +- windows/src/engine/keyman32-ver/calldll.cpp | 5 +++-- windows/src/engine/keyman32-ver/keyman32-ver.vcxproj | 2 +- .../src/engine/keyman32-ver/keyman32-ver.vcxproj.filters | 6 +++--- windows/src/engine/keyman64-ver/keyman64-ver.vcxproj | 2 +- .../src/engine/keyman64-ver/keyman64-ver.vcxproj.filters | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/windows/src/engine/keyman32-ver/DebugEventTrace.cpp b/windows/src/engine/keyman32-ver/DebugEventTrace.cpp index 3ff479a3a60..1790caabe2f 100644 --- a/windows/src/engine/keyman32-ver/DebugEventTrace.cpp +++ b/windows/src/engine/keyman32-ver/DebugEventTrace.cpp @@ -1,6 +1,6 @@ #include "pch.h" -#include "keyman-debug-etw.h" +#include "../keyman32/keyman-debug-etw.h" #ifdef _WIN64 #define DEBUG_PLATFORM_STRING "x64" diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 26f5dff61f4..08af1f72997 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -609,12 +609,13 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: unable to get handle for loaded keyman versioned dll; error:[%d]", GetLastError()); return FALSE; } + char *p = strrchr(module_filename, '\\'); // find last occurrence of '\' if (p != NULL) { - int64_t len = strnlen(keyman_engine_arch,_MAX_PATH); + size_t len = strnlen(keyman_engine_arch,_MAX_PATH); // We know that the arch filename is shorter than the versioned filename so this // should always be safe, just insure we insert the null character - strncpy(p, keyman_engine_arch, len + 1); // +1 ensure null padding terminates the string + strncpy_s(p, _MAX_PATH - (p - module_filename), keyman_engine_arch, len); _td->hModuleProxy = LoadLibrary(module_filename); if (!_td->hModuleProxy) { SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", module_filename, GetLastError()); diff --git a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj index b0a6f8ba71a..1131a50fdc6 100644 --- a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj +++ b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj @@ -343,6 +343,7 @@ + @@ -360,7 +361,6 @@ - diff --git a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters index d7e81152bb5..f7afb4bffd7 100644 --- a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters +++ b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj.filters @@ -210,9 +210,6 @@ Header Files - - Header Files - Header Files @@ -243,5 +240,8 @@ Header Files + + Header Files + \ No newline at end of file diff --git a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj index c4901c58c2b..0c89caaf455 100644 --- a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj @@ -294,7 +294,6 @@ - @@ -310,6 +309,7 @@ + diff --git a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters index 8aa72d3cecd..822d0c734b9 100644 --- a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj.filters @@ -54,7 +54,6 @@ - @@ -72,6 +71,7 @@ + From 9d3589f7860dab72e2079caef0cd16260076fa87 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 25 Jul 2023 12:21:43 +1000 Subject: [PATCH 31/40] chore: Create windows-upgrades.md --- windows/src/windows-upgrades.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 windows/src/windows-upgrades.md diff --git a/windows/src/windows-upgrades.md b/windows/src/windows-upgrades.md new file mode 100644 index 00000000000..eaaf1ce5f3e --- /dev/null +++ b/windows/src/windows-upgrades.md @@ -0,0 +1 @@ +# Windows Upgrades Epic 📲 From 6723f6945cc255c0eb1f3571bc0752cf05d30585 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:41:07 +1000 Subject: [PATCH 32/40] feat(windows): review suggestions Co-authored-by: Marc Durdin --- windows/src/engine/keyman32-ver/Makefile | 3 ++- windows/src/engine/keyman32-ver/calldll.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/windows/src/engine/keyman32-ver/Makefile b/windows/src/engine/keyman32-ver/Makefile index e60e9fdfb52..ca3dc34f07c 100644 --- a/windows/src/engine/keyman32-ver/Makefile +++ b/windows/src/engine/keyman32-ver/Makefile @@ -11,7 +11,8 @@ build: version.res dirs pull-core $(MAKE) -fpremake.mak build clean: def-clean - $(MAKE) -fpremake.mak clean + $(MKVER_U) premake.in premake.mak + $(MAKE) -fpremake.mak clean signcode: $(MKVER_U) premake.in premake.mak diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 08af1f72997..7554c0f9bd1 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -234,9 +234,10 @@ BOOL UnloadDLLs(LPINTKEYBOARDINFO lpkbi) if (lpkbi->lpCoreKeyboardState) { km_kbp_state_imx_deregister_callback(lpkbi->lpCoreKeyboardState); PKEYMAN64THREADDATA _td = ThreadGlobals(); - if (!_td) + if (!_td) { return FALSE; - if (_td->hModuleProxy){ + } + if (_td->hModuleProxy) { FreeLibrary(_td->hModuleProxy); _td->hModuleProxy = NULL; } From efb9fd6f8bf9ad533056d28af3d99d795e4938d6 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 27 Jul 2023 14:09:41 +1000 Subject: [PATCH 33/40] feat: git ignore updates --- .gitignore | 32 -------------------------------- windows/src/.gitignore | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 3d86844b7a5..429948be84e 100644 --- a/.gitignore +++ b/.gitignore @@ -107,38 +107,6 @@ # /engine/keyman32/ /windows/src/engine/keyman32/Keyman32.opensdf -/windows/src/engine/keyman32/*.obj -/windows/src/engine/keyman32/*.cod -/windows/src/engine/keyman32/*.pdb -/windows/src/engine/keyman32/exports.h -/windows/src/engine/keyman32/premake.mak - -# /engine/keyman32-ver -windows/src/engine/keyman32-ver/keyman32-ver.def -windows/src/engine/keyman32-ver/keyman64-build-version.h -windows/src/engine/keyman32-ver/keyman-debug-etwTEMP.BIN -windows/src/engine/keyman32-ver/keyman-engine.pdb -windows/src/engine/keyman32-ver/MSG00001.bin -windows/src/engine/keyman32-ver/KEYMAN32-ver.res -windows/src/engine/keyman32-ver/premake.mak - -# /engine/keyman64 -windows/src/engine/keyman64/exports.h -windows/src/engine/keyman64/keyman-debug-etwTEMP.BIN -windows/src/engine/keyman64/MSG00001.bin -windows/src/engine/keyman64/premake.mak -windows/src/engine/keyman64/keyman-debug-etw.h -windows/src/engine/keyman64/keyman-debug-etw.res - -# /engine/keyman64-ver -windows/src/engine/keyman64-ver/premake.mak -windows/src/engine/keyman64-ver/TODO.TXT -windows/src/engine/keyman32-ver/keyman-debug-etw.h -windows/src/engine/keyman64-ver/Keyman64-ver.res -windows/src/engine/keyman64-ver/premake_version.mak - -# /engine/keymanx64/ -/windows/src/engine/keymanx64/x64 # /engine/kmcomapi/ /windows/src/engine/kmcomapi/kmcomapi.tlb diff --git a/windows/src/.gitignore b/windows/src/.gitignore index 54037b8c4ae..1a624f084e3 100644 --- a/windows/src/.gitignore +++ b/windows/src/.gitignore @@ -14,6 +14,7 @@ # Temporary build files for VC++ **/*.FileListAbsolute.txt + # These files are generated during build engine/keyman32/KEYMAN32.res engine/keyman64/Keyman64.res @@ -22,6 +23,37 @@ engine/mcompile/Release/ tds_file.txt global/delphi/cust/MessageIdentifierConsts.pas +engine/keyman32/*.obj +engine/keyman32/*.cod +engine/keyman32/*.pdb +engine/keyman32/exports.h +engine/keyman32/premake.mak + +# /engine/keyman32-ver +engine/keyman32-ver/keyman32-ver.def +engine/keyman32-ver/keyman64-build-version.h +engine/keyman32-ver/keyman-engine.pdb +engine/keyman32-ver/MSG00001.bin +engine/keyman32-ver/KEYMAN32-ver.res +engine/keyman32-ver/premake.mak + +# /engine/keyman64 +engine/keyman64/exports.h +engine/keyman64/keyman-debug-etwTEMP.BIN +engine/keyman64/MSG00001.bin +engine/keyman64/premake.mak +engine/keyman64/keyman-debug-etw.h +engine/keyman64/keyman-debug-etw.res + +# /engine/keyman64-ver +engine/keyman64-ver/premake.mak +engine/keyman64-ver/TODO.TXT +engine/keyman64-ver/Keyman64-ver.res +engine/keyman64-ver/premake_version.mak + +# /engine/keymanx64/ +engine/keymanx64/x64 + # These are built from corresponding manifest.in and version.in **/manifest.xml From 5ad45480f0a8005ec2f955e0fceab1df69022160 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 27 Jul 2023 15:24:31 +1000 Subject: [PATCH 34/40] feat: update engine makefile --- windows/src/engine/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/src/engine/Makefile b/windows/src/engine/Makefile index 3826c83acf8..a5153918f71 100644 --- a/windows/src/engine/Makefile +++ b/windows/src/engine/Makefile @@ -5,9 +5,9 @@ # ---------------------------------------------------------------------- !ifdef NODELPHI -TARGETS=keymanmc keyman32-ver keyman64-ver keymanx64 mcompile kmtip kmrefresh +TARGETS=keymanmc keyman32 keyman32-ver keyman64 keyman64-ver keymanx64 mcompile kmtip kmrefresh !else -TARGETS=keymanmc keyman32-ver kmcomapi keyman tsysinfox64 tsysinfo keyman64-ver keymanx64 mcompile inst kmtip kmrefresh +TARGETS=keymanmc keyman32 keyman32-ver kmcomapi keyman tsysinfox64 tsysinfo keyman64 keyman64-ver keymanx64 mcompile inst kmtip kmrefresh !endif MANIFESTS=keyman tsysinfo tsysinfox64 keymanx64 mcompile CLEANS=clean-engine From b20aaee1cc9f7ca333adc8268c25aa05d90fe2c3 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 31 Jul 2023 10:58:12 +1000 Subject: [PATCH 35/40] feat: remove dependinces on proxy dlls --- windows/src/engine/keyman32/keyman32.vcxproj | 4 ++-- windows/src/engine/keyman64/keyman64.vcxproj | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32/keyman32.vcxproj index c9662fa6440..aeaef7da872 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj +++ b/windows/src/engine/keyman32/keyman32.vcxproj @@ -97,7 +97,7 @@ %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + %(AdditionalDependencies) true true true @@ -152,7 +152,7 @@ %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + %(AdditionalDependencies) true true true diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64/keyman64.vcxproj index a5e26df8e28..5a9e24f92e0 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj +++ b/windows/src/engine/keyman64/keyman64.vcxproj @@ -106,7 +106,7 @@ %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) + %(AdditionalDependencies) true C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)lib;%(AdditionalLibraryDirectories) false @@ -162,7 +162,7 @@ %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) + %(AdditionalDependencies) true C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)lib;%(AdditionalLibraryDirectories) false @@ -187,4 +187,4 @@ - + \ No newline at end of file From 8ed765f6ecbaf07abe8ece3e4f0e034616aa0ed9 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 31 Jul 2023 14:34:55 +1000 Subject: [PATCH 36/40] feat: fix include path unit test keyman32-ver --- windows/src/test/unit-tests/shared-data/cpp/cppshareddata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/src/test/unit-tests/shared-data/cpp/cppshareddata.cpp b/windows/src/test/unit-tests/shared-data/cpp/cppshareddata.cpp index ec8c59a236f..13f4f2adf00 100644 --- a/windows/src/test/unit-tests/shared-data/cpp/cppshareddata.cpp +++ b/windows/src/test/unit-tests/shared-data/cpp/cppshareddata.cpp @@ -3,11 +3,11 @@ #include "pch.h" #include -#include "../.././../../engine/keyman32/SharedBuffers.h" +#include "../.././../../engine/keyman32-ver/SharedBuffers.h" int main() { - std::cout << "sizeof(SharedBuffer)=" << sizeof(SharedBuffer) << "\n"; + std::cout << "sizeof(SharedBuffer)=" << sizeof(SharedBuffer) << "\n"; std::cout << "sizeof(SelectKeyboardBuffer)=" << sizeof(SelectKeyboardBuffer) << "\n"; std::cout << "offsetof(SelectKeyboardBuffer.CLSID)=" << offsetof(SelectKeyboardBuffer, CLSID) << "\n"; std::cout << "offsetof(SelectKeyboardBuffer.GUIDProfile)=" << offsetof(SelectKeyboardBuffer, GUIDProfile) << "\n"; From 88de533467124ebb97d20728391ac98456b66354 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 31 Jul 2023 17:23:19 +1000 Subject: [PATCH 37/40] feat: use unicode module api calls for proxy dll --- windows/src/engine/keyman32-ver/calldll.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/windows/src/engine/keyman32-ver/calldll.cpp b/windows/src/engine/keyman32-ver/calldll.cpp index 7554c0f9bd1..5ed6182b6df 100644 --- a/windows/src/engine/keyman32-ver/calldll.cpp +++ b/windows/src/engine/keyman32-ver/calldll.cpp @@ -31,9 +31,9 @@ typedef BOOL (WINAPI *InitDllFunction)(PSTR name); #ifdef _WIN64 - const char keyman_engine_arch[] = "keyman64.dll"; + const wchar_t keyman_engine_arch[] = L"keyman64.dll"; #else - const char keyman_engine_arch[] = "keyman32.dll"; + const wchar_t keyman_engine_arch[] = L"keyman32.dll"; #endif /* Add a dll to the list of dlls associated with the keyboard */ @@ -605,19 +605,19 @@ LoadDLLs(LPINTKEYBOARDINFO lpkbi) { } if (!_td->hModuleProxy) { - char module_filename[_MAX_PATH]; - if(!GetModuleFileName(g_hInstance, module_filename, _MAX_PATH)){ + wchar_t module_filename[_MAX_PATH]; + if(!GetModuleFileNameW(g_hInstance, module_filename, _MAX_PATH)){ SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: unable to get handle for loaded keyman versioned dll; error:[%d]", GetLastError()); return FALSE; } - char *p = strrchr(module_filename, '\\'); // find last occurrence of '\' + wchar_t *p = wcsrchr(module_filename, '\\'); // find last occurrence of '\' if (p != NULL) { - size_t len = strnlen(keyman_engine_arch,_MAX_PATH); + size_t len = wcslen(keyman_engine_arch); // We know that the arch filename is shorter than the versioned filename so this // should always be safe, just insure we insert the null character - strncpy_s(p, _MAX_PATH - (p - module_filename), keyman_engine_arch, len); - _td->hModuleProxy = LoadLibrary(module_filename); + wcsncpy_s(p, _MAX_PATH - (p - module_filename), keyman_engine_arch, len); + _td->hModuleProxy = LoadLibraryW(module_filename); if (!_td->hModuleProxy) { SendDebugMessageFormat(0, sdmKeyboard, 0, "LoadDLLsCore: [%s] not loaded with error:[%d]", module_filename, GetLastError()); return FALSE; From 743eaa6ed88049d630912063039b0a5c890bf13f Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 1 Aug 2023 10:45:54 +1000 Subject: [PATCH 38/40] feat: tweaks to gitignore --- windows/src/.gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/windows/src/.gitignore b/windows/src/.gitignore index 1a624f084e3..9aceaa5d0e7 100644 --- a/windows/src/.gitignore +++ b/windows/src/.gitignore @@ -39,15 +39,11 @@ engine/keyman32-ver/premake.mak # /engine/keyman64 engine/keyman64/exports.h -engine/keyman64/keyman-debug-etwTEMP.BIN engine/keyman64/MSG00001.bin engine/keyman64/premake.mak -engine/keyman64/keyman-debug-etw.h -engine/keyman64/keyman-debug-etw.res # /engine/keyman64-ver engine/keyman64-ver/premake.mak -engine/keyman64-ver/TODO.TXT engine/keyman64-ver/Keyman64-ver.res engine/keyman64-ver/premake_version.mak From 05fd82fd1aa32a0b50ded35ab775f9deefa9ba62 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:32:38 +1000 Subject: [PATCH 39/40] chore(windows): icu lib files for version dlls merge --- windows/src/engine/keyman32-ver/keyman32-ver.vcxproj | 10 +++++----- windows/src/engine/keyman32/keyman32.vcxproj | 12 ++++++------ windows/src/engine/keyman64-ver/keyman64-ver.vcxproj | 10 +++++----- windows/src/engine/keyman64/keyman64.vcxproj | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj index 1131a50fdc6..2a3a4710090 100644 --- a/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj +++ b/windows/src/engine/keyman32-ver/keyman32-ver.vcxproj @@ -55,12 +55,12 @@ - $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\i18n;$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) $(ProjectName)$(VersionWithTag) - $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\i18n;$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) $(ProjectName)$(VersionWithTag) @@ -98,7 +98,7 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + libicuuc.a;libicuin.a;libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true keyman32-ver.def true @@ -154,7 +154,7 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + libicuuc.a;libicuin.a;libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) true keyman32-ver.def true @@ -376,4 +376,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32/keyman32.vcxproj index b66dc56a340..e2e6650facf 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj +++ b/windows/src/engine/keyman32/keyman32.vcxproj @@ -55,12 +55,12 @@ - $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\i18n;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\i18n;$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) $(ProjectName)$(VersionWithTag) - $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\i18n;$(ProjectDir)..\..\..\..\core\build\rust\x86\$(Configuration);$(LibraryPath) + $(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\subprojects\icu\source\i18n;$(LibraryPath) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) $(ProjectName)$(VersionWithTag) @@ -96,8 +96,8 @@ 0x0409 - /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libicuuc.a;libicuin.a;libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + %(AdditionalOptions) + %(AdditionalDependencies) true true true @@ -151,8 +151,8 @@ 0x0409 - /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libicuuc.a;libicuin.a;libkmnkbp0.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + %(AdditionalOptions) + %(AdditionalDependencies) true true true diff --git a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj index 0c89caaf455..6271fdc9ceb 100644 --- a/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj +++ b/windows/src/engine/keyman64-ver/keyman64-ver.vcxproj @@ -55,12 +55,12 @@ - $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\i18n;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) $(ProjectName)$(VersionWithTag) - $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\i18n;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) $(ProjectName)$(VersionWithTag) @@ -99,7 +99,7 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) + libicuuc.a;libicuin.a;libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) true C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)lib;%(AdditionalLibraryDirectories) false @@ -155,7 +155,7 @@ /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) + libicuuc.a;libicuin.a;libkmnkbp0.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmt.lib;%(AdditionalDependencies) true C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64;$(VCInstallDir)lib\amd64;$(VCInstallDir)lib;%(AdditionalLibraryDirectories) false @@ -318,4 +318,4 @@ - \ No newline at end of file + diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64/keyman64.vcxproj index 85e5ff8fe52..a7d98b91f60 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj +++ b/windows/src/engine/keyman64/keyman64.vcxproj @@ -63,12 +63,12 @@ - $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\i18n;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\i18n;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) $(ProjectName)$(VersionWithTag) - $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\i18n;$(ProjectDir)..\..\..\..\core\build\rust\x64\$(Configuration);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) + $(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\src;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\common;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\subprojects\icu\source\i18n;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64) $(ProjectDir)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(ProjectDir)..\..\..\..\core\include;$(IncludePath) $(ProjectName)$(VersionWithTag) From f53421b0f17aacf96ea81238c384b4233460a1a3 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:48:56 +1000 Subject: [PATCH 40/40] chore: update vcxproj for proxys to include RC info files --- windows/src/engine/keyman32/keyman32.vcxproj | 4 ++++ windows/src/engine/keyman64/keyman64.vcxproj | 3 +++ 2 files changed, 7 insertions(+) diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32/keyman32.vcxproj index e2e6650facf..0fa94236b58 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj +++ b/windows/src/engine/keyman32/keyman32.vcxproj @@ -198,6 +198,10 @@ + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64/keyman64.vcxproj index a7d98b91f60..682487bdd0e 100644 --- a/windows/src/engine/keyman64/keyman64.vcxproj +++ b/windows/src/engine/keyman64/keyman64.vcxproj @@ -18,6 +18,9 @@ + + + {CE480BDD-E112-488D-8684-ECBA8F46FF87} Keyman32-ver