| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 | 173 #ifdef ADBLOCK_PLUS_TEST_MODE |
| 174 appInfo.developmentBuild = true; | 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 #else | |
| 176 appInfo.developmentBuild = false; | |
| 175 #endif | 177 #endif |
| 176 | 178 |
| 177 AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo); | 179 AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo); |
| 178 std::string dataPath = ToUtf8String(GetAppDataPath()); | 180 std::string dataPath = ToUtf8String(GetAppDataPath()); |
| 179 dynamic_cast<AdblockPlus::DefaultFileSystem*>(jsEngine->GetFileSystem().get()) ->SetBasePath(dataPath); | 181 dynamic_cast<AdblockPlus::DefaultFileSystem*>(jsEngine->GetFileSystem().get()) ->SetBasePath(dataPath); |
| 180 std::auto_ptr<AdblockPlus::FilterEngine> filterEngine(new AdblockPlus::FilterE ngine(jsEngine)); | 182 std::auto_ptr<AdblockPlus::FilterEngine> filterEngine(new AdblockPlus::FilterE ngine(jsEngine)); |
| 181 return filterEngine; | 183 return filterEngine; |
| 182 } | 184 } |
| 183 | 185 |
| 184 int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) | 186 int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 215 } | 217 } |
| 216 catch (std::runtime_error e) | 218 catch (std::runtime_error e) |
| 217 { | 219 { |
| 218 DebugException(e); | 220 DebugException(e); |
| 219 return 1; | 221 return 1; |
| 220 } | 222 } |
| 221 } | 223 } |
| 222 | 224 |
| 223 return 0; | 225 return 0; |
| 224 } | 226 } |
| LEFT | RIGHT |