diff --git a/build/mac/build_scripts/MozillaBuildList.pm b/build/mac/build_scripts/MozillaBuildList.pm index de5fcf0c7dc..ae202d13bfb 100644 --- a/build/mac/build_scripts/MozillaBuildList.pm +++ b/build/mac/build_scripts/MozillaBuildList.pm @@ -356,9 +356,9 @@ sub DumpChromeToTemp($$$$) #// Pick up an embedding manifest specified by $jar_file. We first need to do some extra processing on #// it to get the correct locale. #//-------------------------------------------------------------------------------------------------- -sub ProcessEmbedJarManifest ( $$$$$$ ) +sub ProcessEmbedJarManifest ( $$$$$$$ ) { - my($top_path, $inc_path, $temp_chrome_dir, $jar_file, $locale, $jars) = @_; + my($top_path, $inc_path, $temp_chrome_dir, $jar_file, $locale, $platform, $jars) = @_; # copy over our manifest so that it's also at the root # of our chrome tree then run it through the jar machine. We need to @@ -368,7 +368,7 @@ sub ProcessEmbedJarManifest ( $$$$$$ ) local(*TMPMANIFEST); open(TMPMANIFEST, ">$temp_manifest") || die "couldn't create embed jar manifest"; GenerateManifest::GenerateManifest($top_path, "$inc_path$jar_file", $temp_chrome_dir, - $locale, *TMPMANIFEST, ":", 1); + $locale, $platform, *TMPMANIFEST, ":", 1); close(TMPMANIFEST); CreateJarFromManifest($temp_manifest, "$temp_chrome_dir:", $jars); @@ -430,7 +430,7 @@ sub PackageEmbeddingChrome($$) local(*MANIFEST); open(MANIFEST, ">$temp_manifest") || die "couldn't create embed jar manifest"; GenerateManifest::GenerateManifest($top_path, $inc_path . "embed-jar.mn", $temp_chrome_dir, - "en-US", *MANIFEST, ":", 1); + "en-US", "en-mac", *MANIFEST, ":", 1); close(MANIFEST); # make embed.jar from the above manifest, adding in any other manifests if the @@ -438,10 +438,10 @@ sub PackageEmbeddingChrome($$) my(%jars); CreateJarFromManifest($temp_manifest, "$temp_chrome_dir:", \%jars); if ($main::options{embedding_xulprefs}) { - ProcessEmbedJarManifest($top_path, $inc_path, $temp_chrome_dir, "xulprefs.mn", "en-US", \%jars); + ProcessEmbedJarManifest($top_path, $inc_path, $temp_chrome_dir, "xulprefs.mn", "en-US", "en-mac", \%jars); } if ($main::options{embedding_xulsecurity}) { - ProcessEmbedJarManifest($top_path, $inc_path, $temp_chrome_dir, "xulsecurity.mn", "en-US", \%jars); + ProcessEmbedJarManifest($top_path, $inc_path, $temp_chrome_dir, "xulsecurity.mn", "en-US", "en-mac", \%jars); } WriteOutJarFiles("$temp_chrome_dir:", \%jars); diff --git a/embedding/browser/powerplant/source/CBrowserApp.cp b/embedding/browser/powerplant/source/CBrowserApp.cp index da27bef1b30..b5d37b413b3 100644 --- a/embedding/browser/powerplant/source/CBrowserApp.cp +++ b/embedding/browser/powerplant/source/CBrowserApp.cp @@ -76,6 +76,7 @@ #include "nsNetUtil.h" #include "nsIWindowWatcher.h" #include "nsIDOMWindow.h" +#include "nsIDownload.h" #include @@ -311,6 +312,21 @@ CBrowserApp::OverrideComponents() PR_TRUE); // replace existing #endif + static NS_DEFINE_CID(kDownloadCID, NS_DOWNLOAD_CID); + nsCOMPtr dlFactory; + nsComponentManager::FindFactory(kDownloadCID, getter_AddRefs(dlFactory)); + rv = nsComponentManager::RegisterFactory(kDownloadCID, + "Download", + NS_DOWNLOAD_CONTRACTID, + dlFactory, + PR_TRUE); // replace existing + + static NS_DEFINE_CID(kDownloadCID, NS_DOWNLOAD_CONTRACTID); + rv = nsComponentManager::RegisterFactory(kDownloadCID, + "Download", + NS_DOWNLOAD_CONTRACTID, + downloadFactory, + PR_TRUE); // replace existing return rv; } diff --git a/embedding/components/ui/helperAppDlg/nsHelperAppDlg.xul b/embedding/components/ui/helperAppDlg/nsHelperAppDlg.xul index 19b7a5094fc..ef90ddb0978 100644 --- a/embedding/components/ui/helperAppDlg/nsHelperAppDlg.xul +++ b/embedding/components/ui/helperAppDlg/nsHelperAppDlg.xul @@ -24,7 +24,7 @@ --> - + diff --git a/embedding/config/GenerateManifest.pm b/embedding/config/GenerateManifest.pm index a234f132d17..502798542d3 100644 --- a/embedding/config/GenerateManifest.pm +++ b/embedding/config/GenerateManifest.pm @@ -19,12 +19,12 @@ use vars qw(@ISA @EXPORT); my(%embed_files) = (); -sub GenerateManifest ($$$$$$$) { - my($moz, $manifest, $chrome, $locale, $out_desc, $dir_sep, $verbose) = @_; +sub GenerateManifest ($$$$$$$$) { + my($moz, $manifest, $chrome, $locale, $platform, $out_desc, $dir_sep, $verbose) = @_; local(*OUTDESC) = $out_desc; parse_input_manifest($moz, $manifest, $chrome, $locale, $verbose); - dump_output_manifest($moz, $manifest, $chrome, $locale, *OUTDESC, $dir_sep, $verbose); + dump_output_manifest($moz, $manifest, $chrome, $locale, $platform, *OUTDESC, $dir_sep, $verbose); } @@ -60,8 +60,8 @@ sub parse_input_manifest ($$$$$) { close(MANIFEST); } -sub dump_output_manifest ($$$$$$$) { - my($moz, $manifest, $chrome, $locale, $out_desc, $dir_sep, $verbose) = @_; +sub dump_output_manifest ($$$$$$$$) { + my($moz, $manifest, $chrome, $locale, $platform, $out_desc, $dir_sep, $verbose) = @_; local(*OUTDESC) = $out_desc; print OUTDESC "embed.jar:\n"; @@ -69,6 +69,8 @@ sub dump_output_manifest ($$$$$$$) { $key =~ s/XXXX/$locale/g; $value =~ s/XXXX/$locale/g; + $key =~ s/YYYY/$platform/g; + $value =~ s/YYYY/$platform/g; if ( $dir_sep ne "/" ) { # swap / for $dir_sep $value =~ s/\//$dir_sep/g; } diff --git a/embedding/config/basebrowser-mac-cfm b/embedding/config/basebrowser-mac-cfm index f07b8e4a209..b28f79c06ad 100644 --- a/embedding/config/basebrowser-mac-cfm +++ b/embedding/config/basebrowser-mac-cfm @@ -183,6 +183,14 @@ Components:appcomps.shlb Components:mozcomps.xpt Components:mork.shlb +; download progress +; Optional - you can implement your own download progress dialog +; then this is no longer required +Components:nsProgressDialog.js +Components:nsHelperAppDlg.js +Components:nsDownloadProgressListener.js +Components:downloadmanager.xpt + ; rdf Components:RDFLibrary.shlb Components:rdf.xpt diff --git a/embedding/config/basebrowser-mac-cfmDebug b/embedding/config/basebrowser-mac-cfmDebug index 8c14dc31b6a..d0e71c71776 100644 --- a/embedding/config/basebrowser-mac-cfmDebug +++ b/embedding/config/basebrowser-mac-cfmDebug @@ -183,6 +183,14 @@ Components:appcompsDebug.shlb Components:mozcomps.xpt Components:morkDebug.shlb +; download progress +; Optional - you can implement your own download progress dialog +; then this is no longer required +Components:nsProgressDialog.js +Components:nsHelperAppDlg.js +Components:nsDownloadProgressListener.js +Components:downloadmanager.xpt + ; rdf Components:RDFLibraryDebug.shlb Components:rdf.xpt diff --git a/embedding/config/basebrowser-mac-macho b/embedding/config/basebrowser-mac-macho index 8e04962991a..4a1533a4b67 100644 --- a/embedding/config/basebrowser-mac-macho +++ b/embedding/config/basebrowser-mac-macho @@ -158,6 +158,14 @@ components/profile.xpt components/libwallet.dylib components/wallet.xpt +; download progress +; Optional - you can implement your own download progress dialog +; then this is no longer required +;components/nsProgressDialog.js +;components/nsHelperAppDlg.js +;components/nsDownloadProgressListener.js +;components/downloadmanager.xpt + ; psm2 ; Optional - only if you need PSM2 support components/libpipboot.dylib diff --git a/embedding/config/basebrowser-unix b/embedding/config/basebrowser-unix index 667be47382e..43f8e1bd1fb 100644 --- a/embedding/config/basebrowser-unix +++ b/embedding/config/basebrowser-unix @@ -169,6 +169,14 @@ components/profile.xpt components/libwallet.so components/wallet.xpt +; download progress +; Optional - you can implement your own download progress dialog +; then this is no longer required +;components/nsProgressDialog.js +;components/nsHelperAppDlg.js +;components/nsDownloadProgressListener.js +;components/downloadmanager.xpt + ; psm2 ; Optional - only if you need PSM2 support components/libpipboot.so diff --git a/embedding/config/basebrowser-win b/embedding/config/basebrowser-win index 400ab1ec434..ef9fa7765ef 100644 --- a/embedding/config/basebrowser-win +++ b/embedding/config/basebrowser-win @@ -186,6 +186,14 @@ components\profile.xpt components\wallet.dll components\wallet.xpt +; download progress +; Optional - you can implement your own download progress dialog +; then this is no longer required +;components\nsProgressDialog.js +;components\nsHelperAppDlg.js +;components\nsDownloadProgressListener.js +;components\downloadmanager.xpt + ; psm2 ; Optional - only if you need PSM2 support components\pipboot.dll diff --git a/embedding/config/embed-jar.mn b/embedding/config/embed-jar.mn index a4b0e06c35c..521dc2b3da2 100644 --- a/embedding/config/embed-jar.mn +++ b/embedding/config/embed-jar.mn @@ -29,8 +29,8 @@ locale/XXXX/communicator/contents.rdf, XXXX/locale/XXXX/communicator/contents.rd locale/XXXX/communicator/security.properties, XXXX/locale/XXXX/communicator/security.properties locale/XXXX/communicator/security/caps.properties, XXXX/locale/XXXX/communicator/security/caps.properties locale/XXXX/navigator, XXXX/locale/XXXX/navigator -locale/XXXX/navigator-platform, en-unix/locale/XXXX/navigator-platform -locale/XXXX/global-platform, en-unix/locale/XXXX/global-platform +locale/XXXX/navigator-platform, YYYY/locale/XXXX/navigator-platform +locale/XXXX/global-platform, YYYY/locale/XXXX/global-platform locale/XXXX/communicator/layout, XXXX/locale/XXXX/communicator/layout locale/XXXX/forms, XXXX/locale/XXXX/forms diff --git a/embedding/config/gen_mn.pl b/embedding/config/gen_mn.pl index 3c1eac93c86..7d60a24c396 100644 --- a/embedding/config/gen_mn.pl +++ b/embedding/config/gen_mn.pl @@ -13,6 +13,7 @@ use Getopt::Long; # Configuration $win32 = ($^O eq "MSWin32") ? 1 : 0; # ActiveState Perl +$darwin = ($^O eq "darwin") ? 1 : 0; # MacOSX if ($win32) { $moz = "$ENV{'MOZ_SRC'}/mozilla"; if ($ENV{'MOZ_DEBUG'}) { @@ -30,6 +31,7 @@ else { $verbose = 0; $locale = "en-US"; +$platform = "en-unix"; GetOptions('verbose!' => \$verbose, 'mozpath=s' => \$moz, @@ -42,6 +44,10 @@ if ($win32) { # Fix those pesky backslashes $moz =~ s/\\/\//g; $chrome =~ s/\\/\//g; + $platform = "en-win"; +} +elsif ($darwin) + $platform = "en-mac" } if ($showhelp) { @@ -66,6 +72,6 @@ if ($verbose) { "Manifest file = \"$manifest\"\n"; } -GenerateManifest($moz, $manifest, $chrome, $locale, *STDOUT, "/", $verbose); +GenerateManifest($moz, $manifest, $chrome, $locale, $platform, *STDOUT, "/", $verbose); exit 0;