Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: enterprise/installer/build.scons

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « enterprise/installer/__init__.py ('k') | enterprise/installer/build_enterprise_installer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python2.4
2 #
3 # Copyright 2009-2010 Google Inc.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ========================================================================
17
18 """ Build enterprise installers examples.
19
20 This file contains the product-specific information for building an
21 MSI for remote installation in the enterprise. Product teams should only
22 need to modify this file.
23 APPTEAMS:
24 There are two ways to build such an MSI depending on whether the product's
25 installer is or contains an MSI.
26 """
27
28 Import('env')
29
30 import urllib
31 from enterprise.installer import build_enterprise_installer
32
33 # APPTEAMS: Change this value to False.
34 # Build the installer using build rules specific to Google Update builds.
35 BUILDING_WITH_GOOGLE_UPDATE = True
36
37 # We need to build the custom_actions dll.
38 env.BuildSConscript('custom_actions')
39
40 if BUILDING_WITH_GOOGLE_UPDATE and not env.Bit('no-tests'):
41 env.BuildSConscript('test')
42
43 # APPTEAMS:
44 # Note about versions: Each released build needs to have a different Build
45 # number in the version "Major.Minor.Build.Qfe". The Qfe is ignored by MSI and
46 # only increasing it may cause both the old and new versions of the this MSI
47 # to exist side-by-side (http://msdn.microsoft.com/en-us/library/aa370859.aspx).
48
49 # Custom action DLL name.
50 # Set this to the path to the DLL containing the error display custom action.
51 CUSTOM_ACTION_DLL = ('$STAGING_DIR/show_error_action.dll')
52
53 #
54 # Applications with EXE installers
55 #
56 # Use this section to build an MSI that contains Google Update and a product's
57 # EXE installer. The EXE may not use an MSI installer internally.
58 # MSI installers cannot be wrapped in this way because nested MSI installs are
59 # discouraged, problematic, and deprecated from WiX.
60
61 # APPTEAMS: Make appropriate call to BuildEnterpriseInstaller(). Example below.
62
63 # This sample:
64 # * Builds multiple "products" (each product is actually a different version).
65 # Products are specified in an array of structures, which specify the values
66 # for each product.
67 # * Builds multiple pre-tagged brands and ap values for each "product."
68 def _BuildSampleForTest():
69 ENTERPRISE_INSTALLER_PRODUCTS = [
70 ('Save Arguments', '0.1.2.0', '{7DD1EF7B-D075-47c0-BD51-F624ED87CCF0}',
71 '&brand=mkfi',
72 '$MAIN_DIR/testing/unittest_support/SaveArguments.exe',
73 '/install 0.1.2.0', '/donotregister', '/silentuninstall 0.1.2.0',
74 CUSTOM_ACTION_DLL,
75 'SaveArguments_Enterprise_Installer_0.1.2.0'),
76 ('Save Arguments', '0.1.3.0', '{7DD1EF7B-D075-47c0-BD51-F624ED87CCF0}',
77 '&brand=mkfi',
78 '$MAIN_DIR/testing/unittest_support/SaveArguments.exe',
79 '/install 0.1.3.0', '/donotregister', '/silentuninstall 0.1.3.0',
80 CUSTOM_ACTION_DLL,
81 'SaveArguments_Enterprise_Installer_0.1.3.0'),
82 ]
83
84 # Example of calling BuildEnterpriseInstaller with multiple brands and ap
85 # value combinations for each product.
86 BRAND_AP_COMBINATIONS = [
87 ('FOOB', 'foobar'),
88 #('ENTA', 'enterprise'),
89 #('ENTB', 'enterprise'),
90 ]
91
92 # Omaha only: Build the enterprise installer for each version of Omaha.
93 for omaha_version_info in env['omaha_versions_info']:
94 prefix = omaha_version_info.filename_prefix
95
96 for combo in BRAND_AP_COMBINATIONS:
97 for product in ENTERPRISE_INSTALLER_PRODUCTS:
98 (product_name, product_version, product_guid,
99 product_custom_params,
100 product_installer_path,
101 product_installer_install_command,
102 product_installer_disable_update_registration_arg,
103 product_uninstaller_additional_args,
104 show_error_action_dll,
105 msi_base_name) = product
106
107 product_custom_params = '&brand=' + combo[0] + '&ap=' + combo[1]
108
109 build_enterprise_installer.BuildEnterpriseInstaller(
110 env,
111 product_name, product_version, product_guid,
112 product_custom_params,
113 product_installer_path,
114 product_installer_install_command,
115 product_installer_disable_update_registration_arg,
116 product_uninstaller_additional_args,
117 prefix + msi_base_name + '_' + combo[0],
118 '$MAIN_DIR/enterprise/installer',
119 show_error_action_dll,
120 '$STAGING_DIR/%sGoogleUpdateSetup.exe' % prefix,
121 output_dir = '$TARGET_ROOT/Test_Installers'
122 )
123
124 # Builds a sample enterprise installer based on a standalone installer.
125 # TODO(omaha): Use a standalone installer that does not wrap an MSI. This
126 # mechanism is not intended to be used for apps that use MSI installers.
127 # As is, Omaha tries to install the MSI but fails because the Windows
128 # Installer is busy. It takes a long time to fail because Omaha retries.
129 # TODO(omaha): This is a bad example because it uses MSI. See above.
130 def _BuildSampleStandaloneForTest():
131 # Omaha only: Build the enterprise installer for each version of Omaha.
132 for omaha_version_info in env['omaha_versions_info']:
133 prefix = omaha_version_info.filename_prefix
134
135 msi_base_name = 'TestFoo_Installer_1.0.101.0'
136 BRAND = 'ENTC'
137 AP = 'enterprise-C'
138 product_custom_params = '&brand=' + BRAND + '&ap=' + AP
139
140 # Sample installer data, encoded for the command line. This sample uses a
141 # JSON format but the format is app-specific.
142 product_installer_data = (
143 '{"enterprise":{"param1":true,"param2":true},"value1":"foo"}')
144 product_installer_data = urllib.quote(product_installer_data)
145
146 build_enterprise_installer.BuildEnterpriseInstallerFromStandaloneInstaller(
147 env,
148 'Test Foo',
149 '1.0.101.0',
150 '{D6B08267-B440-4c85-9F79-E195E80D9937}',
151 product_custom_params,
152 '/silentuninstall',
153 product_installer_data,
154 ('$TARGET_ROOT/Test_Installers/' +
155 '%sUNOFFICIAL_TestFooStandaloneInstaller.exe' % (prefix)),
156 CUSTOM_ACTION_DLL,
157 prefix + msi_base_name + '_' + BRAND,
158 '$MAIN_DIR/enterprise/installer',
159 output_dir = '$TARGET_ROOT/Test_Installers'
160 )
161
162 if BUILDING_WITH_GOOGLE_UPDATE:
163 _BuildSampleForTest()
164 _BuildSampleStandaloneForTest()
165
166
167 #
168 # Applications with MSI installers
169 #
170 # To bundle Google Update with a product that has an MSI installer:
171 # * Build a .wixobj that contains the Google Update installation fragment
172 # by calling BuildGoogleUpdateFragment().
173 # * Include the ComponentGoogleUpdate component in the appropriate feature in
174 # the product's WiX code.
175 #
176 # For an example, see instances of "enterprise" in the following files:
177 # omaha/test/test_foo.wxs.xml
178 # omaha/test/build.scons
OLDNEW
« no previous file with comments | « enterprise/installer/__init__.py ('k') | enterprise/installer/build_enterprise_installer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698