OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file contains the definitions of the installer functions that build | 5 // This file contains the definitions of the installer functions that build |
6 // the WorkItemList used to install the application. | 6 // the WorkItemList used to install the application. |
7 | 7 |
8 #include "chrome/installer/setup/install_worker.h" | 8 #include "chrome/installer/setup/install_worker.h" |
9 | 9 |
10 #include <oaidl.h> | 10 #include <oaidl.h> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 temp_path.value(), WorkItem::ALWAYS); | 109 temp_path.value(), WorkItem::ALWAYS); |
110 } | 110 } |
111 | 111 |
112 if (archive_path != archive_dst) { | 112 if (archive_path != archive_dst) { |
113 // In the past, we copied rather than moved for system level installs so | 113 // In the past, we copied rather than moved for system level installs so |
114 // that the permissions of %ProgramFiles% would be picked up. Now that | 114 // that the permissions of %ProgramFiles% would be picked up. Now that |
115 // |temp_path| is in %ProgramFiles% for system level installs (and in | 115 // |temp_path| is in %ProgramFiles% for system level installs (and in |
116 // %LOCALAPPDATA% otherwise), there is no need to do this for the archive. | 116 // %LOCALAPPDATA% otherwise), there is no need to do this for the archive. |
117 // Setup.exe, on the other hand, is created elsewhere so it must always be | 117 // Setup.exe, on the other hand, is created elsewhere so it must always be |
118 // copied. | 118 // copied. |
119 // The archive is usually extracted in |temp_path| in which case we want to | |
120 // move it as mentionned above; however if it is not in |temp_path| (e.g. in | |
robertshield
2012/08/17 16:46:56
nit: mentioned
gab
2012/08/17 17:01:36
Oops didn't realize I'd left this comment there...
| |
121 // developer (component) builds where we use the archive directly from | |
122 // the build output), copy it instead of moving it). | |
123 #if !defined(COMPONENT_BUILD) | |
119 install_list->AddMoveTreeWorkItem(archive_path.value(), archive_dst.value(), | 124 install_list->AddMoveTreeWorkItem(archive_path.value(), archive_dst.value(), |
120 temp_path.value(), WorkItem::ALWAYS_MOVE); | 125 temp_path.value(), WorkItem::ALWAYS_MOVE); |
126 #else // COMPONENT_BUILD | |
127 // In the component build setup.exe uses chrome.7z directly, moving it means | |
128 // that setup.exe cannot be ran again without regenerating the archive, so | |
robertshield
2012/08/17 16:46:56
ran -> run
gab
2012/08/17 17:01:36
Done.
| |
129 // copy it instead to save developer time. | |
130 install_list->AddCopyTreeWorkItem(archive_path.value(), archive_dst.value(), | |
131 temp_path.value(), WorkItem::ALWAYS); | |
132 #endif // COMPONENT_BUILD | |
121 } | 133 } |
122 } | 134 } |
123 | 135 |
124 // This method adds work items to create (or update) Chrome uninstall entry in | 136 // This method adds work items to create (or update) Chrome uninstall entry in |
125 // either the Control Panel->Add/Remove Programs list or in the Omaha client | 137 // either the Control Panel->Add/Remove Programs list or in the Omaha client |
126 // state key if running under an MSI installer. | 138 // state key if running under an MSI installer. |
127 void AddUninstallShortcutWorkItems(const InstallerState& installer_state, | 139 void AddUninstallShortcutWorkItems(const InstallerState& installer_state, |
128 const FilePath& setup_path, | 140 const FilePath& setup_path, |
129 const Version& new_version, | 141 const Version& new_version, |
130 WorkItemList* install_list, | 142 WorkItemList* install_list, |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1577 machine_state, | 1589 machine_state, |
1578 setup_path, | 1590 setup_path, |
1579 new_version, | 1591 new_version, |
1580 work_item_list, | 1592 work_item_list, |
1581 false, // have_child_product | 1593 false, // have_child_product |
1582 cmd_line, | 1594 cmd_line, |
1583 kCmdQuickEnableApplicationHost); | 1595 kCmdQuickEnableApplicationHost); |
1584 } | 1596 } |
1585 | 1597 |
1586 } // namespace installer | 1598 } // namespace installer |
OLD | NEW |