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

Side by Side Diff: src/engine/Updater.cpp

Issue 10879048: Use minor upgrade mechanism for updates, set installer versionautomatically (Closed)
Patch Set: Created June 11, 2013, 1:21 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #include <functional> 1 #include <functional>
2 #include <memory> 2 #include <memory>
3 #include <sstream> 3 #include <sstream>
4 4
5 #include <Windows.h> 5 #include <Windows.h>
6 #include <Msi.h> 6 #include <Msi.h>
7 7
8 #include <AdblockPlus/FileSystem.h> 8 #include <AdblockPlus/FileSystem.h>
9 #include <AdblockPlus/WebRequest.h> 9 #include <AdblockPlus/WebRequest.h>
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 MessageBoxW(NULL, 113 MessageBoxW(NULL,
114 dict->Lookup("updater", "download-error-neterror").c_str(), 114 dict->Lookup("updater", "download-error-neterror").c_str(),
115 dict->Lookup("updater", "download-error-title").c_str(), 115 dict->Lookup("updater", "download-error-title").c_str(),
116 0); 116 0);
117 } 117 }
118 if (result != IDOK) 118 if (result != IDOK)
119 return; 119 return;
120 } 120 }
121 121
122 { 122 {
123 UINT result = ::MsiInstallProductW(tempFile.c_str(), L"ACTION=INSTALL INST ALLUILEVEL=2"); 123 UINT result = ::MsiInstallProductW(tempFile.c_str(), L"ACTION=INSTALL INST ALLUILEVEL=2 REINSTALL=ALL REINSTALLMODE=vomus MSIENFORCEUPGRADECOMPONENTRULES=1 ");
Eric 2013/06/11 15:41:46 We can't always use minor upgrades for all upgrade
Wladimir Palant 2013/06/12 09:46:34 Yes, most of them I hope.
Eric 2013/06/12 14:33:24 I'm going to open a Discourse thread on this topic
124 if (result != ERROR_SUCCESS) 124 if (result != ERROR_SUCCESS)
125 { 125 {
126 Dictionary* dict = Dictionary::GetInstance(); 126 Dictionary* dict = Dictionary::GetInstance();
127 std::wstringstream message; 127 std::wstringstream message;
128 message << dict->Lookup("updater", "download-error-runerror"); 128 message << dict->Lookup("updater", "download-error-runerror");
129 message << std::endl << L"(error " << result << L")"; 129 message << std::endl << L"(error " << result << L")";
130 MessageBoxW(NULL, 130 MessageBoxW(NULL,
131 message.str().c_str(), 131 message.str().c_str(),
132 dict->Lookup("updater", "download-error-title").c_str(), 132 dict->Lookup("updater", "download-error-title").c_str(),
133 0); 133 0);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 catch (const std::exception& e) 183 catch (const std::exception& e)
184 { 184 {
185 DebugException(e); 185 DebugException(e);
186 EndDialog(dialog, DOWNLOAD_FAILED); 186 EndDialog(dialog, DOWNLOAD_FAILED);
187 return; 187 return;
188 } 188 }
189 189
190 EndDialog(dialog, IDOK); 190 EndDialog(dialog, IDOK);
191 } 191 }
OLDNEW
« build_release.py ('K') | « build_release.py ('k') | src/shared/Version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld