Bug 1152997 - Cleanup app update build to exclude android. r=glandium, r=mossop
authorRobert Strong <robert.bugzilla@gmail.com>
Tue, 14 Apr 2015 17:00:02 -0700
changeset 256298 ce046fd1be02d0ad9f154d4402167434afa2a962
parent 256297 225457512400f8056f87b474890582c68770257d
child 256299 966d5cf2202054c72ad21688d7df1213a32e23dc
push id4830
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:18:48 +0000
treeherdermozilla-esr52@4c2175bb0420 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, mossop
bugs1152997
milestone40.0a1
Bug 1152997 - Cleanup app update build to exclude android. r=glandium, r=mossop
toolkit/components/build/nsToolkitCompsCID.h
toolkit/components/build/nsToolkitCompsModule.cpp
toolkit/components/moz.build
toolkit/components/timermanager/moz.build
toolkit/components/timermanager/nsIUpdateTimerManager.idl
toolkit/components/timermanager/nsUpdateTimerManager.js
toolkit/components/timermanager/nsUpdateTimerManager.manifest
toolkit/components/timermanager/tests/unit/consumerNotifications.js
toolkit/components/timermanager/tests/unit/xpcshell.ini
toolkit/moz.build
toolkit/mozapps/update/moz.build
toolkit/mozapps/update/nsIUpdateTimerManager.idl
toolkit/mozapps/update/nsUpdateTimerManager.js
toolkit/mozapps/update/nsUpdateTimerManager.manifest
toolkit/mozapps/update/tests/Makefile.in
toolkit/mozapps/update/tests/moz.build
toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
toolkit/mozapps/update/tests/unit_timermanager/consumerNotifications.js
toolkit/mozapps/update/tests/unit_timermanager/xpcshell.ini
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsUpdateDriver.h
--- a/toolkit/components/build/nsToolkitCompsCID.h
+++ b/toolkit/components/build/nsToolkitCompsCID.h
@@ -1,18 +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/. */
 
-#if defined(MOZ_UPDATER)
-# if !defined(MOZ_WIDGET_ANDROID)
-#  define USE_MOZ_UPDATER
-# endif
-#endif
-
 #define NS_ALERTSERVICE_CONTRACTID \
   "@mozilla.org/alerts-service;1"
 
 // This separate service uses the same nsIAlertsService interface,
 // but instead sends a notification to a platform alerts API
 // if available. Using a separate CID allows us to overwrite the XUL
 // alerts service at runtime.
 #define NS_SYSTEMALERTSERVICE_CONTRACTID \
@@ -85,17 +79,17 @@
 "@mozilla.org/browser/tagging-service;1"
 
 #define NS_FAVICONSERVICE_CONTRACTID \
   "@mozilla.org/browser/favicon-service;1"
 
 #define NS_APPSTARTUP_CONTRACTID \
   "@mozilla.org/toolkit/app-startup;1"
 
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
 #define NS_UPDATEPROCESSOR_CONTRACTID \
   "@mozilla.org/updates/update-processor;1"
 #endif
 
 #define NS_ADDONPATHSERVICE_CONTRACTID \
     "@mozilla.org/addon-path-service;1"
 
 /////////////////////////////////////////////////////////////////////////////
@@ -168,17 +162,17 @@
 { 0x5e8d4751, 0x1852, 0x434b, { 0xa9, 0x92, 0x2c, 0x6d, 0x2a, 0x25, 0xfa, 0x46 } }
 
 #define NS_NAVBOOKMARKSSERVICE_CID \
 { 0x9de95a0c, 0x39a4, 0x4d64, {0x9a, 0x53, 0x17, 0x94, 0x0d, 0xd7, 0xca, 0xbb}}
 
 #define NS_FAVICONSERVICE_CID \
 { 0x984e3259, 0x9266, 0x49cf, { 0xb6, 0x05, 0x60, 0xb0, 0x22, 0xa0, 0x07, 0x56 } }
 
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
 #define NS_UPDATEPROCESSOR_CID \
 { 0xf3dcf644, 0x79e8, 0x4f59, { 0xa1, 0xbb, 0x87, 0x84, 0x54, 0x48, 0x8e, 0xf9 } }
 #endif
 
 #define NS_APPLICATION_REPUTATION_SERVICE_CONTRACTID \
   "@mozilla.org/downloads/application-reputation-service;1"
 
 #define NS_APPLICATION_REPUTATION_SERVICE_CID \
