From 767436a532d7455eafacc75c728565f45936fd02 Mon Sep 17 00:00:00 2001 From: "rahulk@google.com" Date: Tue, 19 Aug 2008 22:56:07 +0000 Subject: 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 --- chrome/installer/mini_installer/chrome.release | 6 ++-- chrome/tools/build/win/create_installer_archive.py | 36 +++++++++++++++++----- chrome/tools/build/win/release.rules | 2 +- 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--.lz or patch-.lz + # Name of the archive file built (for example - chrome.7z or + # patch--.7z or patch-.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 @@