Jar packaging fixup - changes by warren. Looked at by dveditz and ssu.

r=vishy. verified this solution works for mozilla, commercial and shrimp.
dont have bug number handy but this should be world++. basically from
now on, jar.mn rules will both create the jar and publish the flat files
to dist. the flat files are needed so that installers can compose the
files into a new naming system or delete some or whatever.
This commit is contained in:
vishy%netscape.com 2000-09-14 04:45:15 +00:00
Родитель 61bd6d21c1
Коммит 6fbb9dbc07
22 изменённых файлов: 154 добавлений и 80 удалений

Просмотреть файл

@ -508,5 +508,7 @@ XPTLINK_PROG=$(DIST)\bin\xpt_link.exe
XPIDL_GEN_DIR=.\_xpidlgen
#MOZ_DISABLE_JAR_PACKAGING=1 # temporary
!endif # CONFIG_CONFIG_MAK

Просмотреть файл

@ -64,11 +64,17 @@ sub JarIt
my $indivPath = "$destPath/$indivDir";
MkDirs($indivPath, ".", false);
foreach $file (split(' ', "$args $overrides")) {
foreach $file (split(' ', $args)) {
if ($verbose eq true) {
print "adding individual file $file to dist\n";
}
EnsureFileInDir("$indivPath/$file", $file, false);
EnsureFileInDir("$indivPath/$file", $file, false, false);
}
foreach $file (split(' ', $overrides)) {
if ($verbose eq true) {
print "adding individual file $file to dist\n";
}
EnsureFileInDir("$indivPath/$file", $file, false, true);
}
}
@ -76,6 +82,7 @@ sub JarIt
system "zip -u $destPath/$jarfile $args\n" || die "zip failed";
}
if (!($overrides eq "")) {
print "+++ overriding $overrides\n";
system "zip $destPath/$jarfile $overrides\n" || die "zip failed";
}
@ -163,9 +170,9 @@ sub CopyFile
sub EnsureFileInDir
{
my ($destPath, $srcPath, $doCleanup) = @_;
my ($destPath, $srcPath, $doCleanup, $override) = @_;
if (!-e $destPath) {
if (!-e $destPath || $override eq true) {
my $dir = "";
my $file;
if ($destPath =~ /([\w\d.\-\\\/]+)[\\\/]([\w\d.\-]+)/) {
@ -187,6 +194,9 @@ sub EnsureFileInDir
CopyFile($file, $destPath, $doCleanup);
return 1;
}
# elsif ($doCleanup eq false && -e $destPath) {
# print "!!! file $destPath already exists -- need to add '+' rule to jar.mn\n";
# }
return 0;
}

Просмотреть файл

@ -241,53 +241,6 @@ TMPDIR=$(MOZ_SRC)\tmp
$(TMPDIR):
-mkdir $(TMPDIR)
!ifdef JDIRS
!if defined(JAVA_OR_NSJVM)
#//------------------------------------------------------------------------
#//
#// Rule to recursively make all subdirectories specified by the JDIRS target
#//
#//------------------------------------------------------------------------
export:: $(JAVA_DESTPATH) $(JDIRS)
$(JDIRS):: $(JAVA_DESTPATH) $(TMPDIR)
!if "$(WINOS)" == "WIN95"
JDIRS = $(JDIRS:/=\)
!endif
!if defined(NO_CAFE)
$(JDIRS)::
@echo +++ make: building package: $@
@echo $(JAVAC_PROG) $(JAVAC_FLAGS) > $(TMPDIR)\javac.cfg
-@$(DEPTH)\config\buildpkg $(TMPDIR)\javac.cfg $@
@$(RM) $(TMPDIR)\javac.cfg
# @$(DEPTH)\config\buildpkg $@ $(DEPTH)\dist\classes
!else
# compile using symantec cafe's super-speedy compiler!
$(JDIRS)::
@echo +++ make: building package $@
!if "$(WINOS)" == "WIN95"
-@$(MKDIR) $(DEPTH)\dist\classes\$(@:/=\)
!else
-@$(MKDIR) $(DEPTH)\dist\classes\$@ 2> NUL
!endif
$(MOZ_TOOLS)\bin\sj -classpath $(JAVA_DESTPATH);$(JAVA_SOURCEPATH) \
-d $(JAVA_DESTPATH) $(JAVAC_OPTIMIZER) $@\*.java
!endif # NO_CAFE
clobber clobber_all::
-for %g in ($(JDIRS)) do $(RM_R) $(XPDIST:/=\)/classes/%g
!endif # JAVA_OR_NSJVM
!endif # JDIRS
!if defined(INSTALL_FILE_LIST) && defined(INSTALL_DIR)
#//------------------------------------------------------------------------
#//
@ -324,7 +277,6 @@ LIBRARY=$(OBJDIR)\$(LIBRARY_NAME)$(LIBRARY_SUFFIX).lib
#//
#
# Nasty hack to get around the win95 shell's inability to set
# environment variables whilst in a set of target commands
@ -639,7 +591,7 @@ chrome::
install:: chrome
!ifdef WARREN_JAR_PACKAGING
!ifndef MOZ_DISABLE_JAR_PACKAGING
!if exist($(JAR_MANIFEST))
chrome::
@ -651,7 +603,9 @@ chrome::
-for %t in ($(CHROME_TYPE)) do echo %t,install,url,jar:resource:/chrome/$(CHROME_DIR:\=/).jar!/ >>$(DIST)\bin\chrome\installed-chrome.txt
!endif
!else # WARREN_JAR_PACKAGING
regchrome:
!else # !MOZ_DISABLE_JAR_PACKAGING
################################################################################
# Generate chrome building rules.
@ -800,8 +754,6 @@ chrome::
!endif # chrome
!endif # WARREN_JAR_PACKAGING
regchrome:
!if !defined(MOZ_DISABLE_JAR_PACKAGING)
$(PERL) $(DEPTH)\config\zipchrome.pl win32 update $(DIST)\bin\chrome
@ -812,6 +764,8 @@ regchrome:
# $(PERL) $(DEPTH)\config\installchrome.pl win32 resource $(DIST)\bin\chrome
!endif
!endif # !MOZ_DISABLE_JAR_PACKAGING
################################################################################
# Easier than typing it by hand, works from any directory:

Просмотреть файл

@ -31,6 +31,10 @@
DEPTH =..\..
include <$(DEPTH)\config\config.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS = xul
JSLIBFILES = \
@ -126,5 +130,13 @@ install::
$(MAKE_INSTALL) $(CONTENTFILES) $(INSTALLROOT)\content
$(MAKE_INSTALL) $(SKINFILES) $(INSTALLROOT)\skin
$(MAKE_INSTALL) $(IMAGEFILES) $(INSTALLROOT)\skin\images
$(MAKE_INSTALL) .\js\lib\chatzilla-service.js $(DIST)\bin\components
!else
include <$(DEPTH)\config\rules.mak>
!endif
install::
$(MAKE_INSTALL) .\js\lib\chatzilla-service.js $(DIST)\bin\components

Просмотреть файл

@ -22,6 +22,8 @@
DEPTH=..\..\..
include <$(DEPTH)/config/config.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS = content locale
!endif
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -53,6 +53,10 @@ install:: $(LIBRARY)
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
!ifdef MOZ_DISABLE_JAR_PACKAGING
clobber::
rm -f $(DIST)\bin\chrome\packages\core\communicator\content\wallet\CookieViewer.xul
rm -f $(DIST)\bin\chrome\packages\core\communicator\content\wallet\CookieViewer.js
rm -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet\CookieViewer.properties
@ -63,3 +67,5 @@ install:: $(DLL)
$(MAKE_INSTALL) CookieViewer.js $(DIST)\bin\chrome\packages\core\communicator\content\wallet
$(MAKE_INSTALL) CookieViewer.properties $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet
$(MAKE_INSTALL) CookieViewer.dtd $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet
!endif

Просмотреть файл

@ -53,6 +53,10 @@ install:: $(LIBRARY)
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
!ifdef MOZ_DISABLE_JAR_PACKAGING
clobber::
rm -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet\interview.html
rm -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet\index.html
rm -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet\privacy.html
@ -93,3 +97,5 @@ install:: $(DLL)
$(MAKE_INSTALL) WalletEditor.dtd $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet
$(MAKE_INSTALL) privacy.xul $(DIST)\bin\chrome\packages\core\communicator\content\wallet
$(MAKE_INSTALL) privacy.dtd $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet
!endif

Просмотреть файл

@ -53,6 +53,10 @@ install:: $(LIBRARY)
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
!ifdef MOZ_DISABLE_JAR_PACKAGING
clobber::
rm -f $(DIST)\bin\chrome\packages\core\communicator\content\wallet\SignonViewer.xul
rm -f $(DIST)\bin\chrome\packages\core\communicator\content\wallet\SignonViewer.js
rm -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet\SignonViewer.properties
@ -63,3 +67,5 @@ install:: $(DLL)
$(MAKE_INSTALL) SignonViewer.js $(DIST)\bin\chrome\packages\core\communicator\content\wallet
$(MAKE_INSTALL) SignonViewer.properties $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet
$(MAKE_INSTALL) SignonViewer.dtd $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet
!endif

Просмотреть файл

@ -53,6 +53,10 @@ install:: $(LIBRARY)
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
!ifdef MOZ_DISABLE_JAR_PACKAGING
clobber::
rm -f $(DIST)\bin\chrome\packages\core\communicator\content\wallet\WalletPreview.xul
rm -f $(DIST)\bin\chrome\packages\core\communicator\content\wallet\WalletPreview.js
rm -f $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet\WalletPreview.properties
@ -61,3 +65,5 @@ install:: $(DLL)
$(MAKE_INSTALL) WalletPreview.xul $(DIST)\bin\chrome\packages\core\communicator\content\wallet
$(MAKE_INSTALL) WalletPreview.js $(DIST)\bin\chrome\packages\core\communicator\content\wallet
$(MAKE_INSTALL) WalletPreview.properties $(DIST)\bin\chrome\locales\en-US\communicator\locale\wallet
!endif

Просмотреть файл

@ -21,6 +21,12 @@
DEPTH=..\..
DIRS=public src prefs build resources
include <$(DEPTH)\config\config.mak>
DIRS=public src prefs build
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS=$(DIRS) resources
!endif
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -31,3 +31,4 @@ install::
clobber::
rm -f $(DIST)\bin\chrome\locales\en-US\necko\locale\*.*

Просмотреть файл

@ -21,6 +21,10 @@
DEPTH=..\..
include <$(DEPTH)\config\config.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS=content locale
!endif
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -21,6 +21,10 @@
DEPTH=..\..\..
include <$(DEPTH)\config\config.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS=locale content
!endif
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -22,6 +22,10 @@
DEPTH=..\..
MODULE=profile
include <$(DEPTH)\config\config.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS=locale content
!endif
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -22,18 +22,24 @@
DEPTH=..\..
THEME_ROOT_DEPTH = .
DIRS=communicator editor global messenger navigator
include <$(DEPTH)\config\config.mak>
include <$(THEME_ROOT_DEPTH)\theme.mk>
CHROME_DIR = skins\$(THEME)
CHROME_MISC_DIR = .
CHROME_TYPE = skin
CHROME_DIR = skins\$(THEME)
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS=communicator editor global messenger navigator
CHROME_MISC_DIR = .
CHROME_MISC = \
.\manifest.rdf \
.\preview.png \
$(NULL)
!endif
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -20,9 +20,13 @@
#
DEPTH = ..\..\..\..\..
THEME_ROOT_DEPTH = ..\..\..
include <$(DEPTH)\config\rules.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
THEME_ROOT_DEPTH = ..\..\..
include <$(THEME_ROOT_DEPTH)\theme.mk>
clobber::
@ -35,3 +39,5 @@ install::
$(MAKE_INSTALL) internetresults.css $(DIST)\bin\chrome\skins\$(THEME)\communicator\skin\search
$(MAKE_INSTALL) search-editor.css $(DIST)\bin\chrome\skins\$(THEME)\communicator\skin\search
$(MAKE_INSTALL) search.css $(DIST)\bin\chrome\skins\$(THEME)\communicator\skin\search
!endif

Просмотреть файл

@ -20,9 +20,13 @@
#
DEPTH = ..\..\..\..\..
THEME_ROOT_DEPTH = ..\..\..
include <$(DEPTH)\config\rules.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
THEME_ROOT_DEPTH = ..\..\..
include <$(THEME_ROOT_DEPTH)\theme.mk>
clobber::
@ -34,3 +38,4 @@ install::
$(MAKE_INSTALL) sidebar.css $(DIST)\bin\chrome\skins\$(THEME)\communicator\skin\sidebar
$(MAKE_INSTALL) sidebarBindings.xml $(DIST)\bin\chrome\skins\$(THEME)\communicator\skin\sidebar
!endif

Просмотреть файл

@ -20,9 +20,13 @@
#
DEPTH = ..\..\..\..
THEME_ROOT_DEPTH = ..\..
include <$(DEPTH)\config\rules.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
THEME_ROOT_DEPTH = ..\..
include <$(THEME_ROOT_DEPTH)\theme.mk>
install::
@ -40,3 +44,4 @@ install::
clobber::
rm -f $(DIST)\chrome\$(THEME)\communicator\skin\*.*
!endif

Просмотреть файл

@ -20,9 +20,13 @@
#
DEPTH = ..\..\..\..
THEME_ROOT_DEPTH = ..\..
include <$(DEPTH)\config\rules.mak>
!ifdef MOZ_DISABLE_JAR_PACKAGING
THEME_ROOT_DEPTH = ..\..
include <$(THEME_ROOT_DEPTH)\theme.mk>
clobber::
@ -34,7 +38,6 @@ install::
$(MAKE_INSTALL) checkbox.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) commonDialog.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) console.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) colorpicker.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) filepicker.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) formatting.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) global.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
@ -60,3 +63,5 @@ install::
$(MAKE_INSTALL) question-icon.gif $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) alert-icon.gif $(DIST)\bin\chrome\skins\$(THEME)\global\skin
$(MAKE_INSTALL) dialogOverlay.css $(DIST)\bin\chrome\skins\$(THEME)\global\skin
!endif