--- a/toolkit/components/build/nsToolkitCompsModule.cpp
+++ b/toolkit/components/build/nsToolkitCompsModule.cpp
@@ -2,17 +2,17 @@
  * 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/. */
 
 #include "mozilla/ModuleUtils.h"
 #include "nsAppStartup.h"
 #include "nsUserInfo.h"
 #include "nsToolkitCompsCID.h"
 #include "nsFindService.h"
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
 #include "nsUpdateDriver.h"
 #endif
 
 #if !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
 #include "nsParentalControlsService.h"
 #endif
 
 #include "nsAlertsService.h"
@@ -104,17 +104,17 @@ nsUrlClassifierDBServiceConstructor(nsIS
     rv = inst->QueryInterface(aIID, aResult);
     NS_RELEASE(inst);
 
     return rv;
 }
 #endif
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUpdateProcessor)
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR(FinalizationWitnessService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(NativeOSFileInternalsService)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(NativeFileWatcherService, Init)
 
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(AddonPathService, AddonPathService::GetInstance)
 
@@ -136,17 +136,17 @@ NS_DEFINE_NAMED_CID(NS_TYPEAHEADFIND_CID
 #ifdef MOZ_URL_CLASSIFIER
 NS_DEFINE_NAMED_CID(NS_APPLICATION_REPUTATION_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERPREFIXSET_CID);
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERDBSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERSTREAMUPDATER_CID);
 NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERUTILS_CID);
 #endif
 NS_DEFINE_NAMED_CID(NS_BROWSERSTATUSFILTER_CID);
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
 NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_CID);
 #endif
 NS_DEFINE_NAMED_CID(FINALIZATIONWITNESSSERVICE_CID);
 NS_DEFINE_NAMED_CID(NATIVE_OSFILE_INTERNALS_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_ADDON_PATH_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NATIVE_FILEWATCHER_SERVICE_CID);
 
 static const Module::CIDEntry kToolkitCIDs[] = {
@@ -168,17 +168,17 @@ static const Module::CIDEntry kToolkitCI
 #ifdef MOZ_URL_CLASSIFIER
   { &kNS_APPLICATION_REPUTATION_SERVICE_CID, false, nullptr, ApplicationReputationServiceConstructor },
   { &kNS_URLCLASSIFIERPREFIXSET_CID, false, nullptr, nsUrlClassifierPrefixSetConstructor },
   { &kNS_URLCLASSIFIERDBSERVICE_CID, false, nullptr, nsUrlClassifierDBServiceConstructor },
   { &kNS_URLCLASSIFIERSTREAMUPDATER_CID, false, nullptr, nsUrlClassifierStreamUpdaterConstructor },
   { &kNS_URLCLASSIFIERUTILS_CID, false, nullptr, nsUrlClassifierUtilsConstructor },
 #endif
   { &kNS_BROWSERSTATUSFILTER_CID, false, nullptr, nsBrowserStatusFilterConstructor },
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
   { &kNS_UPDATEPROCESSOR_CID, false, nullptr, nsUpdateProcessorConstructor },
 #endif
   { &kFINALIZATIONWITNESSSERVICE_CID, false, nullptr, FinalizationWitnessServiceConstructor },
   { &kNATIVE_OSFILE_INTERNALS_SERVICE_CID, false, nullptr, NativeOSFileInternalsServiceConstructor },
   { &kNS_ADDON_PATH_SERVICE_CID, false, nullptr, AddonPathServiceConstructor },
   { &kNATIVE_FILEWATCHER_SERVICE_CID, false, nullptr, NativeFileWatcherServiceConstructor },
   { nullptr }
 };
