Index: src/engine/main.cpp |
=================================================================== |
--- a/src/engine/main.cpp |
+++ b/src/engine/main.cpp |
@@ -165,17 +165,21 @@ namespace |
} |
} |
std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring& locale) |
{ |
AdblockPlus::AppInfo appInfo; |
appInfo.version = ToUtf8String(IEPLUGIN_VERSION); |
appInfo.name = "adblockplusie"; |
- appInfo.platform = "msie"; |
+#ifdef _WIN64 |
+ appInfo.platform = "win64"; |
Felix Dahlke
2013/06/11 10:07:52
Not sure what we'll want to use the platform for,
Wladimir Palant
2013/06/11 14:42:10
It is used for some branching in the JS code. And
|
+#else |
+ appInfo.platform = "win32"; |
+#endif |
appInfo.locale = ToUtf8String(locale); |
#ifdef ADBLOCK_PLUS_TEST_MODE |
appInfo.developmentBuild = true; |
#else |
appInfo.developmentBuild = false; |
#endif |
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::New(appInfo); |
@@ -185,22 +189,22 @@ std::auto_ptr<AdblockPlus::FilterEngine> |
std::string dataPath = ToUtf8String(GetAppDataPath()); |
dynamic_cast<AdblockPlus::DefaultFileSystem*>(jsEngine->GetFileSystem().get())->SetBasePath(dataPath); |
std::auto_ptr<AdblockPlus::FilterEngine> filterEngine(new AdblockPlus::FilterEngine(jsEngine)); |
return filterEngine; |
} |
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) |
{ |
- AutoHandle mutex(CreateMutexW(0, false, L"AdblockPlusEngine")); |
- if (!mutex) |
- { |
- DebugLastError("CreateMutex failed"); |
- return 1; |
- } |
+ AutoHandle mutex(CreateMutexW(0, false, L"AdblockPlusEngine")); |
+ if (!mutex) |
+ { |
+ DebugLastError("CreateMutex failed"); |
+ return 1; |
+ } |
if (GetLastError() == ERROR_ALREADY_EXISTS) |
{ |
DebugLastError("Named pipe exists, another engine instance appears to be running"); |
return 1; |
} |
int argc; |