Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

Merge with stable

Changeset 201f11bcbc8a

Parents 962142268aca

Parents 41263f8967cb

by Adrian Buehlmann

Changes to 2 files · Browse files at 201f11bcbc8a Showing diff from parent 962142268aca 41263f8967cb Diff from another changeset...

 
22
23
24
 
 
 
 
 
 
 
25
26
27
 
134
135
136
137
 
138
139
140
141
 
142
143
144
145
 
146
147
148
149
 
150
151
152
153
 
154
155
156
 
282
283
284
285
 
286
287
288
289
 
290
291
292
293
 
294
295
296
297
 
298
299
300
301
 
302
303
304
 
22
23
24
25
26
27
28
29
30
31
32
33
34
 
141
142
143
 
144
145
146
147
 
148
149
150
151
 
152
153
154
155
 
156
157
158
159
 
160
161
162
163
 
289
290
291
 
292
293
294
295
 
296
297
298
299
 
300
301
302
303
 
304
305
306
307
 
308
309
310
311
@@ -22,6 +22,13 @@
    <?define VCRedistSrcDir = C:\Program Files\Microsoft SDKs\Windows\v7.0\Redist\VC ?>   + <!-- shell extension CLSID's --> + <?define CLSID_TortoiseHgCmenu = 46605027-5B8C-4DCE-BFE0-051B7972D64C ?> + <?define CLSID_TortoiseHg0 = 869C8877-2C3C-438D-844B-31B86BFE5E8A ?> + <?define CLSID_TortoiseHg1 = AF42ADAB-8C2E-4285-B746-99B31094708E ?> + <?define CLSID_TortoiseHg2 = CDA1C89D-E9B5-4981-A857-82DD932EA2FD ?> + <?define CLSID_TortoiseHg6 = 9E3D4EC9-0624-4393-8B48-204C217ED1FF ?> +   <Product Name='TortoiseHg $(var.Version) ($(var.Platform))'   Id='$(var.ProductId)'   Version='$(var.Version)' @@ -134,23 +141,23 @@
  Type='string' Value='[INSTALLDIR]'   />   <RegistryValue - Root='HKCR' Key='CLSID\{46605027-5B8C-4DCE-BFE0-051B7972D64C}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHgCmenu)}\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{869C8877-2C3C-438D-844B-31B86BFE5E8A}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg0)}\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{AF42ADAB-8C2E-4285-B746-99B31094708E}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg1)}\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{CDA1C89D-E9B5-4981-A857-82DD932EA2FD}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg2)}\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{9E3D4EC9-0624-4393-8B48-204C217ED1FF}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg6)}\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   />   <?include shell-register.wxi ?> @@ -282,23 +289,23 @@
  Type='string' Value='[INSTALLDIR]'   />   <RegistryValue - Root='HKCR' Key='CLSID\{46605027-5B8C-4DCE-BFE0-051B7972D64C}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHgCmenu)}\InProcServer32'   Type='string' Value='[Common64]ThgShellx64.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{869C8877-2C3C-438D-844B-31B86BFE5E8A}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg0)}\InProcServer32'   Type='string' Value='[Common64]ThgShellx64.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{AF42ADAB-8C2E-4285-B746-99B31094708E}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg1)}\InProcServer32'   Type='string' Value='[Common64]ThgShellx64.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{CDA1C89D-E9B5-4981-A857-82DD932EA2FD}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg2)}\InProcServer32'   Type='string' Value='[Common64]ThgShellx64.dll'   />   <RegistryValue - Root='HKCR' Key='CLSID\{9E3D4EC9-0624-4393-8B48-204C217ED1FF}\InProcServer32' + Root='HKCR' Key='CLSID\{$(var.CLSID_TortoiseHg6)}\InProcServer32'   Type='string' Value='[Common64]ThgShellx64.dll'   />   <?include shell-register.wxi ?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
 