@@ -202,17 +202,17 @@ static const Module::ContractIDEntry kTo
   { NS_APPLICATION_REPUTATION_SERVICE_CONTRACTID, &kNS_APPLICATION_REPUTATION_SERVICE_CID },
   { NS_URLCLASSIFIERPREFIXSET_CONTRACTID, &kNS_URLCLASSIFIERPREFIXSET_CID },
   { NS_URLCLASSIFIERDBSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },
   { NS_URICLASSIFIERSERVICE_CONTRACTID, &kNS_URLCLASSIFIERDBSERVICE_CID },
   { NS_URLCLASSIFIERSTREAMUPDATER_CONTRACTID, &kNS_URLCLASSIFIERSTREAMUPDATER_CID },
   { NS_URLCLASSIFIERUTILS_CONTRACTID, &kNS_URLCLASSIFIERUTILS_CID },
 #endif
   { NS_BROWSERSTATUSFILTER_CONTRACTID, &kNS_BROWSERSTATUSFILTER_CID },
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
   { NS_UPDATEPROCESSOR_CONTRACTID, &kNS_UPDATEPROCESSOR_CID },
 #endif
   { FINALIZATIONWITNESSSERVICE_CONTRACTID, &kFINALIZATIONWITNESSSERVICE_CID },
   { NATIVE_OSFILE_INTERNALS_SERVICE_CONTRACTID, &kNATIVE_OSFILE_INTERNALS_SERVICE_CID },
   { NS_ADDONPATHSERVICE_CONTRACTID, &kNS_ADDON_PATH_SERVICE_CID },
   { NATIVE_FILEWATCHER_SERVICE_CONTRACTID, &kNATIVE_FILEWATCHER_SERVICE_CID },
   { nullptr }
 };
--- a/toolkit/components/moz.build
+++ b/toolkit/components/moz.build
@@ -43,16 +43,17 @@ DIRS += [
     'protobuf',
     'reader',
     'reflect',
     'sqlite',
     'startup',
     'statusfilter',
     'telemetry',
     'thumbnails',
+    'timermanager',
     'typeaheadfind',
     'urlformatter',
     'viewconfig',
     'viewsource',
     'workerloader',
     'workerlz4',
     'xulstore'
 ]
copy from toolkit/mozapps/update/moz.build
copy to toolkit/components/timermanager/moz.build
--- a/toolkit/mozapps/update/moz.build
+++ b/toolkit/components/timermanager/moz.build
@@ -1,50 +1,21 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
-    if CONFIG['MOZ_UPDATER'] or CONFIG['MOZ_MAINTENANCE_SERVICE']:
-        # If only the maintenance service is installed and not
-        # the updater, then the maintenance service may still be
-        # used for other things.  We need to build update/common
-        # which the maintenance service uses.
-        DIRS += ['common']
-        if CONFIG['OS_ARCH'] == 'WINNT':
-            DIRS += ['common-standalone']
-
-    if CONFIG['MOZ_UPDATER']:
-        DIRS += ['updater']
-
 XPIDL_MODULE = 'update'
 
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit_timermanager/xpcshell.ini']
+XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 XPIDL_SOURCES += [
     'nsIUpdateTimerManager.idl',
 ]
 
 EXTRA_COMPONENTS += [
     'nsUpdateTimerManager.js',
     'nsUpdateTimerManager.manifest',
 ]
 
-if CONFIG['MOZ_UPDATER']:
-    TEST_DIRS += ['tests']
-
-    XPIDL_SOURCES += [
-        'nsIUpdateService.idl',
-    ]
-
-    EXTRA_COMPONENTS += [
-        'nsUpdateService.js',
-        'nsUpdateService.manifest',
-        'nsUpdateServiceStub.js',
-    ]
-
-    EXTRA_JS_MODULES += [
-        'UpdateTelemetry.jsm',
-    ]
-
-JAR_MANIFESTS += ['jar.mn']
+with Files('**'):
+    BUG_COMPONENT = ('Toolkit', 'Application Update')
rename from toolkit/mozapps/update/nsIUpdateTimerManager.idl
rename to toolkit/components/timermanager/nsIUpdateTimerManager.idl
rename from toolkit/mozapps/update/nsUpdateTimerManager.js
rename to toolkit/components/timermanager/nsUpdateTimerManager.js
rename from toolkit/mozapps/update/nsUpdateTimerManager.manifest
rename to toolkit/components/timermanager/nsUpdateTimerManager.manifest
rename from toolkit/mozapps/update/tests/unit_timermanager/consumerNotifications.js
rename to toolkit/components/timermanager/tests/unit/consumerNotifications.js
rename from toolkit/mozapps/update/tests/unit_timermanager/xpcshell.ini
rename to toolkit/components/timermanager/tests/unit/xpcshell.ini
--- a/toolkit/moz.build
+++ b/toolkit/moz.build
@@ -18,20 +18,27 @@ DIRS += [
     'mozapps/preferences',
     'mozapps/plugins',
     'obsolete',
     'profile',
     'themes',
     'webapps',
 ]
 