Просмотреть файл

@ -22,13 +22,17 @@
DEPTH=..\..
THEME_ROOT_DEPTH = .
DIRS=communicator editor global messenger navigator
include <$(DEPTH)\config\config.mak>
include <$(THEME_ROOT_DEPTH)\theme.mk>
CHROME_DIR = skins\$(THEME)
CHROME_MISC_DIR = .
CHROME_TYPE = skin
CHROME_DIR = skins\$(THEME)
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS=communicator editor global messenger navigator
CHROME_MISC_DIR = .
CHROME_MISC = \
.\manifest.rdf \
@ -37,11 +41,19 @@ CHROME_MISC = \
include <$(DEPTH)\config\rules.mak>
# choose Classic skin as default
chrome::
echo skin,install,select,classic/1.0 >>$(DIST)\bin\chrome\installed-chrome.txt
!else
DIRS = communicator\search\win \
communicator\sidebar\win \
communicator\win \
global\win \
messenger\win \
navigator\win
include <$(DEPTH)\config\rules.mak>
!endif

Просмотреть файл

@ -0,0 +1,8 @@
skins/classic.jar:
messenger/skin/mailheader.css
messenger/skin/msgHdrViewOverlay.css
messenger/skin/threadPane.css
messenger/skin/pref-mailnews.css
messenger/skin/folderPane.css
messenger/skin/messenger.css
messenger/skin/subscribe.css

Просмотреть файл

@ -22,19 +22,23 @@
DEPTH=..\..
THEME_ROOT_DEPTH = .
DIRS=communicator editor global messenger navigator
include <$(DEPTH)\config\config.mak>
include <$(THEME_ROOT_DEPTH)\theme.mk>
CHROME_DIR = skins\$(THEME)
CHROME_MISC_DIR = .
CHROME_TYPE = skin
CHROME_DIR = skins\$(THEME)
!ifdef MOZ_DISABLE_JAR_PACKAGING
DIRS=communicator editor global messenger navigator
CHROME_MISC_DIR = .
CHROME_MISC = \
.\manifest.rdf \
.\preview.png \
$(NULL)
!endif
include <$(DEPTH)\config\rules.mak>