15
16
17
18
19
20
 
 
 
 
 
 
 
 
 
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
 #include "stdafx.h"  #include "ShellExt.h"  #include "TortoiseUtils.h"  #include "StringUtils.h"  #include "InitStatus.h"  #include "ThgClassFactory.h"  #include "CShellExtCMenu.h"  #include "CShellExtOverlay.h"    #include <olectl.h>    #define INITGUID  #include <initguid.h>   -#ifdef THG_MSI_INSTALL -// GUIDs used by WiX msi installer  DEFINE_GUID(CLSID_TortoiseHgCmenu, 0x46605027L, 0x5B8C, 0x4DCE, 0xBF, 0xE0, 0x05, 0x1B, 0x79, 0x72, 0xD6, 0x4C);    DEFINE_GUID(CLSID_TortoiseHg0, 0x869C8877L, 0x2C3C, 0x438D, 0x84, 0x4B, 0x31, 0xB8, 0x6B, 0xFE, 0x5E, 0x8A);  DEFINE_GUID(CLSID_TortoiseHg1, 0xAF42ADABL, 0x8C2E, 0x4285, 0xB7, 0x46, 0x99, 0xB3, 0x10, 0x94, 0x70, 0x8E);  DEFINE_GUID(CLSID_TortoiseHg2, 0xCDA1C89DL, 0xE9B5, 0x4981, 0xA8, 0x57, 0x82, 0xDD, 0x93, 0x2E, 0xA2, 0xFD);  DEFINE_GUID(CLSID_TortoiseHg6, 0x9E3D4EC9L, 0x0624, 0x4393, 0x8B, 0x48, 0x20, 0x4C, 0x21, 0x7E, 0xD1, 0xFF); -#else -// GUIDs used by innosetup installer -DEFINE_GUID(CLSID_TortoiseHgCmenu, 0xb456db9fL, 0x7bf4, 0x478c, 0x93, 0x7a, 0x5, 0x13, 0xc, 0x2c, 0x21, 0x2e); - -DEFINE_GUID(CLSID_TortoiseHg0, 0xb456dba0L, 0x7bf4, 0x478c, 0x93, 0x7a, 0x5, 0x13, 0xc, 0x2c, 0x21, 0x2e); -DEFINE_GUID(CLSID_TortoiseHg1, 0xb456dba1L, 0x7bf4, 0x478c, 0x93, 0x7a, 0x5, 0x13, 0xc, 0x2c, 0x21, 0x2e); -DEFINE_GUID(CLSID_TortoiseHg2, 0xb456dba2L, 0x7bf4, 0x478c, 0x93, 0x7a, 0x5, 0x13, 0xc, 0x2c, 0x21, 0x2e); -DEFINE_GUID(CLSID_TortoiseHg6, 0xb456dba6L, 0x7bf4, 0x478c, 0x93, 0x7a, 0x5, 0x13, 0xc, 0x2c, 0x21, 0x2e); -#endif    UINT g_cRefThisDll = 0;  HINSTANCE g_hmodThisDll = NULL;    CRITICAL_SECTION g_critical_section;      typedef struct  {   HKEY hRootKey;   LPTSTR lpszSubKey;   LPTSTR lpszValueName;   LPTSTR lpszData;  } REGSTRUCT, *LPREGSTRUCT;      VOID _LoadResources();  VOID _UnloadResources();      extern "C"  int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)  {   if (dwReason == DLL_PROCESS_ATTACH)   {   TDEBUG_TRACE("DllMain: DLL_PROCESS_ATTACH");   g_hmodThisDll = hInstance;   ::InitializeCriticalSection(&g_critical_section);   _LoadResources();   }   else if (dwReason == DLL_PROCESS_DETACH)   {   TDEBUG_TRACE("DllMain: DLL_PROCESS_ATTACH");   ::DeleteCriticalSection(&g_critical_section);   _UnloadResources();   }     return 1;  }      STDAPI DllCanUnloadNow(void)  {   TDEBUG_TRACE("DllCanUnloadNow");   return (g_cRefThisDll == 0 ? S_OK : S_FALSE);  }      STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppvOut)  {   LPWSTR pwszShellExt;   StringFromIID(rclsid, &pwszShellExt);   TDEBUG_TRACE("DllGetClassObject clsid = " << WideToMultibyte(pwszShellExt));     if (ppvOut == 0)   {   TDEBUG_TRACE("**** DllGetClassObject: error: ppvOut is 0");   return E_POINTER;   }     *ppvOut = NULL;     typedef ThgClassFactory<CShellExtOverlay> FactOvl;   typedef ThgClassFactory<CShellExtCMenu> FactCmenu;     if (IsEqualIID(rclsid, CLSID_TortoiseHgCmenu))   {   FactCmenu *pcf = new FactCmenu(0);   TDEBUG_TRACE("DllGetClassObject clsname = " << "CLSID_TortoiseHgCmenu");   return pcf->QueryInterface(riid, ppvOut);   }   else if (IsEqualIID(rclsid, CLSID_TortoiseHg0))   {   FactOvl *pcf = new FactOvl('C'); // clean   TDEBUG_TRACE("DllGetClassObject clsname = " << "CLSID_TortoiseHg0");   ++InitStatus::inst().unchanged_;   return pcf->QueryInterface(riid, ppvOut);   }   else if (IsEqualIID(rclsid, CLSID_TortoiseHg1))   {   FactOvl *pcf = new FactOvl('A'); // added   TDEBUG_TRACE("DllGetClassObject clsname = " << "CLSID_TortoiseHg1");   ++InitStatus::inst().added_;   return pcf->QueryInterface(riid, ppvOut);   }   else if (IsEqualIID(rclsid, CLSID_TortoiseHg2))   {   FactOvl *pcf = new FactOvl('M'); // modified   TDEBUG_TRACE("DllGetClassObject clsname = " << "CLSID_TortoiseHg2");   ++InitStatus::inst().modified_;   return pcf->QueryInterface(riid, ppvOut);   }   else if (IsEqualIID(rclsid, CLSID_TortoiseHg6))   {   FactOvl *pcf = new FactOvl('?'); // not in repo   TDEBUG_TRACE("DllGetClassObject clsname = " << "CLSID_TortoiseHg6");   ++InitStatus::inst().notinrepo_;   return pcf->QueryInterface(riid, ppvOut);   }     return CLASS_E_CLASSNOTAVAILABLE;  }      VOID _LoadResources(VOID)  {  }      VOID _UnloadResources(VOID)  {  }      LPCRITICAL_SECTION CShellExt::GetCriticalSection()  {   return &g_critical_section;  }      void CShellExt::IncDllRef()  {   ThgCriticalSection cs(CShellExt::GetCriticalSection());   g_cRefThisDll++;  }      void CShellExt::DecDllRef()  {   ThgCriticalSection cs(CShellExt::GetCriticalSection());   g_cRefThisDll--;  }