Revision: 8498 https://osdn.net/projects/ttssh2/scm/svn/commits/8498 Author: zmatsuo Date: 2020-01-22 22:54:01 +0900 (Wed, 22 Jan 2020) Log Message: ----------- layer_for_unicodeを使用するようにした Modified Paths: -------------- trunk/TTXSamples/TTXCheckUpdate/CMakeLists.txt trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj.filters trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v8.vcproj trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c trunk/TTXSamples/TTXSamples.sln trunk/TTXSamples/TTXSamples.v16.sln -------------- next part -------------- Modified: trunk/TTXSamples/TTXCheckUpdate/CMakeLists.txt =================================================================== --- trunk/TTXSamples/TTXCheckUpdate/CMakeLists.txt 2020-01-22 13:53:52 UTC (rev 8497) +++ trunk/TTXSamples/TTXCheckUpdate/CMakeLists.txt 2020-01-22 13:54:01 UTC (rev 8498) @@ -15,7 +15,6 @@ cJSON/cJSON.h cJSON/cJSON.c # - ../../teraterm/common/codeconv.cpp ../../teraterm/common/codeconv.h ../../teraterm/common/dlglib.h ../../teraterm/common/dlglib.c @@ -46,6 +45,7 @@ target_link_libraries( TTXCheckUpdate PRIVATE + common_static ttpcmn Wininet.lib ) Modified: trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj =================================================================== --- trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj 2020-01-22 13:53:52 UTC (rev 8497) +++ trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj 2020-01-22 13:54:01 UTC (rev 8498) @@ -56,7 +56,7 @@ <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\teraterm\teraterm;$(ProjectDir)..\..\teraterm\common;$(ProjectDir)..\..\teraterm\teraterm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;TTXENCODE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <PrecompiledHeader /> @@ -75,7 +75,7 @@ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <AdditionalIncludeDirectories>$(SolutionDir)..\teraterm\common;$(SolutionDir)..\teraterm\teraterm;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;TTXENCODE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader /> <WarningLevel>Level3</WarningLevel> @@ -96,7 +96,6 @@ <ClCompile Include="parse.cpp" /> <ClCompile Include="TTXCheckUpdate.c" /> <ClCompile Include="cJSON/cJSON.c" /> - <ClCompile Include="../../teraterm/common/codeconv.cpp" /> <ClCompile Include="../../teraterm/common/dlglib.c" /> <ClCompile Include="../../teraterm/common/dlglib_cpp.cpp" /> <ClCompile Include="../../teraterm/common/dlglib_tmpl.cpp" /> @@ -113,7 +112,12 @@ <ItemGroup> <ResourceCompile Include="resource.rc" /> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\teraterm\common\common_static.v16.vcxproj"> + <Project>{ac42387d-23ec-45db-81f9-8933c7efa52a}</Project> + </ProjectReference> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> -</Project> \ No newline at end of file +</Project> Modified: trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj.filters =================================================================== --- trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj.filters 2020-01-22 13:53:52 UTC (rev 8497) +++ trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v16.vcxproj.filters 2020-01-22 13:54:01 UTC (rev 8498) @@ -33,9 +33,6 @@ <ClCompile Include="../../teraterm/common/ttlib.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="../../teraterm/common/codeconv.cpp"> - <Filter>common</Filter> - </ClCompile> <ClCompile Include="../../teraterm/common/dlglib.c"> <Filter>common</Filter> </ClCompile> Modified: trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v8.vcproj =================================================================== --- trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v8.vcproj 2020-01-22 13:53:52 UTC (rev 8497) +++ trunk/TTXSamples/TTXCheckUpdate/TTXCheckUpdate.v8.vcproj 2020-01-22 13:54:01 UTC (rev 8498) @@ -177,10 +177,6 @@ Name="common" > <File - RelativePath="..\..\teraterm\common\codeconv.cpp" - > - </File> - <File RelativePath="..\..\teraterm\common\codeconv.h" > </File> Modified: trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c =================================================================== --- trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c 2020-01-22 13:53:52 UTC (rev 8497) +++ trunk/TTXSamples/TTXCheckUpdate/ttxcheckupdate.c 2020-01-22 13:54:01 UTC (rev 8498) @@ -13,6 +13,7 @@ #include "compat_w95.h" #include "dlglib.h" #include "i18n.h" +#include "layer_for_unicode.h" #include "resource.h" #include "parse.h" @@ -38,11 +39,11 @@ int cursor = -1; size_t i; - SendDlgItemMessageW(hDlg, IDC_COMBO1, CB_RESETCONTENT, 0, 0); + _SendDlgItemMessageW(hDlg, IDC_COMBO1, CB_RESETCONTENT, 0, 0); for (i = 0; i < pvar->versions_count; i++) { const version_one_t *v = &pvar->versions[i]; wchar_t *strW = ToWcharU8(v->version_text); - SendDlgItemMessageW(hDlg, IDC_COMBO1, CB_ADDSTRING, 0, (LPARAM)strW); + _SendDlgItemMessageW(hDlg, IDC_COMBO1, CB_ADDSTRING, 0, (LPARAM)strW); free(strW); if (cursor == -1 && v->version_major == version_major) { cursor = (int)i; @@ -59,7 +60,7 @@ const version_one_t *v = version; wchar_t *strW = ToWcharU8(v->text); - SetWindowTextW(GetDlgItem(hDlg, IDC_EDIT1), strW); + _SetWindowTextW(GetDlgItem(hDlg, IDC_EDIT1), strW); free(strW); if (v->url == NULL) { @@ -138,7 +139,7 @@ L" %s\n", UILanguageFile); swprintf(buf, _countof(buf), UIMsg, update_info_url); - result_mb = MessageBoxW(hWnd, buf, L"Tera Term", MB_YESNO | MB_ICONEXCLAMATION); + result_mb = _MessageBoxW(hWnd, buf, L"Tera Term", MB_YESNO | MB_ICONEXCLAMATION); if (result_mb == IDNO) { return; } @@ -147,7 +148,7 @@ swprintf(agent, _countof(agent), L"%s_%d", agent_base, pvar->ts->RunningVersion); result_bool = GetContent(update_info_url, agent, (void**)&json_raw_ptr, &json_raw_size); if (!result_bool) { - MessageBoxW(hWnd, L"access error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); + _MessageBoxW(hWnd, L"access error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); return; } json_size = json_raw_size + 1; @@ -162,7 +163,7 @@ /* json\x82\xF0\x83p\x81[\x83X\x82\xB7\x82\xE9 */ pvar->versions = ParseJson(json_ptr, &pvar->versions_count); if (pvar->versions == NULL) { - MessageBoxW(hWnd, L"parse error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); + _MessageBoxW(hWnd, L"parse error?", L"Tera Term", MB_OK | MB_ICONEXCLAMATION); return; } @@ -260,11 +261,13 @@ return FALSE; } +#if 0 if (!IsWindowsNTKernel()) { // TODO Windows10\x88ȊO\x81A\x96\xA2\x8C\x9F\x8F\xD8 return FALSE; } - +#endif + size = sizeof(Exports) - sizeof(exports->size); if ((int)size > exports->size) { size = exports->size; Modified: trunk/TTXSamples/TTXSamples.sln =================================================================== --- trunk/TTXSamples/TTXSamples.sln 2020-01-22 13:53:52 UTC (rev 8497) +++ trunk/TTXSamples/TTXSamples.sln 2020-01-22 13:54:01 UTC (rev 8498) @@ -33,7 +33,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TTXOutputBuffering", "TTXOutputBuffering\TTXOutputBuffering.vcproj", "{80BE71D1-BEA3-4A5D-8F13-362D6364892D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TTXCheckUpdate", "TTXCheckUpdate\TTXCheckUpdate.v8.vcproj", "{937DFA65-5709-4643-B778-482C15DEC581}" + ProjectSection(ProjectDependencies) = postProject + {DF4E3C36-A743-4FB4-8EE9-49899E69ED32} = {DF4E3C36-A743-4FB4-8EE9-49899E69ED32} + EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common_static", "..\teraterm\common\common_static.v8.vcproj", "{DF4E3C36-A743-4FB4-8EE9-49899E69ED32}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -108,6 +113,10 @@ {937DFA65-5709-4643-B778-482C15DEC581}.Debug|Win32.Build.0 = Debug|Win32 {937DFA65-5709-4643-B778-482C15DEC581}.Release|Win32.ActiveCfg = Release|Win32 {937DFA65-5709-4643-B778-482C15DEC581}.Release|Win32.Build.0 = Release|Win32 + {DF4E3C36-A743-4FB4-8EE9-49899E69ED32}.Debug|Win32.ActiveCfg = Debug|Win32 + {DF4E3C36-A743-4FB4-8EE9-49899E69ED32}.Debug|Win32.Build.0 = Debug|Win32 + {DF4E3C36-A743-4FB4-8EE9-49899E69ED32}.Release|Win32.ActiveCfg = Release|Win32 + {DF4E3C36-A743-4FB4-8EE9-49899E69ED32}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/TTXSamples/TTXSamples.v16.sln =================================================================== --- trunk/TTXSamples/TTXSamples.v16.sln 2020-01-22 13:53:52 UTC (rev 8497) +++ trunk/TTXSamples/TTXSamples.v16.sln 2020-01-22 13:54:01 UTC (rev 8498) @@ -36,6 +36,8 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TTXCheckUpdate", "TTXCheckUpdate\TTXCheckUpdate.v16.vcxproj", "{937DFA65-5709-4643-B778-482C15DEC581}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common_static", "..\teraterm\common\common_static.v16.vcxproj", "{AC42387D-23EC-45DB-81F9-8933C7EFA52A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -110,6 +112,10 @@ {937DFA65-5709-4643-B778-482C15DEC581}.Debug|Win32.Build.0 = Debug|Win32 {937DFA65-5709-4643-B778-482C15DEC581}.Release|Win32.ActiveCfg = Release|Win32 {937DFA65-5709-4643-B778-482C15DEC581}.Release|Win32.Build.0 = Release|Win32 + {AC42387D-23EC-45DB-81F9-8933C7EFA52A}.Debug|Win32.ActiveCfg = Debug|Win32 + {AC42387D-23EC-45DB-81F9-8933C7EFA52A}.Debug|Win32.Build.0 = Debug|Win32 + {AC42387D-23EC-45DB-81F9-8933C7EFA52A}.Release|Win32.ActiveCfg = Release|Win32 + {AC42387D-23EC-45DB-81F9-8933C7EFA52A}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE