• R/O
  • HTTP
  • SSH
  • HTTPS

winmerge-jp: Commit


Commit MetaInfo

Revision4bfc59720e8fcd544fa74ac213d3b83facd50878 (tree)
Time2021-09-16 21:04:28
AuthorTakashi Sawanaka <sdottaka@user...>
CommiterTakashi Sawanaka

Log Message

Shell Extension for Windows 11 or later (5)

Change Summary

Incremental Difference

--- a/Src/Merge.vcxproj
+++ b/Src/Merge.vcxproj
@@ -253,6 +253,9 @@
253253 <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
254254 <Profile>true</Profile>
255255 </Link>
256+ <Manifest>
257+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
258+ </Manifest>
256259 </ItemDefinitionGroup>
257260 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
258261 <Midl>
@@ -306,6 +309,9 @@
306309 <EnableCOMDATFolding>true</EnableCOMDATFolding>
307310 <Profile>true</Profile>
308311 </Link>
312+ <Manifest>
313+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
314+ </Manifest>
309315 </ItemDefinitionGroup>
310316 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
311317 <Midl>
@@ -357,6 +363,9 @@
357363 <EnableCOMDATFolding>true</EnableCOMDATFolding>
358364 <Profile>true</Profile>
359365 </Link>
366+ <Manifest>
367+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
368+ </Manifest>
360369 </ItemDefinitionGroup>
361370 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
362371 <Midl>
@@ -407,6 +416,9 @@
407416 <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
408417 <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
409418 </Link>
419+ <Manifest>
420+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
421+ </Manifest>
410422 </ItemDefinitionGroup>
411423 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">
412424 <Midl>
@@ -456,6 +468,9 @@
456468 <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
457469 <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
458470 </Link>
471+ <Manifest>
472+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
473+ </Manifest>
459474 </ItemDefinitionGroup>
460475 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
461476 <Midl>
@@ -503,6 +518,9 @@
503518 <Profile>false</Profile>
504519 <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
505520 </Link>
521+ <Manifest>
522+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
523+ </Manifest>
506524 </ItemDefinitionGroup>
507525 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
508526 <Midl>
@@ -548,6 +566,9 @@
548566 <Profile>false</Profile>
549567 <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
550568 </Link>
569+ <Manifest>
570+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
571+ </Manifest>
551572 </ItemDefinitionGroup>
552573 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'">
553574 <Midl>
@@ -594,6 +615,9 @@
594615 <Profile>false</Profile>
595616 <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
596617 </Link>
618+ <Manifest>
619+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
620+ </Manifest>
597621 </ItemDefinitionGroup>
598622 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|ARM64'">
599623 <Midl>
@@ -638,6 +662,9 @@
638662 <Profile>false</Profile>
639663 <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
640664 </Link>
665+ <Manifest>
666+ <AdditionalManifestFiles>res\WinMerge.exe.manifest</AdditionalManifestFiles>
667+ </Manifest>
641668 </ItemDefinitionGroup>
642669 <ItemGroup>
643670 <ClCompile Include="..\Externals\gtest\src\gtest-all.cc">
--- a/Src/PropShell.cpp
+++ b/Src/PropShell.cpp
@@ -13,6 +13,7 @@
1313 #include "Constants.h"
1414 #include "Environment.h"
1515 #include "paths.h"
16+#include "Win_VersionHelper.h"
1617
1718 #ifdef _DEBUG
1819 #define new DEBUG_NEW
@@ -106,13 +107,6 @@ static bool RegisterShellExtension(bool unregister, bool peruser)
106107 }
107108 }
108109
109-PropShell::PropShell(COptionsMgr *optionsMgr)
110-: OptionsPanel(optionsMgr, PropShell::IDD)
111-, m_bContextAdded(false)
112-, m_bContextAdvanced(false)
113-{
114-}
115-
116110 static bool RegisterWinMergeContextMenu(bool unregister)
117111 {
118112 String cmd;
@@ -137,6 +131,13 @@ static bool RegisterWinMergeContextMenu(bool unregister)
137131 return true;
138132 }
139133
134+PropShell::PropShell(COptionsMgr *optionsMgr)
135+: OptionsPanel(optionsMgr, PropShell::IDD)
136+, m_bContextAdded(false)
137+, m_bContextAdvanced(false)
138+{
139+}
140+
140141 BOOL PropShell::OnInitDialog()
141142 {
142143 OptionsPanel::OnInitDialog();
@@ -294,13 +295,14 @@ void PropShell::UpdateButtons()
294295 bool registered = IsShellExtensionRegistered(false);
295296 bool registeredPerUser = IsShellExtensionRegistered(true);
296297 bool registerdWinMergeContextMenu = IsWinMergeContextMenuRegistered();
298+ bool win11 = IsWin11_OrGreater();
297299 EnableDlgItem(IDC_EXPLORER_CONTEXT, registered || registeredPerUser || registerdWinMergeContextMenu);
298300 EnableDlgItem(IDC_REGISTER_SHELLEXTENSION, !registered);
299301 EnableDlgItem(IDC_UNREGISTER_SHELLEXTENSION, registered);
300302 EnableDlgItem(IDC_REGISTER_SHELLEXTENSION_PERUSER, !registeredPerUser);
301303 EnableDlgItem(IDC_UNREGISTER_SHELLEXTENSION_PERUSER, registeredPerUser);
302- EnableDlgItem(IDC_REGISTER_WINMERGECONTEXTMENU, !registerdWinMergeContextMenu);
303- EnableDlgItem(IDC_UNREGISTER_WINMERGECONTEXTMENU, registerdWinMergeContextMenu);
304+ EnableDlgItem(IDC_REGISTER_WINMERGECONTEXTMENU, !registerdWinMergeContextMenu && win11);
305+ EnableDlgItem(IDC_UNREGISTER_WINMERGECONTEXTMENU, registerdWinMergeContextMenu && win11);
304306 EnableDlgItem(IDC_EXPLORER_ADVANCED,
305307 (registered || registeredPerUser || registerdWinMergeContextMenu) && IsDlgButtonChecked(IDC_EXPLORER_CONTEXT));
306308 }
--- a/Src/Win_VersionHelper.h
+++ b/Src/Win_VersionHelper.h
@@ -14,23 +14,26 @@
1414 #include <windows.h>
1515
1616 inline bool
17-IsWinVer_OrGreater(WORD wVersion, WORD wServicePack = 0)
17+IsWinVer_OrGreater(WORD wVersion, WORD wBuildNumber = 0)
1818 {
1919 DWORDLONG dwlConditionMask = 0;
2020 VER_SET_CONDITION( dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL );
2121 VER_SET_CONDITION( dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL );
22- VER_SET_CONDITION( dwlConditionMask, VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL );
22+ VER_SET_CONDITION( dwlConditionMask, VER_BUILDNUMBER, VER_GREATER_EQUAL );
2323
24- OSVERSIONINFOEXW osvi;
25- ::ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
26- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
24+ OSVERSIONINFOEXW osvi{ sizeof(OSVERSIONINFOEX) };
2725 osvi.dwMajorVersion = HIBYTE(wVersion);
2826 osvi.dwMinorVersion = LOBYTE(wVersion);
29- osvi.wServicePackMajor = wServicePack;
27+ osvi.dwBuildNumber = wBuildNumber;
3028
31- return !!VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask);
29+ return !!VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_BUILDNUMBER, dwlConditionMask);
3230 }
3331
32+inline bool
33+IsWin11_OrGreater()
34+{
35+ return IsWinVer_OrGreater( 0x0a00, 0 );
36+}
3437
3538 inline bool
3639 IsWin7_OrGreater()
--- a/Src/res/WinMerge.exe.manifest
+++ b/Src/res/WinMerge.exe.manifest
@@ -2,7 +2,7 @@
22 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
33 <assemblyIdentity
44 version="1.0.0.0"
5- processorArchitecture="X86"
5+ processorArchitecture="*"
66 name="Microsoft.Winweb.WinMerge"
77 type="win32"
88 />
@@ -25,10 +25,25 @@
2525 type="win32"
2626 name="Microsoft.Windows.Common-Controls"
2727 version="6.0.0.0"
28- processorArchitecture="X86"
28+ processorArchitecture="*"
2929 publicKeyToken="6595b64144ccf1df"
3030 language="*"
3131 />
3232 </dependentAssembly>
3333 </dependency>
34-</assembly>
\ No newline at end of file
34+
35+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
36+ <application>
37+ <!-- Windows Vista -->
38+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
39+ <!-- Windows 7 -->
40+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
41+ <!-- Windows 8 -->
42+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
43+ <!-- Windows 8.1 -->
44+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
45+ <!-- Windows 10 -->
46+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
47+ </application>
48+ </compatibility>
49+</assembly>
--- a/Translations/WinMerge/Dutch.po
+++ b/Translations/WinMerge/Dutch.po
@@ -1,11 +1,11 @@
11 # This file is part from WinMerge <https://winmerge.org/>
22 # Released under the "GNU General Public License"
3-#
3+#
44 # Translators:
55 # * Ronald Schaap <ronald at schaap.demon.nl>
66 # * Michel Coene
77 # Thomas De Rocker, 2021
8-#
8+#
99 msgid ""
1010 msgstr ""
1111 "Project-Id-Version: WinMerge\n"
Show on old repository browser