summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 22:56:07 +0000
committerrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 22:56:07 +0000
commit767436a532d7455eafacc75c728565f45936fd02 (patch)
tree396b38f8ed7994fddc97dd7f9d303578e5312230
parentb05c90f8107464ca18d888a251cea7dd7c1b0776 (diff)
downloadchromium_src-767436a532d7455eafacc75c728565f45936fd02.zip
chromium_src-767436a532d7455eafacc75c728565f45936fd02.tar.gz
chromium_src-767436a532d7455eafacc75c728565f45936fd02.tar.bz2
Update archive script to not include rlz.dll unless we are building Google Chrome.
BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1065 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/installer/mini_installer/chrome.release6
-rw-r--r--chrome/tools/build/win/create_installer_archive.py36
-rw-r--r--chrome/tools/build/win/release.rules2
3 files changed, 33 insertions, 11 deletions
diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release
index e9fc438..2eeb953 100644
--- a/chrome/installer/mini_installer/chrome.release
+++ b/chrome/installer/mini_installer/chrome.release
@@ -27,14 +27,16 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-[FILES]
+[GENERAL]
chrome.exe: %(ChromeDir)s\
wow_helper.exe: %(ChromeDir)s\
Dictionaries\en-US.bdic: %(ChromeDir)s\Dictionaries
-rlz.dll: %(VersionDir)s\
chrome.dll: %(VersionDir)s\
icudt38.dll: %(VersionDir)s\
Themes\default.dll: %(VersionDir)s\Themes
locales\*.dll: %(VersionDir)s\Locales
Resources\Inspector\*.*: %(VersionDir)s\Resources\Inspector
Resources\Inspector\Images\*.*: %(VersionDir)s\Resources\Inspector\Images
+
+[GOOGLE_CHROME]
+rlz.dll: %(VersionDir)s\
diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py
index 5f32472..55ef3d2 100644
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -113,15 +113,32 @@ def MakeStagingDirectory(output_dir):
os.makedirs(file_path)
return file_path
-
-def CopyFilesToStagingDir(config, staging_dir, output_dir):
- """Copies files required for installer archive to staging dir.
+def CopyAllFilesToStagingDir(config, distribution, staging_dir, output_dir):
+ """Copies the files required for installer archive.
+ Copies all common files required for various distributions of Chromium and
+ also files for the specific Chromium build specified by distribution.
+ """
+ # TODO(rahulk) remove the line below once we have setup environment variable
+ # CHROMIUM_BUILD on buildbots appropriately.
+ distribution = '_google_chrome'
+ CopySectionFilesToStagingDir(config, 'GENERAL', staging_dir, output_dir)
+ if distribution:
+ if len(distribution) > 1 and distribution[0] == '_':
+ distribution = distribution[1:]
+ CopySectionFilesToStagingDir(config, distribution.upper(),
+ staging_dir, output_dir)
+
+
+def CopySectionFilesToStagingDir(config, section, staging_dir, output_dir):
+ """Copies installer archive files specified in section to staging dir.
+ This method copies reads section from config file and copies all the files
+ specified to staging dir.
"""
- for option in config.options('FILES'):
+ for option in config.options(section):
if option.endswith('dir'):
continue
- dst = os.path.join(staging_dir, config.get('FILES', option))
+ dst = os.path.join(staging_dir, config.get(section, option))
if not os.path.exists(dst):
os.makedirs(dst)
for file in glob.glob(os.path.join(output_dir, option)):
@@ -243,10 +260,11 @@ def main(options):
staging_dir = MakeStagingDirectory(options.output_dir)
- CopyFilesToStagingDir(config, staging_dir, options.output_dir)
+ CopyAllFilesToStagingDir(config, options.distribution,
+ staging_dir, options.output_dir)
- # Name of the archive file built (for example - chrome.lz or
- # patch-<old_version>-<new_version>.lz or patch-<new_version>.lz
+ # Name of the archive file built (for example - chrome.7z or
+ # patch-<old_version>-<new_version>.7z or patch-<new_version>.7z
archive_file_name = CreateArchiveFile(options.output_dir, staging_dir,
current_version, options.last_chrome_installer,
options.last_chrome_version, options.rebuild_archive)
@@ -259,6 +277,8 @@ if '__main__' == __name__:
option_parser = optparse.OptionParser()
option_parser.add_option('-o', '--output_dir', help='Output directory')
option_parser.add_option('-i', '--input_file', help='Input file')
+ option_parser.add_option('-d', '--distribution',
+ help='Name of Chromium Distribution. Optional.')
option_parser.add_option('-r', '--rebuild_archive', action='store_true',
default=False, help='Rebuild Chrome.7z archive, even if it exists.')
option_parser.add_option('-l', '--last_chrome_installer',
diff --git a/chrome/tools/build/win/release.rules b/chrome/tools/build/win/release.rules
index 3d5c94e..8c4170d 100644
--- a/chrome/tools/build/win/release.rules
+++ b/chrome/tools/build/win/release.rules
@@ -7,7 +7,7 @@
<CustomBuildRule
Name="create installer archive"
DisplayName="create installer archive"
- CommandLine="$(SolutionDir)..\third_party\python_24\python.exe $(SolutionDir)tools\build\win\create_installer_archive.py --output_dir=&quot;$(OutDir)&quot; --input_file=&quot;$(InputPath)&quot; [LastChromeInstaller] [LastChromeVersion] [RebuildArchive]"
+ CommandLine="$(SolutionDir)..\third_party\python_24\python.exe $(SolutionDir)tools\build\win\create_installer_archive.py --output_dir=&quot;$(OutDir)&quot; --input_file=&quot;$(InputPath)&quot; --distribution=$(CHROMIUM_BUILD) [LastChromeInstaller] [LastChromeVersion] [RebuildArchive]"
Outputs="$(OutDir)/$(InputName).7z;$(OutDir)/$(InputName).packed.7z;$(OutDir)/setup.ex_;$(OutDir)/packed_files.txt;"
AdditionalDependencies="$(SolutionDir)\tools\build\win\create_installer_archive.py;$(OutDir)\chrome.exe;$(OutDir)\crash_reporter.exe;$(OutDir)\chrome.dll;$(OutDir)\locales\en-US.dll;$(OutDir)\icudt38.dll"
FileExtensions="*.release"