OSDN Git Service

Add TortoiseOverlays Source Code SVN version 14484
authorFrank Li <lznuaa@gmail.com>
Sat, 7 Feb 2009 13:57:31 +0000 (21:57 +0800)
committerFrank Li <lznuaa@gmail.com>
Sat, 7 Feb 2009 13:57:31 +0000 (21:57 +0800)
27 files changed:
src/TortoiseOverlays/Documentation.txt [new file with mode: 0644]
src/TortoiseOverlays/ExampleMSI.wxs [new file with mode: 0644]
src/TortoiseOverlays/Guids.h [new file with mode: 0644]
src/TortoiseOverlays/IconOverlay.cpp [new file with mode: 0644]
src/TortoiseOverlays/Includes.wxi [new file with mode: 0644]
src/TortoiseOverlays/License.txt [new file with mode: 0644]
src/TortoiseOverlays/ShellExt.cpp [new file with mode: 0644]
src/TortoiseOverlays/ShellExt.def [new file with mode: 0644]
src/TortoiseOverlays/ShellExt.h [new file with mode: 0644]
src/TortoiseOverlays/ShellExtClassFactory.cpp [new file with mode: 0644]
src/TortoiseOverlays/ShellExtClassFactory.h [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlays.build [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlays.cpp [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlays.sln [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlays.vcproj [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlaysDir.wxi [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlaysDirx64.wxi [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlaysMSI.wxs [new file with mode: 0644]
src/TortoiseOverlays/TortoiseOverlaysMerge.wxs [new file with mode: 0644]
src/TortoiseOverlays/VersionNumberInclude.in.wxi [new file with mode: 0644]
src/TortoiseOverlays/resource.h [new file with mode: 0644]
src/TortoiseOverlays/resource.rc [new file with mode: 0644]
src/TortoiseOverlays/resource.rc2 [new file with mode: 0644]
src/TortoiseOverlays/stdafx.cpp [new file with mode: 0644]
src/TortoiseOverlays/stdafx.h [new file with mode: 0644]
src/TortoiseOverlays/version.build.in [new file with mode: 0644]
src/TortoiseOverlays/version.in [new file with mode: 0644]

diff --git a/src/TortoiseOverlays/Documentation.txt b/src/TortoiseOverlays/Documentation.txt
new file mode 100644 (file)
index 0000000..44f0bc4
--- /dev/null
@@ -0,0 +1,112 @@
+TortoiseOverlays\r
+================\r
+\r
+Introduction:\r
+-------------\r
+Windows only has a limited amount of free slots for icon overlay\r
+handlers (around 12 - the rest is used by the system itself). This is\r
+a problem for Tortoise clients because they usually need a lot of those\r
+handlers to show the different states of files and folders. If a user\r
+has more than one Tortoise client installed, that's already enough to\r
+hit the system limit and some overlays won't show up anymore.\r
+\r
+The purpose of the TortoiseOverlays project is to provide a common icon\r
+overlay handler for all the Tortoise clients. This reduces the risk of\r
+hitting the system limit. The only downside is that all Tortoise clients\r
+will have the very same overlay icons, which means the users won't\r
+immediately see from the overlays which version control system is \r
+handling a certain folder of file. But this is still far better than\r
+not be able to show an overlay at all because of the system limit.\r
+\r
+Using the TortoiseOverlays dll:\r
+-------------------------------\r
+Usually, an icon overlay handler is registered under\r
+HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ShellIconOverlayIdentifiers\r
+To make use of the TortoiseOverlays dll, register your overlay handler\r
+under HKLM\Software\TortoiseOverlays\\Statusname, with 'Statusname'\r
+being one of:\r
+Normal             under version control, but nothing special\r
+Modified           locally modified, needs committing/pushing\r
+Conflict           requires user interaction to solve a problem\r
+Deleted            item is missing or deleted\r
+ReadOnly           item is readonly, can't be edited\r
+Locked             user has permission to edit item (has exclusive lock)\r
+Added              item is added, but not yet in the repository\r
+Ignored            item is ignored by the version control system\r
+Unversioned        item is not under version control\r
+\r
+The difference here is that TortoiseOverlays must know which one of your\r
+overlay handlers handles which of the states so it can show the correct\r
+icon. An example:\r
+instead of creating the registry key\r
+HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ShellIconOverlayIdentifiers\TortoiseSVNNormal\r
+with the "(default)" registry value being the GUID, create the key\r
+HKLM\Software\TortoiseOverlays\\Normal\r
+and add a string value "SVN"="GUID"\r
+\r
+That's it. No more changes are needed.\r
+\r
+How it works:\r
+-------------\r
+TortoiseOverlays registers itself with the explorer to handle the nine\r
+states mentioned above, i.e. it registers nine overlay handlers.\r
+The explorer process initializes the TortoiseOverlays handler, calling\r
+its IShellIconOverlayIdentifier::GetOverlayInfo(). TortoiseOverlays \r
+looks for the registered overlay handlers under \r
+HKLM\Software\TortoiseOverlays\\Statusname and calls their \r
+GetOverlayInfo() method so they can initialize too (Note that any change\r
+to the icon name, index, ... your handler does are overwritten later\r
+and won't be used - it's TortoiseOverlays that handles the icons now).\r
+After the initialization, TortoiseOverlays relays every call to its\r
+IShellIconOverlayIdentifier::IsMemberOf() method to the other handlers.\r
+The first handler that returns S_OK determines whether the icon is shown\r
+or not.\r
+\r
+Since TortoiseOverlays is shared between all Tortoise clients (it's a\r
+so called shared component) it installs in \r
+c:\program files\common files (%commonprogramfiles%) to make sure it's\r
+available from all clients.\r
+\r
+How to install/redistribute TortoiseOverlays:\r
+---------------------------------------------\r
+You can either install TortoiseOverlays with the provided merge module\r
+(which is the recommended way, because it can properly handle the \r
+required reference counting of the registry keys and dlls), or use the\r
+also provided msi installer.\r
+You MUST NOT try to install the dll and create the registry keys yourself!\r
+If you have a non-msi installer, you can call the msi installer like this:\r
+msiexec /i TortoiseOverlays-1.0.0.XXXX-win32.msi /qn /norestart\r
+But in that case, you also must not deinstall it when your client gets\r
+deinstalled.\r
+\r
+The reason I chose merge modules/msi is that TortoiseOverlays is a \r
+*shared* component, and other setup packages can't handle reference \r
+counting very well. And removing TortoiseOverlays with your client even\r
+though some other Tortoise client still needs it is not acceptable.\r
+\r
+\r
+Using custom icons:\r
+-------------------\r
+TortoiseOverlays comes with a default set of icons. But if you like to\r
+give the user the chance to use his own preferred icon set, you can\r
+tell TortoiseOverlays to use a different set. To do that, create the\r
+following registry values and set them to the paths of your icons:\r
+HKCU\Software\TortoiseOverlays\NormalIcon\r
+HKCU\Software\TortoiseOverlays\ModifiedIcon\r
+HKCU\Software\TortoiseOverlays\ConflictIcon\r
+HKCU\Software\TortoiseOverlays\DeletedIcon\r
+HKCU\Software\TortoiseOverlays\ReadOnlyIcon\r
+HKCU\Software\TortoiseOverlays\LockedIcon\r
+HKCU\Software\TortoiseOverlays\AddedIcon\r
+HKCU\Software\TortoiseOverlays\IgnoredIcon\r
+HKCU\Software\TortoiseOverlays\UnversionedIcon\r
+\r
+Make sure you install your new icon sets under \r
+c:\program files\common files\TortoiseOverlays\icons\iconsetname\r
+(%commonprogramfiles%\TortoiseOverlays\icons\iconsetname)\r
+to avoid missing icons as soon as your client gets uninstalled. Because\r
+as the TortoiseOverlays dll your icon sets are shared files, shared\r
+between all Tortoise clients.\r
+Also make sure your icon sets include *all* icons, not just the ones\r
+your client uses. Otherwise the user will have inconsistent icons in\r
+those clients who use all icons.
\ No newline at end of file
diff --git a/src/TortoiseOverlays/ExampleMSI.wxs b/src/TortoiseOverlays/ExampleMSI.wxs
new file mode 100644 (file)
index 0000000..44bdfda
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version='1.0'?>\r
+<Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>\r
+       <Product\r
+                 UpgradeCode="YOURGUID-86C7-4D14-AEC0-86416A69ABDE"\r
+                 Name="YourProductName"\r
+                 Id="*"\r
+                 Version="YOURVERSIONNUMBER"\r
+                 Manufacturer="ManufacturerName"\r
+                 Language="1033">\r
+               <Package\r
+                               Id="*"\r
+                               Keywords="Tortoise,Overlays"\r
+                               Description="desc"\r
+                               Comments="Provided by TortoiseSVN"\r
+                               Manufacturer="ManufacturerName"\r
+                               InstallerVersion="200"\r
+                               Platform="x86"\r
+                               Languages="1033"\r
+                               Compressed="yes"\r
+                               SummaryCodepage="1252"/>\r
+\r
+               <Media Id="1" Cabinet="TOVL.cab" EmbedCab="yes" CompressionLevel="high" />\r
+               \r
+               <Upgrade Id='YOURGUID-86C7-4D14-AEC0-86416A69ABDE'>\r
+                       <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="YOURVERSIONNUMBER" OnlyDetect="yes" />\r
+               </Upgrade>\r
+               \r
+               <Directory Id='TARGETDIR' Name='SourceDir'>\r
+                       <Directory Id='TortoiseOverlays' Name='TortoiseOverlays'>\r
+                               <Merge Id='TortoiseOverlaysMerge' Language='0' src='..\..\ext\TortoiseOverlays\TortoiseOverlays-1.0.4.11886-win32.msm' DiskId='1' />\r
+                       </Directory>\r
+               </Directory>\r
+\r
+               <Feature Id='TortoiseOverlaysPackage' Title='TortoiseOverlays Package' Level='1'>\r
+                       <MergeRef Id="TortoiseOverlaysMerge" />\r
+               </Feature>\r
+\r
+               <InstallExecuteSequence>\r
+                       <!-- AppSearch must be done before RemoveExistingProducts and before FindRelatedProducts -->\r
+                       <AppSearch Sequence="1"></AppSearch>\r
+                       <RemoveExistingProducts After="InstallValidate">PREVIOUSVERSIONSINSTALLED</RemoveExistingProducts>\r
+                       <ScheduleReboot After="RegisterProduct" />\r
+               </InstallExecuteSequence>\r
+\r
+       </Product>\r
+</Wix>\r
diff --git a/src/TortoiseOverlays/Guids.h b/src/TortoiseOverlays/Guids.h
new file mode 100644 (file)
index 0000000..1ce8547
--- /dev/null
@@ -0,0 +1,27 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007 - TortoiseSVN\r
+\r
+\r
+\r
+// {C5994560-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_NORMAL, 0xc5994560, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994561-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_MODIFIED, 0xc5994561, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994562-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_CONFLICT, 0xc5994562, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994563-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_LOCKED, 0xc5994563, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994564-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_READONLY, 0xc5994564, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994565-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_DELETED, 0xc5994565, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994566-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_ADDED, 0xc5994566, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994567-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_IGNORED, 0xc5994567, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994568-53D9-4125-87C9-F193FC689CB2}\r
+DEFINE_GUID(CLSID_Tortoise_UNVERSIONED, 0xc5994568, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+// {C5994569-53D9-4125-87C9-F193FC689CB2}\r
+//DEFINE_GUID(CLSID_Tortoise_SOMETHING2, 0xc5994569, 0x53d9, 0x4125, 0x87, 0xc9, 0xf1, 0x93, 0xfc, 0x68, 0x9c, 0xb2);\r
+\r
+\r
diff --git a/src/TortoiseOverlays/IconOverlay.cpp b/src/TortoiseOverlays/IconOverlay.cpp
new file mode 100644 (file)
index 0000000..b02186c
--- /dev/null
@@ -0,0 +1,271 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007 - TortoiseSVN\r
+#include "stdafx.h"\r
+#include "ShellExt.h"\r
+#include "Guids.h"\r
+\r
+// "The Shell calls IShellIconOverlayIdentifier::GetOverlayInfo to request the\r
+//  location of the handler's icon overlay. The icon overlay handler returns\r
+//  the name of the file containing the overlay image, and its index within\r
+//  that file. The Shell then adds the icon overlay to the system image list."\r
+STDMETHODIMP CShellExt::GetOverlayInfo(LPWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags)\r
+{\r
+       int nInstalledOverlays = GetInstalledOverlays();\r
+       \r
+       if ((m_State == FileStateAdded)&&(nInstalledOverlays > 12))\r
+               return S_FALSE;         // don't use the 'added' overlay\r
+       if ((m_State == FileStateLocked)&&(nInstalledOverlays > 13))\r
+               return S_FALSE;         // don't show the 'locked' overlay\r
+       if ((m_State == FileStateIgnored)&&(nInstalledOverlays > 12))\r
+               return S_FALSE;         // don't use the 'ignored' overlay\r
+       if ((m_State == FileStateUnversioned)&&(nInstalledOverlays > 13))\r
+               return S_FALSE;         // don't show the 'unversioned' overlay\r
+\r
+    // Get folder icons from registry\r
+       // Default icons are stored in LOCAL MACHINE\r
+       // User selected icons are stored in CURRENT USER\r
+       TCHAR regVal[1024];\r
+       DWORD len = 1024;\r
+\r
+       wstring icon;\r
+       wstring iconName;\r
+\r
+       HKEY hkeys [] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };\r
+       switch (m_State)\r
+       {\r
+               case FileStateNormal            : iconName = _T("NormalIcon"); break;\r
+               case FileStateModified          : iconName = _T("ModifiedIcon"); break;\r
+               case FileStateConflict          : iconName = _T("ConflictIcon"); break;\r
+               case FileStateDeleted           : iconName = _T("DeletedIcon"); break;\r
+               case FileStateReadOnly          : iconName = _T("ReadOnlyIcon"); break;\r
+               case FileStateLocked            : iconName = _T("LockedIcon"); break;\r
+               case FileStateAdded                     : iconName = _T("AddedIcon"); break;\r
+               case FileStateIgnored           : iconName = _T("IgnoredIcon"); break;\r
+               case FileStateUnversioned       : iconName = _T("UnversionedIcon"); break;\r
+       }\r
+\r
+       for (int i = 0; i < 2; ++i)\r
+       {\r
+               HKEY hkey = 0;\r
+\r
+               if (::RegOpenKeyEx (hkeys[i],\r
+                       _T("Software\\TortoiseOverlays"),\r
+                    0,\r
+                    KEY_QUERY_VALUE,\r
+                    &hkey) != ERROR_SUCCESS)\r
+                       continue;\r
+\r
+               if (icon.empty() == true\r
+                       && (::RegQueryValueEx (hkey,\r
+                                                        iconName.c_str(),\r
+                                                        NULL,\r
+                                                        NULL,\r
+                                                        (LPBYTE) regVal,\r
+                                                        &len)) == ERROR_SUCCESS)\r
+                       icon.assign (regVal, len);\r
+\r
+               ::RegCloseKey(hkey);\r
+\r
+       }\r
+\r
+       // now load the Tortoise handlers and call their GetOverlayInfo method\r
+       // note: we overwrite any changes a Tortoise handler will do to the\r
+       // params and overwrite them later.\r
+       LoadHandlers(pwszIconFile, cchMax, pIndex, pdwFlags);\r
+\r
+    // Add name of appropriate icon\r
+    if (icon.empty() == false)\r
+        wcsncpy_s (pwszIconFile, cchMax, icon.c_str(), cchMax);\r
+    else\r
+        return S_FALSE;\r
+\r
+\r
+    *pIndex = 0;\r
+    *pdwFlags = ISIOI_ICONFILE;\r
+    return S_OK;\r
+};\r
+\r
+STDMETHODIMP CShellExt::GetPriority(int *pPriority)\r
+{\r
+       switch (m_State)\r
+       {\r
+               case FileStateConflict:\r
+                       *pPriority = 0;\r
+                       break;\r
+               case FileStateModified:\r
+                       *pPriority = 1;\r
+                       break;\r
+               case FileStateDeleted:\r
+                       *pPriority = 2;\r
+                       break;\r
+               case FileStateReadOnly:\r
+                       *pPriority = 3;\r
+                       break;\r
+               case FileStateLocked:\r
+                       *pPriority = 4;\r
+                       break;\r
+               case FileStateAdded:\r
+                       *pPriority = 5;\r
+                       break;\r
+               case FileStateNormal:\r
+                       *pPriority = 6;\r
+                       break;\r
+               case FileStateUnversioned:\r
+                       *pPriority = 8;\r
+                       break;\r
+               case FileStateIgnored:\r
+                       *pPriority = 7;\r
+                       break;\r
+               default:\r
+                       *pPriority = 100;\r
+                       return S_FALSE;\r
+       }\r
+    return S_OK;\r
+}\r
+\r
+STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD dwAttrib)\r
+{\r
+       for (vector<DLLPointers>::iterator it = m_dllpointers.begin(); it != m_dllpointers.end(); ++it)\r
+       {\r
+               if (it->pShellIconOverlayIdentifier)\r
+               {\r
+                       if (it->pShellIconOverlayIdentifier->IsMemberOf(pwszPath, dwAttrib) == S_OK)\r
+                               return S_OK;\r
+               }\r
+       }\r
+       return S_FALSE;\r
+}\r
+\r
+int CShellExt::GetInstalledOverlays()\r
+{\r
+       // if there are more than 12 overlay handlers installed, then that means not all\r
+       // of the overlay handlers can be shown. Windows chooses the ones first\r
+       // returned by RegEnumKeyEx() and just drops the ones that come last in\r
+       // that enumeration.\r
+       int nInstalledOverlayhandlers = 0;\r
+       // scan the registry for installed overlay handlers\r
+       HKEY hKey;\r
+       if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, \r
+               _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers"),\r
+               0, KEY_ENUMERATE_SUB_KEYS, &hKey)==ERROR_SUCCESS)\r
+       {\r
+               for (int i = 0, rc = ERROR_SUCCESS; rc == ERROR_SUCCESS; i++)\r
+               { \r
+                       TCHAR value[1024];\r
+                       DWORD size = sizeof value / sizeof TCHAR;\r
+                       FILETIME last_write_time;\r
+                       rc = RegEnumKeyEx(hKey, i, value, &size, NULL, NULL, NULL, &last_write_time);\r
+                       if (rc == ERROR_SUCCESS) \r
+                       {\r
+                               nInstalledOverlayhandlers++;\r
+                       }\r
+               }\r
+       }\r
+       RegCloseKey(hKey);\r
+       return nInstalledOverlayhandlers;\r
+}\r
+\r
+void CShellExt::LoadHandlers(LPWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags)\r
+{\r
+       HKEY hKey;\r
+       wstring name;\r
+       switch (m_State)\r
+       {\r
+       case FileStateNormal            : name = _T("Software\\TortoiseOverlays\\Normal"); break;\r
+       case FileStateModified          : name = _T("Software\\TortoiseOverlays\\Modified"); break;\r
+       case FileStateConflict          : name = _T("Software\\TortoiseOverlays\\Conflict"); break;\r
+       case FileStateDeleted           : name = _T("Software\\TortoiseOverlays\\Deleted"); break;\r
+       case FileStateReadOnly          : name = _T("Software\\TortoiseOverlays\\ReadOnly"); break;\r
+       case FileStateLocked            : name = _T("Software\\TortoiseOverlays\\Locked"); break;\r
+       case FileStateAdded                     : name = _T("Software\\TortoiseOverlays\\Added"); break;\r
+       case FileStateIgnored           : name = _T("Software\\TortoiseOverlays\\Ignored"); break;\r
+       case FileStateUnversioned       : name = _T("Software\\TortoiseOverlays\\Unversioned"); break;\r
+       }\r
+       if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, \r
+               name.c_str(),\r
+               0, KEY_READ, &hKey)==ERROR_SUCCESS)\r
+       {\r
+               for (int i = 0, rc = ERROR_SUCCESS; rc == ERROR_SUCCESS; i++)\r
+               { \r
+                       TCHAR k[MAX_PATH];\r
+                       TCHAR value[MAX_PATH];\r
+                       DWORD sizek = sizeof k / sizeof TCHAR;\r
+                       DWORD sizev = sizeof value / sizeof TCHAR;\r
+                       rc = RegEnumValue(hKey, i, k, &sizek, NULL, NULL, (LPBYTE)value, &sizev);\r
+                       if (rc == ERROR_SUCCESS) \r
+                       {\r
+                               TCHAR comobj[MAX_PATH];\r
+                               TCHAR modpath[MAX_PATH];\r
+                               _tcscpy_s(comobj, MAX_PATH, _T("CLSID\\"));\r
+                               _tcscat_s(comobj, MAX_PATH, value);\r
+                               _tcscat_s(comobj, MAX_PATH, _T("\\InprocServer32"));\r
+                               if (SHRegGetPath(HKEY_CLASSES_ROOT, comobj, _T(""), modpath, 0) == ERROR_SUCCESS)\r
+                               {\r
+                                       LoadRealLibrary(modpath, value, pwszIconFile, cchMax, pIndex, pdwFlags);\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+       RegCloseKey(hKey);\r
+}\r
+\r
+void CShellExt::LoadRealLibrary(LPCTSTR ModuleName, LPCTSTR clsid, LPWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags)\r
+{\r
+       static const char GetClassObject[] = "DllGetClassObject";\r
+       static const char CanUnloadNow[] = "DllCanUnloadNow";\r
+\r
+       DLLPointers pointers;\r
+\r
+       pointers.hDll = LoadLibraryEx(ModuleName, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);\r
+       if (!pointers.hDll)\r
+       {\r
+               pointers.hDll = NULL;\r
+               return;\r
+       }\r
+\r
+       pointers.pDllGetClassObject = NULL;\r
+       pointers.pDllCanUnloadNow = NULL;\r
+       pointers.pDllGetClassObject = (LPFNGETCLASSOBJECT)GetProcAddress(pointers.hDll, GetClassObject);\r
+       if (pointers.pDllGetClassObject == NULL)\r
+       {\r
+               FreeLibrary(pointers.hDll);\r
+               pointers.hDll = NULL;\r
+               return;\r
+       }\r
+       pointers.pDllCanUnloadNow = (LPFNCANUNLOADNOW)GetProcAddress(pointers.hDll, CanUnloadNow);\r
+       if (pointers.pDllCanUnloadNow == NULL)\r
+       {\r
+               FreeLibrary(pointers.hDll);\r
+               pointers.hDll = NULL;\r
+               return;\r
+       }\r
+\r
+       IID c;\r
+       if (IIDFromString((LPOLESTR)clsid, &c) == S_OK)\r
+       {\r
+               IClassFactory * pClassFactory = NULL;\r
+               if (SUCCEEDED(pointers.pDllGetClassObject(c, IID_IClassFactory, (LPVOID*)&pClassFactory)))\r
+               {\r
+                       IShellIconOverlayIdentifier * pShellIconOverlayIdentifier = NULL;\r
+                       if (SUCCEEDED(pClassFactory->CreateInstance(NULL, IID_IShellIconOverlayIdentifier, (LPVOID*)&pShellIconOverlayIdentifier)))\r
+                       {\r
+                               pointers.pShellIconOverlayIdentifier = pShellIconOverlayIdentifier;\r
+                               if (pointers.pShellIconOverlayIdentifier->GetOverlayInfo(pwszIconFile, cchMax, pIndex, pdwFlags) != S_OK)\r
+                               {\r
+                                       // the overlay handler refused to be properly initialized\r
+                                       FreeLibrary(pointers.hDll);\r
+                                       pointers.hDll = NULL;\r
+                                       pClassFactory->Release();\r
+                                       pointers.pShellIconOverlayIdentifier->Release();\r
+                                       return;\r
+                               }\r
+                       }\r
+                       pClassFactory->Release();\r
+               }\r
+       }\r
+\r
+       m_dllpointers.push_back(pointers);\r
+}\r
+\r
+\r
+\r
diff --git a/src/TortoiseOverlays/Includes.wxi b/src/TortoiseOverlays/Includes.wxi
new file mode 100644 (file)
index 0000000..e0e5ed7
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Include Id="TsvnInclude">\r
+       <!-- This gets automatically generated by the makefile running SubWCRev.exe on VersionNumberInclude.in.wxi -->\r
+       <?include VersionNumberInclude.wxi ?>\r
+\r
+       <!-- General ..................................................................... -->\r
+       <?define VersionNumberInternal="$(var.MajorVersion).$(var.MinorVersion).$(var.BuildVersion)" ?>\r
+       <?define VersionNumberUserVisible="$(var.MajorVersion).$(var.MinorVersion).$(var.MicroVersion).$(var.BuildVersion)" ?>\r
+\r
+       <!-- Platform specifics ........................................................... -->\r
+\r
+       <?if $(env.Platform) = "x64" ?>\r
+       <?define Win64YesNo="yes" ?>\r
+       <?define ReleasePath="Release64" ?>\r
+       <?define PlatformPathExtension="x64" ?>\r
+       <?define PackagePlatforms="x64" ?>\r
+       <?define PlatformUserVisible="(64 bit)" ?>\r
+       <?else?>\r
+       <?define Win64YesNo="no" ?>\r
+       <?define ReleasePath="Release" ?>\r
+       <?define PlatformPathExtension="win32" ?>\r
+       <?define PackagePlatforms="x86" ?>\r
+       <?define PlatformUserVisible="(32 bit)" ?>\r
+       <?endif?>\r
+\r
+       <!-- GUIDs ....................................................................... -->\r
+\r
+       <?if $(env.Platform) = "x64" ?>\r
+       <?define UpgradeGuid="3C89127D-F335-46eb-8720-CAFE0C0FEB7E" ?>\r
+       <?else?>\r
+       <?define UpgradeGuid="9D3DBC93-494B-45a8-88D7-430AB5568B0F" ?>\r
+       <?endif?>\r
+\r
+       <?define GuidNormal="C5994560-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidModified="C5994561-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidConflict="C5994562-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidLocked="C5994563-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidReadOnly="C5994564-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidDeleted="C5994565-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidAdded="C5994566-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidIgnored="C5994567-53D9-4125-87C9-F193FC689CB2"?>\r
+       <?define GuidUnversioned="C5994568-53D9-4125-87C9-F193FC689CB2"?>\r
+\r
+       <!-- Target specific component GUIDs ............................................. -->\r
+\r
+       <?if $(env.Platform) = "x64" ?>\r
+\r
+       <?define GuidShellRegistry="A1187970-A460-409e-9B3B-A53170A5BB2E"?>\r
+       <?define GuidMachineRegistry="2CF4E92F-1DAB-4719-B278-756F50A966AC"?>\r
+       <?define GuidApproveShellComponents="3FB40350-DF8A-4442-AC40-ED475EDA8D9A"?>\r
+\r
+       <?define OverlayDll="26DC8384-C811-421b-BA3E-71E9897DB879"?>\r
+       <?define GuidIconsXPStyle="5FDADF3B-9541-4bc1-8B4E-EA345CDBBFA4"?>\r
+\r
+       <?else?>\r
+\r
+       <?define GuidShellRegistry="55ADC3EC-C30F-427e-9C4C-E79254E36A0D"?>\r
+       <?define GuidMachineRegistry="A0621092-5B86-46ea-8608-E121040D92B4"?>\r
+       <?define GuidApproveShellComponents="9007B61C-2CF7-4dee-9BF1-E73B9C7196D3"?>\r
+\r
+       <?define OverlayDll="B2BE5541-1B56-4b85-A047-ECBDD890092E"?>\r
+       <?define GuidIconsXPStyle="9C4E4EF3-DC28-45e7-904F-54101784C57F"?>\r
+\r
+       <?endif?>\r
+\r
+</Include>\r
diff --git a/src/TortoiseOverlays/License.txt b/src/TortoiseOverlays/License.txt
new file mode 100644 (file)
index 0000000..ee02992
--- /dev/null
@@ -0,0 +1,30 @@
+====================================================================\r
+Copyright (c) 2007-2008 The TortoiseSVN Project.  All rights reserved.\r
+\r
+Preamble:\r
+The TortoiseOverlays handler was written to reduce the problems with\r
+the limited available icon overlay handler slots in Windows. The goal\r
+is to have all clients use it equally. The purpose of this license is\r
+to allow all clients to use the TortoiseOverlays handler, no matter \r
+what license the client itself has. And to state some rules for all \r
+clients to avoid compatibility problems and for users to know where\r
+the TortoiseOverlays handler comes from.\r
+\r
+\r
+\r
+Redistribution and use of the TortoiseOverlays handler and the overlay \r
+icons in it are permitted provided that the following conditions are met:\r
+\r
+1. Clients using the TortoiseOverlay handler must provide an\r
+   acknowlegdement that it was taken from the TortoiseSVN project, with\r
+   a link to the project website (tortoisesvn.net)\r
+   in one or more of the following places:\r
+   a) an "about" box.\r
+   b) the product user manual.\r
+   c) a textfile in the installation folder of the application.\r
+   d) a contributors page on the product web page.\r
+\r
+2. The name "TortoiseSVN" must not be used to endorse or\r
+   promote products using this overlay handler without prior written\r
+   permission. For written permission, please contact\r
+   dev@tortoisesvn.tigris.org.\r
diff --git a/src/TortoiseOverlays/ShellExt.cpp b/src/TortoiseOverlays/ShellExt.cpp
new file mode 100644 (file)
index 0000000..6f637de
--- /dev/null
@@ -0,0 +1,98 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007 - TortoiseSVN\r
+#include "stdafx.h"\r
+\r
+#pragma warning (disable : 4786)\r
+\r
+// Initialize GUIDs (should be done only and at-least once per DLL/EXE)\r
+#include <initguid.h>\r
+#include "Guids.h"\r
+\r
+#include "ShellExt.h"\r
+\r
+\r
+// *********************** CShellExt *************************\r
+CShellExt::CShellExt(FileState state)\r
+{\r
+    m_State = state;\r
+\r
+    m_cRef = 0L;\r
+    g_cRefThisDll++;\r
+       \r
+}\r
+\r
+CShellExt::~CShellExt()\r
+{\r
+       g_cRefThisDll--;\r
+}\r
+\r
+\r
+STDMETHODIMP CShellExt::QueryInterface(REFIID riid, LPVOID FAR *ppv)\r
+{\r
+    *ppv = NULL; \r
+\r
+    if (IsEqualIID(riid, IID_IShellExtInit) || IsEqualIID(riid, IID_IUnknown))\r
+    {\r
+        *ppv = (LPSHELLEXTINIT)this;\r
+    }\r
+    else if (IsEqualIID(riid, IID_IContextMenu))\r
+    {\r
+        *ppv = (LPCONTEXTMENU)this;\r
+    }\r
+    else if (IsEqualIID(riid, IID_IContextMenu2))\r
+    {\r
+        *ppv = (LPCONTEXTMENU2)this;\r
+    }\r
+    else if (IsEqualIID(riid, IID_IContextMenu3))\r
+    {\r
+        *ppv = (LPCONTEXTMENU3)this;\r
+    }\r
+    else if (IsEqualIID(riid, IID_IShellIconOverlayIdentifier))\r
+    {\r
+        *ppv = (IShellIconOverlayIdentifier*)this;\r
+    }\r
+    else if (IsEqualIID(riid, IID_IShellPropSheetExt))\r
+    {\r
+        *ppv = (LPSHELLPROPSHEETEXT)this;\r
+    }\r
+    if (*ppv)\r
+    {\r
+        AddRef();\r
+               \r
+        return NOERROR;\r
+    }\r
+       \r
+    return E_NOINTERFACE;\r
+}\r
+\r
+STDMETHODIMP_(ULONG) CShellExt::AddRef()\r
+{\r
+    return ++m_cRef;\r
+}\r
+\r
+STDMETHODIMP_(ULONG) CShellExt::Release()\r
+{\r
+    if (--m_cRef)\r
+        return m_cRef;\r
+\r
+       for (vector<DLLPointers>::iterator it = m_dllpointers.begin(); it != m_dllpointers.end(); ++it)\r
+       {\r
+               if (it->pShellIconOverlayIdentifier != NULL)\r
+                       it->pShellIconOverlayIdentifier->Release();\r
+               if (it->hDll != NULL)\r
+                       FreeLibrary(it->hDll);\r
+\r
+               it->hDll = NULL;\r
+               it->pDllGetClassObject = NULL;\r
+               it->pDllCanUnloadNow = NULL;\r
+               it->pShellIconOverlayIdentifier = NULL;\r
+       }\r
+\r
+       m_dllpointers.clear();\r
+\r
+    delete this;\r
+       \r
+    return 0L;\r
+}\r
+\r
+\r
diff --git a/src/TortoiseOverlays/ShellExt.def b/src/TortoiseOverlays/ShellExt.def
new file mode 100644 (file)
index 0000000..a657276
--- /dev/null
@@ -0,0 +1,7 @@
+;shellext.def : Declares the module parameters for the DLL.\r
+\r
+LIBRARY      TORTOISEOVERLAYS\r
+\r
+EXPORTS\r
+    DllCanUnloadNow private\r
+    DllGetClassObject private\r
diff --git a/src/TortoiseOverlays/ShellExt.h b/src/TortoiseOverlays/ShellExt.h
new file mode 100644 (file)
index 0000000..c31fbc7
--- /dev/null
@@ -0,0 +1,84 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007 - TortoiseSVN\r
+\r
+#pragma once\r
+#include <vector>\r
+\r
+#include "resource.h"\r
+\r
+extern UINT                            g_cRefThisDll;                  // Reference count of this DLL.\r
+extern HINSTANCE                       g_hmodThisDll;                  // Instance handle for this DLL\r
+\r
+using namespace std;\r
+\r
+enum FileState\r
+{\r
+       FileStateNormal,\r
+       FileStateModified,\r
+       FileStateConflict,\r
+       FileStateLocked,\r
+       FileStateReadOnly,\r
+       FileStateDeleted,\r
+       FileStateAdded,\r
+       FileStateIgnored,\r
+       FileStateUnversioned,\r
+       FileStateInvalid\r
+};\r
+\r
+class DLLPointers\r
+{\r
+public:\r
+       DLLPointers() : hDll(NULL)\r
+               , pDllGetClassObject(NULL)\r
+               , pDllCanUnloadNow(NULL)\r
+               , pShellIconOverlayIdentifier(NULL)\r
+       {\r
+       }\r
+\r
+       HINSTANCE hDll;\r
+       LPFNGETCLASSOBJECT pDllGetClassObject;\r
+       LPFNCANUNLOADNOW pDllCanUnloadNow;\r
+       IShellIconOverlayIdentifier * pShellIconOverlayIdentifier;\r
+};\r
+\r
+// The actual OLE Shell context menu handler\r
+/**\r
+ * The main class of our COM object / Shell Extension.\r
+ * It contains all Interfaces we implement for the shell to use.\r
+ */\r
+class CShellExt : public IShellIconOverlayIdentifier\r
+{\r
+protected:\r
+       FileState m_State;\r
+       ULONG   m_cRef;\r
+\r
+       vector<DLLPointers>                     m_dllpointers;\r
+\r
+private:\r
+       int                             GetInstalledOverlays(void);             ///< returns the maximum number of overlays TSVN shall use\r
+       void                    LoadRealLibrary(LPCTSTR ModuleName, LPCTSTR clsid, LPWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags);\r
+       void                    LoadHandlers(LPWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags);\r
+public:\r
+       CShellExt(FileState state);\r
+       virtual ~CShellExt();\r
+\r
+       /** \name IUnknown \r
+        * IUnknown members\r
+        */\r
+       //@{\r
+       STDMETHODIMP         QueryInterface(REFIID, LPVOID FAR *);\r
+       STDMETHODIMP_(ULONG) AddRef();\r
+       STDMETHODIMP_(ULONG) Release();\r
+       //@}\r
+\r
+\r
+       /** \name IShellIconOverlayIdentifier \r
+        * IShellIconOverlayIdentifier methods\r
+        */\r
+       //@{\r
+       STDMETHODIMP    GetOverlayInfo(LPWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags);\r
+       STDMETHODIMP    GetPriority(int *pPriority); \r
+       STDMETHODIMP    IsMemberOf(LPCWSTR pwszPath, DWORD dwAttrib);\r
+       //@}\r
+\r
+};\r
diff --git a/src/TortoiseOverlays/ShellExtClassFactory.cpp b/src/TortoiseOverlays/ShellExtClassFactory.cpp
new file mode 100644 (file)
index 0000000..9661522
--- /dev/null
@@ -0,0 +1,83 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007 - TortoiseSVN\r
+#include "stdafx.h"\r
+#include "ShellExt.h"\r
+#include "ShellExtClassFactory.h"\r
+\r
+\r
+CShellExtClassFactory::CShellExtClassFactory(FileState state)\r
+{\r
+    m_StateToMake = state;\r
+\r
+    m_cRef = 0L;\r
+       \r
+    g_cRefThisDll++; \r
+}\r
+\r
+CShellExtClassFactory::~CShellExtClassFactory()          \r
+{\r
+    g_cRefThisDll--;\r
+}\r
+\r
+STDMETHODIMP CShellExtClassFactory::QueryInterface(REFIID riid,\r
+                                                   LPVOID FAR *ppv)\r
+{\r
+    *ppv = NULL;\r
+\r
+    // Any interface on this object is the object pointer\r
+       \r
+    if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory))\r
+    {\r
+        *ppv = (LPCLASSFACTORY)this;\r
+               \r
+        AddRef();\r
+               \r
+        return NOERROR;\r
+    }\r
+       \r
+    return E_NOINTERFACE;\r
+}  \r
+\r
+STDMETHODIMP_(ULONG) CShellExtClassFactory::AddRef()\r
+{\r
+    return ++m_cRef;\r
+}\r
+\r
+STDMETHODIMP_(ULONG) CShellExtClassFactory::Release()\r
+{\r
+    if (--m_cRef)\r
+        return m_cRef;\r
+\r
+    delete this;\r
+       \r
+    return 0L;\r
+}\r
+\r
+STDMETHODIMP CShellExtClassFactory::CreateInstance(LPUNKNOWN pUnkOuter,\r
+                                                                                                  REFIID riid,\r
+                                                                                                  LPVOID *ppvObj)\r
+{\r
+    *ppvObj = NULL;\r
+       \r
+    // Shell extensions typically don't support aggregation (inheritance)\r
+       \r
+    if (pUnkOuter)\r
+        return CLASS_E_NOAGGREGATION;\r
+       \r
+    // Create the main shell extension object.  The shell will then call\r
+    // QueryInterface with IID_IShellExtInit--this is how shell extensions are\r
+    // initialized.\r
+       \r
+    CShellExt* pShellExt = new CShellExt(m_StateToMake);  //Create the CShellExt object\r
+               \r
+    if (NULL == pShellExt)\r
+        return E_OUTOFMEMORY;\r
+       \r
+    return pShellExt->QueryInterface(riid, ppvObj);\r
+}\r
+\r
+\r
+STDMETHODIMP CShellExtClassFactory::LockServer(BOOL /*fLock*/)\r
+{\r
+    return E_NOTIMPL;\r
+}\r
diff --git a/src/TortoiseOverlays/ShellExtClassFactory.h b/src/TortoiseOverlays/ShellExtClassFactory.h
new file mode 100644 (file)
index 0000000..857811d
--- /dev/null
@@ -0,0 +1,34 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007 - TortoiseSVN\r
+#pragma once\r
+\r
+\r
+/**\r
+ * This class factory object creates the main handlers -\r
+ * its constructor says which OLE class it has to make.\r
+ */\r
+class CShellExtClassFactory : public IClassFactory\r
+{\r
+protected:\r
+    ULONG m_cRef;\r
+    /// variable to contain class of object (i.e. not under source control, up to date)\r
+    FileState          m_StateToMake;\r
+\r
+       \r
+public:\r
+    CShellExtClassFactory(FileState state);\r
+    virtual ~CShellExtClassFactory();\r
+       \r
+       //@{\r
+    /// IUnknown members\r
+    STDMETHODIMP         QueryInterface(REFIID, LPVOID FAR *);\r
+    STDMETHODIMP_(ULONG) AddRef();\r
+    STDMETHODIMP_(ULONG) Release();\r
+       //@}\r
+    \r
+       //@{\r
+    /// IClassFactory members\r
+    STDMETHODIMP      CreateInstance(LPUNKNOWN, REFIID, LPVOID FAR *);\r
+    STDMETHODIMP      LockServer(BOOL);\r
+       //@}\r
+};\r
diff --git a/src/TortoiseOverlays/TortoiseOverlays.build b/src/TortoiseOverlays/TortoiseOverlays.build
new file mode 100644 (file)
index 0000000..7519510
--- /dev/null
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>\r
+<project name="TortoiseSVN" default="all">\r
+\r
+       <property name="SubWCRevFileName" value="bin\${configuration}${bindirextension}\bin\SubWCRev.exe"/>\r
+\r
+       <target name="all">\r
+\r
+               <exec program="${SubWCRevFileName}">\r
+                       <arg value="." />\r
+                       <arg value="version.build.in" />\r
+                       <arg value="version.build" />\r
+               </exec>\r
+               <exec program="${SubWCRevFileName}">\r
+                       <arg value="." />\r
+                       <arg value="version.in" />\r
+                       <arg value="version.h" />\r
+               </exec>\r
+               <nant target="setversioninfo">\r
+                       <buildfiles>\r
+                               <include name="version.build" />\r
+                       </buildfiles>\r
+               </nant>\r
+\r
+\r
+               <loadfile file="version.in" property="versionheaderfile">\r
+                       <filterchain>\r
+                               <replacetokens begintoken="$" endtoken="$">\r
+                                       <token key="MajorVersion" value="${environment::get-variable('MajorVersion')}" />\r
+                                       <token key="MinorVersion" value="${environment::get-variable('MinorVersion')}" />\r
+                                       <token key="MicroVersion" value="${environment::get-variable('Microversion')}" />\r
+                                       <token key="WCREV" value="${environment::get-variable('WCREV')}" />\r
+                                       <token key="WCDATE" value="${environment::get-variable('WCDATE')}" />\r
+                                       <token key="DEVBUILD" value="${devrelease}" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </loadfile>\r
+               <echo file="version.h" message="${versionheaderfile}" />\r
+\r
+               <loadfile file="VersionNumberInclude.in.wxi" property="versionwixfile">\r
+                       <filterchain>\r
+                               <replacetokens begintoken="$" endtoken="$">\r
+                                       <token key="MajorVersion" value="${environment::get-variable('MajorVersion')}" />\r
+                                       <token key="MinorVersion" value="${environment::get-variable('MinorVersion')}" />\r
+                                       <token key="MicroVersion" value="${environment::get-variable('Microversion')}" />\r
+                                       <token key="WCREV" value="${environment::get-variable('WCREV')}" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </loadfile>\r
+               <echo file="VersionNumberInclude.wxi" message="${versionwixfile}" />\r
+               <property name="verstring" value="${environment::get-variable('MajorVersion')}.${environment::get-variable('MinorVersion')}.${environment::get-variable('MicroVersion')}.${environment::get-variable('WCREV')}" />\r
+\r
+\r
+               <exec program="devenv.com" >\r
+                       <arg value="TortoiseOverlays.sln" />\r
+                       <arg value="/rebuild" />\r
+                       <arg value="release|win32" />\r
+               </exec>\r
+               <exec program="devenv.com" >\r
+                       <arg value="TortoiseOverlays.sln" />\r
+                       <arg value="/rebuild" />\r
+                       <arg value="release|x64" />\r
+               </exec>\r
+                 <setenv>\r
+                         <variable name="Platform" value="win32" />\r
+                 </setenv>\r
+\r
+                 <exec program="candle">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\" />\r
+                         <arg value="TortoiseOverlaysMerge.wxs" />\r
+                 </exec>\r
+                 <exec program="light">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\TortoiseOverlays-${verstring}-${platform}.msm" />\r
+                         <arg value="..\..\bin\TortoiseOverlaysMerge.wixobj" />\r
+                 </exec>\r
+                 <exec program="candle">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\" />\r
+                         <arg value="TortoiseOverlaysMSI.wxs" />\r
+                 </exec>\r
+                 <exec program="light">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\TortoiseOverlays-${verstring}-${platform}.msi" />\r
+                         <arg value="..\..\bin\TortoiseOverlaysMSI.wixobj" />\r
+                 </exec>\r
+                 <delete>\r
+                         <fileset>\r
+                                 <include name="..\..\bin\*.wixobj" />\r
+                                 <include name="..\..\bin\*.wixpdb" />\r
+                         </fileset>\r
+                 </delete>\r
+\r
+                 <setenv>\r
+                         <variable name="Platform" value="x64" />\r
+                 </setenv>\r
+               <property name="platform" value="x64" />\r
+               <property name="bindirextension" value="64" />\r
+                 <exec program="candle">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\" />\r
+                         <arg value="TortoiseOverlaysMerge.wxs" />\r
+                 </exec>\r
+                 <exec program="light">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\TortoiseOverlays-${verstring}-${platform}.msm" />\r
+                         <arg value="..\..\bin\TortoiseOverlaysMerge.wixobj" />\r
+                 </exec>\r
+                 <exec program="candle">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\" />\r
+                         <arg value="TortoiseOverlaysMSI.wxs" />\r
+                 </exec>\r
+                 <exec program="light">\r
+                         <arg value="-nologo" />\r
+                         <arg value="-out" />\r
+                         <arg value="..\..\bin\TortoiseOverlays-${verstring}-${platform}.msi" />\r
+                         <arg value="..\..\bin\TortoiseOverlaysMSI.wixobj" />\r
+                 </exec>\r
+                 <delete>\r
+                         <fileset>\r
+                                 <include name="..\..\bin\*.wixobj" />\r
+                                 <include name="..\..\bin\*.wixpdb" />\r
+                         </fileset>\r
+                 </delete>\r
+\r
+\r
+       </target>\r
+</project>\r
diff --git a/src/TortoiseOverlays/TortoiseOverlays.cpp b/src/TortoiseOverlays/TortoiseOverlays.cpp
new file mode 100644 (file)
index 0000000..be28882
--- /dev/null
@@ -0,0 +1,75 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007 - TortoiseSVN\r
+#include "stdafx.h"\r
+#include "ShellExt.h"\r
+#include "Guids.h"\r
+#include "ShellExtClassFactory.h"\r
+\r
+UINT                           g_cRefThisDll = 0;                              ///< reference count of this DLL.\r
+HINSTANCE                      g_hmodThisDll = NULL;                   ///< handle to this DLL itself.\r
+\r
+\r
+#pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")\r
+\r
+extern "C" int APIENTRY\r
+DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /* lpReserved */)\r
+{\r
+#ifdef _DEBUG\r
+       // if no debugger is present, then don't load the dll.\r
+       // this prevents other apps from loading the dll and locking\r
+       // it.\r
+\r
+       if (!::IsDebuggerPresent())\r
+       {\r
+               return FALSE;\r
+       }\r
+#endif\r
+\r
+    if (dwReason == DLL_PROCESS_ATTACH)\r
+    {\r
+        // Extension DLL one-time initialization\r
+        g_hmodThisDll = hInstance;\r
+    }\r
+    return 1;   // ok\r
+}\r
+\r
+STDAPI DllCanUnloadNow(void)\r
+{\r
+       return (g_cRefThisDll == 0 ? S_OK : S_FALSE);\r
+}\r
+\r
+STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppvOut)\r
+{\r
+    *ppvOut = NULL;\r
+       \r
+    FileState state = FileStateInvalid;\r
+    if (IsEqualIID(rclsid, CLSID_Tortoise_NORMAL))\r
+        state = FileStateNormal;\r
+    else if (IsEqualIID(rclsid, CLSID_Tortoise_MODIFIED))\r
+        state = FileStateModified;\r
+    else if (IsEqualIID(rclsid, CLSID_Tortoise_CONFLICT))\r
+        state = FileStateConflict;\r
+       else if (IsEqualIID(rclsid, CLSID_Tortoise_DELETED))\r
+               state = FileStateDeleted;\r
+       else if (IsEqualIID(rclsid, CLSID_Tortoise_READONLY))\r
+               state = FileStateReadOnly;\r
+       else if (IsEqualIID(rclsid, CLSID_Tortoise_LOCKED))\r
+               state = FileStateLocked;\r
+       else if (IsEqualIID(rclsid, CLSID_Tortoise_ADDED))\r
+               state = FileStateAdded;\r
+       else if (IsEqualIID(rclsid, CLSID_Tortoise_IGNORED))\r
+               state = FileStateIgnored;\r
+       else if (IsEqualIID(rclsid, CLSID_Tortoise_UNVERSIONED))\r
+               state = FileStateUnversioned;\r
+       \r
+    if (state != FileStateInvalid)\r
+    {\r
+               CShellExtClassFactory *pcf = new CShellExtClassFactory(state);\r
+               return pcf->QueryInterface(riid, ppvOut);\r
+    }\r
+       \r
+    return CLASS_E_CLASSNOTAVAILABLE;\r
+\r
+}\r
+\r
+\r
diff --git a/src/TortoiseOverlays/TortoiseOverlays.sln b/src/TortoiseOverlays/TortoiseOverlays.sln
new file mode 100644 (file)
index 0000000..ff39ca1
--- /dev/null
@@ -0,0 +1,25 @@
+Microsoft Visual Studio Solution File, Format Version 10.00\r
+# Visual Studio 2008\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TortoiseOverlays", "TortoiseOverlays.vcproj", "{C7E54DB1-C1AA-4154-9667-B443C7E18811}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Debug|x64 = Debug|x64\r
+               Release|Win32 = Release|Win32\r
+               Release|x64 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Debug|Win32.Build.0 = Debug|Win32\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Debug|x64.ActiveCfg = Debug|x64\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Debug|x64.Build.0 = Debug|x64\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Release|Win32.ActiveCfg = Release|Win32\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Release|Win32.Build.0 = Release|Win32\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Release|x64.ActiveCfg = Release|x64\r
+               {C7E54DB1-C1AA-4154-9667-B443C7E18811}.Release|x64.Build.0 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/src/TortoiseOverlays/TortoiseOverlays.vcproj b/src/TortoiseOverlays/TortoiseOverlays.vcproj
new file mode 100644 (file)
index 0000000..e1f4a74
--- /dev/null
@@ -0,0 +1,569 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="TortoiseOverlays"\r
+       ProjectGUID="{C7E54DB1-C1AA-4154-9667-B443C7E18811}"\r
+       RootNamespace="TortoiseOverlays"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="..\..\bin\Debug\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseOverlays\Debug"\r
+                       ConfigurationType="2"\r
+                       UseOfMFC="0"\r
+                       UseOfATL="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="1"\r
+                               TypeLibraryName=".\Debug/TortoiseOverlays.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="0"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"\r
+                               RuntimeLibrary="1"\r
+                               ForceConformanceInForLoopScope="true"\r
+                               RuntimeTypeInfo="true"\r
+                               UsePrecompiledHeader="2"\r
+                               AssemblerListingLocation="..\..\obj\TortoiseOverlays\Debug/"\r
+                               ObjectFile="..\..\obj\TortoiseOverlays\Debug/"\r
+                               ProgramDataBaseFileName="..\..\obj\TortoiseOverlays\Debug/"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="4"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;TSVNSHELL"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               IgnoreImportLibrary="true"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="shlwapi.lib"\r
+                               OutputFile="$(OutDir)/TortoiseOverlays.dll"\r
+                               LinkIncremental="0"\r
+                               SuppressStartupBanner="true"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               IgnoreDefaultLibraryNames=""\r
+                               ModuleDefinitionFile=".\ShellExt.def"\r
+                               DelayLoadDLLs=""\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/TortoiseOverlays.pdb"\r
+                               EntryPointSymbol=""\r
+                               BaseAddress="0x5960000"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               ImportLibrary="..\..\obj\TortoiseOverlays\Debug/TortoiseOverlays.lib"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="..\..\bin\Debug64\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseOverlays\Debug64"\r
+                       ConfigurationType="2"\r
+                       UseOfMFC="0"\r
+                       UseOfATL="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\Debug/TortoiseOverlays.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="0"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="WIN64;_DEBUG;_WINDOWS;_USRDLL"\r
+                               BasicRuntimeChecks="1"\r
+                               RuntimeLibrary="1"\r
+                               ForceConformanceInForLoopScope="true"\r
+                               RuntimeTypeInfo="true"\r
+                               UsePrecompiledHeader="2"\r
+                               AssemblerListingLocation="..\..\obj\TortoiseOverlays\Debug64/"\r
+                               ObjectFile="..\..\obj\TortoiseOverlays\Debug64/"\r
+                               ProgramDataBaseFileName="..\..\obj\TortoiseOverlays\Debug64/"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;TSVNSHELL"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               IgnoreImportLibrary="true"\r
+                               AdditionalDependencies="shlwapi.lib"\r
+                               OutputFile="$(OutDir)/TortoiseOverlays.dll"\r
+                               LinkIncremental="0"\r
+                               SuppressStartupBanner="true"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               IgnoreDefaultLibraryNames="LIBC"\r
+                               ModuleDefinitionFile=".\ShellExt.def"\r
+                               DelayLoadDLLs=""\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/TortoiseOverlays.pdb"\r
+                               BaseAddress="0x5960000"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               ImportLibrary="..\..\obj\TortoiseOverlays\Debug64/TortoiseOverlays.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\bin\Release\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseOverlays\Release"\r
+                       ConfigurationType="2"\r
+                       UseOfMFC="0"\r
+                       UseOfATL="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="1"\r
+                               TypeLibraryName=".\Release/TortoiseOverlays.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               EnableIntrinsicFunctions="true"\r
+                               FavorSizeOrSpeed="1"\r
+                               OmitFramePointers="true"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="false"\r
+                               ForceConformanceInForLoopScope="true"\r
+                               UsePrecompiledHeader="2"\r
+                               AssemblerListingLocation="..\..\obj\TortoiseOverlays\Release/"\r
+                               ObjectFile="..\..\obj\TortoiseOverlays\Release/"\r
+                               ProgramDataBaseFileName="..\..\obj\TortoiseOverlays\Release/"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG;TSVNSHELL"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               IgnoreImportLibrary="true"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="shlwapi.lib"\r
+                               OutputFile="$(OutDir)/TortoiseOverlays.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               IgnoreDefaultLibraryNames=""\r
+                               ModuleDefinitionFile=".\ShellExt.def"\r
+                               DelayLoadDLLs=""\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/TortoiseOverlays.pdb"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="0"\r
+                               BaseAddress="0x5960000"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               ImportLibrary="..\..\obj\TortoiseOverlays\Release/TortoiseOverlays.lib"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="..\..\bin\Release64\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseOverlays\Release64"\r
+                       ConfigurationType="2"\r
+                       UseOfMFC="0"\r
+                       UseOfATL="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\Release/TortoiseOverlays.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               EnableIntrinsicFunctions="true"\r
+                               FavorSizeOrSpeed="1"\r
+                               OmitFramePointers="true"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="WIN64;NDEBUG;_WINDOWS;_USRDLL"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="false"\r
+                               ForceConformanceInForLoopScope="true"\r
+                               UsePrecompiledHeader="2"\r
+                               AssemblerListingLocation="..\..\obj\TortoiseOverlays\Release64/"\r
+                               ObjectFile="..\..\obj\TortoiseOverlays\Release64/"\r
+                               ProgramDataBaseFileName="..\..\obj\TortoiseOverlays\Release64/"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               CompileAs="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG;TSVNSHELL"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               IgnoreImportLibrary="true"\r
+                               AdditionalDependencies="shlwapi.lib"\r
+                               OutputFile="$(OutDir)/TortoiseOverlays.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               IgnoreDefaultLibraryNames=""\r
+                               ModuleDefinitionFile=".\ShellExt.def"\r
+                               DelayLoadDLLs=""\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/TortoiseOverlays.pdb"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="1"\r
+                               BaseAddress="0x5960000"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               ImportLibrary="..\..\obj\TortoiseOverlays\Release64/TortoiseOverlays.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\IconOverlay.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\ShellExt.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\ShellExt.def"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\ShellExtClassFactory.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="stdafx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               UsePrecompiledHeader="1"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               UsePrecompiledHeader="1"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               UsePrecompiledHeader="1"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               UsePrecompiledHeader="1"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\TortoiseOverlays.cpp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\Guids.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\resource.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\ShellExt.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\ShellExtClassFactory.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="stdafx.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\resource.rc"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\resource.rc2"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="WiX"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\Includes.wxi"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\TortoiseOverlaysDir.wxi"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\TortoiseOverlaysMerge.wxs"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\TortoiseOverlaysMSI.wxs"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+               <Global\r
+                       Name="DevPartner_IsInstrumented"\r
+                       Value="0"\r
+               />\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/src/TortoiseOverlays/TortoiseOverlaysDir.wxi b/src/TortoiseOverlays/TortoiseOverlaysDir.wxi
new file mode 100644 (file)
index 0000000..92a9935
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Include Id="TsvnInclude">\r
+       <Component Id='OverlayRegistry' Guid='87654321-4321-4321-4321-110987654321' Win64="$(var.Win64YesNo)">\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}\InProcServer32" Value="[CommonFilesFolder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}" Value="TortoiseSVN" Type="string" />\r
+\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\1TortoiseNormal" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\1TortoiseNormal" Value="{$(var.GuidNormal)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\2TortoiseModified" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\2TortoiseModified" Value="{$(var.GuidModified)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\3TortoiseConflict" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\3TortoiseConflict" Value="{$(var.GuidConflict)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\4TortoiseLocked" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\4TortoiseLocked" Value="{$(var.GuidLocked)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\5TortoiseReadOnly" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\5TortoiseReadOnly" Value="{$(var.GuidReadOnly)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\6TortoiseDeleted" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\6TortoiseDeleted" Value="{$(var.GuidDeleted)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\7TortoiseAdded" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\7TortoiseAdded" Value="{$(var.GuidAdded)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\8TortoiseIgnored" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\8TortoiseIgnored" Value="{$(var.GuidIgnored)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\9TortoiseUnversioned" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\9TortoiseUnversioned" Value="{$(var.GuidUnversioned)}" Type="string" />\r
+       </Component>\r
+\r
+       <Component Id="C__machineregistry" Guid="$(var.GuidMachineRegistry)" Win64="$(var.Win64YesNo)">\r
+               <RegistryKey Root="HKLM" Key="Software\TortoiseOverlays" Action="create" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="NormalIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\NormalIcon.ico" Type="string" KeyPath="yes" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="ModifiedIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\ModifiedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="ConflictIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\ConflictIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="DeletedIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\DeletedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="ReadOnlyIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\ReadOnlyIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="LockedIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\LockedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="AddedIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\AddedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="IgnoredIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\IgnoredIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="UnversionedIcon" Value="[CommonFilesFolder]TortoiseOverlays\icons\XPStyle\UnversionedIcon.ico" Type="string" />\r
+       </Component>\r
+\r
+       <Component Id="C__approveshellcomponents" Guid="$(var.GuidApproveShellComponents)" Win64="$(var.Win64YesNo)">\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidNormal)}" Value="TortoiseOverlays" KeyPath="yes" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidModified)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidConflict)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidLocked)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidReadOnly)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidDeleted)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidAdded)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidIgnored)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidUnversioned)}" Value="TortoiseOverlays" Type="string" />\r
+       </Component>\r
+</Include>\r
diff --git a/src/TortoiseOverlays/TortoiseOverlaysDirx64.wxi b/src/TortoiseOverlays/TortoiseOverlaysDirx64.wxi
new file mode 100644 (file)
index 0000000..e879fbc
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Include Id="TsvnInclude">\r
+       <Component Id='OverlayRegistry' Guid='87654321-4321-4321-4321-110987654321' Win64="$(var.Win64YesNo)">\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidNormal)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidModified)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidConflict)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidLocked)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidReadOnly)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidDeleted)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidAdded)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidIgnored)}" Value="TortoiseSVN" Type="string" />\r
+               <RegistryKey Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}\InProcServer32" Value="[CommonFiles64Folder]TortoiseOverlays\TortoiseOverlays.dll" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}\InProcServer32" Name="ThreadingModel" Value="Apartment" Type="string" />\r
+               <RegistryValue Root="HKMU" Key="Software\Classes\CLSID\{$(var.GuidUnversioned)}" Value="TortoiseSVN" Type="string" />\r
+\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseNormal" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseNormal" Value="{$(var.GuidNormal)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseModified" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseModified" Value="{$(var.GuidModified)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseConflict" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseConflict" Value="{$(var.GuidConflict)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseLocked" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseLocked" Value="{$(var.GuidLocked)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseReadOnly" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseReadOnly" Value="{$(var.GuidReadOnly)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseDeleted" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseDeleted" Value="{$(var.GuidDeleted)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseAdded" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseAdded" Value="{$(var.GuidAdded)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseIgnored" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseIgnored" Value="{$(var.GuidIgnored)}" Type="string" />\r
+               <RegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseUnversioned" Action="createAndRemoveOnUninstall" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\TortoiseUnversioned" Value="{$(var.GuidUnversioned)}" Type="string" />\r
+       </Component>\r
+\r
+       <Component Id="C__machineregistry" Guid="$(var.GuidMachineRegistry)" Win64="$(var.Win64YesNo)">\r
+               <RegistryKey Root="HKLM" Key="Software\TortoiseOverlays" Action="create" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="NormalIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\NormalIcon.ico" Type="string" KeyPath="yes" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="ModifiedIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\ModifiedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="ConflictIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\ConflictIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="DeletedIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\DeletedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="ReadOnlyIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\ReadOnlyIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="LockedIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\LockedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="AddedIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\AddedIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="IgnoredIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\IgnoredIcon.ico" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\TortoiseOverlays" Name="UnversionedIcon" Value="[CommonFiles64Folder]TortoiseOverlays\icons\XPStyle\UnversionedIcon.ico" Type="string" />\r
+       </Component>\r
+\r
+       <Component Id="C__approveshellcomponents" Guid="$(var.GuidApproveShellComponents)" Win64="$(var.Win64YesNo)">\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidNormal)}" Value="TortoiseOverlays" KeyPath="yes" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidModified)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidConflict)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidLocked)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidReadOnly)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidDeleted)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidAdded)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidIgnored)}" Value="TortoiseOverlays" Type="string" />\r
+               <RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Name="{$(var.GuidUnversioned)}" Value="TortoiseOverlays" Type="string" />\r
+       </Component>\r
+</Include>\r
diff --git a/src/TortoiseOverlays/TortoiseOverlaysMSI.wxs b/src/TortoiseOverlays/TortoiseOverlaysMSI.wxs
new file mode 100644 (file)
index 0000000..605fd2e
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>\r
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r
+       <?include Includes.wxi?>\r
+       <?if $(env.Platform) = "win32" ?>\r
+       <?define cf="CommonFilesFolder" ?>\r
+       <?endif ?>\r
+       <?if $(env.Platform) = "x64" ?>\r
+       <?define cf="CommonFiles64Folder" ?>\r
+       <?endif ?>\r
+       <Product\r
+                 UpgradeCode="$(var.UpgradeGuid)"\r
+               Name="TortoiseOverlays"\r
+                 Id="*"\r
+                 Version="$(var.VersionNumberInternal)"\r
+                 Manufacturer="TortoiseSVN"\r
+                 Language="1033">\r
+               <Package\r
+                               Id="*"\r
+                               Keywords="Tortoise,Overlays"\r
+                               Description="Overlayhandler for Tortoise clients"\r
+                               Comments="Provided by TortoiseSVN"\r
+                               Manufacturer="TortoiseSVN"\r
+                               InstallerVersion="200"\r
+                               Platform="$(var.PackagePlatforms)"\r
+                               Languages="1033"\r
+                               Compressed="yes"\r
+                               SummaryCodepage="1252"/>\r
+\r
+               <Media Id="1" Cabinet="TOVL.cab" EmbedCab="yes" CompressionLevel="high" />\r
+               \r
+               <Upgrade Id='$(var.UpgradeGuid)'>\r
+                       <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.VersionNumberInternal)" OnlyDetect="yes" />\r
+               </Upgrade>\r
+               \r
+               <Directory Id='TARGETDIR' Name='SourceDir'>\r
+                       <Directory Id='$(var.cf)' Name='Common'>\r
+                               <Directory Id='TortoiseOverlays' Name='TortoiseOverlays'>\r
+                                       <Component Id="C__overlaydll" Guid="$(var.OverlayDll)" Win64="$(var.Win64YesNo)">\r
+                                               <File Id="F__overlaydll" Name="TortoiseOverlays.dll" DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\TortoiseOverlays.dll" KeyPath="yes" />\r
+                                               <File Id="F__license" Name="License.txt" DiskId="1" Source="License.txt" />\r
+                                       </Component>\r
+\r
+                                       <?if $(env.Platform) = "win32" ?>\r
+                                       <?include TortoiseOverlaysDir.wxi?>\r
+                                       <?endif ?>\r
+                                       <?if $(env.Platform) = "x64" ?>\r
+                                       <?include TortoiseOverlaysDirx64.wxi?>\r
+                                       <?endif ?>\r
+\r
+                                       <Directory Id="D__icons" Name="icons" >\r
+                                               <Directory Id="D__iconsxpstyle" Name="XPStyle" >\r
+                                                       <Component Id="C__iconsxpstyle" Guid="$(var.GuidIconsXPStyle)" Win64="$(var.Win64YesNo)">\r
+                                                               <File Id="F__XPStyleConflictIcon" Name="NormalIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\NormalIcon.ico" KeyPath="yes" />\r
+                                                               <File Id="F__XPStyleInSubversionIcon" Name="ModifiedIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\ModifiedIcon.ico" />\r
+                                                               <File Id="F__XPStyleModifiedIcon" Name="ConflictIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\ConflictIcon.ico" />\r
+                                                               <File Id="F__XPStyleReadOnlyIcon" Name="DeletedIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\DeletedIcon.ico" />\r
+                                                               <File Id="F__XPStyleDeletedIcon" Name="ReadOnlyIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\ReadOnlyIcon.ico" />\r
+                                                               <File Id="F__XPStyleLockedIcon" Name="LockedIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\LockedIcon.ico" />\r
+                                                               <File Id="F__XPStyleAddedIcon" Name="AddedIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\AddedIcon.ico" />\r
+                                                               <File Id="F__XPStyleIgnoredIcon" Name="IgnoredIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\IgnoredIcon.ico" />\r
+                                                               <File Id="F__XPStyleUnversionedIcon" Name="UnversionedIcon.ico" DiskId="1" Source="..\Resources\Icons\XPStyle\UnversionedIcon.ico" />\r
+                                                       </Component>\r
+                                               </Directory>\r
+                                       </Directory>\r
+\r
+                               </Directory>\r
+                       </Directory>\r
+               </Directory>\r
+\r
+               <Feature Id='TortoiseOverlaysPackage' Title='TortoiseOverlays Package' Level='1'>\r
+                       <ComponentRef Id='C__overlaydll' />\r
+                       <ComponentRef Id='C__iconsxpstyle' />\r
+                       <ComponentRef Id='OverlayRegistry' />\r
+                       <ComponentRef Id='C__machineregistry' />\r
+                       <ComponentRef Id='C__approveshellcomponents' />\r
+               </Feature>\r
+\r
+               <InstallExecuteSequence>\r
+                       <!-- AppSearch must be done before RemoveExistingProducts and before FindRelatedProducts -->\r
+                       <AppSearch Sequence="1"></AppSearch>\r
+                       <RemoveExistingProducts After="InstallValidate">PREVIOUSVERSIONSINSTALLED</RemoveExistingProducts>\r
+                       <ScheduleReboot After="RegisterProduct" />\r
+               </InstallExecuteSequence>\r
+\r
+       </Product>\r
+</Wix>\r
diff --git a/src/TortoiseOverlays/TortoiseOverlaysMerge.wxs b/src/TortoiseOverlays/TortoiseOverlaysMerge.wxs
new file mode 100644 (file)
index 0000000..4c1bb99
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>\r
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r
+       <?include Includes.wxi?>\r
+       <?if $(env.Platform) = "win32" ?>\r
+       <?define cf="CommonFilesFolder" ?>\r
+       <?endif ?>\r
+       <?if $(env.Platform) = "x64" ?>\r
+       <?define cf="CommonFiles64Folder" ?>\r
+       <?endif ?>\r
+\r
+       <Module Id='TortoiseOverlays' Language='0' Version='1.0.0.0'>\r
+               <Package Id="$(var.UpgradeGuid)" Description='Overlay handler for Tortoise clients'\r
+                                 Comments='Provided by TortoiseSVN'\r
+                                 Manufacturer='TortoiseSVN' InstallerVersion='200' />\r
+               \r
+               <Directory Id='TARGETDIR' Name='SourceDir'>\r
+                       <Directory Id='$(var.cf)' Name='Common'>\r
+                       \r
+                               <Directory Id='TortoiseOverlays' Name='TortoiseOverlays'>\r
+                                       <Component Id="C__overlaydll" Guid="$(var.OverlayDll)" Win64="$(var.Win64YesNo)">\r
+                                               <File Id="F__overlaydll" Name="TortoiseOverlays.dll" Source="..\..\bin\$(var.ReleasePath)\bin\TortoiseOverlays.dll" KeyPath="yes" />\r
+                                               <File Id="F__license" Name="License.txt" Source="License.txt" />\r
+                                       </Component>\r
+\r
+                                       <?if $(env.Platform) = "win32" ?>\r
+                                       <?include TortoiseOverlaysDir.wxi?>\r
+                                       <?endif ?>\r
+                                       <?if $(env.Platform) = "x64" ?>\r
+                                       <?include TortoiseOverlaysDirx64.wxi?>\r
+                                       <?endif ?>\r
+\r
+                                       <Directory Id="D__icons" Name="icons" >\r
+                                               <Directory Id="D__iconsxpstyle" Name="XPStyle" >\r
+                                                       <Component Id="C__iconsxpstyle" Guid="$(var.GuidIconsXPStyle)" Win64="$(var.Win64YesNo)">\r
+                                                               <File Id="F__XPStyleConflictIcon" Name="NormalIcon.ico" Source="..\Resources\Icons\XPStyle\NormalIcon.ico" KeyPath="yes" />\r
+                                                               <File Id="F__XPStyleInSubversionIcon" Name="ModifiedIcon.ico" Source="..\Resources\Icons\XPStyle\ModifiedIcon.ico" />\r
+                                                               <File Id="F__XPStyleModifiedIcon" Name="ConflictIcon.ico" Source="..\Resources\Icons\XPStyle\ConflictIcon.ico" />\r
+                                                               <File Id="F__XPStyleReadOnlyIcon" Name="DeletedIcon.ico" Source="..\Resources\Icons\XPStyle\DeletedIcon.ico" />\r
+                                                               <File Id="F__XPStyleDeletedIcon" Name="ReadOnlyIcon.ico" Source="..\Resources\Icons\XPStyle\ReadOnlyIcon.ico" />\r
+                                                               <File Id="F__XPStyleLockedIcon" Name="LockedIcon.ico" Source="..\Resources\Icons\XPStyle\LockedIcon.ico" />\r
+                                                               <File Id="F__XPStyleAddedIcon" Name="AddedIcon.ico" Source="..\Resources\Icons\XPStyle\AddedIcon.ico" />\r
+                                                               <File Id="F__XPStyleIgnoredIcon" Name="IgnoredIcon.ico" Source="..\Resources\Icons\XPStyle\IgnoredIcon.ico" />\r
+                                                               <File Id="F__XPStyleUnversionedIcon" Name="UnversionedIcon.ico" Source="..\Resources\Icons\XPStyle\UnversionedIcon.ico" />\r
+                                                       </Component>\r
+                                               </Directory>\r
+                                       </Directory>\r
+                                       \r
+                               </Directory>\r
+                       </Directory>\r
+               </Directory>\r
+       </Module>\r
+</Wix>\r
diff --git a/src/TortoiseOverlays/VersionNumberInclude.in.wxi b/src/TortoiseOverlays/VersionNumberInclude.in.wxi
new file mode 100644 (file)
index 0000000..87c4689
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Include Id="VersionNumberInclude">\r
+  <?define MajorVersion="$MajorVersion$" ?>\r
+  <?define MinorVersion="$MinorVersion$" ?>\r
+  <?define MicroVersion="$MicroVersion$" ?>\r
+  <?define BuildVersion="$WCREV$" ?>\r
+</Include>\r
diff --git a/src/TortoiseOverlays/resource.h b/src/TortoiseOverlays/resource.h
new file mode 100644 (file)
index 0000000..2d8da82
--- /dev/null
@@ -0,0 +1,15 @@
+//{{NO_DEPENDENCIES}}\r
+// Microsoft Visual C++ generated include file.\r
+// Used by resource.rc\r
+//\r
+\r
+// Next default values for new objects\r
+// \r
+#ifdef APSTUDIO_INVOKED\r
+#ifndef APSTUDIO_READONLY_SYMBOLS\r
+#define _APS_NEXT_RESOURCE_VALUE        5160\r
+#define _APS_NEXT_COMMAND_VALUE         40001\r
+#define _APS_NEXT_CONTROL_VALUE         11026\r
+#define _APS_NEXT_SYMED_VALUE           5101\r
+#endif\r
+#endif\r
diff --git a/src/TortoiseOverlays/resource.rc b/src/TortoiseOverlays/resource.rc
new file mode 100644 (file)
index 0000000..9889ee8
--- /dev/null
@@ -0,0 +1,67 @@
+// Microsoft Visual C++ generated resource script.\r
+//\r
+#include "resource.h"\r
+\r
+#define APSTUDIO_READONLY_SYMBOLS\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Generated from the TEXTINCLUDE 2 resource.\r
+//\r
+#include "winres.h"\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+#undef APSTUDIO_READONLY_SYMBOLS\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+// English (U.S.) resources\r
+\r
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
+#ifdef _WIN32\r
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
+#pragma code_page(1252)\r
+#endif //_WIN32\r
+\r
+#ifdef APSTUDIO_INVOKED\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// TEXTINCLUDE\r
+//\r
+\r
+1 TEXTINCLUDE \r
+BEGIN\r
+    "resource.h\0"\r
+END\r
+\r
+2 TEXTINCLUDE \r
+BEGIN\r
+    "#include ""winres.h""\r\n"\r
+    "\0"\r
+END\r
+\r
+3 TEXTINCLUDE \r
+BEGIN\r
+    "LANGUAGE 9, 1\r\n"\r
+    "#pragma code_page(1252)\r\n"\r
+    "#include ""resource.rc2""  // non-Microsoft Visual C++ edited resources\r\n"\r
+    "\0"\r
+END\r
+\r
+#endif    // APSTUDIO_INVOKED\r
+\r
+#endif    // English (U.S.) resources\r
+/////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+\r
+#ifndef APSTUDIO_INVOKED\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Generated from the TEXTINCLUDE 3 resource.\r
+//\r
+LANGUAGE 9, 1\r
+#pragma code_page(1252)\r
+#include "resource.rc2"  // non-Microsoft Visual C++ edited resources\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+#endif    // not APSTUDIO_INVOKED\r
+\r
diff --git a/src/TortoiseOverlays/resource.rc2 b/src/TortoiseOverlays/resource.rc2
new file mode 100644 (file)
index 0000000..fa49e5c
--- /dev/null
@@ -0,0 +1,45 @@
+#ifdef APSTUDIO_INVOKED\r
+#error this file is not editable by Microsoft Visual C++\r
+#endif //APSTUDIO_INVOKED\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// RT_MANIFEST\r
+//\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Version\r
+//\r
+#include "version.h"\r
+VS_VERSION_INFO VERSIONINFO\r
+ FILEVERSION FILEVER\r
+ PRODUCTVERSION PRODUCTVER\r
+ FILEFLAGSMASK 0x3fL\r
+#ifdef _DEBUG\r
+ FILEFLAGS 0x1L\r
+#else\r
+ FILEFLAGS 0x0L\r
+#endif\r
+ FILEOS 0x4L\r
+ FILETYPE VFT_DLL\r
+ FILESUBTYPE 0x0L\r
+BEGIN\r
+    BLOCK "StringFileInfo"\r
+    BEGIN\r
+        BLOCK "040004e4"\r
+        BEGIN\r
+            VALUE "CompanyName", "http://tortoisesvn.net\0"\r
+            VALUE "FileDescription", "TortoiseSVN overlay handler shim\0"\r
+            VALUE "FileVersion", STRFILEVER\r
+            VALUE "InternalName", "TortoiseOverlays.dll\0"\r
+            VALUE "LegalCopyright", "Copyright (C) 2008 - TortoiseSVN\0"\r
+            VALUE "OriginalFilename", "TortoiseOverlays.dll\0"\r
+            VALUE "ProductName", "TortoiseSVN\0"\r
+            VALUE "ProductVersion", STRPRODUCTVER\r
+        END\r
+    END\r
+    BLOCK "VarFileInfo"\r
+    BEGIN\r
+        VALUE "Translation", 0x400, 1252\r
+    END\r
+END\r
diff --git a/src/TortoiseOverlays/stdafx.cpp b/src/TortoiseOverlays/stdafx.cpp
new file mode 100644 (file)
index 0000000..e0cacce
--- /dev/null
@@ -0,0 +1,7 @@
+// stdafx.cpp : source file that includes just the standard includes\r
+// TortoiseProc.pch will be the pre-compiled header\r
+// stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+\r
diff --git a/src/TortoiseOverlays/stdafx.h b/src/TortoiseOverlays/stdafx.h
new file mode 100644 (file)
index 0000000..054ec20
--- /dev/null
@@ -0,0 +1,36 @@
+// TortoiseOverlays - an overlay handler for Tortoise clients\r
+// Copyright (C) 2007-2008 - TortoiseSVN\r
+\r
+#pragma once\r
+// Modify the following defines if you have to target a platform prior to the ones specified below.\r
+// Refer to MSDN for the latest info on corresponding values for different platforms.\r
+#ifndef WINVER                         // Allow use of features specific to Windows 95 and Windows NT 4 or later.\r
+#      define WINVER 0x0501            // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.\r
+#endif\r
+\r
+#ifndef _WIN32_WINNT           // Allow use of features specific to Windows NT 4 or later.\r
+#      define _WIN32_WINNT 0x0501              // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.\r
+#endif                                         \r
+\r
+#ifndef _WIN32_WINDOWS         // Allow use of features specific to Windows 98 or later.\r
+#      define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later.\r
+#endif\r
+\r
+#ifndef _WIN32_IE                      // Allow use of features specific to IE 4.0 or later.\r
+#      define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later.\r
+#endif\r
+\r
+#define ISOLATION_AWARE_ENABLED 1\r
+\r
+#include <windows.h>\r
+\r
+#include <commctrl.h>\r
+#include <Shlobj.h>\r
+#include <Shlwapi.h>\r
+#include <tchar.h>\r
+\r
+#pragma warning(push)\r
+#pragma warning(disable: 4702) // Unreachable code warnings in xtree\r
+#include <string>\r
+#include <vector> \r
+#pragma warning(pop)\r
diff --git a/src/TortoiseOverlays/version.build.in b/src/TortoiseOverlays/version.build.in
new file mode 100644 (file)
index 0000000..422b717
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>\r
+<project name="SetVersionInfo" default="setversioninfo">\r
+       <target name="setversioninfo">\r
+               <setenv>\r
+                       <variable name="MajorVersion" value="1" />\r
+                       <variable name="MinorVersion" value="0" />\r
+                       <variable name="MicroVersion" value="5" />\r
+                       <variable name="WCREV" value="$WCREV$" />\r
+                       <variable name="WCDATE" value="$WCDATE$" />\r
+               </setenv>\r
+       </target>\r
+</project>
\ No newline at end of file
diff --git a/src/TortoiseOverlays/version.in b/src/TortoiseOverlays/version.in
new file mode 100644 (file)
index 0000000..08ae2f4
--- /dev/null
@@ -0,0 +1,17 @@
+#define FILEVER        $MajorVersion$,$MinorVersion$,$MicroVersion$,$WCREV$\r
+#define PRODUCTVER     $MajorVersion$,$MinorVersion$,$MicroVersion$,$WCREV$\r
+#define STRFILEVER     "$MajorVersion$, $MinorVersion$, $MicroVersion$, $WCREV$\0"\r
+#define STRPRODUCTVER  "$MajorVersion$, $MinorVersion$, $MicroVersion$, $WCREV$\0"\r
+\r
+#define TSVN_VERMAJOR             $MajorVersion$\r
+#define TSVN_VERMINOR             $MinorVersion$\r
+#define TSVN_VERMICRO             $MicroVersion$\r
+#define TSVN_VERBUILD                    $WCREV$\r
+#define TSVN_VERDATE                     "$WCDATE$"\r
+\r
+#ifdef _WIN64\r
+#define TSVN_PLATFORM          "64 Bit $DEVBUILD$"\r
+#else\r
+#define TSVN_PLATFORM          "32 Bit $DEVBUILD$"\r
+#endif\r
+\r