# HG changeset patch
# User t_mrc-ct@sourceforge.jp
# Date 1349094081 -32400
# Branch GECKO1704esr_2013030721_RELBRANCH
# Node ID e4d27e73c03c665ad99736f79af6e8ce46d7235b
# Parent  098fa0fbab8cabc261c6df8f8848acd6dcea38df
trying to re-enable updater (with v17 fix)

diff --git a/DEBUG.mozcfg b/DEBUG.mozcfg
--- a/DEBUG.mozcfg
+++ b/DEBUG.mozcfg
@@ -4,7 +4,7 @@
 
 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"
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -1800,27 +1800,14 @@
     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
     ;;
 
diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -232,7 +232,7 @@
 	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
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
@@ -7,7 +7,7 @@
 	<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>
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
@@ -2,9 +2,6 @@
 # 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");
@@ -24,10 +21,11 @@
       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) {
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
@@ -4,8 +4,6 @@
 # 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"?>
@@ -43,7 +41,7 @@
     <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"/>
 
diff --git a/mail/base/jar.mn b/mail/base/jar.mn
--- a/mail/base/jar.mn
+++ b/mail/base/jar.mn
@@ -114,6 +114,8 @@
 # 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/
@@ -124,3 +126,4 @@
 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
@@ -17,6 +17,8 @@
 
 PREF_JS_EXPORTS += $(srcdir)/thunderbird-branding.js
 
+DEFINES += -DAPP_VERSION="$(MOZ_APP_VERSION)"
+
 include $(topsrcdir)/config/rules.mk
 
 export::
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
@@ -2,6 +2,7 @@
  * 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%");
 
@@ -23,3 +24,18 @@
 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
