# HG changeset patch
# User t_mrc-ct@sourceforge.jp
# Date 1349094081 -32400
# Branch GECKO17011esr_2013111808_RELBRANCH
# Node ID 1d65c02ad70dbc578898ef48626151a12a11f485
# Parent  5e94147710405e3bf3559df356966834331cc29f
trying to re-enable updater (with v17 fix)

diff --git a/DEBUG.mozcfg b/DEBUG.mozcfg
--- a/DEBUG.mozcfg
+++ b/DEBUG.mozcfg
@@ -1,15 +1,15 @@
 ac_add_options --enable-application=mail
 ac_add_options --enable-calendar
 ac_add_options --enable-crypto
 
 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-tbird-dbg
 
-ac_add_options --disable-updater
+#ac_add_options --disable-updater
 
 CC="gcc-4.0 -arch ppc"
 CXX="g++-4.0 -arch ppc"
 mk_add_options MOZ_MAKE_FLAGS="-s -j2"
 mk_add_options AUTOCONF=autoconf213
 ac_add_options --disable-tests
 ac_add_options --disable-static
 ac_add_options --disable-crashreporter
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -1795,37 +1795,24 @@
         LDFLAGS=$_SAVE_LDFLAGS
     fi
     MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
 
     # What Tenfourbird tuned for
     if test "$_SUBDIR_CC"
     then
      changequote(,)
-     tenfourbird_mtune_test="`echo "$_SUBDIR_CC" | sed -E -ne 's#.*[[:blank:]]-mtune=([[:alnum:]]+)([[:blank:]].*)?$#\1#p' -e 'd'`" 
+     TENFOURBIRD_TUNED="`echo "$_SUBDIR_CC" | sed -E -ne "s#.*[[:blank:]]-mtune='([[:alnum:]]+)'([[:blank:]].*)?\\$#\\1#p" -e 's#.*[[:blank:]]-mtune="([[:alnum:]]+)"([[:blank:]].*)?$#\1#p' -e 's#.*[[:blank:]]-mtune=([[:alnum:]]+)([[:blank:]].*)?$#\1#p' -e d`"
+     TENFOURBIRD_TUNED_NICKNAME="`echo "$TENFOURBIRD_TUNED" | sed -E -e 's/^([gG]3|740|750)$/G3/' -e 's/^([gG]4|7400)$/7400/' -e 's/^7450$/7450/' -e 's/^(G5|970)$/G5/'`"
      changequote([,])
-     case "$tenfourbird_mtune_test" in
-     "G3"|"740"|"750")
-      TENFOURBIRD_TUNED="PowerPC G3"
-     ;;
-     "G4"|"7400")
-      TENFOURBIRD_TUNED="PowerPC G4"
-     ;;
-     "7450")
-      TENFOURBIRD_TUNED="PowerPC G4e"
-     ;;
-     "G5"|"970")
-      TENFOURBIRD_TUNED="PowerPC G5"
-     ;;
-     *)
-      TENFOURBIRD_TUNED="PowerPC"
-     ;;
-     esac
-     AC_DEFINE_UNQUOTED(TENFOURBIRD_TUNED, "$TENFOURBIRD_TUNED")
+
+     AC_DEFINE_UNQUOTED(TENFOURBIRD_TUNED,$TENFOURBIRD_TUNED)
      AC_SUBST(TENFOURBIRD_TUNED)
+     AC_DEFINE_UNQUOTED(TENFOURBIRD_TUNED_NICKNAME,$TENFOURBIRD_TUNED_NICKNAME)
+     AC_SUBST(TENFOURBIRD_TUNED_NICKNAME)
     fi # TENFOURBIRD_TUNED
     ;;
 
 *-freebsd*)
     if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
 	DLL_SUFFIX=".so.1.0"
 	DSO_LDOPTS="-shared"
     fi
diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -227,17 +227,17 @@
 APPFILES = MacOS
 endif
 
 libs repackage:: $(PROGRAM)
 	$(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
 	rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(MOZ_MACBUNDLE_NAME) --exclude English.lproj
 	$(MKDIR) -p $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
 	rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj
-	sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/" -e "s/%TENFOURBIRD_TUNED%/$(TENFOURBIRD_TUNED)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist
+	sed -e "s/%APP_VERSION%/$(MOZ_APP_VERSION)/" -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" -e "s/%LOWER_MAC_APP_NAME%/$(LOWER_MAC_APP_NAME)/" -e "s/%TENFOURBIRD_TUNED_NICKNAME%/$(TENFOURBIRD_TUNED_NICKNAME)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Info.plist
 	sed -e "s/%MAC_APP_NAME%/$(MAC_APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/$(AB).lproj/InfoPlist.strings
 	rsync -a $(DIST)/bin/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/$(APPFILES)
 ifdef LIBXUL_SDK
 	cp $(LIBXUL_DIST)/bin/$(XR_STUB_NAME) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/thunderbird
 else
 	$(RM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(PROGRAM)
 	rsync -aL $(PROGRAM) $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS
 endif
diff --git a/mail/app/macbuild/Contents/Info.plist.in b/mail/app/macbuild/Contents/Info.plist.in
--- a/mail/app/macbuild/Contents/Info.plist.in
+++ b/mail/app/macbuild/Contents/Info.plist.in
@@ -2,17 +2,17 @@
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>English</string>
 	<key>CFBundleExecutable</key>
 	<string>thunderbird</string>
 	<key>CFBundleGetInfoString</key>
-	<string>%MAC_APP_NAME% %APP_VERSION% for %TENFOURBIRD_TUNED%</string>
+	<string>%MAC_APP_NAME% %APP_VERSION% for PowerPC %TENFOURBIRD_TUNED_NICKNAME%</string>
 	<key>CFBundleIconFile</key>
 	<string>thunderbird</string>
 	<key>CFBundleIdentifier</key>
 	<string>jp.sourceforge.%LOWER_MAC_APP_NAME%</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
 	<string>%MAC_APP_NAME%</string>
diff --git a/mail/base/content/aboutDialog.js b/mail/base/content/aboutDialog.js
--- a/mail/base/content/aboutDialog.js
+++ b/mail/base/content/aboutDialog.js
@@ -1,15 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-// MOZ_UPDATER not supported.
-#undef MOZ_UPDATER
-
 // Services = object with smart getters for common XPCOM services
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource:///modules/iteratorUtils.jsm");
 
 function init(aEvent)
 {
   if (aEvent.target != document)
     return;
@@ -19,20 +16,21 @@
     if (distroId) {
       var distroVersion = Services.prefs.getCharPref("distribution.version");
       var distroAbout = Services.prefs.getComplexValue("distribution.about",
         Components.interfaces.nsISupportsString);
 
       var distroField = document.getElementById("distribution");
       distroField.value = distroAbout;
       distroField.style.display = "block";
-
+/*
       var distroIdField = document.getElementById("distributionId");
       distroIdField.value = distroId + " - " + distroVersion;
       distroIdField.style.display = "block";
+*/
     }
   }
   catch (e) {
     // Pref is unset
   }
 
   // XXX FIXME
   // Include the build ID if this is an "a#" (nightly or aurora) build
diff --git a/mail/base/content/aboutDialog.xul b/mail/base/content/aboutDialog.xul
--- a/mail/base/content/aboutDialog.xul
+++ b/mail/base/content/aboutDialog.xul
@@ -1,16 +1,14 @@
 <?xml version="1.0"?> <!-- -*- Mode: HTML -*- --> 
 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-<!-- MOZ_UPDATER not supported. -->
-#undef MOZ_UPDATER
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/content/aboutDialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
 
 <!DOCTYPE window [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
 %brandDTD;
 <!ENTITY % aboutDialogDTD SYSTEM "chrome://messenger/locale/aboutDialog.dtd" >
@@ -38,17 +36,17 @@
   <script type="application/javascript" src="chrome://messenger/content/specialTabs.js"/>
   <!-- This one is for openURL -->
   <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
 
   <vbox id="aboutDialogContainer">
     <hbox id="clientBox">
       <vbox id="leftBox" flex="1"/>
       <vbox id="rightBox" flex="1">
-#expand <label id="version" value="__MOZ_APP_VERSION__ for __TENFOURBIRD_TUNED__"/>
+#expand <label id="version" value="__MOZ_APP_VERSION__"/>
         <label id="distribution" class="text-blurb"/>
         <label id="distributionId" class="text-blurb"/>
 
         <vbox id="detailsBox">
           <vbox id="updateBox">
 #ifdef MOZ_UPDATER
             <deck id="updateDeck" orient="vertical">
               <hbox id="updateButtonBox" align="center">
diff --git a/mail/base/jar.mn b/mail/base/jar.mn
--- a/mail/base/jar.mn
+++ b/mail/base/jar.mn
@@ -109,18 +109,21 @@
     content/messenger/safeMode.js                   (content/safeMode.js)
     content/messenger/sanitize.xul                  (content/sanitize.xul)
     content/messenger/sanitize.js                   (content/sanitize.js)
     content/messenger/sanitizeDialog.css            (content/sanitizeDialog.css)
     content/messenger/sanitizeDialog.js             (content/sanitizeDialog.js)
 # the following files are mail-specific overrides
 *+  content/messenger/license.html                  (/mozilla/toolkit/content/license.html)
 % override chrome://global/content/license.html chrome://messenger/content/license.html
+    content/messenger/updatesOverlay.xul             (content/updatesOverlay.xul)
+*   content/messenger/updatesOverlay.js              (content/updatesOverlay.js)
 
 comm.jar:
 % content communicator %content/communicator/
    content/communicator/contentAreaClick.js         (content/contentAreaClick.js)
 *  content/communicator/utilityOverlay.xul          (content/utilityOverlay.xul)
    content/communicator/utilityOverlay.js           (content/utilityOverlay.js)
 
 toolkit.jar:
 % overlay chrome://global/content/customizeToolbar.xul chrome://messenger/content/customizeToolbarOverlay.xul
 % overlay chrome://mozapps/content/downloads/downloads.xul chrome://messenger/content/downloadsOverlay.xul
+% overlay chrome://mozapps/content/update/updates.xul chrome://messenger/content/updatesOverlay.xul
diff --git a/mail/branding/aurora/Makefile.in b/mail/branding/aurora/Makefile.in
--- a/mail/branding/aurora/Makefile.in
+++ b/mail/branding/aurora/Makefile.in
@@ -12,16 +12,18 @@
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = \
 	locales \
 	$(NULL)
 
 PREF_JS_EXPORTS += $(srcdir)/thunderbird-branding.js
 
+DEFINES += -DAPP_VERSION="$(MOZ_APP_VERSION)"
+
 include $(topsrcdir)/config/rules.mk
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
 ifeq ($(OS_ARCH),WINNT)
 	cp $(srcdir)/thunderbird.ico   $(DIST)/branding/thunderbird.ico
 	cp $(srcdir)/branding.nsi      $(DIST)/branding/branding.nsi
 	cp $(srcdir)/wizHeader.bmp     $(DIST)/branding/wizHeader.bmp
diff --git a/mail/branding/aurora/thunderbird-branding.js b/mail/branding/aurora/thunderbird-branding.js
--- a/mail/branding/aurora/thunderbird-branding.js
+++ b/mail/branding/aurora/thunderbird-branding.js
@@ -1,12 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#filter substitution
 // Default start page
 pref("mailnews.start_page.url","https://live.mozillamessaging.com/%APP%/start?locale=%LOCALE%&version=%VERSION%&os=%OS%&buildid=%APPBUILDID%");
 
 // start page override to load after an update
 pref("mailnews.start_page.override_url","https://live.mozillamessaging.com/%APP%/whatsnew?locale=%LOCALE%&version=%VERSION%&os=%OS%&buildid=%APPBUILDID%");
 
 // Release notes URL
 pref("app.releaseNotesURL", "http://live.mozillamessaging.com/%APP%/releasenotes?locale=%LOCALE%&version=%VERSION%&os=%OS%&buildid=%APPBUILDID%");
@@ -18,8 +19,23 @@
 // The time interval between the downloading of mar file chunks in the
 // background (in seconds)
 pref("app.update.download.backgroundInterval", 60);
 
 // Give the user x seconds to react before showing the big UI. default=24 hours
 pref("app.update.promptWaitTime", 86400);
 
 pref("app.vendorURL", "http://tenfourbird.sourceforge.jp/");
+
+// Tenfourbird specific prefs
+pref("distribution.id", "Tenfourbird@TENFOURBIRD_TUNED@");
+pref("distribution.version", "@APP_VERSION@");
+pref("distribution.about", "for PowerPC @TENFOURBIRD_TUNED_NICKNAME@");
+
+#pref("app.releaseNotesURL", );
+#pref("app.support.baseURL", );
+#pref("app.update.url.details", );
+pref("app.update.url.manual", "http://en.sourceforge.jp/projects/tenfourbird/releases/");
+pref("app.update.url.override","http://tenfourbird.sourceforge.jp/update/1/check.php?name=%DISTRIBUTION%&version=%DISTRIBUTION_VERSION%");
+
+# pref("mail.instrumentation.postUrl", );
+
+pref("tenfourbird.update.url.download", "http://tenfourbird.sourceforge.jp/update/1/download.php?name=%DISTRIBUTION%&version=%DISTRIBUTION_VERSION%");
\ No newline at end of file