-DIRS += ['mozapps/update']
+if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
+    DIRS += ['mozapps/update']
 
 if CONFIG['MOZ_MAINTENANCE_SERVICE']:
-    DIRS += ['components/maintenanceservice']
+# Including mozapps/update/common-standalone allows the maintenance service
+# to be built so the maintenance service can be used for things other than
+# updating applications.
+    DIRS += [
+        'mozapps/update/common-standalone',
+        'components/maintenanceservice'
+    ]
 
 DIRS += ['xre']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
     DIRS += ['system/unixproxy']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     DIRS += ['system/osxproxy']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
@@ -56,11 +63,8 @@ elif CONFIG['MOZ_ENABLE_PROFILER_SPS']:
 with Files('mozapps/installer/windows/*'):
     BUG_COMPONENT = ('Toolkit', 'NSIS Installer')
 
 with Files('mozapps/plugins/*'):
     BUG_COMPONENT = ('Core', 'Plug-ins')
 
 with Files('mozapps/preferences/*'):
     BUG_COMPONENT = ('Toolkit', 'Preferences')
-
-with Files('mozapps/update/*'):
-    BUG_COMPONENT = ('Toolkit', 'Application Update')
--- a/toolkit/mozapps/update/moz.build
+++ b/toolkit/mozapps/update/moz.build
@@ -1,50 +1,33 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
-    if CONFIG['MOZ_UPDATER'] or CONFIG['MOZ_MAINTENANCE_SERVICE']:
-        # If only the maintenance service is installed and not
-        # the updater, then the maintenance service may still be
-        # used for other things.  We need to build update/common
-        # which the maintenance service uses.
-        DIRS += ['common']
-        if CONFIG['OS_ARCH'] == 'WINNT':
-            DIRS += ['common-standalone']
-
-    if CONFIG['MOZ_UPDATER']:
-        DIRS += ['updater']
-
 XPIDL_MODULE = 'update'
 
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit_timermanager/xpcshell.ini']
+DIRS += [
+    'common',
+    'updater',
+]
 
 XPIDL_SOURCES += [
-    'nsIUpdateTimerManager.idl',
+    'nsIUpdateService.idl',
 ]
 
+TEST_DIRS += ['tests']
+
 EXTRA_COMPONENTS += [
-    'nsUpdateTimerManager.js',
-    'nsUpdateTimerManager.manifest',
+    'nsUpdateService.js',
+    'nsUpdateService.manifest',
+    'nsUpdateServiceStub.js',
 ]
 
-if CONFIG['MOZ_UPDATER']:
-    TEST_DIRS += ['tests']
-
-    XPIDL_SOURCES += [
-        'nsIUpdateService.idl',
-    ]
-
-    EXTRA_COMPONENTS += [
-        'nsUpdateService.js',
-        'nsUpdateService.manifest',
-        'nsUpdateServiceStub.js',
-    ]
-
-    EXTRA_JS_MODULES += [
-        'UpdateTelemetry.jsm',
-    ]
+EXTRA_JS_MODULES += [
+    'UpdateTelemetry.jsm',
+]
 
 JAR_MANIFESTS += ['jar.mn']
