mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
package download progress on mac for embedding. fix jar manifest to not pull en-unix on every platform. r=bryner/sr=ben/a=rjesup. bug#134523
This commit is contained in:
parent
2cd6213ca5
commit
89cccb0e97
@ -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);
|
||||
|
||||
|
@ -76,6 +76,7 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDownload.h"
|
||||
|
||||
#include <TextServices.h>
|
||||
|
||||
@ -311,6 +312,21 @@ CBrowserApp::OverrideComponents()
|
||||
PR_TRUE); // replace existing
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kDownloadCID, NS_DOWNLOAD_CID);
|
||||
nsCOMPtr<nsIFactory> 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;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user