[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-38.3.0esr-5.5-1] fixup! Bug #4234: Use the Firefox Update Process for Tor Browser.



commit d55b90fbad7a81bdbee2d0131ac8e5c5712b3026
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
Date:   Thu Sep 17 11:15:41 2015 -0400

    fixup! Bug #4234: Use the Firefox Update Process for Tor Browser.
    
    If not building the Windows Maintenance Service, avoid a dependency
    on crypt32.dll and wintrust.dll.
    
    Also, avoid setting sUsingService inside the updater code; this
    ensures that all Maintenance Service related codepaths are skipped.
---
 toolkit/mozapps/update/common/moz.build        |    7 +++++--
 toolkit/mozapps/update/common/sources.mozbuild |   15 +++++++++------
 toolkit/mozapps/update/updater/updater.cpp     |    6 ++++++
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/toolkit/mozapps/update/common/moz.build b/toolkit/mozapps/update/common/moz.build
index a977b0f..4beb56a 100644
--- a/toolkit/mozapps/update/common/moz.build
+++ b/toolkit/mozapps/update/common/moz.build
@@ -12,13 +12,16 @@ EXPORTS += [
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     EXPORTS += [
-        'certificatecheck.h',
         'pathhash.h',
-        'registrycertificates.h',
         'uachelper.h',
         'updatehelper.cpp',
         'updatehelper.h',
     ]
+    if CONFIG['MOZ_MAINTENANCE_SERVICE']:
+        EXPORTS += [
+            'certificatecheck.h',
+            'registrycertificates.h',
+        ]
 
 Library('updatecommon')
 
diff --git a/toolkit/mozapps/update/common/sources.mozbuild b/toolkit/mozapps/update/common/sources.mozbuild
index 7ec1aff..6b8a9e3 100644
--- a/toolkit/mozapps/update/common/sources.mozbuild
+++ b/toolkit/mozapps/update/common/sources.mozbuild
@@ -6,16 +6,19 @@ sources = []
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     sources += [
-        'certificatecheck.cpp',
         'pathhash.cpp',
-        'registrycertificates.cpp',
         'uachelper.cpp',
         'updatehelper.cpp',
     ]
-    OS_LIBS += [
-        'crypt32',
-        'wintrust',
-    ]
+    if CONFIG['MOZ_MAINTENANCE_SERVICE']:
+        sources += [
+            'certificatecheck.cpp',
+            'registrycertificates.cpp',
+        ]
+        OS_LIBS += [
+            'crypt32',
+            'wintrust',
+        ]
 
 sources += [
     'readstrings.cpp',
diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
index 9a01203..31a5dac 100644
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -129,7 +129,9 @@ static bool sUseHardLinks = true;
 #endif
 
 #ifdef XP_WIN
+#ifdef MOZ_MAINTENANCE_SERVICE
 #include "registrycertificates.h"
+#endif
 BOOL PathAppendSafe(LPWSTR base, LPCWSTR extra);
 BOOL PathGetSiblingFilePath(LPWSTR destinationBuffer,
                             LPCWSTR siblingFilePath,
@@ -2031,6 +2033,7 @@ LaunchWinPostProcess(const WCHAR *installationDir,
     return false;
   }
 
+#ifdef MOZ_MAINTENANCE_SERVICE
 // TEST_UPDATER is not available on esr38
 //#if !defined(TEST_UPDATER)
   if (sUsingService &&
@@ -2038,6 +2041,7 @@ LaunchWinPostProcess(const WCHAR *installationDir,
     return false;
   }
 //#endif
+#endif
 
   WCHAR dlogFile[MAX_PATH + 1];
   if (!PathGetSiblingFilePath(dlogFile, exefullpath, L"uninstall.update")) {
@@ -2981,8 +2985,10 @@ int NS_main(int argc, NS_tchar **argv)
   const int callbackIndex = 6;
 
 #if defined(XP_WIN)
+#ifdef MOZ_MAINTENANCE_SERVICE
   sUsingService = getenv("MOZ_USING_SERVICE") != nullptr;
   putenv(const_cast<char*>("MOZ_USING_SERVICE="));
+#endif
   // lastFallbackError keeps track of the last error for the service not being
   // used, in case of an error when fallback is not enabled we write the
   // error to the update.status file.

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits