| OLD | NEW |
| (Empty) |
| 1 // Copyright 2008-2009 Google Inc. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 // you may not use this file except in compliance with the License. | |
| 5 // You may obtain a copy of the License at | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 // ======================================================================== | |
| 15 // | |
| 16 // Invoke with: | |
| 17 // omaha_comtibility_test.exe <path>\example_config.txt | |
| 18 // <path>\GoogleUpdateSetup.exe | |
| 19 // or if you only want to run the httpserver that reads the config and responds | |
| 20 // appropriately use | |
| 21 // OmahaCompatibility.exe <path>\example_config.txt | |
| 22 // | |
| 23 | |
| 24 #include <Windows.h> | |
| 25 #include <tchar.h> | |
| 26 #include "omaha/common/vistautil.h" | |
| 27 #include "omaha/tools/omahacompatibility/compatibility_test.h" | |
| 28 | |
| 29 void PrintUsage() { | |
| 30 wprintf(_T("Incorrect arguments\n") | |
| 31 _T("Usage:\n") | |
| 32 _T("OmahaCompatibility <Full path to config file>") | |
| 33 _T(" <Full path to googleupdatesetup.exe>\n") | |
| 34 _T("\nor:\n") | |
| 35 _T("OmahaCompatibility <Full path to config file>") | |
| 36 _T("Note: The debug version of googleupdatesetup is needed.\n") | |
| 37 _T("You need to be admin on the machine to run this program,\n") | |
| 38 _T("although omaha itself does not need admin to run.")); | |
| 39 } | |
| 40 | |
| 41 // Set the appropriate update dev registry keys. Url, AuCheckPeriodMs | |
| 42 // Start the http server. | |
| 43 // Launch googleupdate. | |
| 44 int _tmain(int argc, TCHAR* argv[]) { | |
| 45 if (argc < 2 || argc > 3) { | |
| 46 PrintUsage(); | |
| 47 return -1; | |
| 48 } | |
| 49 | |
| 50 // TODO(omaha): Remove this requirement. This is needed for now, since we | |
| 51 // need permissions to write the updatedev key to override the url that omaha | |
| 52 // talks to. | |
| 53 if (!omaha::vista_util::IsUserAdmin()) { | |
| 54 PrintUsage(); | |
| 55 return -1; | |
| 56 } | |
| 57 | |
| 58 omaha::CompatibilityTest compat_test; | |
| 59 compat_test.set_config_file(argv[1]); | |
| 60 | |
| 61 bool test_omaha = false; | |
| 62 if (argc == 3) { | |
| 63 compat_test.set_googleupdate_setup_path(argv[2]); | |
| 64 test_omaha = true; | |
| 65 } | |
| 66 return compat_test.Main(test_omaha); | |
| 67 } | |
| 68 | |
| OLD | NEW |