Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/engine/main.cpp

Issue 10920006: Expect MSI installers (Closed)
Patch Set: Created June 10, 2013, 3:27 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/engine/Updater.cpp ('K') | « src/engine/Updater.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« src/engine/Updater.cpp ('K') | « src/engine/Updater.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld