From af837c8d5a6a3537da41e122cf3d9418d1829bd8 Mon Sep 17 00:00:00 2001 From: "tao%netscape.com" Date: Mon, 19 Mar 2001 23:10:12 +0000 Subject: [PATCH] 71517: Dynamically select platform jar in langxxxx.xpi. r=ssu, sr=dveditz. package all en-*.jar into langenus.xpi and select on one the fly. --- allmakefiles.sh | 3 ++ .../resources/locale/en-US/Makefile.in | 2 +- .../resources/locale/en-US/makefile.win | 1 + .../resources/locale/en-US/unix/makefile.win | 25 ++++++++++++++++ .../resources/locale/en-US/Makefile.in | 2 +- .../resources/locale/en-US/makefile.win | 2 +- .../resources/locale/en-US/unix/makefile.win | 25 ++++++++++++++++ .../resources/locale/en-US/win/Makefile.in | 30 +++++++++++++++++++ .../resources/locale/en-US/mac/Makefile.in | 30 +++++++++++++++++++ .../resources/locale/en-US/mac/makefile.win | 25 ++++++++++++++++ .../resources/locale/en-US/makefile.win | 2 +- .../resources/locale/en-US/unix/makefile.win | 25 ++++++++++++++++ .../resources/locale/en-US/win/Makefile.in | 29 ++++++++++++++++++ xpinstall/packager/mac/langenus.jst | 17 ++++++++++- xpinstall/packager/packages-unix | 2 ++ xpinstall/packager/packages-win | 2 ++ xpinstall/packager/unix/langenus.jst | 17 ++++++++++- xpinstall/packager/windows/langenus.jst | 17 ++++++++++- 18 files changed, 249 insertions(+), 7 deletions(-) create mode 100644 xpfe/browser/resources/locale/en-US/unix/makefile.win create mode 100644 xpfe/components/prefwindow/resources/locale/en-US/unix/makefile.win create mode 100644 xpfe/components/prefwindow/resources/locale/en-US/win/Makefile.in create mode 100644 xpfe/global/resources/locale/en-US/mac/Makefile.in create mode 100644 xpfe/global/resources/locale/en-US/mac/makefile.win create mode 100644 xpfe/global/resources/locale/en-US/unix/makefile.win create mode 100644 xpfe/global/resources/locale/en-US/win/Makefile.in diff --git a/allmakefiles.sh b/allmakefiles.sh index 578c3048b7f8..8a454fa20da9 100755 --- a/allmakefiles.sh +++ b/allmakefiles.sh @@ -670,6 +670,7 @@ xpfe/components/prefwindow/resources/content/unix/Makefile xpfe/components/prefwindow/resources/locale/Makefile xpfe/components/prefwindow/resources/locale/en-US/Makefile xpfe/components/prefwindow/resources/locale/en-US/unix/Makefile +xpfe/components/prefwindow/resources/locale/en-US/win/Makefile xpfe/components/related/Makefile xpfe/components/related/src/Makefile xpfe/components/related/public/Makefile @@ -717,8 +718,10 @@ xpfe/global/resources/content/os2/Makefile xpfe/global/resources/content/unix/Makefile xpfe/global/resources/locale/Makefile xpfe/global/resources/locale/en-US/Makefile +xpfe/global/resources/locale/en-US/mac/Makefile xpfe/global/resources/locale/en-US/os2/Makefile xpfe/global/resources/locale/en-US/unix/Makefile +xpfe/global/resources/locale/en-US/win/Makefile xpfe/communicator/Makefile xpfe/communicator/resources/Makefile xpfe/communicator/resources/locale/Makefile diff --git a/xpfe/browser/resources/locale/en-US/Makefile.in b/xpfe/browser/resources/locale/en-US/Makefile.in index 61bcc7978301..2556e7babc19 100644 --- a/xpfe/browser/resources/locale/en-US/Makefile.in +++ b/xpfe/browser/resources/locale/en-US/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = unix +DIRS = mac unix win include $(topsrcdir)/config/rules.mk diff --git a/xpfe/browser/resources/locale/en-US/makefile.win b/xpfe/browser/resources/locale/en-US/makefile.win index 535b8b86a16e..3e110c22e592 100644 --- a/xpfe/browser/resources/locale/en-US/makefile.win +++ b/xpfe/browser/resources/locale/en-US/makefile.win @@ -32,6 +32,7 @@ CHROME_L10N = \ .\askViewZoom.dtd \ $(NULL) +DIRS= unix include <$(DEPTH)\config\rules.mak> diff --git a/xpfe/browser/resources/locale/en-US/unix/makefile.win b/xpfe/browser/resources/locale/en-US/unix/makefile.win new file mode 100644 index 000000000000..d635b2d0ff09 --- /dev/null +++ b/xpfe/browser/resources/locale/en-US/unix/makefile.win @@ -0,0 +1,25 @@ +#!nmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=..\..\..\..\..\.. + +include <$(DEPTH)\config\rules.mak> + diff --git a/xpfe/components/prefwindow/resources/locale/en-US/Makefile.in b/xpfe/components/prefwindow/resources/locale/en-US/Makefile.in index 5b2f3f9f88d5..79ffc2eda139 100644 --- a/xpfe/components/prefwindow/resources/locale/en-US/Makefile.in +++ b/xpfe/components/prefwindow/resources/locale/en-US/Makefile.in @@ -26,7 +26,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = unix +DIRS = unix win include $(topsrcdir)/config/rules.mk diff --git a/xpfe/components/prefwindow/resources/locale/en-US/makefile.win b/xpfe/components/prefwindow/resources/locale/en-US/makefile.win index 6460f7f5ac85..68271edb9f7c 100644 --- a/xpfe/components/prefwindow/resources/locale/en-US/makefile.win +++ b/xpfe/components/prefwindow/resources/locale/en-US/makefile.win @@ -21,7 +21,7 @@ DEPTH=..\..\..\..\..\.. -DIRS = win +DIRS = win unix CHROME_DIR = locales\en-US CHROME_L10N_DIR = communicator\locale\pref diff --git a/xpfe/components/prefwindow/resources/locale/en-US/unix/makefile.win b/xpfe/components/prefwindow/resources/locale/en-US/unix/makefile.win new file mode 100644 index 000000000000..3d509f8465f2 --- /dev/null +++ b/xpfe/components/prefwindow/resources/locale/en-US/unix/makefile.win @@ -0,0 +1,25 @@ +#!nmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=..\..\..\..\..\..\.. + +include <$(DEPTH)\config\rules.mak> + diff --git a/xpfe/components/prefwindow/resources/locale/en-US/win/Makefile.in b/xpfe/components/prefwindow/resources/locale/en-US/win/Makefile.in new file mode 100644 index 000000000000..cc72b53a53ca --- /dev/null +++ b/xpfe/components/prefwindow/resources/locale/en-US/win/Makefile.in @@ -0,0 +1,30 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../../../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +include $(topsrcdir)/config/rules.mk + diff --git a/xpfe/global/resources/locale/en-US/mac/Makefile.in b/xpfe/global/resources/locale/en-US/mac/Makefile.in new file mode 100644 index 000000000000..56c9f98fa0a0 --- /dev/null +++ b/xpfe/global/resources/locale/en-US/mac/Makefile.in @@ -0,0 +1,30 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +include $(topsrcdir)/config/rules.mk + diff --git a/xpfe/global/resources/locale/en-US/mac/makefile.win b/xpfe/global/resources/locale/en-US/mac/makefile.win new file mode 100644 index 000000000000..d635b2d0ff09 --- /dev/null +++ b/xpfe/global/resources/locale/en-US/mac/makefile.win @@ -0,0 +1,25 @@ +#!nmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=..\..\..\..\..\.. + +include <$(DEPTH)\config\rules.mak> + diff --git a/xpfe/global/resources/locale/en-US/makefile.win b/xpfe/global/resources/locale/en-US/makefile.win index 04243db645c6..69927b626a48 100644 --- a/xpfe/global/resources/locale/en-US/makefile.win +++ b/xpfe/global/resources/locale/en-US/makefile.win @@ -21,7 +21,7 @@ DEPTH=..\..\..\..\.. -DIRS=win +DIRS=win unix mac CHROME_DIR=locales\en-US CHROME_L10N_DIR=global\locale diff --git a/xpfe/global/resources/locale/en-US/unix/makefile.win b/xpfe/global/resources/locale/en-US/unix/makefile.win new file mode 100644 index 000000000000..d635b2d0ff09 --- /dev/null +++ b/xpfe/global/resources/locale/en-US/unix/makefile.win @@ -0,0 +1,25 @@ +#!nmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=..\..\..\..\..\.. + +include <$(DEPTH)\config\rules.mak> + diff --git a/xpfe/global/resources/locale/en-US/win/Makefile.in b/xpfe/global/resources/locale/en-US/win/Makefile.in new file mode 100644 index 000000000000..1f0fa06b165d --- /dev/null +++ b/xpfe/global/resources/locale/en-US/win/Makefile.in @@ -0,0 +1,29 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2001 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk +nclude $(topsrcdir)/config/rules.mk + diff --git a/xpinstall/packager/mac/langenus.jst b/xpinstall/packager/mac/langenus.jst index 5d375e7ab7db..077c0da7286a 100644 --- a/xpinstall/packager/mac/langenus.jst +++ b/xpinstall/packager/mac/langenus.jst @@ -3,6 +3,21 @@ var srDest = $SpaceRequired$; var err; var fProgram; +// OS type detection +// which platform? +var platformStr = new String(Install.platform); +var platformNode; +if (!platformStr.search(/^Macintosh/)) + platformNode = 'mac'; +else if (!platformStr.search(/^Win/)) + platformNode = 'win'; +else + platformNode = 'unix'; + +logComment("initInstall: platformNode=" + platformNode); +// end +// end - OS type detection + // --- LOCALIZATION NOTE: translate only these --- var prettyName = "English (US) Language Pack"; var langcode = "en"; @@ -10,7 +25,7 @@ var chromeNode = langcode + "-US"; // --- END LOCALIZABLE RESOURCES --- var regName = "locales/mozilla/" + chromeNode; var chromeName = chromeNode + ".jar"; -var platformName = langcode + "-mac.jar"; +var platformName = langcode + "-" + platformNode + ".jar"; var localeName = "locale/" + chromeNode + "/"; err = initInstall(prettyName, regName, "$Version$"); diff --git a/xpinstall/packager/packages-unix b/xpinstall/packager/packages-unix index e8c809ab9506..156648fb5211 100644 --- a/xpinstall/packager/packages-unix +++ b/xpinstall/packager/packages-unix @@ -12,7 +12,9 @@ ; ; en-US bin/chrome/en-US.jar +bin/chrome/en-mac.jar bin/chrome/en-unix.jar +bin/chrome/en-win.jar [regus] ; diff --git a/xpinstall/packager/packages-win b/xpinstall/packager/packages-win index dac133948810..ab6e49086e3c 100644 --- a/xpinstall/packager/packages-win +++ b/xpinstall/packager/packages-win @@ -13,6 +13,8 @@ ; en-US bin\chrome\en-US\* bin\chrome\en-win\* +bin\chrome\en-unix\* +bin\chrome\en-mac\* [regus] ; diff --git a/xpinstall/packager/unix/langenus.jst b/xpinstall/packager/unix/langenus.jst index f0606224e4bd..e7349bd1de00 100644 --- a/xpinstall/packager/unix/langenus.jst +++ b/xpinstall/packager/unix/langenus.jst @@ -2,6 +2,21 @@ var srDest = $SpaceRequired$; var err; var fProgram; +// OS type detection +// which platform? +var platformStr = new String(Install.platform); +var platformNode; +if (!platformStr.search(/^Macintosh/)) + platformNode = 'mac'; +else if (!platformStr.search(/^Win/)) + platformNode = 'win'; +else + platformNode = 'unix'; + +logComment("initInstall: platformNode=" + platformNode); +// end +// end - OS type detection + // --- LOCALIZATION NOTE: translate only these --- var prettyName = "English (US) Language Pack"; var langcode = "en"; @@ -9,7 +24,7 @@ var chromeNode = langcode + "-US"; // --- END LOCALIZABLE RESOURCES --- var regName = "locales/mozilla/" + chromeNode; var chromeName = chromeNode + ".jar"; -var platformName = langcode + "-unix.jar"; +var platformName = langcode + "-" + platformNode + ".jar"; var localeName = "locale/" + chromeNode + "/"; err = initInstall(prettyName, regName, "$Version$"); diff --git a/xpinstall/packager/windows/langenus.jst b/xpinstall/packager/windows/langenus.jst index a517a432388c..bae96a29aacf 100644 --- a/xpinstall/packager/windows/langenus.jst +++ b/xpinstall/packager/windows/langenus.jst @@ -3,6 +3,21 @@ var srDest; var err; var fProgram; +// OS type detection +// which platform? +var platformStr = new String(Install.platform); +var platformNode; +if (!platformStr.search(/^Macintosh/)) + platformNode = 'mac'; +else if (!platformStr.search(/^Win/)) + platformNode = 'win'; +else + platformNode = 'unix'; + +logComment("initInstall: platformNode=" + platformNode); +// end +// end - OS type detection + // ----LOCALIZATION NOTE: translate only these ------ var prettyName = "English (US) Language Pack"; var langcode = "en"; @@ -10,7 +25,7 @@ var chromeNode = langcode + "-US"; // --- END CHANGABLE STUFF --- var regName = "locales/mozilla/" + chromeNode; var chromeName = chromeNode + ".jar"; -var platformName = langcode + "-win.jar"; +var platformName = langcode + "-" + platformNode + ".jar"; var localeName = "locale/" + chromeNode + "/"; srDest = $SpaceRequired$:bin;