OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "Plugin.h" | 3 #include "Plugin.h" |
4 #ifdef _WIN64 | 4 #ifdef _WIN64 |
5 #include "../../build/x64/AdblockPlus_i.c" | 5 #include "../../build/x64/AdblockPlus_i.c" |
6 #else | 6 #else |
7 #include "../../build/ia32/AdblockPlus_i.c" | 7 #include "../../build/ia32/AdblockPlus_i.c" |
8 #endif | 8 #endif |
9 | 9 |
10 #include "PluginClass.h" | 10 #include "PluginClass.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 void InitPlugin(bool isInstall) | 109 void InitPlugin(bool isInstall) |
110 { | 110 { |
111 CPluginSystem* system = CPluginSystem::GetInstance(); | 111 CPluginSystem* system = CPluginSystem::GetInstance(); |
112 | 112 |
113 CPluginSettings* settings = CPluginSettings::GetInstance(); | 113 CPluginSettings* settings = CPluginSettings::GetInstance(); |
114 | 114 |
115 if (isInstall) | 115 if (isInstall) |
116 { | 116 { |
117 DEBUG_GENERAL( | 117 std::wstring t[] = { |
118 L"========================================================================
========\nINSTALLER " + | 118 L"========================================================================
========", |
119 CString(IEPLUGIN_VERSION) + | 119 L"INSTALLER " IEPLUGIN_VERSION, |
120 L"\n======================================================================
==========") | 120 L"========================================================================
========" |
| 121 }; |
| 122 DEBUG_GENERAL( t ); |
121 } | 123 } |
122 else | 124 else |
123 { | 125 { |
124 DEBUG_GENERAL( | 126 std::wstring t[] = { |
125 L"========================================================================
========\nUPDATER " + | 127 L"========================================================================
========", |
126 CString(IEPLUGIN_VERSION) + | 128 L"UPDATER " IEPLUGIN_VERSION, |
127 L"\n======================================================================
==========") | 129 L"========================================================================
========" |
| 130 }; |
| 131 DEBUG_GENERAL( t ); |
128 } | 132 } |
129 | 133 |
130 // Post async plugin error | 134 // Post async plugin error |
131 CPluginError pluginError; | 135 CPluginError pluginError; |
132 while (CPluginClientBase::PopFirstPluginError(pluginError)) | 136 while (CPluginClientBase::PopFirstPluginError(pluginError)) |
133 { | 137 { |
134 CPluginClientBase::LogPluginError(pluginError.GetErrorCode(), pluginError.Ge
tErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true
, pluginError.GetProcessId(), pluginError.GetThreadId()); | 138 CPluginClientBase::LogPluginError(pluginError.GetErrorCode(), pluginError.Ge
tErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true
, pluginError.GetProcessId(), pluginError.GetThreadId()); |
135 } | 139 } |
136 } | 140 } |
137 | 141 |
138 // Called from installer | 142 // Called from installer |
139 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) | 143 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) |
140 { | 144 { |
141 InitPlugin(true); | 145 InitPlugin(true); |
142 } | 146 } |
143 | 147 |
144 // Called from updater | 148 // Called from updater |
145 EXTERN_C void STDAPICALLTYPE OnUpdate(void) | 149 EXTERN_C void STDAPICALLTYPE OnUpdate(void) |
146 { | 150 { |
147 InitPlugin(false); | 151 InitPlugin(false); |
148 } | 152 } |
OLD | NEW |