+
+with Files('**'):
+    BUG_COMPONENT = ('Toolkit', 'Application Update')
--- a/toolkit/mozapps/update/tests/Makefile.in
+++ b/toolkit/mozapps/update/tests/Makefile.in
@@ -13,18 +13,16 @@ aus-test-const_PATH   := $(XPCSHELLTESTR
 aus-test-const_FLAGS  := -Fsubstitution $(DEFINES) $(ACDEFINES)
 aus-test-const_TARGET := misc
 
 INSTALL_TARGETS      += xpcshell-data
 xpcshell-data_FILES  := $(filter-out $(pp_const_file),$(wildcard $(srcdir)/data/*))
 xpcshell-data_DEST   := $(XPCSHELLTESTROOT)/data
 xpcshell-data_TARGET := misc
 
-# Android doesn't use the Mozilla updater or the toolkit update UI
-ifneq (android,$(MOZ_WIDGET_TOOLKIT))
 ifndef MOZ_PROFILE_GENERATE
 ifdef COMPILE_ENVIRONMENT
 INSTALL_TARGETS        += xpcshell-helper
 xpcshell-helper_FILES  := $(DIST)/bin/TestAUSHelper$(BIN_SUFFIX)
 xpcshell-helper_DEST   := $(XPCSHELLTESTROOT)/data
 xpcshell-helper_TARGET := misc
 endif
 endif # Not MOZ_PROFILE_GENERATE
@@ -42,29 +40,25 @@ chrome-data_TARGET := misc
 INI_TEST_FILES = \
   TestAUSReadStrings1.ini \
   TestAUSReadStrings2.ini \
   TestAUSReadStrings3.ini \
   $(NULL)
 
 MOZ_WINCONSOLE = 1
 
-endif # Not Android
-
 include $(topsrcdir)/config/rules.mk
 
-ifneq (android,$(MOZ_WIDGET_TOOLKIT))
 # TestAUSReadStrings runs during check in the following directory with a Unicode
 # char in order to test bug 473417 on Windows.
 ifeq ($(OS_ARCH),WINNT)
 bug473417dir = test_bug473417-
 else
 bug473417dir = test_bug473417
 endif
 
 check::
 	$(RM) -rf $(DEPTH)/_tests/updater/ && $(NSINSTALL) -D $(DEPTH)/_tests/updater/$(bug473417dir)/
 	for i in $(INI_TEST_FILES); do \
 	  $(INSTALL) $(srcdir)/$$i $(DEPTH)/_tests/updater/$(bug473417dir)/; \
 	done
 	$(INSTALL) $(FINAL_TARGET)/TestAUSReadStrings$(BIN_SUFFIX) $(DEPTH)/_tests/updater/$(bug473417dir)/
 	@$(RUN_TEST_PROGRAM) $(DEPTH)/_tests/updater/$(bug473417dir)/TestAUSReadStrings$(BIN_SUFFIX)
-endif # Not Android
--- a/toolkit/mozapps/update/tests/moz.build
+++ b/toolkit/mozapps/update/tests/moz.build
@@ -3,47 +3,45 @@
 # 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/.
 
 HAS_MISC_RULE = True
 
 XPCSHELL_TESTS_MANIFESTS += ['unit_aus_update/xpcshell.ini']
 
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
-    MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
-    XPCSHELL_TESTS_MANIFESTS += ['unit_base_updater/xpcshell.ini']
+MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
+XPCSHELL_TESTS_MANIFESTS += ['unit_base_updater/xpcshell.ini']
 
-    if CONFIG['MOZ_MAINTENANCE_SERVICE']:
-        XPCSHELL_TESTS_MANIFESTS += ['unit_service_updater/xpcshell.ini']
+if CONFIG['MOZ_MAINTENANCE_SERVICE']:
+    XPCSHELL_TESTS_MANIFESTS += ['unit_service_updater/xpcshell.ini']
 
-    SimplePrograms([
-        'TestAUSHelper',
-        'TestAUSReadStrings',
-    ])
+SimplePrograms([
+    'TestAUSHelper',
+    'TestAUSReadStrings',
+])
 
-    LOCAL_INCLUDES += [
-        '/toolkit/mozapps/update',
-        '/toolkit/mozapps/update/common',
+LOCAL_INCLUDES += [
+    '/toolkit/mozapps/update',
+    '/toolkit/mozapps/update/common',
+]
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    USE_LIBS += [
+        'updatecommon-standalone',
     ]
 
-    if CONFIG['OS_ARCH'] == 'WINNT':
-        USE_LIBS += [
-            'updatecommon-standalone',
-        ]
-    else:
-        USE_LIBS += [
-            'updatecommon',
-        ]
-
-    if CONFIG['OS_ARCH'] == 'WINNT':
-        OS_LIBS += [
-            'wintrust',
-            'shlwapi',
-        ]
+    OS_LIBS += [
+        'wintrust',
+        'shlwapi',
+      ]
+else:
+    USE_LIBS += [
+        'updatecommon',
+    ]
 
 for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_DISPLAYNAME',
             'MOZ_APP_VENDOR', 'BIN_SUFFIX', 'MOZ_DEBUG'):
     DEFINES[var] = CONFIG[var]
 
 DEFINES['NS_NO_XPCOM'] = True
 
 if CONFIG['MOZ_MAINTENANCE_SERVICE']:
--- a/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
+++ b/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
@@ -1,16 +1,15 @@
 ; 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/.
 
 [DEFAULT]
 head = head_update.js
 tail =
-skip-if = toolkit == 'android'
 
 [canCheckForAndCanApplyUpdates.js]
 [urlConstruction.js]
 [updateCheckOnLoadOnErrorStatusText.js]
 [updateManagerXML.js]
 [remoteUpdateXML.js]
 [downloadAndHashCheckMar.js]
 [cleanupDownloadingForOlderAppVersion.js]
--- a/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
+++ b/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
@@ -4,17 +4,16 @@
 
 ; Tests that require the updater binary. These tests should never run on Android
 ; which doesn't use the updater binary as other applications do and are excluded
 ; from running the tests in the moz.build file.
 
 [DEFAULT]
 head = head_update.js
 tail =
-skip-if = toolkit == 'android'
 
 [marSuccessComplete.js]
 [marSuccessPartial.js]
 [marFailurePartial.js]
 [marStageSuccessComplete.js]
 skip-if = toolkit == 'gonk'
 reason = bug 820380
 [marStageSuccessPartial.js]
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -18,17 +18,19 @@
 #include "mozilla/IOInterposer.h"
 #include "mozilla/Likely.h"
 #include "mozilla/Poison.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Telemetry.h"
 
 #include "nsAppRunner.h"
 #include "mozilla/AppData.h"
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
 #include "nsUpdateDriver.h"
+#endif
 #include "ProfileReset.h"
 
 #ifdef MOZ_INSTRUMENT_EVENT_LOOP
 #include "EventTracer.h"
 #endif
 
 #ifdef XP_MACOSX
 #include "nsVersionComparator.h"
@@ -3713,17 +3715,17 @@ XREMain::XRE_mainStartup(bool* aExitFlag
     nsAutoCString desktopStartupEnv;
     desktopStartupEnv.AssignLiteral("DESKTOP_STARTUP_ID=");
     desktopStartupEnv.Append(mDesktopStartupID);
     // Leak it with extreme prejudice!
     PR_SetEnv(ToNewCString(desktopStartupEnv));
   }
 #endif
 
-#if defined(USE_MOZ_UPDATER)
+#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
   // Check for and process any available updates
   nsCOMPtr<nsIFile> updRoot;
   bool persistent;
   rv = mDirProvider.GetFile(XRE_UPDATE_ROOT_DIR, &persistent,
                             getter_AddRefs(updRoot));
   // XRE_UPDATE_ROOT_DIR may fail. Fallback to appDir if failed
   if (NS_FAILED(rv))
     updRoot = mDirProvider.GetAppDir();
--- a/toolkit/xre/nsUpdateDriver.h
+++ b/toolkit/xre/nsUpdateDriver.h
@@ -3,23 +3,21 @@
 /* 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/. */
 
 #ifndef nsUpdateDriver_h__
 #define nsUpdateDriver_h__
 
 #include "nscore.h"
-#ifdef MOZ_UPDATER
 #include "nsIUpdateService.h"
 #include "nsIThread.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "mozilla/Attributes.h"
-#endif
 
 class nsIFile;
 
 #if defined(XP_WIN)
 #include <windows.h>
   typedef HANDLE     ProcessType;
 #elif defined(XP_MACOSX)
   typedef pid_t      ProcessType;
@@ -52,17 +50,16 @@ nsresult ProcessUpdates(nsIFile *greDir,
                                     nsIFile *updRootDir,
                                     int argc, char **argv,
                                     const char *appVersion,
                                     bool restart = true,
                                     bool isOSUpdate = false,
                                     nsIFile *osApplyToDir = nullptr,
                                     ProcessType *pid = nullptr);
 
-#ifdef MOZ_UPDATER
 // The implementation of the update processor handles the task of loading the
 // updater application for staging an update.
 // XXX ehsan this is living in this file in order to make use of the existing
 // stuff here, we might want to move it elsewhere in the future.
 class nsUpdateProcessor final : public nsIUpdateProcessor
 {
 public:
   nsUpdateProcessor();
@@ -102,11 +99,9 @@ private:
   void UpdateDone();
   void ShutdownWatcherThread();
 
 private:
   ProcessType mUpdaterPID;
   nsCOMPtr<nsIThread> mProcessWatcher;
   StagedUpdateInfo mInfo;
 };
-#endif
-
 #endif  // nsUpdateDriver_h__