diff --git a/common/windows/build.sh b/common/windows/build.sh index 714d633544..06f5dd0201 100755 --- a/common/windows/build.sh +++ b/common/windows/build.sh @@ -18,7 +18,7 @@ builder_describe "Keyman common Windows modules" \ builder_parse "$@" -if [[ $BUILDER_OS != windows ]]; then +if [[ $BUILDER_OS != win ]]; then builder_echo grey "Platform is not Windows; skipping common/windows" exit 0 fi diff --git a/windows/src/.gitignore b/windows/src/.gitignore index 3ac3da4ea5..350b7e4bdb 100644 --- a/windows/src/.gitignore +++ b/windows/src/.gitignore @@ -16,7 +16,7 @@ # These files are generated during build engine/keyman32/KEYMAN32.res -engine/keyman64/Keyman64.res +engine/keyman32/Keyman64.res engine/keymanx64/keymanx64.res engine/mcompile/Release/ tds_file.txt diff --git a/windows/src/engine/.gitignore b/windows/src/engine/.gitignore index 13c59ae0a5..e17dcb3de7 100644 --- a/windows/src/engine/.gitignore +++ b/windows/src/engine/.gitignore @@ -3,11 +3,6 @@ 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 mcompile/Debug # Visual Studio packages for test diff --git a/windows/src/engine/README.md b/windows/src/engine/README.md index 38851aa11e..5a4f1ab2b1 100644 --- a/windows/src/engine/README.md +++ b/windows/src/engine/README.md @@ -11,13 +11,9 @@ The installation merge module database for the Keyman Engine. Host application for the Keyman Engine. Shows the Keyman icon, Keyman menu, OSK, and handles language switching etc, as well as running the windows hooks to capture and translate keystrokes. -## keyman32 - keyman32.dll +## keyman32 - keyman32.dll, keyman64.dll -Main keyboard processing library and hook library (32 bit). - -## keyman64 - keyman64.dll - -Main keyboard processing library and hook library (64 bit). +Main keyboard processing library and hook library (x86, x64). ## keymanmc - keymanmc.dll diff --git a/windows/src/engine/build.sh b/windows/src/engine/build.sh index 6cc993758a..9c9a6d2d0f 100755 --- a/windows/src/engine/build.sh +++ b/windows/src/engine/build.sh @@ -17,8 +17,7 @@ builder_describe \ \ ":insthelper Installation helper module" \ ":keyman Main host process (32 bit)" \ - ":keyman32 Keystroke processing engine (32 bit)" \ - ":keyman64 Keystroke processing engine (64 bit)" \ + ":keyman32 Keystroke processing engine (all archs)" \ ":keymanmc Message library" \ ":keymanx64 Host process (64 bit)" \ ":kmcomapi COM API library" \ diff --git a/windows/src/engine/engine.sln b/windows/src/engine/engine.sln index 81da027de0..5c641463c8 100644 --- a/windows/src/engine/engine.sln +++ b/windows/src/engine/engine.sln @@ -3,9 +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}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman64", "keyman64\keyman64.vcxproj", "{D1115FB2-230D-4FD8-90B9-982E49953D18}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyman32", "keyman32\Keyman32.vcxproj", "{BD5564FB-35A5-4A3C-B96A-4A6578E2B593}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keymanx64", "keymanx64\keymanx64.vcxproj", "{A34650EA-D6E8-4229-8091-6BF1443565B5}" EndProject @@ -29,18 +27,12 @@ Global 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|Win32.ActiveCfg = Release|x64 + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593}.Debug|Win32.Build.0 = Release|x64 {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 - {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 {A34650EA-D6E8-4229-8091-6BF1443565B5}.Debug|Win32.ActiveCfg = Debug|x64 {A34650EA-D6E8-4229-8091-6BF1443565B5}.Debug|x64.ActiveCfg = Debug|x64 {A34650EA-D6E8-4229-8091-6BF1443565B5}.Debug|x64.Build.0 = Debug|x64 diff --git a/windows/src/engine/keyman32/build.sh b/windows/src/engine/keyman32/build.sh index b171dd9cc8..76afe37c64 100755 --- a/windows/src/engine/keyman32/build.sh +++ b/windows/src/engine/keyman32/build.sh @@ -8,7 +8,8 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" builder_describe "Keystroke processing engine (32 bit)" \ @/common/include \ @/core:x86 \ - clean configure build test publish install + clean configure build test publish install \ + :x86 :x64 builder_parse "$@" @@ -16,19 +17,26 @@ builder_parse "$@" source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh" WIN32_TARGET="$WIN32_TARGET_PATH/keyman32.dll" +X64_TARGET="$X64_TARGET_PATH/keyman64.dll" builder_describe_outputs \ - configure:project /resources/build/win/delphi_environment_generated.inc.sh \ - build:project /windows/src/engine/keyman32/$WIN32_TARGET + configure /resources/build/win/delphi_environment_generated.inc.sh \ + build:x86 /windows/src/engine/keyman32/$WIN32_TARGET \ + build:x64 /windows/src/engine/keyman64/$X64_TARGET \ #------------------------------------------------------------------------------------------------------------------- -function do_clean() { - vs_msbuild keyman32.vcxproj //t:Clean +function do_clean_x86() { + vs_msbuild keyman32.vcxproj //t:Clean //p:Platform=Win32 clean_windows_project_files } -function do_build() { +function do_clean_x64() { + vs_msbuild keyman32.vcxproj //t:Clean //p:Platform=x64 + clean_windows_project_files +} + +function do_build_x86() { create-windows-output-folders build_version.res vs_msbuild keyman32.vcxproj //t:Build "//p:Platform=Win32" @@ -36,21 +44,43 @@ function do_build() { cp "$WIN32_TARGET_PATH/keyman32.pdb" "$WINDOWS_DEBUGPATH_ENGINE" } -function do_publish() { +function do_build_x64() { + create-windows-output-folders + build_version.res + vs_msbuild keyman32.vcxproj //t:Build "//p:Platform=x64" + cp "$X64_TARGET" "$WINDOWS_PROGRAM_ENGINE" + cp "$X64_TARGET_PATH/keyman64.pdb" "$WINDOWS_DEBUGPATH_ENGINE" +} + +function do_publish_x86() { wrap-signcode //d "Keyman Engine for Windows" "$WINDOWS_PROGRAM_ENGINE/keyman32.dll" wrap-symstore "$WINDOWS_PROGRAM_ENGINE/keyman32.dll" //t keyman-engine-windows wrap-symstore "$WINDOWS_DEBUGPATH_ENGINE/keyman32.pdb" //t keyman-engine-windows } -function do_install() { +function do_publish_x64() { + wrap-signcode //d "Keyman Engine for Windows" "$WINDOWS_PROGRAM_ENGINE/keyman64.dll" + wrap-symstore "$WINDOWS_PROGRAM_ENGINE/keyman64.dll" //t keyman-engine-windows + wrap-symstore "$WINDOWS_DEBUGPATH_ENGINE/keyman64.pdb" //t keyman-engine-windows +} + +function do_install_x86() { cp "$WINDOWS_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" } -builder_run_action clean:project do_clean -builder_run_action configure:project configure_windows_build_environment -builder_run_action build:project do_build +function do_install_x64() { + cp "$WINDOWS_PROGRAM_ENGINE/keyman64.dll" "$INSTALLPATH_KEYMANENGINE/keyman64.dll" +} + +builder_run_action clean:x86 do_clean_x86 +builder_run_action clean:x64 do_clean_x64 +builder_run_action configure configure_windows_build_environment +builder_run_action build:x86 do_build_x86 +builder_run_action build:x64 do_build_x64 # builder_run_action test:project do_test -builder_run_action publish:project do_publish -builder_run_action install:project do_install +builder_run_action publish:x86 do_publish_x86 +builder_run_action publish:x64 do_publish_x64 +builder_run_action install:x86 do_install_x86 +builder_run_action install:x64 do_install_x64 diff --git a/windows/src/engine/keyman32/hotkeys.cpp b/windows/src/engine/keyman32/hotkeys.cpp index cead296f8d..ac16a3698e 100644 --- a/windows/src/engine/keyman32/hotkeys.cpp +++ b/windows/src/engine/keyman32/hotkeys.cpp @@ -26,9 +26,7 @@ // I5136 #include "pch.h" -#ifdef _WIN64 -#error hotkeys.cpp is not required for win64. -#endif +#ifndef _WIN64 Hotkeys *g_Hotkeys = NULL; // I4326 @@ -141,3 +139,5 @@ Hotkey *Hotkeys::GetHotkey(DWORD hotkey) return &m_hotkeys[i]; return NULL; } + +#endif diff --git a/windows/src/engine/keyman32/k32_lowlevelkeyboardhook.cpp b/windows/src/engine/keyman32/k32_lowlevelkeyboardhook.cpp index cc5152cf58..79c46ebc59 100644 --- a/windows/src/engine/keyman32/k32_lowlevelkeyboardhook.cpp +++ b/windows/src/engine/keyman32/k32_lowlevelkeyboardhook.cpp @@ -26,9 +26,7 @@ #include "serialkeyeventserver.h" #include "kbd.h" /* DDK kbdlayout */ -#ifdef _WIN64 -#error k32_lowlevelkeyboardhook.cpp is not required for win64. -#endif +#ifndef _WIN64 BOOL ProcessHotkey(UINT vkCode, BOOL isUp, DWORD ShiftState); @@ -329,3 +327,5 @@ BOOL ProcessHotkey(UINT vkCode, BOOL isUp, DWORD ShiftState) { return TRUE; } + +#endif diff --git a/windows/src/engine/keyman32/keyman32.rc b/windows/src/engine/keyman32/keyman32.rc index 06a3db3fef..624b24e9f2 100644 --- a/windows/src/engine/keyman32/keyman32.rc +++ b/windows/src/engine/keyman32/keyman32.rc @@ -1,4 +1,3 @@ - #include "version.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/windows/src/engine/keyman32/keyman32.vcxproj b/windows/src/engine/keyman32/keyman32.vcxproj index 021aa55d65..8f75aeb126 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj +++ b/windows/src/engine/keyman32/keyman32.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {BD5564FB-35A5-4A3C-B96A-4A6578E2B593} @@ -22,11 +30,21 @@ false v142 + + DynamicLibrary + false + v142 + DynamicLibrary false v142 + + DynamicLibrary + false + v142 + @@ -34,33 +52,65 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)bin\$(Platform)\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ false + false $(ProjectDir)bin\$(Platform)\$(Configuration)\ + $(ProjectDir)bin\$(Platform)\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ + $(ProjectDir)obj\$(Platform)\$(Configuration)\ true + true AllRules.ruleset + AllRules.ruleset + + AllRules.ruleset + AllRules.ruleset + + $(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)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + keyman32 + + + $(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)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(IncludePath) + keyman64 $(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)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x86\$(Configuration)\include;$(IncludePath) + keyman32 + + + $(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)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(IncludePath) + keyman64 @@ -120,6 +170,62 @@ + + + NDEBUG;%(PreprocessorDefinitions) + true + true + ./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) + libicuuc.a;libicuin.a;libkeymancore.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + true + keyman64.def + true + true + false + Windows + true + true + 0x1c100000 + true + true + ..\..\..\lib\keyman64.lib + + + true + ./Keyman64.bsc + + + + + + _DEBUG;%(PreprocessorDefinitions) @@ -173,124 +279,92 @@ + + + _DEBUG;%(PreprocessorDefinitions) + true + true + ./Keyman32.tlb + + + + + Disabled + .\;..\..\global\inc;.;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + + + MultiThreadedDebug + Use + pch.h + All + true + Level4 + true + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) + libicuuc.a;libicuin.a;libkeymancore.a;psapi.lib;rpcrt4.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;%(AdditionalDependencies) + true + keyman64.def + true + true + Windows + 0x1C100000 + true + true + ..\..\..\lib\keyman64.lib + + + 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) - + + + + + + + + Create + Create Create + Create @@ -298,60 +372,58 @@ - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - + + - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - + + + Document false + false false + false mc %(FullPath) + mc %(FullPath) Compiling keyman-debug-etw + Compiling keyman-debug-etw %(Filename).rc;%(Filename.h);MSG00001.bin + %(Filename).rc;%(Filename.h);MSG00001.bin mc %(FullPath) + mc %(FullPath) Compiling keyman-debug-etw + Compiling keyman-debug-etw %(Filename).rc;%(Filename.h);MSG00001.bin + %(Filename).rc;%(Filename.h);MSG00001.bin Designer - + + true + true + + + true + true + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + true + true + + + true + true diff --git a/windows/src/engine/keyman32/keyman32.vcxproj.filters b/windows/src/engine/keyman32/keyman32.vcxproj.filters index 0f16750b7c..5627c72b04 100644 --- a/windows/src/engine/keyman32/keyman32.vcxproj.filters +++ b/windows/src/engine/keyman32/keyman32.vcxproj.filters @@ -152,6 +152,9 @@ Resource Files + + Source Files + @@ -160,6 +163,9 @@ Source Files + + Source Files + diff --git a/windows/src/engine/keyman32/keyman64.def b/windows/src/engine/keyman32/keyman64.def new file mode 100644 index 0000000000..9f46c08cb8 --- /dev/null +++ b/windows/src/engine/keyman32/keyman64.def @@ -0,0 +1,45 @@ +LIBRARY KEYMAN64 + +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_WriteDebugEventW + + Keyman_Diagnostic + + Keyman_RegisterMasterController + Keyman_UnregisterMasterController + Keyman_RegisterControllerThread + Keyman_UnregisterControllerThread + + SetCustomPostKeyCallback diff --git a/windows/src/engine/keyman32/keyman64.rc b/windows/src/engine/keyman32/keyman64.rc new file mode 100644 index 0000000000..c4fe9ce92e --- /dev/null +++ b/windows/src/engine/keyman32/keyman64.rc @@ -0,0 +1 @@ +#include "version64.rc" diff --git a/windows/src/engine/keyman32/kmhook_keyboard.cpp b/windows/src/engine/keyman32/kmhook_keyboard.cpp index 711eb68322..c5859bccc0 100644 --- a/windows/src/engine/keyman32/kmhook_keyboard.cpp +++ b/windows/src/engine/keyman32/kmhook_keyboard.cpp @@ -62,9 +62,8 @@ #include "pch.h" #include -#ifdef _WIN64 -#error kmhook_keyboard.cpp is not required for win64. -#endif +#ifndef _WIN64 + // I3617 BOOL IsLanguageSwitchWindowVisible(); void SendToLanguageSwitchWindow(WPARAM wParam, LPARAM lParam); @@ -192,3 +191,5 @@ int ProcessLanguageSwitchShiftKey(WPARAM wParam, BOOL isUp) PostDummyKeyEvent(); // I3301 - this is imperfect because we don't deal with HC_NOREMOVE. But good enough? // I3534 // I4844 return 0; } + +#endif diff --git a/windows/src/engine/keyman32/syskbdnt64.cpp b/windows/src/engine/keyman32/syskbdnt64.cpp index 37342ac7d5..882bb4e030 100644 --- a/windows/src/engine/keyman32/syskbdnt64.cpp +++ b/windows/src/engine/keyman32/syskbdnt64.cpp @@ -31,6 +31,9 @@ //////////////////////////////////////////////////////////////////////////// #include "pch.h" + +#ifndef _WIN64 + #include "kbd.h" /* DDK kbdlayout */ //#pragma warning ( disable : 4200 ) @@ -221,3 +224,5 @@ BOOL IsWow64() fStored = TRUE; return bIsWow64; } + +#endif diff --git a/windows/src/engine/keyman64/version.rc b/windows/src/engine/keyman32/version64.rc similarity index 100% rename from windows/src/engine/keyman64/version.rc rename to windows/src/engine/keyman32/version64.rc diff --git a/windows/src/engine/keyman64/build.sh b/windows/src/engine/keyman64/build.sh deleted file mode 100755 index 4b278e3c3e..0000000000 --- a/windows/src/engine/keyman64/build.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -## START STANDARD BUILD SCRIPT INCLUDE -# adjust relative paths as necessary -THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" -## END STANDARD BUILD SCRIPT INCLUDE - -builder_describe "Keystroke processing engine (64 bit)" \ - @/common/include \ - @/core:x64 \ - clean configure build test publish install - -builder_parse "$@" - -#------------------------------------------------------------------------------------------------------------------- - -source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh" -X64_TARGET="$X64_TARGET_PATH/keyman64.dll" - -builder_describe_outputs \ - configure:project /resources/build/win/delphi_environment_generated.inc.sh \ - build:project /windows/src/engine/keyman64/$X64_TARGET - -#------------------------------------------------------------------------------------------------------------------- - -function do_clean() { - vs_msbuild keyman64.vcxproj //t:Clean - clean_windows_project_files -} - -function do_build() { - create-windows-output-folders - build_version.res - vs_msbuild keyman64.vcxproj //t:Build "//p:Platform=x64" - cp "$X64_TARGET" "$WINDOWS_PROGRAM_ENGINE" - cp "$X64_TARGET_PATH/keyman64.pdb" "$WINDOWS_DEBUGPATH_ENGINE" -} - -function do_publish() { - wrap-signcode //d "Keyman Engine for Windows" "$WINDOWS_PROGRAM_ENGINE/keyman64.dll" - wrap-symstore "$WINDOWS_PROGRAM_ENGINE/keyman64.dll" //t keyman-engine-windows - wrap-symstore "$WINDOWS_DEBUGPATH_ENGINE/keyman64.pdb" //t keyman-engine-windows -} - -builder_run_action clean:project do_clean -builder_run_action configure:project configure_windows_build_environment -builder_run_action build:project do_build -# builder_run_action test:project do_test -builder_run_action publish:project do_publish -builder_run_action install:project cp "$WINDOWS_PROGRAM_ENGINE/keyman64.dll" "$INSTALLPATH_KEYMANENGINE/keyman64.dll" diff --git a/windows/src/engine/keyman64/keyman64.rc b/windows/src/engine/keyman64/keyman64.rc deleted file mode 100644 index 176ac08147..0000000000 --- a/windows/src/engine/keyman64/keyman64.rc +++ /dev/null @@ -1,3 +0,0 @@ - -#include "version.rc" - diff --git a/windows/src/engine/keyman64/keyman64.sln b/windows/src/engine/keyman64/keyman64.sln deleted file mode 100644 index cbab00dba9..0000000000 --- a/windows/src/engine/keyman64/keyman64.sln +++ /dev/null @@ -1,24 +0,0 @@ - -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|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 - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/windows/src/engine/keyman64/keyman64.vcxproj b/windows/src/engine/keyman64/keyman64.vcxproj deleted file mode 100644 index 9e9b5f7e71..0000000000 --- a/windows/src/engine/keyman64/keyman64.vcxproj +++ /dev/null @@ -1,332 +0,0 @@ - - - - - Debug - x64 - - - Release - x64 - - - - {D1115FB2-230D-4FD8-90B9-982E49953D18} - Keyman32 - 10.0 - - - - 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\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)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(IncludePath) - - - $(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)..\..\..\..\common\include;$(ProjectDir)..\..\..\..\core\include;$(ProjectDir)..\..\..\..\core\build\x64\$(Configuration)\include;$(IncludePath) - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - ./Keyman32.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\keyman32;..\..\global\inc;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - true - - - MultiThreaded - true - Use - pch.h - All - Level4 - true - true - ProgramDatabase - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libicuuc.a;libicuin.a;libkeymancore.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.lib - MachineX64 - true - true - - - true - ./Keyman32.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - ./Keyman32.tlb - - - - - Disabled - ..\keyman32;..\..\global\inc;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - true - - - MultiThreadedDebug - Use - pch.h - All - true - Level4 - true - true - ProgramDatabase - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - /verbose:lib /section:.SHARDATA,rws %(AdditionalOptions) - libicuuc.a;libicuin.a;libkeymancore.a;psapi.lib;version.lib;setupapi.lib;iphlpapi.lib;imm32.lib;crypt32.lib;wintrust.lib;imagehlp.lib;ws2_32.lib;libcmtd.lib;%(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.lib - MachineX64 - true - true - - - true - ./Keyman32.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 - $(IntDir)%(Filename)1.xdc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/keyman64.vcxproj.filters b/windows/src/engine/keyman64/keyman64.vcxproj.filters deleted file mode 100644 index 06ba0e951e..0000000000 --- a/windows/src/engine/keyman64/keyman64.vcxproj.filters +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/windows/src/engine/testhost/testhost.cpp b/windows/src/engine/testhost/testhost.cpp index 4369db42b0..d74c3c1cc6 100644 --- a/windows/src/engine/testhost/testhost.cpp +++ b/windows/src/engine/testhost/testhost.cpp @@ -312,8 +312,8 @@ 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_DEBUG "keyman32" / "bin" / "x64" / "Debug" / "keyman64.dll" +#define KEYMAN32_RELEASE "keyman32" / "bin" / "x64" / "Release" / "keyman64.dll" #else #define KEYMAN32 "keyman32.dll" #define KEYMAN32_DEBUG "keyman32" / "bin" / "Win32" / "Debug" / "keyman32.dll"