Left: | ||
Right: |
OLD | NEW |
---|---|
1 #include "stdafx.h" | 1 #include "stdafx.h" |
2 | 2 |
3 #include "../shared/AutoHandle.h" | 3 #include "../shared/AutoHandle.h" |
4 #include "../shared/Communication.h" | 4 #include "../shared/Communication.h" |
5 #include "../shared/Utils.h" | 5 #include "../shared/Utils.h" |
6 #include "../shared/Version.h" | 6 #include "../shared/Version.h" |
7 #include "Debug.h" | 7 #include "Debug.h" |
8 | 8 |
9 namespace | 9 namespace |
10 { | 10 { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring& locale) | 166 std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring& locale) |
167 { | 167 { |
168 AdblockPlus::AppInfo appInfo; | 168 AdblockPlus::AppInfo appInfo; |
169 appInfo.version = ToUtf8String(IEPLUGIN_VERSION); | 169 appInfo.version = ToUtf8String(IEPLUGIN_VERSION); |
170 appInfo.name = "adblockplusie"; | 170 appInfo.name = "adblockplusie"; |
171 appInfo.platform = "msie"; | 171 appInfo.platform = "msie"; |
172 appInfo.locale = ToUtf8String(locale); | 172 appInfo.locale = ToUtf8String(locale); |
173 #ifdef ADBLOCK_PLUS_TEST_MODE | |
174 appInfo.developmentBuild = true; | |
Wladimir Palant
2013/06/05 09:54:05
Please add #else and set it to false explicitly in
Felix Dahlke
2013/06/05 10:12:36
Fair enough, wouldn't hurt.
| |
175 #endif | |
173 | 176 |
174 AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo); | 177 AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo); |
175 std::string dataPath = ToUtf8String(GetAppDataPath()); | 178 std::string dataPath = ToUtf8String(GetAppDataPath()); |
176 dynamic_cast<AdblockPlus::DefaultFileSystem*>(jsEngine->GetFileSystem().get()) ->SetBasePath(dataPath); | 179 dynamic_cast<AdblockPlus::DefaultFileSystem*>(jsEngine->GetFileSystem().get()) ->SetBasePath(dataPath); |
177 std::auto_ptr<AdblockPlus::FilterEngine> filterEngine(new AdblockPlus::FilterE ngine(jsEngine)); | 180 std::auto_ptr<AdblockPlus::FilterEngine> filterEngine(new AdblockPlus::FilterE ngine(jsEngine)); |
178 return filterEngine; | 181 return filterEngine; |
179 } | 182 } |
180 | 183 |
181 int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) | 184 int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) |
182 { | 185 { |
(...skipping 29 matching lines...) Expand all Loading... | |
212 } | 215 } |
213 catch (std::runtime_error e) | 216 catch (std::runtime_error e) |
214 { | 217 { |
215 DebugException(e); | 218 DebugException(e); |
216 return 1; | 219 return 1; |
217 } | 220 } |
218 } | 221 } |
219 | 222 |
220 return 0; | 223 return 0; |
221 } | 224 } |
OLD | NEW |