From 62c8b05ff79462c08d559ee9a20c41e890dbab73 Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Mon, 9 Jul 2001 22:49:55 +0000 Subject: [PATCH] NOT PART OF BUILD. Embedding manifest generator. b=83393 --- embedding/config/gen_mn.pl | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 embedding/config/gen_mn.pl diff --git a/embedding/config/gen_mn.pl b/embedding/config/gen_mn.pl new file mode 100644 index 00000000000..9fb47ca4a46 --- /dev/null +++ b/embedding/config/gen_mn.pl @@ -0,0 +1,75 @@ +#!/usr/bin/perl + +use Getopt::Long; +use File::stat; + +# Configuration +$win32 = ($^O eq "MSWin32") ? 1 : 0; # ActiveState Perl +if ($win32) { + print ("This may not work on Win32!\n"); + $moz = "$ENV{'MOZ_SRC'}/mozilla"; +} +else { + $moz = "~/mozilla"; +} + +$chrome = "$moz/dist/Embed/tmpchrome"; +$locale = "en-US"; + +GetOptions('mozpath=s' => \$moz, + 'chrome=s' => \$chrome, + 'locale=s' => \$locale, + 'help' => \$showhelp); + +if ($showhelp) { + print STDERR "Embedding manifest generator\n", + "Usage:\n", + " -help Show this help.\n", + " -mozpath Specify the path to Mozilla.\n", + " -chrome Specify the path to the chrome.\n", + " -locale Specify the chrome locale to use.\n"; + exit 1; +} + + +%embed_files = ( + "content/global/", "$chrome/toolkit/content/global/", + "skin/clasic/global/", "$chrome/classic/skin/classic/global/", + "skin/classic/communicator/contents.rdf", "$chrome/classic/skin/classic/communicator/contents.rdf", +# "skin/classic/communicator/dialogOverlay.css", "$chrome/classic/skin/classic/communicator/dialogOverlay.css", +# "skin/classic/communicator/smallheader-bg.gif", "$chrome/classic/skin/classic/communicator/smallheader-bg.gif", + # Locale stuff + "locale/$locale/global/", "$chrome/$locale/local/$locale/global/", + "locale/$locale/necko/contents.rdf", "$chrome/$locale/locale/$locale/necko/contents.rdf", + "locale/$locale/necko/necko.properties", "$chrome/$locale/locale/$locale/necko/necko.properties", + "locale/$locale/necko/redirect_loop.dtd", "$chrome/$locale/locale/$locale/necko/redirect_loop.dtd", + "locale/$locale/communicator/contents.rdf", "$chrome/$locale/locale/$locale/communicator/contents.rdf", + "locale/$locale/communicator/security.properties", "$chrome/$locale/locale/$locale/communicator/security.properties", + # Help stuff +# "content/help/", "help/content/help/", +# "skin/classic/communicator/help.css", "classic/skin/classic/communicator/help.css", +); + +print "embed.jar:\n"; +while (($key, $value) = each %embed_files) { + open (FILES, "ls -1 $value 2>/dev/null |") or die("Cannot list \"$value\"\n"); + while () { + chomp; + + + if (substr($value, $#value) eq '/') { + $chrome_file = "$key$_"; + $real_file = "$value$_"; + } + else { + $chrome_file = $key; + $real_file = $value; + } + + if (! -d $real_file) { + $real_file =~ s/$chrome\///g; + print " $chrome_file ($real_file)\n"; + } + } +} +