Bug 475986. Make text-align:start work on <html:th> correctly. r+sr=dbaron
[mozilla-central.git] / embedding / config / gen_mn.pl
blob9e8ded245a548cf74814e121117fc6abf41a5220
1 #!/usr/bin/perl
3 #################################################################
4 # Rest of program
6 # get requirements from the same dir as the script
7 if ($^O ne "cygwin") {
8 # we'll be pulling in some stuff from the script directory
9 require FindBin;
10 import FindBin;
11 push @INC, $FindBin::Bin;
14 require GenerateManifest;
15 import GenerateManifest;
16 use Getopt::Long;
18 # Configuration
19 $win32 = 0;
20 $darwin = 0;
21 for ($^O) {
22 if (/((MS)?win32)|cygwin/i) {
23 $win32 = 1;
25 elsif (/darwin/i) {
26 $darwin = 1;
29 if ($win32) {
30 $moz = "$ENV{'MOZ_SRC'}/mozilla";
31 if ($ENV{'MOZ_DEBUG'}) {
32 $chrome = "$moz/dist/WIN32_D.OBJ/Embed/tmpchrome";
34 else
36 $chrome = "$moz/dist/WIN32_O.OBJ/Embed/tmpchrome";
39 else {
40 $moz = "~/mozilla";
41 $chrome = "$moz/dist/Embed/tmpchrome";
44 $verbose = 0;
45 $locale = "en-US";
46 $platform = "en-unix";
48 GetOptions('verbose!' => \$verbose,
49 'mozpath=s' => \$moz,
50 'manifest=s' => \$manifest,
51 'chrome=s' => \$chrome,
52 'locale=s' => \$locale,
53 'help' => \$showhelp);
55 if ($win32) {
56 # Fix those pesky backslashes
57 $moz =~ s/\\/\//g;
58 $chrome =~ s/\\/\//g;
59 $platform = "en-win";
61 elsif ($darwin) {
62 $platform = "en-mac"
65 if ($showhelp) {
66 print STDERR "Embedding manifest generator.\n",
67 "Usage:\n",
68 " -help Show this help.\n",
69 " -manifest <file> Specify the input manifest.\n",
70 " -mozpath <path> Specify the path to Mozilla.\n",
71 " -chrome <path> Specify the path to the chrome.\n",
72 " -locale <value> Specify the locale to use. (e.g. en-US)\n",
73 " -verbose Print extra information\n";
74 exit 1;
77 if ($manifest eq "") {
78 die("Error: No input manifest file was specified.\n");
81 if ($verbose) {
82 print STDERR "Mozilla path = \"$moz\"\n",
83 "Chrome path = \"$chrome\"\n",
84 "Manifest file = \"$manifest\"\n";
87 GenerateManifest($moz, $manifest, $chrome, $locale, $platform, *STDOUT, "/", $verbose);
89 exit 0;