From ac30b280ae4ba2cf45770f50065a9862d8ec1bcd Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Thu, 25 Nov 2021 14:35:51 +1100 Subject: [PATCH] chore(developer): move kcframe into its own folder --- windows/src/developer/developer.sln | 10 ++++++ .../kmcmpdll/{ => kcframe}/kcframe.cpp | 31 ++++++++++++------- .../kmcmpdll/{ => kcframe}/kcframe.vcxproj | 17 +++++----- .../{ => kcframe}/kcframe.vcxproj.filters | 0 4 files changed, 38 insertions(+), 20 deletions(-) rename windows/src/developer/kmcmpdll/{ => kcframe}/kcframe.cpp (61%) rename windows/src/developer/kmcmpdll/{ => kcframe}/kcframe.vcxproj (94%) rename windows/src/developer/kmcmpdll/{ => kcframe}/kcframe.vcxproj.filters (100%) diff --git a/windows/src/developer/developer.sln b/windows/src/developer/developer.sln index 5ec342e151..33dbf50512 100644 --- a/windows/src/developer/developer.sln +++ b/windows/src/developer/developer.sln @@ -11,6 +11,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kmanalyze", "kmanalyze\kman EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IMSample", "samples\imsample\IMSample.vcxproj", "{0C9DB8F9-B788-8782-A97D-4F8294AA0B4E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kcframe", "kmcmpdll\kcframe\kcframe.vcxproj", "{E92CC897-8228-4728-8110-028088D7A99C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -47,6 +49,14 @@ Global {0C9DB8F9-B788-8782-A97D-4F8294AA0B4E}.Release|x64.ActiveCfg = Release|Win32 {0C9DB8F9-B788-8782-A97D-4F8294AA0B4E}.Release|x86.ActiveCfg = Release|Win32 {0C9DB8F9-B788-8782-A97D-4F8294AA0B4E}.Release|x86.Build.0 = Release|Win32 + {E92CC897-8228-4728-8110-028088D7A99C}.Debug|x64.ActiveCfg = Debug|x64 + {E92CC897-8228-4728-8110-028088D7A99C}.Debug|x64.Build.0 = Debug|x64 + {E92CC897-8228-4728-8110-028088D7A99C}.Debug|x86.ActiveCfg = Debug|Win32 + {E92CC897-8228-4728-8110-028088D7A99C}.Debug|x86.Build.0 = Debug|Win32 + {E92CC897-8228-4728-8110-028088D7A99C}.Release|x64.ActiveCfg = Release|x64 + {E92CC897-8228-4728-8110-028088D7A99C}.Release|x64.Build.0 = Release|x64 + {E92CC897-8228-4728-8110-028088D7A99C}.Release|x86.ActiveCfg = Release|Win32 + {E92CC897-8228-4728-8110-028088D7A99C}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/windows/src/developer/kmcmpdll/kcframe.cpp b/windows/src/developer/kmcmpdll/kcframe/kcframe.cpp similarity index 61% rename from windows/src/developer/kmcmpdll/kcframe.cpp rename to windows/src/developer/kmcmpdll/kcframe/kcframe.cpp index 2a704c9d43..d51c2fbc54 100644 --- a/windows/src/developer/kmcmpdll/kcframe.cpp +++ b/windows/src/developer/kmcmpdll/kcframe/kcframe.cpp @@ -1,30 +1,29 @@ /* Name: kcframe Copyright: Copyright (C) SIL International. - Documentation: - Description: + Documentation: + Description: Create Date: 24 Aug 2015 Modified Date: 24 Aug 2015 Authors: mcdurdin - Related Files: - Dependencies: + Related Files: + Dependencies: - Bugs: - Todo: - Notes: + Bugs: + Todo: + Notes: History: 24 Aug 2015 - mcdurdin - I4865 - Add treat hints and warnings as errors into project - + 24 Aug 2015 - mcdurdin - I4866 - Add warn on deprecated features to project and compile - + */ #include #include #include - -//extern "C" BOOL __declspec(dllexport) CompileKeyboardFile(PSTR pszInfile, PSTR pszOutfile, BOOL FSaveDebug, CompilerMessageProc pMsgProc) +#include int WINAPI msgproc(int line, DWORD dwMsgCode, LPSTR szText) { @@ -34,11 +33,19 @@ int WINAPI msgproc(int line, DWORD dwMsgCode, LPSTR szText) int main(int argc, char *argv[]) { + if (argc == 2 && strcmp(argv[1], "--sizeof") == 0) { + printf("FILE_KEYBOARD_SIZE = %d\n", sizeof(FILE_KEYBOARD)); + printf("FILE_GROUP_SIZE = %d\n", sizeof(FILE_GROUP)); + printf("FILE_STORE_SIZE = %d\n", sizeof(FILE_STORE)); + printf("FILE_KEY_SIZE = %d\n", sizeof(FILE_KEY)); + printf("FILE_DEADKEY_SIZE = %d\n", sizeof(FILE_DEADKEY)); + return 0; + } if(argc < 3) { puts("Usage: kcframe infile.kmn outfile.kmx"); return 1; } - return CompileKeyboardFile(argv[1], argv[2], TRUE, FALSE, TRUE, msgproc) ? 0 : 1; // I4865 // I4866 + return CompileKeyboardFile(argv[1], argv[2], TRUE, FALSE, TRUE, msgproc) ? 0 : 1; } diff --git a/windows/src/developer/kmcmpdll/kcframe.vcxproj b/windows/src/developer/kmcmpdll/kcframe/kcframe.vcxproj similarity index 94% rename from windows/src/developer/kmcmpdll/kcframe.vcxproj rename to windows/src/developer/kmcmpdll/kcframe/kcframe.vcxproj index eb02ce1ad5..e4b305d0a9 100644 --- a/windows/src/developer/kmcmpdll/kcframe.vcxproj +++ b/windows/src/developer/kmcmpdll/kcframe/kcframe.vcxproj @@ -88,20 +88,22 @@ - $(SolutionDir)$(Platform)\$(Configuration)\ + $(ProjectDir)..\bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ - $(SolutionDir)$(Platform)\$(Configuration)\ + $(ProjectDir)..\bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ $(ProjectName).x64 + $(ProjectDir)..\bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ $(ProjectName).x64 + $(ProjectDir)..\bin\$(Platform)\$(Configuration)\ @@ -112,7 +114,7 @@ MaxSpeed OnlyExplicitInline - .;..\..\global\inc;%(AdditionalIncludeDirectories) + .;..\..\..\global\inc;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreaded @@ -147,7 +149,7 @@ MaxSpeed OnlyExplicitInline - .;..\..\global\inc;%(AdditionalIncludeDirectories) + .;..\..\..\global\inc;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true MultiThreaded @@ -180,7 +182,7 @@ Disabled - .;..\..\global\inc;%(AdditionalIncludeDirectories) + .;..\..\..\global\inc;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks @@ -216,7 +218,7 @@ Disabled - .;..\..\global\inc;%(AdditionalIncludeDirectories) + .;..\..\..\global\inc;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -258,9 +260,8 @@ - + {7e26fe08-721e-424b-9da0-4a0dca88a86e} - false diff --git a/windows/src/developer/kmcmpdll/kcframe.vcxproj.filters b/windows/src/developer/kmcmpdll/kcframe/kcframe.vcxproj.filters similarity index 100% rename from windows/src/developer/kmcmpdll/kcframe.vcxproj.filters rename to windows/src/developer/kmcmpdll/kcframe/kcframe.vcxproj.filters