Bug 652445 - Remove WinCE code (incl Faststart & nsSplashScreenWin) from toolkit; r=dtownsend
authorEd Morley <bmo@edmorley.co.uk>
Fri, 29 Apr 2011 12:38:26 +0200
changeset 68747 8f79e7fc13d689c1248acb6954aa43bc4ee5cacc
parent 68746 f4c738892af6d400c361372909c1189c285e0929
child 68748 8ceab62fda1d37f0686650b0c6376da9ef658f5b
push idunknown
push userunknown
push dateunknown
reviewersdtownsend
bugs652445
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 652445 - Remove WinCE code (incl Faststart & nsSplashScreenWin) from toolkit; r=dtownsend
config/autoconf.mk.in
configure.in
mobile/app/Makefile.in
toolkit/Makefile.in
toolkit/components/Makefile.in
toolkit/components/alerts/resources/content/alert.js
toolkit/components/downloads/nsDownloadManager.cpp
toolkit/components/faststart/FastStartup.js
toolkit/components/faststart/FastStartup.manifest
toolkit/components/faststart/Makefile.in
toolkit/components/faststart/faststartstub.cpp
toolkit/components/startup/Makefile.in
toolkit/components/startup/nsUserInfoWin.cpp
toolkit/content/license.html
toolkit/library/Makefile.in
toolkit/library/libxul-config.mk
toolkit/library/libxul-rules.mk
toolkit/library/nsDllMain.cpp
toolkit/locales/l10n.mk
toolkit/mozapps/downloads/content/downloads.js
toolkit/mozapps/installer/packager.mk
toolkit/mozapps/installer/wince/Makefile.in
toolkit/mozapps/installer/wince/ns7zipExtractor.cpp
toolkit/mozapps/installer/wince/ns7zipExtractor.h
toolkit/mozapps/installer/wince/nsArchiveExtractor.cpp
toolkit/mozapps/installer/wince/nsArchiveExtractor.h
toolkit/mozapps/installer/wince/nsInstaller.cpp
toolkit/mozapps/installer/wince/nsInstaller.h
toolkit/mozapps/installer/wince/nsInstallerDlg.cpp
toolkit/mozapps/installer/wince/nsInstallerDlg.h
toolkit/mozapps/installer/wince/nsInstallerppc.rc
toolkit/mozapps/installer/wince/nsInstallerppc.rc2
toolkit/mozapps/installer/wince/nsSetupStrings.cpp
toolkit/mozapps/installer/wince/nsSetupStrings.h
toolkit/mozapps/installer/wince/nsSetupStrings.inc
toolkit/mozapps/installer/wince/readme.txt
toolkit/mozapps/installer/wince/resourceppc.h
toolkit/mozapps/installer/wince/uninstall/Makefile.in
toolkit/mozapps/installer/wince/uninstall/Uninstall.cpp
toolkit/mozapps/installer/wince/uninstall/Uninstall.rc
toolkit/mozapps/installer/wince/uninstall/resource.h
toolkit/mozapps/installer/wince/xulrunnerinstaller.ico
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/nsUpdateServiceStub.js
toolkit/mozapps/update/test/unit/head_update.js.in
toolkit/mozapps/update/test/unit/test_0150_appBinReplaced_xp_win_complete.js
toolkit/mozapps/update/test/unit/test_0151_appBinPatched_xp_win_partial.js
toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_win_complete.js
toolkit/mozapps/update/test/unit/test_0170_fileLocked_xp_win_complete.js
toolkit/mozapps/update/test/unit/test_0171_fileLocked_xp_win_partial.js
toolkit/mozapps/update/test/unit/test_0180_fileInUse_xp_win_complete.js
toolkit/mozapps/update/test/unit/test_0181_fileInUse_xp_win_partial.js
toolkit/mozapps/update/test/unit/test_0182_rmrfdirFileInUse_xp_win_complete.js
toolkit/mozapps/update/test/unit/test_0183_rmrfdirFileInUse_xp_win_partial.js
toolkit/mozapps/update/test/unit/test_0200_app_launch_apply_update.js
toolkit/themes/winstripe/global/toolbar.css
toolkit/toolkit-tiers.mk
toolkit/xre/Makefile.in
toolkit/xre/nsAppRunner.cpp
toolkit/xre/nsNativeAppSupportWin.cpp
toolkit/xre/nsSplashScreenWin.cpp
toolkit/xre/nsWindowsRestart.cpp
toolkit/xre/nsWindowsWMain.cpp
toolkit/xre/nsXREDirProvider.cpp
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -140,17 +140,16 @@ XPC_IDISPATCH_SUPPORT = @XPC_IDISPATCH_S
 NS_ENABLE_TSF = @NS_ENABLE_TSF@
 MOZ_SPELLCHECK = @MOZ_SPELLCHECK@
 MOZ_PROFILELOCKING = @MOZ_PROFILELOCKING@
 MOZ_FEEDS = @MOZ_FEEDS@
 MOZ_TOOLKIT_SEARCH = @MOZ_TOOLKIT_SEARCH@
 MOZ_PLACES = @MOZ_PLACES@
 MOZ_STORAGE = @MOZ_STORAGE@
 MOZ_SAFE_BROWSING = @MOZ_SAFE_BROWSING@
-MOZ_FASTSTART = @MOZ_FASTSTART@
 MOZ_URL_CLASSIFIER = @MOZ_URL_CLASSIFIER@
 MOZ_ZIPWRITER = @MOZ_ZIPWRITER@
 MOZ_MORK = @MOZ_MORK@
 MOZ_MORKREADER = @MOZ_MORKREADER@
 MOZ_NO_FAST_LOAD = @MOZ_NO_FAST_LOAD@
 MOZ_OGG = @MOZ_OGG@
 MOZ_RAW = @MOZ_RAW@
 MOZ_SYDNEYAUDIO = @MOZ_SYDNEYAUDIO@
--- a/configure.in
+++ b/configure.in
@@ -4797,17 +4797,16 @@ MOZ_PANGO=1
 MOZ_PERMISSIONS=1
 MOZ_PLACES=1
 MOZ_PREF_EXTENSIONS=1
 MOZ_PROFILELOCKING=1
 MOZ_PSM=1
 MOZ_RDF=1
 MOZ_REFLOW_PERF=
 MOZ_SAFE_BROWSING=
-MOZ_FASTSTART=
 MOZ_HELP_VIEWER=
 MOZ_SPELLCHECK=1
 MOZ_SPLASHSCREEN=
 MOZ_STORAGE=1
 MOZ_SVG=1
 MOZ_THUMB2=
 MOZ_TIMELINE=
 MOZ_TOOLKIT_SEARCH=1
@@ -6767,28 +6766,16 @@ MOZ_ARG_ENABLE_BOOL(safe-browsing,
     MOZ_SAFE_BROWSING=1,
     MOZ_SAFE_BROWSING= )
 if test -n "$MOZ_SAFE_BROWSING"; then
     AC_DEFINE(MOZ_SAFE_BROWSING)
 fi
 AC_SUBST(MOZ_SAFE_BROWSING)
 
 dnl ========================================================
-dnl = Enable faststart component
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(faststart,
-[  --enable-faststart      Enable the faststart component],
-    MOZ_FASTSTART=1,
-    MOZ_FASTSTART= )
-if test -n "$MOZ_FASTSTART"; then
-    AC_DEFINE(MOZ_FASTSTART)
-fi
-AC_SUBST(MOZ_FASTSTART)
-
-dnl ========================================================
 dnl = Enable url-classifier
 dnl ========================================================
 dnl Implicitly enabled by default if building with safe-browsing
 if test -n "$MOZ_SAFE_BROWSING"; then
     MOZ_URL_CLASSIFIER=1
 fi
 MOZ_ARG_ENABLE_BOOL(url-classifier,
 [  --enable-url-classifier Enable url classifier module],
--- a/mobile/app/Makefile.in
+++ b/mobile/app/Makefile.in
@@ -130,17 +130,16 @@ ifeq (http,$(patsubst http%,http,$(SOURC
 DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 REDIT_PATH = $(LIBXUL_DIST)/bin
 endif
 
 APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
-APP_BINARY_FASTSTART = $(MOZ_APP_NAME)faststart$(BIN_SUFFIX)
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 
 APP_NAME = $(MOZ_APP_DISPLAYNAME)
 APP_VERSION = $(MOZ_APP_VERSION)
 
 ifdef MOZ_DEBUG
 APP_NAME := $(APP_NAME)Debug
@@ -178,20 +177,16 @@ endif
 	printf "APPLMOZB" > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
 
 else # MOZ_WIDGET_TOOLKIT != cocoa
 
 libs::
 ifdef LIBXUL_SDK
 	cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY)
 endif
-ifdef MOZ_FASTSTART
-ifdef _MSC_VER
-endif
-endif
 ifndef SKIP_COPY_XULRUNNER
 ifdef LIBXUL_SDK
 	$(NSINSTALL) -D $(DIST)/bin/xulrunner
 	(cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
 endif
 endif # SKIP_COPY_XULRUNNER
 
 	$(NSINSTALL) -D $(DIST)/bin/chrome/icons/default
--- a/toolkit/Makefile.in
+++ b/toolkit/Makefile.in
@@ -58,23 +58,16 @@ PARALLEL_DIRS = \
   mozapps/update \
   mozapps/xpinstall \
   obsolete \
   profile \
   spatial-navigation \
   themes \
   $(NULL)
 
-ifeq ($(OS_ARCH),WINCE)
-ifdef WINCE_WINDOWS_MOBILE
-DIRS += mozapps/readstrings
-DIRS += mozapps/installer/wince
-endif
-endif
-
 ifneq (,$(filter gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
 PARALLEL_DIRS += system/unixproxy
 endif
 
 ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
 PARALLEL_DIRS += system/osxproxy
 endif
 
--- a/toolkit/components/Makefile.in
+++ b/toolkit/components/Makefile.in
@@ -115,20 +115,16 @@ PARALLEL_DIRS += \
   intl \
   $(NULL)
 endif
 
 ifdef MOZ_URL_CLASSIFIER
 PARALLEL_DIRS += url-classifier
 endif
 
-ifdef MOZ_FASTSTART
-PARALLEL_DIRS += faststart
-endif
-
 DIRS += \
   build \
   $(NULL)
 
 EXTRA_PP_COMPONENTS = nsDefaultCLH.js
 EXTRA_COMPONENTS = nsDefaultCLH.manifest
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/alerts/resources/content/alert.js
+++ b/toolkit/components/alerts/resources/content/alert.js
@@ -137,52 +137,46 @@ function onAlertLoad()
 
   sizeToContent();
 
   // Work around a bug where sizeToContent() leaves a border outside of the content
   var contentDim = document.getElementById("alertBox").boxObject;
   if (window.innerWidth == contentDim.width + 1)
     --window.innerWidth;
 
-#ifndef WINCE
   // Start with a 1px width/height, because 0 causes trouble with gtk1/2
   gCurrentSize = 1;
 
   // Determine final size
   if (gOrigin & NS_ALERT_HORIZONTAL)
   {
     gFinalSize = window.outerWidth;
     window.outerWidth = gCurrentSize;
   }
   else
   {
     gFinalSize = window.outerHeight;
     window.outerHeight = gCurrentSize;
   }
-#endif
 
   // Determine position
   var x = gOrigin & NS_ALERT_LEFT ? screen.availLeft :
           screen.availLeft + screen.availWidth - window.outerWidth;
   var y = gOrigin & NS_ALERT_TOP ? screen.availTop :
           screen.availTop + screen.availHeight - window.outerHeight;
 
   // Offset the alert by 10 pixels from the edge of the screen
   if (gOrigin & NS_ALERT_HORIZONTAL)
     y += gOrigin & NS_ALERT_TOP ? 10 : -10;
   else
     x += gOrigin & NS_ALERT_LEFT ? 10 : -10;
 
   window.moveTo(x, y);
 
-#ifndef WINCE
   setTimeout(animateAlert, gSlideTime);
-#else
-  setTimeout(closeAlert, gOpenTime);
-#endif
 }
 
 function animate(step)
 {
   gCurrentSize += step;
 
   if (gOrigin & NS_ALERT_HORIZONTAL)
   {
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -64,17 +64,17 @@
 #include "nsDownloadManager.h"
 #include "nsNetUtil.h"
 
 #include "mozStorageCID.h"
 #include "nsDocShellCID.h"
 #include "nsEmbedCID.h"
 #include "nsToolkitCompsCID.h"
 
-#if defined(XP_WIN) && !defined(WINCE)
+#ifdef XP_WIN
 #include <shlobj.h>
 #ifdef DOWNLOAD_SCANNER
 #include "nsDownloadScanner.h"
 #endif
 #endif
 
 #ifdef XP_MACOSX
 #include <CoreFoundation/CoreFoundation.h>
@@ -1134,17 +1134,17 @@ nsDownloadManager::GetDefaultDownloadsDi
   mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(),
                              getter_Copies(folderName));
 
 #if defined (XP_MACOSX)
   rv = dirService->Get(NS_OSX_DEFAULT_DOWNLOAD_DIR,
                        NS_GET_IID(nsILocalFile),
                        getter_AddRefs(downloadDir));
   NS_ENSURE_SUCCESS(rv, rv);
-#elif defined(XP_WIN) && !defined(WINCE)
+#elif defined(XP_WIN)
   rv = dirService->Get(NS_WIN_DEFAULT_DOWNLOAD_DIR,
                        NS_GET_IID(nsILocalFile),
                        getter_AddRefs(downloadDir));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Check the os version
   nsCOMPtr<nsIPropertyBag2> infoService =
      do_GetService(NS_SYSTEMINFO_CONTRACTID, &rv);
@@ -2238,17 +2238,17 @@ nsDownload::SetState(DownloadState aStat
               alerts->ShowAlertNotification(
                   NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
                   message, !removeWhenDone, EmptyString(), mDownloadManager,
                   EmptyString());
             }
         }
       }
 
-#if (defined(XP_WIN) && !defined(WINCE)) || defined(XP_MACOSX) || defined(ANDROID)
+#if defined(XP_WIN) || defined(XP_MACOSX) || defined(ANDROID)
       nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget);
       nsCOMPtr<nsIFile> file;
       nsAutoString path;
 
       if (fileURL &&
           NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
           file &&
           NS_SUCCEEDED(file->GetPath(path))) {
deleted file mode 100644
--- a/toolkit/components/faststart/FastStartup.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* -*- Mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 FastStartup.js
- *
- * The Initial Developer of the Original Code is Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Vladimir Vukicevic <vladimir@pobox.com>
- *   Brian Crowder <crowder@fiverocks.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cr = Components.results;
-const Cu = Components.utils;
-
-const Timer = Components.Constructor("@mozilla.org/timer;1", "nsITimer", "initWithCallback");
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-const RESTART_ENV_VAR = "FASTSTART_INITIATED_RESTART";
-
-function setenv(key, value) {
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Components.interfaces.nsIEnvironment);
-  env.set(key, value);
-}
-
-function getenv(key) {
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Components.interfaces.nsIEnvironment);
-  return env.get(key);
-}
-
-function nsFastStartupObserver() {
-  let _browserWindowCount = 0;
-  let _memCleanupTimer;
-  let _restartTimer;
-  let _isShuttingDown;
-
-  function stopMemoryCleanup() {
-    if (_memCleanupTimer) {
-      _memCleanupTimer.cancel();
-      _memCleanupTimer = null;
-    }
-
-    if (_restartTimer) {
-      _restartTimer.cancel();
-      _restartTimer = null;
-    }
-  }
-
-  function scheduleMemoryCleanup() {
-    if (_isShuttingDown)
-      return;
-
-    stopMemoryCleanup();
-
-    function restart() {
-      setenv(RESTART_ENV_VAR, "1");
-      setenv("NO_SPLASH", "1");
-      let appstartup = Cc["@mozilla.org/toolkit/app-startup;1"].
-                       getService(Ci.nsIAppStartup);
-      appstartup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
-      
-      _restartTimer = null;
-    }
-
-    function memoryCleanup() {
-      var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
-
-      // Do this 3 times, because of a comment in TestGtkEmbed that says this
-      // gives the cycle collector the best chance at purging things.
-      os.notifyObservers(null, "memory-pressure", "heap-minimize");
-      os.notifyObservers(null, "memory-pressure", "heap-minimize");
-      os.notifyObservers(null, "memory-pressure", "heap-minimize");
-
-      _memCleanupTimer = null; 
-    }
-
-    // wait 30s until firing off the memory cleanup, in case the user
-    // opens another window right away
-    _memCleanupTimer = new Timer(memoryCleanup, 30000, Ci.nsITimer.TYPE_ONE_SHOT);
-
-    // Also, begin a countdown to restart the stub in 15 minutes
-    _restartTimer = new Timer(restart, 60000 * 15, Ci.nsITimer.TYPE_ONE_SHOT);
-  }
-
-  //
-  // nsIObserver
-  //
-  this.observe = function observe(subject, topic, data) {
-    var win = subject;
-
-    // XXX the window at this point won't actually have its document loaded --
-    // win.document.documentURI will pretty much always be about:blank.  We need
-    // to attach a load handler to actually figure out which document gets loaded.
-    if (topic == "domwindowopened") {
-      stopMemoryCleanup();
-      _browserWindowCount++;
-    } else if (topic == "domwindowclosed") {
-      if (_browserWindowCount > 0)
-        _browserWindowCount--;
-      if (_browserWindowCount == 0) {
-        scheduleMemoryCleanup();
-        let prefservice = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService);
-        prefservice.savePrefFile(null);
-      }
-    } else if (topic == "quit-application-granted") {
-      stopMemoryCleanup();
-      _isShuttingDown = true;
-      let appstartup = Cc["@mozilla.org/toolkit/app-startup;1"].
-                       getService(Ci.nsIAppStartup);
-      appstartup.exitLastWindowClosingSurvivalArea();
-    }
-  }
-
-  /*
-   * QueryInterface
-   * We expect the WindowWatcher service to retain a strong reference to us, so supporting
-   * weak references is fine.
-   */
-  this.QueryInterface = XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]);
-}
-
-function nsFastStartupCLH() { }
-
-nsFastStartupCLH.prototype = {
-  //
-  // nsICommandLineHandler
-  //
-  handle: function fs_handle(cmdLine) {
-    // the rest of this only handles -faststart here
-
-    if (cmdLine.handleFlag("shutdown-faststart", false)) {
-      cmdLine.preventDefault = true;
-      // Shutdown this service
-      let appstartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
-      appstartup.quit(Ci.nsIAppStartup.eAttemptQuit);
-      return;
-    }
-
-    if (cmdLine.handleFlag("faststart-hidden", false) || (getenv(RESTART_ENV_VAR) == "1"))
-      cmdLine.preventDefault = true;
-
-    try {
-      // did we already initialize faststart?  if so,
-      // nothing to do here.
-      if (this.inited)
-        return;
-
-      this.inited = true;
-
-      // Clear this environment variable for subsequent runs
-      setenv(RESTART_ENV_VAR, "0");
-
-      let fsobs = new nsFastStartupObserver();
-      let wwatch = Cc["@mozilla.org/embedcomp/window-watcher;1"].
-                   getService(Ci.nsIWindowWatcher);
-      wwatch.registerNotification(fsobs);
-
-      let obsService = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
-      obsService.addObserver(fsobs, "quit-application-granted", true);
-
-      let appstartup = Cc["@mozilla.org/toolkit/app-startup;1"].
-                       getService(Ci.nsIAppStartup);
-      appstartup.enterLastWindowClosingSurvivalArea();
-    } catch (e) {
-      Cu.reportError(e);
-    }
-  },
-
-  helpInfo: "    -faststart-hidden      Start the FastStart service\n" +
-            "    -shutdown-faststart    Shutdown the FastStart service\n",
-
-  // QI
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
-
-  // XPCOMUtils factory
-  classID: Components.ID("{580c6c51-f690-4ce1-9ecc-b678e0c031c7}"),
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsFastStartupCLH]);
deleted file mode 100644
--- a/toolkit/components/faststart/FastStartup.manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-component {580c6c51-f690-4ce1-9ecc-b678e0c031c7} FastStartup.js
-contract @mozilla.org/browser/faststart;1 {580c6c51-f690-4ce1-9ecc-b678e0c031c7}
-category command-line-handler 00-faststart @mozilla.org/browser/faststart;1
deleted file mode 100644
--- a/toolkit/components/faststart/Makefile.in
+++ /dev/null
@@ -1,63 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# 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 the Mozilla Browser code.
-#
-# The Initial Developer of the Original Code is the Mozilla Foundation.
-# Portions created by the Initial Developer are Copyright (C) 2009
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Vladimir Vukicevic <vladimir@pobox.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH     = ../../..
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DEFINES += -DMOZ_NO_MOZALLOC
-
-EXTRA_PP_COMPONENTS = \
-    FastStartup.js \
-    FastStartup.manifest \
-    $(NULL)
-
-ifdef _MSC_VER
-ifdef WINCE
-CPPSRCS = \
-    faststartstub.cpp \
-    $(NULL)
-
-SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX)) \
-
-WIN32_EXE_LDFLAGS += -ENTRY:WinMainCRTStartup
-endif
-endif
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/toolkit/components/faststart/faststartstub.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <windows.h>
-#include <stdlib.h>
-#include <tchar.h>
-#include <stdio.h>
-
-int WINAPI
-WinMain(HINSTANCE hInstance,
-    HINSTANCE hPrevInstance,
-    LPTSTR lpCmdLine,
-    int nCmdShow)
-{
-  PROCESS_INFORMATION pi;
-  STARTUPINFOW si = { 0 };
-  wchar_t modfilename[MAX_PATH];
-  wchar_t execname[MAX_PATH];
-  wchar_t args[MAX_PATH];
-  wcscpy(args, L"-nosplash -faststart-hidden");
-
-  HMODULE mod = GetModuleHandle(NULL);
-  GetModuleFileNameW(mod, modfilename, sizeof(modfilename)/sizeof(modfilename[0]));
-  wchar_t *chomp = wcsstr(modfilename, L"faststart.exe");
-  if (!chomp) {
-      MessageBoxW(NULL, L"Couldn't figure out how to run the faststart service!", L"Faststart Fail", MB_OK);
-	  return 0;
-  }
-
-  size_t len = chomp - modfilename;
-  wcsncpy(execname, modfilename, len);
-  execname[len] = 0;
-  wcscat(execname, L".exe");
-
-  BOOL ok = CreateProcessW(execname, args, NULL, NULL, FALSE, 0,
-                           NULL, NULL, &si, &pi);
-  if (!ok) {
-      MessageBoxW(NULL, L"Couldn't figure out how to run the faststart service!", L"Faststart Fail", MB_OK);
-	  return 0;
-  }
-  return 0;
-}
--- a/toolkit/components/startup/Makefile.in
+++ b/toolkit/components/startup/Makefile.in
@@ -50,17 +50,17 @@ LIBXUL_LIBRARY = 1
 
 CPPSRCS = \
   nsAppStartup.cpp \
   $(NULL)
 
 ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS += nsUserInfoOS2.cpp
 else
-ifeq (,$(filter-out WINCE WINNT,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 CPPSRCS += nsUserInfoWin.cpp
 else
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CMMSRCS += nsUserInfoMac.mm
 else
 CPPSRCS += nsUserInfoUnix.cpp
 endif
 endif
--- a/toolkit/components/startup/nsUserInfoWin.cpp
+++ b/toolkit/components/startup/nsUserInfoWin.cpp
@@ -51,29 +51,27 @@ nsUserInfo::~nsUserInfo()
 {
 }
 
 NS_IMPL_ISUPPORTS1(nsUserInfo,nsIUserInfo)
 
 NS_IMETHODIMP
 nsUserInfo::GetUsername(char **aUsername)
 {
-#ifndef WINCE
     *aUsername = nsnull;
 
     PRUnichar username[256];
     DWORD size = 256;
 
     if (!GetUserNameW(username, &size))
         return NS_ERROR_FAILURE;
 
     *aUsername = ToNewUTF8String(nsDependentString(username));
-    if (*aUsername) return NS_OK;
-#endif
-    return NS_ERROR_FAILURE;
+
+    return (*aUsername) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP 
 nsUserInfo::GetFullname(PRUnichar **aFullname)
 {
     *aFullname = nsnull;
     return NS_ERROR_NOT_IMPLEMENTED;
 }
--- a/toolkit/content/license.html
+++ b/toolkit/content/license.html
@@ -3612,17 +3612,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 
     <hr>
 
     <h1><a name="other-notices"></a>Other Required Notices</h1>
 
     <ul>
       <li>This software is based in part on the work of the Independent 
           JPEG Group.</li>
-      <li>Portions of the OS/2, Windows Mobile and Android versions
+      <li>Portions of the OS/2 and Android versions
           of this software are copyright &copy;1996-2010
           <a href="http://www.freetype.org/">The FreeType Project</a>.
           All rights reserved.</li>
     </ul>
 
 
     <hr>
 
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -65,20 +65,16 @@ endif
 
 VPATH += $(topsrcdir)/build/
 CPPSRCS += $(STDCXX_COMPAT)
 
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 CPPSRCS += dlldeps-xul.cpp
 endif
 
-ifeq ($(OS_ARCH),WINCE)
-CPPSRCS += dlldeps-xul.cpp
-endif
-
 ifeq ($(OS_ARCH),OS2)
 CPPSRCS += dlldeps-xul.cpp
 endif
 
 ifneq (,$(MOZ_ENABLE_GTK2))
 DEFINES += -DMOZ_ENABLE_GTK2
 endif
 
@@ -125,17 +121,17 @@ CPPSRCS += \
 	$(NULL)
 
 GARBAGE += \
 	$(RDF_UTIL_SRC_LCPPSRCS) \
 	$(NULL)
 endif
 endif
 
-ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
+ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
 SDK_LIBRARY = $(IMPORT_LIBRARY)
 else
 SDK_LIBRARY = $(SHARED_LIBRARY)
 endif
 
 EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
 
 ifndef MOZ_ENABLE_LIBXUL
@@ -222,23 +218,16 @@ ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32 shlwapi psapi ws2_32 dbghelp)
 ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
 OS_LIBS += $(call EXPAND_LIBNAME,imagehlp)
 endif
 ifdef MOZ_CRASHREPORTER
 OS_LIBS += $(call EXPAND_LIBNAME,wininet)
 endif
 endif # WINNT
-ifeq ($(OS_ARCH),WINCE)
-OS_LIBS += $(call EXPAND_LIBNAME, aygshell uuid ole32 oleaut32 Ws2 ddraw)
-OS_LIBS += $(call EXPAND_LIBNAME, ceosutil libcmt comsuppw)
-ifdef WINCE_WINDOWS_MOBILE
-OS_LIBS += $(call EXPAND_LIBNAME, cellcore)
-endif
-endif
 
 ifdef MOZ_JPROF
 EXTRA_DSO_LDOPTS += -ljprof
 endif
 
 ifdef MOZ_ENABLE_QT
 EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) $(XEXT_LIBS)
 endif
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -36,17 +36,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 CPPSRCS += \
 	nsStaticXULComponents.cpp \
 	$(NULL)
 
-ifeq (,$(filter-out WINCE WINNT,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 REQUIRES += widget gfx
 CPPSRCS += \
 	nsDllMain.cpp \
 	$(NULL)
 endif
 
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 CPPSRCS += \
@@ -110,23 +110,18 @@ ifneq (Android,$(OS_TARGET))
 OS_LIBS += -lrt
 endif
 endif
 
 STATIC_LIBS += \
 	xpcom_core \
 	ucvutil_s \
 	chromium_s \
-	$(NULL)
-
-ifndef WINCE
-STATIC_LIBS += \
 	mozreg_s \
 	$(NULL)
-endif
 
 # component libraries
 COMPONENT_LIBS += \
 	necko \
 	uconv \
 	i18n \
 	chardet \
 	jar$(VERSION_NUMBER) \
--- a/toolkit/library/libxul-rules.mk
+++ b/toolkit/library/libxul-rules.mk
@@ -50,19 +50,17 @@ DEFINES += \
 	-D_IMPL_NS_STRINGAPI \
 	-DEXPORT_XPT_API \
 	-DEXPORT_XPTC_API \
 	-D_IMPL_NS_GFX \
 	-D_IMPL_NS_WIDGET \
 	$(NULL)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-ifneq ($(OS_ARCH),WINCE)
 OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
 endif
-endif
 
 export:: dlldeps.cpp
 
 dlldeps.cpp: $(topsrcdir)/xpcom/build/dlldeps.cpp
 	$(INSTALL) $^ .
 
 GARBAGE += dlldeps.cpp
--- a/toolkit/library/nsDllMain.cpp
+++ b/toolkit/library/nsDllMain.cpp
@@ -41,21 +41,17 @@
 #include "nsToolkit.h"
 
 #if defined(__GNUC__)
 // If DllMain gets name mangled, it won't be seen.
 extern "C" {
 #endif
 
 BOOL APIENTRY DllMain(  
-#ifdef WINCE
-                      HANDLE hModule, 
-#else 
                       HINSTANCE hModule, 
-#endif
                       DWORD reason, 
                       LPVOID lpReserved )
 {
     switch( reason ) {
         case DLL_PROCESS_ATTACH:
             nsToolkit::Startup((HINSTANCE)hModule);
             break;
 
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -150,20 +150,16 @@ repackage-zip:  libs-$(AB_CD)
 ifneq (en,$(AB))
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 	mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/$(AB).lproj
 endif
 endif
 	$(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
 	cd $(DIST)/l10n-stage; \
 	  $(MAKE_PACKAGE)
-ifeq (WINCE,$(OS_ARCH))
-	cd $(DIST)/l10n-stage; \
-	  $(MAKE_CAB)
-endif
 ifdef MAKE_COMPLETE_MAR
 	$(MAKE) -C $(MOZDEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \
 	  MOZ_PKG_PRETTYNAMES=$(MOZ_PKG_PRETTYNAMES) \
 	  PACKAGE_BASE_DIR="$(_ABS_DIST)/l10n-stage" \
 	  DIST="$(_ABS_DIST)"
 endif
 # packaging done, undo l10n stuff
 ifneq (en,$(AB))
@@ -172,19 +168,16 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 endif
 endif
 ifdef MOZ_OMNIJAR
 	@(cd $(STAGEDIST) && $(UNPACK_OMNIJAR))
 endif
 	$(MAKE) clobber-zip AB_CD=$(AB_CD)
 	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
 	mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(ZIP_OUT)"
-ifeq (WINCE,$(OS_ARCH))
-	mv -f "$(DIST)/l10n-stage/$(PKG_BASENAME).cab" "$(DIST)/$(PKG_PATH)$(PKG_BASENAME).cab"
-endif
 
 repackage-zip-%: $(STAGEDIST)
 	@$(MAKE) repackage-zip AB_CD=$* ZIP_IN="$(ZIP_IN)"
 
 APP_DEFINES = $(firstword $(wildcard $(LOCALE_SRCDIR)/defines.inc) \
                           $(srcdir)/en-US/defines.inc)
 TK_DEFINES = $(firstword \
    $(wildcard $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc) \
--- a/toolkit/mozapps/downloads/content/downloads.js
+++ b/toolkit/mozapps/downloads/content/downloads.js
@@ -290,29 +290,27 @@ function openDownload(aDownload)
     var dontAsk = false;
     var pref = Cc["@mozilla.org/preferences-service;1"].
                getService(Ci.nsIPrefBranch);
     try {
       dontAsk = !pref.getBoolPref(PREF_BDM_ALERTONEXEOPEN);
     } catch (e) { }
 
 #ifdef XP_WIN
-#ifndef WINCE
     // On Vista and above, we rely on native security prompting for
     // downloaded content unless it's disabled.
     try {
       var sysInfo = Cc["@mozilla.org/system-info;1"].
                     getService(Ci.nsIPropertyBag2);
       if (parseFloat(sysInfo.getProperty("version")) >= 6 &&
           pref.getBoolPref(PREF_BDM_SCANWHENDONE)) {
         dontAsk = true;
       }
     } catch (ex) { }
 #endif
-#endif
 
     if (!dontAsk) {
       var strings = document.getElementById("downloadStrings");
       var name = aDownload.getAttribute("target");
       var message = strings.getFormattedString("fileExecutableSecurityWarning", [name, name]);
 
       let title = gStr.fileExecutableSecurityWarningTitle;
       let dontAsk = gStr.fileExecutableSecurityWarningDontAsk;
@@ -487,22 +485,20 @@ function Startup()
     if (e.keyCode == e.DOM_VK_ESCAPE) {
       // Move focus to the list instead of closing the window
       gDownloadsView.focus();
       e.preventDefault();
     }
   }, false);
 
 #ifdef XP_WIN
-#ifndef WINCE
   let tempScope = {};
   Cu.import("resource://gre/modules/DownloadTaskbarProgress.jsm", tempScope);
   tempScope.DownloadTaskbarProgress.onDownloadWindowLoad(window);
 #endif
-#endif
 }
 
 function Shutdown()
 {
   gDownloadManager.removeListener(gDownloadListener);
 
   let obs = Cc["@mozilla.org/observer-service;1"].
             getService(Ci.nsIObserverService);
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -42,17 +42,17 @@
 include $(MOZILLA_DIR)/toolkit/mozapps/installer/package-name.mk
 
 # This is how we create the binary packages we release to the public.
 
 ifndef MOZ_PKG_FORMAT
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 MOZ_PKG_FORMAT  = DMG
 else
-ifeq (,$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
+ifeq (,$(filter-out OS2 WINNT, $(OS_ARCH)))
 MOZ_PKG_FORMAT  = ZIP
 else
 ifeq (,$(filter-out SunOS, $(OS_ARCH)))
    MOZ_PKG_FORMAT  = BZ2
 else
    ifeq (,$(filter-out gtk2 qt, $(MOZ_WIDGET_TOOLKIT)))
       MOZ_PKG_FORMAT  = BZ2
    else
@@ -62,48 +62,34 @@ else
           MOZ_PKG_FORMAT = TGZ
       endif
    endif
 endif
 endif
 endif
 endif # MOZ_PKG_FORMAT
 
-ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 INSTALLER_DIR   = windows
 endif
 
 PACKAGE       = $(PKG_PATH)$(PKG_BASENAME)$(PKG_SUFFIX)
 
 # By default, the SDK uses the same packaging type as the main bundle,
 # but on mac it is a .tar.bz2
 SDK_PATH      = $(PKG_PATH)
 ifeq ($(MOZ_APP_NAME),xulrunner)
 SDK_PATH = sdk/
 endif
 SDK_SUFFIX    = $(PKG_SUFFIX)
 SDK           = $(SDK_PATH)$(PKG_BASENAME).sdk$(SDK_SUFFIX)
 
 MAKE_PACKAGE	= $(error What is a $(MOZ_PKG_FORMAT) package format?);
-MAKE_CAB	= $(error Don't know how to make a CAB!);
 _ABS_DIST = $(call core_abspath,$(DIST))
 
-ifdef WINCE
-ifndef WINCE_WINDOWS_MOBILE
-CABARGS += -s
-endif
-ifdef MOZ_FASTSTART
-CABARGS += -faststart
-endif
-VSINSTALLDIR ?= $(error VSINSTALLDIR not set, must be set to the Visual Studio install directory)
-MAKE_CAB	= $(PYTHON) $(MOZILLA_DIR)/build/package/wince/make_wince_cab.py \
-	$(CABARGS) "$(VSINSTALLDIR)/SmartDevices/SDK/SDKTools/cabwiz.exe" \
-	"$(MOZ_PKG_DIR)" "$(MOZ_APP_DISPLAYNAME)" "$(PKG_PATH)$(PKG_BASENAME).cab"
-endif
-
 CREATE_FINAL_TAR = $(TAR) -c --owner=0 --group=0 --numeric-owner \
   --mode="go-w" -f
 UNPACK_TAR       = tar -xf-
 
 ifeq ($(MOZ_PKG_FORMAT),TAR)
 PKG_SUFFIX	= .tar
 INNER_MAKE_PACKAGE 	= $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) > $(PACKAGE)
 INNER_UNMAKE_PACKAGE	= $(UNPACK_TAR) < $(UNPACKAGE)
@@ -122,21 +108,16 @@ INNER_UNMAKE_PACKAGE	= bunzip2 -c $(UNPA
 MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK)
 endif
 ifeq ($(MOZ_PKG_FORMAT),ZIP)
 PKG_SUFFIX	= .zip
 INNER_MAKE_PACKAGE	= $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR)
 INNER_UNMAKE_PACKAGE	= $(UNZIP) $(UNPACKAGE)
 MAKE_SDK = $(ZIP) -r9D $(SDK) $(MOZ_APP_NAME)-sdk
 endif
-ifeq ($(MOZ_PKG_FORMAT),CAB)
-PKG_SUFFIX	= .cab
-INNER_MAKE_PACKAGE	= $(MAKE_CAB)
-INNER_UNMAKE_PACKAGE	= $(error Unpacking CAB files is not supported)
-endif
 ifeq ($(MOZ_PKG_FORMAT),SFX7Z)
 PKG_SUFFIX	= .exe
 INNER_MAKE_PACKAGE	= rm -f app.7z && \
   mv $(MOZ_PKG_DIR) core && \
   $(CYGWIN_WRAPPER) 7z a -r -t7z app.7z -mx -m0=BCJ2 -m1=LZMA:d24 \
     -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3 && \
   mv core $(MOZ_PKG_DIR) && \
   cat $(SFX_HEADER) app.7z > $(PACKAGE) && \
@@ -530,17 +511,17 @@ GARBAGE		+= $(DIST)/$(PACKAGE) $(PACKAGE
 
 ifeq ($(OS_ARCH),IRIX)
 STRIP_FLAGS	= -f
 endif
 ifeq ($(OS_ARCH),OS2)
 STRIP		= $(MOZILLA_DIR)/toolkit/mozapps/installer/os2/strip.cmd
 endif
 
-ifneq (,$(filter WINNT WINCE OS2,$(OS_ARCH)))
+ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
 PKGCP_OS = dos
 else
 PKGCP_OS = unix
 endif
 
 # The following target stages files into two directories: one directory for
 # core files, and one for optional extensions based on the information in
 # the MOZ_PKG_MANIFEST file and the following vars:
@@ -693,17 +674,17 @@ make-sourcestamp-file::
 # The install target will install the application to prefix/lib/appname-version
 # In addition if INSTALL_SDK is set, it will install the development headers,
 # libraries, and IDL files as follows:
 # dist/include -> prefix/include/appname-version
 # dist/idl -> prefix/share/idl/appname-version
 # dist/sdk/lib -> prefix/lib/appname-devel-version/lib
 # prefix/lib/appname-devel-version/* symlinks to the above directories
 install:: stage-package
-ifneq (,$(filter WINNT WINCE,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 	$(error "make install" is not supported on this platform. Use "make package" instead.)
 endif
 ifeq (bundle,$(MOZ_FS_LAYOUT))
 	$(error "make install" is not supported on this platform. Use "make package" instead.)
 endif
 ifdef MOZ_OMNIJAR
 	cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR)
 endif
@@ -757,19 +738,16 @@ make-sdk:
 	(cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | \
 	  (cd $(DIST)/$(MOZ_APP_NAME)-sdk/lib && tar -xf -)
 	$(NSINSTALL) -D $(DIST)/$(SDK_PATH)
 	cd $(DIST) && $(MAKE_SDK)
 
 ifeq ($(OS_TARGET), WINNT)
 INSTALLER_PACKAGE = $(DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
 endif
-ifeq ($(OS_TARGET), WINCE)
-INSTALLER_PACKAGE = $(DIST)/$(PKG_PATH)$(PKG_BASENAME).cab
-endif
 
 # These are necessary because some of our packages/installers contain spaces
 # in their filenames and GNU Make's $(wildcard) function doesn't properly
 # deal with them.
 empty :=
 space = $(empty) $(empty)
 QUOTED_WILDCARD = $(if $(wildcard $(subst $(space),?,$(1))),"$(1)")
 ESCAPE_SPACE = $(subst $(space),\$(space),$(1))
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/Makefile.in
+++ /dev/null
@@ -1,76 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# 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 Fennec Installer for WinCE.
-#
-# The Initial Developer of the Original Code is The Mozilla Foundation.
-#
-# Portions created by the Initial Developer are Copyright (C) 2009
-# the Mozilla Foundation <http://www.mozilla.org/>. All Rights Reserved.
-#
-# Contributor(s): 
-#   Alex Pakhotin <alexp@mozilla.com> (original author)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH     = ../../../..
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-export NO_SHUNT = 1
-USE_STATIC_LIBS = 1
-
-PROGRAM = xulrunner-stub-installer.sfx
-
-REQUIRES = lib7z
-
-CPPSRCS = \
-  nsInstaller.cpp \
-  nsInstallerDlg.cpp \
-  nsArchiveExtractor.cpp \
-  ns7zipExtractor.cpp \
-  nsSetupStrings.cpp \
-  $(NULL)
-
-LOCAL_INCLUDES += -I$(srcdir)/../../readstrings
-
-RCINCLUDE = nsInstallerppc.rc
-
-DEFINES += -D_UNICODE
-
-LIBS += $(DEPTH)/toolkit/mozapps/readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX) \
-  $(DIST)/lib/7z.lib \
-  $(NULL)
-
-OS_LIBS += aygshell.lib commctrl.lib note_prj.lib oleaut32.lib ole32.lib libcmt.lib coredll.lib corelibc.lib
-
-WIN32_EXE_LDFLAGS += -ENTRY:WinMain
-
-DIRS += uninstall
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/ns7zipExtractor.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "wtypes.h"
-#include "nsArchiveExtractor.h"
-#include "ns7zipExtractor.h"
-#include "7zLib.h"
-
-static nsExtractorProgress *g_pProgress = NULL;
-
-static void ExtractProgressCallback(int nPercentComplete)
-{
-  if (g_pProgress)
-  {
-    g_pProgress->Progress(nPercentComplete);
-  }
-}
-
-static void ShowError()
-{
-  MessageBoxW(GetForegroundWindow(), GetExtractorError(), L"Extractor", MB_OK|MB_ICONERROR);
-}
-
-ns7zipExtractor::ns7zipExtractor(const WCHAR *sArchiveName, DWORD dwSfxStubSize, nsExtractorProgress *pProgress) :
-  nsArchiveExtractor(sArchiveName, dwSfxStubSize, pProgress)
-{
-  g_pProgress = pProgress;
-}
-
-ns7zipExtractor::~ns7zipExtractor()
-{
-  g_pProgress = NULL;
-}
-
-int ns7zipExtractor::Extract(const WCHAR *sDestinationDir)
-{
-  int res = SzExtractSfx(m_sArchiveName, m_dwSfxStubSize, NULL, sDestinationDir, ExtractProgressCallback);
-  if (res != 0)
-    ShowError();
-  return res;
-}
-
-int ns7zipExtractor::ExtractFile(const WCHAR *sFileName, const WCHAR *sDestinationDir)
-{
-  int res = SzExtractSfx(m_sArchiveName, m_dwSfxStubSize, sFileName, sDestinationDir, NULL);
-  if (res != 0)
-    ShowError();
-  return res;
-}
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/ns7zipExtractor.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#pragma once
-
-#include "nsArchiveExtractor.h"
-
-class ns7zipExtractor : public nsArchiveExtractor
-{
-public:
-  ns7zipExtractor(const WCHAR *sArchiveName, DWORD dwSfxStubSize, nsExtractorProgress *pProgress);
-  virtual ~ns7zipExtractor();
-
-  virtual int Extract(const WCHAR *sDestinationDir);
-  virtual int ExtractFile(const WCHAR *sFileName, const WCHAR *sDestinationDir);
-};
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsArchiveExtractor.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "wtypes.h"
-#include "nsArchiveExtractor.h"
-
-nsArchiveExtractor::nsArchiveExtractor(const WCHAR *sArchiveName, DWORD dwSfxStubSize, nsExtractorProgress *pProgress) :
-  m_sArchiveName(NULL), m_pProgress(pProgress), m_dwSfxStubSize(dwSfxStubSize)
-{
-  if (sArchiveName)
-    m_sArchiveName = wcsdup(sArchiveName);
-}
-
-nsArchiveExtractor::~nsArchiveExtractor()
-{
-  free(m_sArchiveName);
-}
-
-int nsArchiveExtractor::Extract(const WCHAR *sDestinationDir)
-{
-  return OK;
-}
-
-int nsArchiveExtractor::ExtractFile(const WCHAR *sFileName, const WCHAR *sDestinationDir)
-{
-  return OK;
-}
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsArchiveExtractor.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#pragma once
-
-/**
- *  Class to show the progress
- */
-class nsExtractorProgress
-{
-public:
-  nsExtractorProgress() {}
-  virtual void Progress(int nPercentComplete) = 0; /* to be overriden to get progress notifications */
-};
-
-/**
- *  Base archive-extractor class.
- *  Used to derive a specific archive format implementation.
- */
-class nsArchiveExtractor
-{
-public:
-  enum
-  {
-    OK = 0,
-    ERR_FAIL = -1,
-    ERR_PARAM = -2,
-    ERR_READ = -3,
-    ERR_WRITE = -4,
-    ERR_MEM = -5,
-    ERR_NO_ARCHIVE = -6,
-    ERR_EXTRACTION = -7,
-  };
-
-  nsArchiveExtractor(const WCHAR *sArchiveName, DWORD dwSfxStubSize, nsExtractorProgress *pProgress);
-  virtual ~nsArchiveExtractor();
-
-  virtual int Extract(const WCHAR *sDestinationDir);
-  virtual int ExtractFile(const WCHAR *sFileName, const WCHAR *sDestinationDir);
-
-protected:
-  WCHAR *m_sArchiveName;
-  nsExtractorProgress *m_pProgress;
-  DWORD m_dwSfxStubSize;
-};
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsInstaller.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- *
- * nsInstaller.cpp : Mozilla Fennec Installer
- *
- */
-
-#include <windows.h>
-#include <DeviceResolutionAware.h>
-#include "nsSetupStrings.h"
-#include "nsInstaller.h"
-#include "ns7zipExtractor.h"
-#include "nsInstallerDlg.h"
-
-const WCHAR c_sStringsFile[] = L"setup.ini";
-
-// Global Variables:
-nsSetupStrings Strings;
-
-HINSTANCE g_hInst;
-WCHAR     g_sSourcePath[MAX_PATH];
-WCHAR     g_sExeFullFileName[MAX_PATH];
-WCHAR     g_sExeFileName[MAX_PATH];
-DWORD     g_dwExeSize;
-
-// Forward declarations of functions included in this code module:
-BOOL InitInstance(HINSTANCE, int);
-DWORD GetExeSize();
-BOOL PostExtract();
-BOOL LoadStrings();
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// WinMain
-//
-///////////////////////////////////////////////////////////////////////////////
-int WINAPI WinMain(HINSTANCE hInstance,
-                   HINSTANCE hPrevInstance,
-                   LPTSTR    lpCmdLine,
-                   int       nCmdShow)
-{
-  int nResult = -1;
-
-  if (!InitInstance(hInstance, nCmdShow)) 
-    return nResult;
-
-  nsInstallerDlg::GetInstance()->Init(g_hInst);
-  nResult = nsInstallerDlg::GetInstance()->DoModal();
-
-  return nResult;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// InitInstance
-//
-///////////////////////////////////////////////////////////////////////////////
-BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
-{
-  g_hInst = hInstance;
-
-  InitCommonControls();
-
-  g_sExeFileName[0] = L'\0';
-  if (GetModuleFileName(NULL, g_sExeFullFileName, MAX_PATH) == 0)
-    return FALSE;
-
-  wcscpy(g_sSourcePath, g_sExeFullFileName);
-  WCHAR *sSlash = wcsrchr(g_sSourcePath, L'\\');
-  wcscpy(g_sExeFileName, sSlash + 1);
-  *sSlash = L'\0'; // cut the file name
-
-  g_dwExeSize = GetExeSize();
-
-  return LoadStrings();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// GetExeSize
-//
-///////////////////////////////////////////////////////////////////////////////
-
-DWORD AbsoluteSeek(HANDLE, DWORD);
-void  ReadBytes(HANDLE, LPVOID, DWORD);
-
-DWORD GetExeSize()
-{
-  DWORD dwSize = 0;
-  HANDLE hImage;
-
-  DWORD  dwSectionOffset;
-  DWORD  dwCoffHeaderOffset;
-  DWORD  moreDosHeader[16];
-
-  ULONG  NTSignature;
-
-  IMAGE_DOS_HEADER      image_dos_header;
-  IMAGE_FILE_HEADER     image_file_header;
-  IMAGE_OPTIONAL_HEADER image_optional_header;
-  IMAGE_SECTION_HEADER  image_section_header;
-
-  // Open the EXE file.
-  hImage = CreateFile(g_sExeFullFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
-                      OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
-  if (INVALID_HANDLE_VALUE == hImage)
-  {
-    ErrorMsg(L"Could not open the EXE");
-    return 0;
-  }
-
-  // Read the MS-DOS image header.
-  ReadBytes(hImage, &image_dos_header, sizeof(image_dos_header));
-
-  if (IMAGE_DOS_SIGNATURE != image_dos_header.e_magic)
-  {
-    ErrorMsg(L"Unknown file format.");
-    return 0;
-  }
-
-  // Read more MS-DOS header.
-  ReadBytes(hImage, moreDosHeader, sizeof(moreDosHeader));
-
-  // Get actual COFF header.
-  dwCoffHeaderOffset = AbsoluteSeek(hImage, image_dos_header.e_lfanew) + sizeof(ULONG);
-
-  ReadBytes (hImage, &NTSignature, sizeof(NTSignature));
-
-  if (IMAGE_NT_SIGNATURE != NTSignature)
-  {
-    ErrorMsg(L"Missing NT signature. Unknown file type.");
-    return 0;
-  }
-
-  dwSectionOffset = dwCoffHeaderOffset + IMAGE_SIZEOF_FILE_HEADER + IMAGE_SIZEOF_NT_OPTIONAL_HEADER;
-
-  ReadBytes(hImage, &image_file_header, IMAGE_SIZEOF_FILE_HEADER);
-
-  // Read optional header.
-  ReadBytes(hImage, &image_optional_header, IMAGE_SIZEOF_NT_OPTIONAL_HEADER);
-
-  WORD nNumSections = image_file_header.NumberOfSections;
-
-  for (WORD i = 0; i < nNumSections; i++)
-  {
-    ReadBytes(hImage, &image_section_header, sizeof(IMAGE_SECTION_HEADER));
-
-    DWORD dwRawData = image_section_header.PointerToRawData + image_section_header.SizeOfRawData;
-    if (dwRawData > dwSize)
-      dwSize = dwRawData;
-  }
-
-  CloseHandle(hImage);
-
-  return dwSize;
-}
-
-DWORD AbsoluteSeek(HANDLE hFile, DWORD offset)
-{
-  DWORD newOffset;
-
-  if ((newOffset = SetFilePointer(hFile, offset, NULL, FILE_BEGIN)) == 0xFFFFFFFF)
-    ErrorMsg(L"SetFilePointer failed");
-
-  return newOffset;
-}
-
-void ReadBytes(HANDLE hFile, LPVOID buffer, DWORD size)
-{
-  DWORD bytes;
-
-  if (!ReadFile(hFile, buffer, size, &bytes, NULL))
-    ErrorMsg(L"ReadFile failed");
-  else if (size != bytes)
-    ErrorMsg(L"Read the wrong number of bytes");
-}
-
-//////////////////////////////////////////////////////////////////////////
-//
-// Read strings resource from the attached archive
-//
-//////////////////////////////////////////////////////////////////////////
-BOOL LoadStrings()
-{
-  WCHAR *sExtractPath = L"\\Temp\\";
-  WCHAR sExtractedStringsFile[MAX_PATH];
-  _snwprintf(sExtractedStringsFile, MAX_PATH, L"%s%s", sExtractPath, c_sStringsFile);
-
-  ns7zipExtractor archiveExtractor(g_sExeFullFileName, g_dwExeSize, NULL);
-
-  int nResult = archiveExtractor.ExtractFile(c_sStringsFile, sExtractPath);
-
-  if (nResult != 0)
-    return FALSE;
-
-  BOOL bResult = Strings.LoadStrings(sExtractedStringsFile);
-  DeleteFile(sExtractedStringsFile);
-
-  return bResult;
-}
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsInstaller.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#pragma once
-#include "resourceppc.h"
-
-extern nsSetupStrings Strings;
-extern const WCHAR c_sStringsFile[];
-
-extern WCHAR g_sSourcePath[MAX_PATH];
-extern WCHAR g_sExeFileName[MAX_PATH];
-extern WCHAR g_sExeFullFileName[MAX_PATH];
-extern DWORD g_dwExeSize;
-
-#define ErrorMsg(msg) MessageBoxW(GetForegroundWindow(), msg, L"Setup", MB_OK|MB_ICONERROR)
-bool ConvertToChar(const WCHAR *wstr, char *str);
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsInstallerDlg.cpp
+++ /dev/null
@@ -1,524 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- *
- * nsInstallerDlg.cpp : Mozilla Fennec Installer UI.
- *
- */
-
-#include <windows.h>
-#include <projects.h>
-#include <aygshell.h>
-
-#include "nsSetupStrings.h"
-#include "nsInstaller.h"
-#include "ns7zipExtractor.h"
-#include "nsInstallerDlg.h"
-
-#define WM_DIALOGCREATED (WM_USER + 1)
-
-const WCHAR c_sInstallPathTemplate[] = L"%s\\%s";
-const WCHAR c_sExtractCardPathTemplate[] = L"\\%s%s\\%s";
-const WCHAR c_sAppRegKeyTemplate[] = L"Software\\Mozilla\\%s";
-const WCHAR c_sFastStartTemplate[] = L"%s\\%sfaststart.exe";
-
-// Message handler for the dialog
-BOOL CALLBACK DlgMain(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-  return nsInstallerDlg::GetInstance()->DlgMain(hDlg, message, wParam, lParam);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// nsInstallerDlg dialog
-//
-///////////////////////////////////////////////////////////////////////////////
-
-nsInstallerDlg::nsInstallerDlg()
-{
-  m_hInst = NULL;
-  m_hDlg = NULL;
-  m_bFastStart = FALSE;
-  m_sExtractPath[0] = 0;
-  m_sInstallPath[0] = 0;
-  m_sProgramFiles[0] = 0;
-  m_sErrorMsg[0] = 0;
-}
-
-nsInstallerDlg* nsInstallerDlg::GetInstance()
-{
-  static nsInstallerDlg dlg;
-  return &dlg;
-}
-
-void nsInstallerDlg::Init(HINSTANCE hInst)
-{
-  m_hInst = hInst;
-}
-
-int nsInstallerDlg::DoModal()
-{
-  return (int)DialogBox(m_hInst, (LPCTSTR)IDD_MAIN, 0, ::DlgMain);
-}
-
-BOOL CALLBACK nsInstallerDlg::DlgMain(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-  switch (message)
-  {
-    case WM_INITDIALOG:
-      return OnInitDialog(hDlg, wParam, lParam);
-
-    case WM_DIALOGCREATED:
-      return OnDialogCreated(hDlg);
-
-    case WM_COMMAND:
-      switch (LOWORD(wParam))
-      {
-        case IDOK:
-        case IDCANCEL:
-          EndDialog(hDlg, LOWORD(wParam));
-          return TRUE;
-
-        case IDC_BTN_INSTALL:
-          if (OnBtnExtract())
-            EndDialog(hDlg, IDOK);
-          return TRUE;
-      }
-      break;
-
-    case WM_CLOSE:
-      EndDialog(hDlg, message);
-      return TRUE;
-  }
-  return FALSE;
-}
-
-BOOL nsInstallerDlg::OnInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
-{
-  // Create a Done button and size it.  
-  SHINITDLGINFO shidi;
-  shidi.dwMask = SHIDIM_FLAGS;
-  shidi.dwFlags = SHIDIF_DONEBUTTON | SHIDIF_SIPDOWN | SHIDIF_SIZEDLGFULLSCREEN | SHIDIF_EMPTYMENU;
-  shidi.hDlg = hDlg;
-  SHInitDialog(&shidi);
-
-  m_hDlg = hDlg;
-
-  SetWindowText(m_hDlg, Strings.GetString(StrID_WindowCaption));
-  SetControlWindowText(IDC_STATIC_TITLE, Strings.GetString(StrID_WindowCaption));
-  SetControlWindowText(IDC_STATIC_INSTALL, Strings.GetString(StrID_InstallTo));
-  SetControlWindowText(IDC_BTN_INSTALL, Strings.GetString(StrID_Install));
-  SetControlWindowText(IDCANCEL, Strings.GetString(StrID_Cancel));
-
-  if (!SHGetSpecialFolderPath(m_hDlg, m_sProgramFiles, CSIDL_PROGRAM_FILES, FALSE))
-    wcscpy(m_sProgramFiles, L"\\Program Files");
-
-  _snwprintf(m_sInstallPath, MAX_PATH, c_sInstallPathTemplate,
-             m_sProgramFiles, Strings.GetString(StrID_AppShortName));
-
-  SendMessageToControl(IDC_CMB_PATH, CB_ADDSTRING, 0, (LPARAM)(m_sInstallPath));
-  FindMemCards();
-  SendMessageToControl(IDC_CMB_PATH, CB_SETCURSEL, 0, 0);
-
-  EnableWindow(GetDlgItem(m_hDlg, IDC_BTN_INSTALL), FALSE);
-
-  PostMessage(m_hDlg, WM_DIALOGCREATED, 0, 0);
-
-  return TRUE;
-}
-
-void nsInstallerDlg::FindMemCards()
-{
-  WIN32_FIND_DATA fd;
-  HANDLE hFlashCard = FindFirstFlashCard(&fd);
-  if (hFlashCard != INVALID_HANDLE_VALUE)
-  {
-    WCHAR sPath[MAX_PATH];
-    do 
-    {
-      if (wcslen(fd.cFileName) > 0)
-      {
-        _snwprintf(sPath, MAX_PATH, c_sExtractCardPathTemplate,
-          fd.cFileName, m_sProgramFiles, Strings.GetString(StrID_AppShortName));
-        SendMessageToControl(IDC_CMB_PATH, CB_ADDSTRING, 0, (LPARAM)(sPath));
-      }
-    } while(FindNextFlashCard(hFlashCard, &fd) && *fd.cFileName);
-  }
-}
-
-BOOL nsInstallerDlg::OnDialogCreated(HWND hDlg)
-{
-  BOOL bUninstallCancelled = FALSE;
-  if (RunUninstall(&bUninstallCancelled) && bUninstallCancelled)
-  {
-    // Cancel installation
-    PostMessage(hDlg, WM_CLOSE, 0, 0);
-  }
-  else
-    EnableWindow(GetDlgItem(m_hDlg, IDC_BTN_INSTALL), TRUE);
-
-  return TRUE;
-}
-
-BOOL nsInstallerDlg::OnBtnExtract()
-{
-  BOOL bResult = FALSE;
-
-  EnableWindow(GetDlgItem(m_hDlg, IDC_BTN_INSTALL), FALSE);
-  EnableWindow(GetDlgItem(m_hDlg, IDCANCEL), FALSE);
-
-  int nPathIndex = SendMessageToControl(IDC_CMB_PATH, CB_GETCURSEL, 0, 0);
-  if (nPathIndex >= 0)
-    SendMessageToControl(IDC_CMB_PATH, CB_GETLBTEXT, nPathIndex, (LPARAM)(m_sInstallPath));
-
-  wcscpy(m_sExtractPath, m_sInstallPath);
-
-  // Remove the last directory ("Fennec") from the path as it is already in the archive
-  WCHAR *sSlash = wcsrchr(m_sExtractPath, L'\\');
-  if (sSlash)
-    *sSlash = 0;
-
-  ns7zipExtractor archiveExtractor(g_sExeFullFileName, g_dwExeSize, this);
-
-  SendMessageToControl(IDC_PROGRESS, PBM_SETRANGE, 0, (LPARAM) MAKELPARAM (0, 100)); // progress in percents
-  SendMessageToControl(IDC_PROGRESS, PBM_SETPOS, 0, 0);
-
-  int nResult = archiveExtractor.Extract(m_sExtractPath);
-  if (nResult == 0)
-  {
-    Progress(100); // 100%
-    bResult = PostExtract();
-  }
-
-  EnableWindow(GetDlgItem(m_hDlg, IDC_BTN_INSTALL), TRUE);
-  EnableWindow(GetDlgItem(m_hDlg, IDCANCEL), TRUE);
-
-  if (bResult)
-  {
-    MessageBoxW(m_hDlg, Strings.GetString(StrID_InstalledSuccessfully),
-                Strings.GetString(StrID_WindowCaption), MB_OK|MB_ICONINFORMATION);
-  }
-  else
-  {
-    WCHAR sMsg[c_nMaxErrorLen];
-    if (nResult != 0)
-      _snwprintf(sMsg, c_nMaxErrorLen, L"%s %d", Strings.GetString(StrID_ExtractionError), nResult);
-    else
-      _snwprintf(sMsg, c_nMaxErrorLen, L"%s\n%s", Strings.GetString(StrID_ThereWereErrors), m_sErrorMsg);
-
-    MessageBoxW(m_hDlg, sMsg, Strings.GetString(StrID_WindowCaption), MB_OK|MB_ICONERROR);
-  }
-
-  return bResult;
-}
-
-LRESULT nsInstallerDlg::SendMessageToControl(int nCtlID, UINT Msg, WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/)
-{
-  return SendMessage(GetDlgItem(m_hDlg, nCtlID), Msg, wParam, lParam);
-}
-
-void nsInstallerDlg::SetControlWindowText(int nCtlID, const WCHAR *sText)
-{
-  SetWindowText(GetDlgItem(m_hDlg, nCtlID), sText);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// ZipProgress member override
-//
-///////////////////////////////////////////////////////////////////////////////
-void nsInstallerDlg::Progress(int n)
-{
-  SendMessageToControl(IDC_PROGRESS, PBM_SETPOS, (WPARAM)n, 0);
-}
-
-//////////////////////////////////////////////////////////////////////////
-//
-// PostExtract - additional step after extraction
-//
-//////////////////////////////////////////////////////////////////////////
-
-#define RUN_AND_CHECK(fn) \
-  if (!fn()) { \
-    bResult = FALSE; \
-    AddErrorMsg(L ## #fn ## L" failed"); \
-  }
-
-BOOL nsInstallerDlg::PostExtract()
-{
-  BOOL bResult = TRUE;
-
-  m_bFastStart = FastStartFileExists();
-
-  RUN_AND_CHECK(CreateShortcut)
-
-  RUN_AND_CHECK(StoreInstallPath)
-
-  MoveSetupStrings();
-
-  RUN_AND_CHECK(SilentFirstRun)
-
-  RUN_AND_CHECK(RunSetupCab)
-
-  return bResult;
-}
-
-BOOL nsInstallerDlg::StoreInstallPath()
-{
-  HKEY hKey;
-  WCHAR sRegFennecKey[MAX_PATH];
-  _snwprintf(sRegFennecKey, MAX_PATH, c_sAppRegKeyTemplate, Strings.GetString(StrID_AppShortName));
-
-  // Store the installation path - to be used by the uninstaller
-  LONG result = RegCreateKeyEx(HKEY_LOCAL_MACHINE, sRegFennecKey, 0, REG_NONE,
-                               REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL);
-  if (result == ERROR_SUCCESS)
-  {
-    result = RegSetValueEx(hKey, L"Path", 0, REG_SZ, (BYTE* const)m_sInstallPath, (wcslen(m_sInstallPath)+1)*sizeof(WCHAR));
-    RegCloseKey(hKey);
-  }
-
-  return (result == ERROR_SUCCESS);
-}
-
-// Creates shortcuts for Fennec and (optionally) FastStart service.
-// Note: The shortcut names have to be in sync with DeleteShortcut in Uninstaller.cpp
-BOOL nsInstallerDlg::CreateShortcut()
-{
-  BOOL result = FALSE;
-
-  WCHAR sFennecPath[MAX_PATH];
-  _snwprintf(sFennecPath, MAX_PATH, L"\"%s\\%s.exe\"", m_sInstallPath, Strings.GetString(StrID_AppShortName));
-
-  WCHAR sProgramsPath[MAX_PATH];
-  if (SHGetSpecialFolderPath(m_hDlg, sProgramsPath, CSIDL_PROGRAMS, FALSE))
-  {
-    WCHAR sShortcutPath[MAX_PATH];
-    _snwprintf(sShortcutPath, MAX_PATH, L"%s\\%s.lnk", sProgramsPath, Strings.GetString(StrID_AppShortName));
-
-    // Delete the old shortcut if it exists
-    if(SetFileAttributes(sShortcutPath, FILE_ATTRIBUTE_NORMAL))
-      DeleteFile(sShortcutPath);
-
-    result = SHCreateShortcut(sShortcutPath, sFennecPath);
-  }
-
-  if (m_bFastStart)
-  {
-    WCHAR sFastStartPath[MAX_PATH];
-    _snwprintf(sFastStartPath, MAX_PATH, L"\"%s\\%sfaststart.exe\"", m_sInstallPath, Strings.GetString(StrID_AppShortName));
-
-    WCHAR sStartupPath[MAX_PATH];
-    if (SHGetSpecialFolderPath(m_hDlg, sStartupPath, CSIDL_STARTUP, FALSE))
-    {
-      WCHAR sStartupShortcutPath[MAX_PATH];
-      _snwprintf(sStartupShortcutPath, MAX_PATH, L"%s\\%sFastStart.lnk", sStartupPath, Strings.GetString(StrID_AppShortName));
-
-      if(SetFileAttributes(sStartupShortcutPath, FILE_ATTRIBUTE_NORMAL))
-        DeleteFile(sStartupShortcutPath);
-
-      result = SHCreateShortcut(sStartupShortcutPath, sFastStartPath) && result;
-    }
-  }
-
-  return result;
-}
-
-BOOL nsInstallerDlg::MoveSetupStrings()
-{
-  WCHAR sExtractedStringsFile[MAX_PATH];
-  _snwprintf(sExtractedStringsFile, MAX_PATH, L"%s\\%s", m_sExtractPath, c_sStringsFile);
-
-  WCHAR sNewStringsFile[MAX_PATH];
-  _snwprintf(sNewStringsFile, MAX_PATH, L"%s\\%s", m_sInstallPath, c_sStringsFile);
-
-  return MoveFile(sExtractedStringsFile, sNewStringsFile);
-}
-
-BOOL nsInstallerDlg::SilentFirstRun()
-{
-  SetControlWindowText(IDC_STATUS_TEXT, Strings.GetString(StrID_CreatingUserProfile));
-  UpdateWindow(m_hDlg); // make sure the text is drawn
-
-  WCHAR sCmdLine[MAX_PATH];
-  WCHAR *sParams = NULL;
-  if (m_bFastStart)
-  {
-    // Run fast start exe instead - it will create the profile and stay in the background
-    _snwprintf(sCmdLine, MAX_PATH, c_sFastStartTemplate, m_sInstallPath, Strings.GetString(StrID_AppShortName));
-  }
-  else
-  {
-    _snwprintf(sCmdLine, MAX_PATH, L"%s\\%s.exe", m_sInstallPath, Strings.GetString(StrID_AppShortName));
-    sParams = L"-silent -nosplash";
-  }
-  PROCESS_INFORMATION pi;
-  BOOL bResult = CreateProcess(sCmdLine, sParams,
-                               NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
-  if (bResult)
-  {
-    // Wait for it to finish (since the system is likely to be busy
-    // while it launches anyways). The process may never terminate
-    // if FastStart is enabled, so don't wait longer than 10 seconds.
-    WaitForSingleObject(pi.hProcess, 10000);
-  }
-
-  if (m_bFastStart)
-  {
-    // When the FastStart is enabled, Fennec is being loaded in the background,
-    // user cannot launch it with a shortcut, and the system is busy at the moment,
-    // so we'll just wait here.
-
-    // Class name: appName + "MessageWindow"
-    WCHAR sClassName[MAX_PATH];
-    _snwprintf(sClassName, MAX_PATH, L"%s%s", Strings.GetString(StrID_AppShortName), L"MessageWindow");
-
-    // Wait until the hidden window gets created or for some timeout (~10s seems to be reasonable)
-    HWND handle = NULL;
-    for (int i = 0; i < 20 && !handle; i++)
-    {
-      handle = ::FindWindowW(sClassName, NULL);
-      Sleep(500);
-    }
-  }
-
-  SetWindowText(GetDlgItem(m_hDlg, IDC_STATUS_TEXT), L"");
-  return bResult;
-}
-
-BOOL nsInstallerDlg::RunSetupCab()
-{
-  BOOL bResult = FALSE;
-
-  WCHAR sCabPath[MAX_PATH];
-  WCHAR sParams[MAX_PATH + 20];
-  _snwprintf(sCabPath, MAX_PATH, L"%s\\setup.cab", m_sInstallPath);
-
-  // Run "wceload.exe /noui Fennec.cab"
-  _snwprintf(sParams, MAX_PATH, L"/noui \"%s\"", sCabPath);
-  PROCESS_INFORMATION pi;
-  bResult = CreateProcess(L"\\Windows\\wceload.exe",
-                          sParams, NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
-  if (bResult)
-  {
-    // Wait for it to finish
-    WaitForSingleObject(pi.hProcess, INFINITE);
-  }
-
-  return bResult;
-}
-
-void nsInstallerDlg::AddErrorMsg(WCHAR* sErr)
-{
-  WCHAR sMsg[c_nMaxErrorLen];
-  _snwprintf(sMsg, c_nMaxErrorLen, L"%s. LastError = %d\n", sErr, GetLastError());
-  wcsncat(m_sErrorMsg, sMsg, c_nMaxErrorLen - wcslen(m_sErrorMsg));
-}
-
-//////////////////////////////////////////////////////////////////////////
-//
-// Uninstall previous installation
-//
-//////////////////////////////////////////////////////////////////////////
-
-BOOL nsInstallerDlg::GetInstallPath(WCHAR *sPath)
-{
-  HKEY hKey;
-  WCHAR sRegFennecKey[MAX_PATH];
-  _snwprintf(sRegFennecKey, MAX_PATH, c_sAppRegKeyTemplate, Strings.GetString(StrID_AppShortName));
-
-  LONG result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sRegFennecKey, 0, KEY_ALL_ACCESS, &hKey);
-  if (result == ERROR_SUCCESS)
-  {
-    DWORD dwType = NULL;
-    DWORD dwCount = MAX_PATH * sizeof(WCHAR);
-    result = RegQueryValueEx(hKey, L"Path", NULL, &dwType, (LPBYTE)sPath, &dwCount);
-
-    RegCloseKey(hKey);
-  }
-
-  return (result == ERROR_SUCCESS);
-}
-
-BOOL nsInstallerDlg::RunUninstall(BOOL *pbCancelled)
-{
-  BOOL bResult = FALSE;
-  WCHAR sUninstallPath[MAX_PATH];
-  if (GetInstallPath(sUninstallPath))
-  {
-    if (wcslen(sUninstallPath) > 0 && sUninstallPath[wcslen(sUninstallPath)-1] != '\\')
-      wcscat(sUninstallPath, L"\\");
-
-    WCHAR sParam[MAX_PATH+10];
-    _snwprintf(sParam, MAX_PATH+9, L"[remove] %s", sUninstallPath);
-
-    wcscat(sUninstallPath, L"uninstall.exe");
-
-    PROCESS_INFORMATION pi;
-    bResult = CreateProcess(sUninstallPath, sParam,
-                            NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
-    if (bResult)
-    {
-      // Wait for it to finish
-      WaitForSingleObject(pi.hProcess, INFINITE);
-
-      if (pbCancelled != NULL)
-      {
-        DWORD dwExitCode = 0;
-        GetExitCodeProcess(pi.hProcess, &dwExitCode);
-        *pbCancelled = (dwExitCode == IDCANCEL);
-      }
-    }
-  }
-  return bResult;
-}
-
-//////////////////////////////////////////////////////////////////////////
-//
-// Helper functions
-//
-//////////////////////////////////////////////////////////////////////////
-
-BOOL nsInstallerDlg::FastStartFileExists()
-{
-  WCHAR sFastStartPath[MAX_PATH];
-  _snwprintf(sFastStartPath, MAX_PATH, c_sFastStartTemplate, m_sInstallPath, Strings.GetString(StrID_AppShortName));
-  // Check if file exists
-  return (GetFileAttributes(sFastStartPath) != INVALID_FILE_ATTRIBUTES);
-}
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsInstallerDlg.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#pragma once
-
-/**
- * nsInstallerDlg dialog
- */
-class nsInstallerDlg : public nsExtractorProgress
-{
-public:
-  static nsInstallerDlg* GetInstance();
-  void Init(HINSTANCE hInst);
-  int DoModal();
-  virtual void Progress(int n); // gets progress notifications
-  INT_PTR DlgMain(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
-  const WCHAR* GetExtractPath() { return m_sInstallPath; }
-
-private:
-  nsInstallerDlg();
-  BOOL OnInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam);
-  void FindMemCards();
-  BOOL OnDialogCreated(HWND hDlg);
-  BOOL OnBtnExtract();
-  LRESULT SendMessageToControl(int nCtlID, UINT Msg, WPARAM wParam = 0, LPARAM lParam = 0);
-  void SetControlWindowText(int nCtlID, const WCHAR *sText);
-
-  BOOL PostExtract();
-  BOOL StoreInstallPath();
-  BOOL CreateShortcut();
-  BOOL MoveSetupStrings();
-  BOOL SilentFirstRun();
-  BOOL RunSetupCab();
-
-  BOOL GetInstallPath(WCHAR *sPath);
-  BOOL RunUninstall(BOOL *pbCancelled);
-
-  void AddErrorMsg(WCHAR* sErr);
-  BOOL FastStartFileExists();
-
-  static const int c_nMaxErrorLen = 2048;
-
-  HINSTANCE m_hInst;
-  HWND m_hDlg;
-  BOOL m_bFastStart;
-  WCHAR m_sProgramFiles[MAX_PATH];
-  WCHAR m_sExtractPath[MAX_PATH];
-  WCHAR m_sInstallPath[MAX_PATH];
-  WCHAR m_sErrorMsg[c_nMaxErrorLen];
-};
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsInstallerppc.rc
+++ /dev/null
@@ -1,162 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Microsoft Visual C++ generated resource script.
-//
-#include "resourceppc.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "resdefce.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_NSINSTALLER        ICON                    "xulrunnerinstaller.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_MAIN DIALOG  0, 0, 156, 129
-STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION
-EXSTYLE 0x80000000L
-CAPTION "Mozilla Setup"
-FONT 8, "MS Shell Dlg"
-BEGIN
-    ICON            IDI_NSINSTALLER,IDC_STATIC,7,3,20,20,SS_REALSIZEIMAGE
-    LTEXT           "XULRunner Setup",IDC_STATIC_TITLE,39,8,106,8,SS_NOPREFIX
-    LTEXT           "Install XULRunner to",IDC_STATIC_INSTALL,2,26,142,11
-    PUSHBUTTON      "Install",IDC_BTN_INSTALL,2,57,70,20
-    PUSHBUTTON      "Cancel",IDCANCEL,84,57,70,20
-    CONTROL         "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,2,84,152,9
-    COMBOBOX        IDC_CMB_PATH,2,37,152,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "",IDC_STATUS_TEXT,2,98,152,19
-END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE 
-BEGIN
-    "resourceppc.h\0"
-END
-
-2 TEXTINCLUDE 
-BEGIN
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""resdefce.h""\r\n"
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE 
-BEGIN
-    "\r\n"
-    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
-    "LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r\n"
-    "#pragma code_page(1252)\r\n"
-    "#include ""nsInstallerppc.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
-    "#endif\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
-BEGIN
-    IDD_MAIN, DIALOG
-    BEGIN
-        LEFTMARGIN, 2
-        RIGHTMARGIN, 154
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#include "nsInstallerppc.rc2"  // non-Microsoft Visual C++ edited resources
-#endif
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsInstallerppc.rc2
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// nsInstallerPPC.rc2 - resources Microsoft Visual C++ does not edit directly
-//
-
-#ifdef APSTUDIO_INVOKED
-#error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Add manually edited resources here...
-
-/////////////////////////////////////////////////////////////////////////////
-HI_RES_AWARE CEUX {1}	// turn off the emulation layer
-			// Remove this resource to enable pixel-
-			// doubling on platforms that support it
-/////////////////////////////////////////////////////////////////////////////
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsSetupStrings.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- *
- * Class to work with localizable string resources
- *
- */
-
-#include <windows.h>
-#include "nsSetupStrings.h"
-#include "readstrings.h"
-#include "errors.h"
-
-#define STR_KEY(x) #x "\0"
-const char *kSetupStrKeys =
-#include "nsSetupStrings.inc"
-;
-#undef STR_KEY
-
-nsSetupStrings::nsSetupStrings()
-{
-  m_sBuf = NULL;
-  memset(m_arrStrings, 0, sizeof(m_arrStrings));
-}
-
-nsSetupStrings::~nsSetupStrings()
-{
-  delete[] m_sBuf;
-}
-
-BOOL nsSetupStrings::LoadStrings(WCHAR *sFileName)
-{
-  if (!sFileName)
-    return FALSE;
-
-  BOOL bResult = FALSE;
-  char strings[kNumberOfStrings][MAX_TEXT_LEN];
-  if (ReadStrings(sFileName, kSetupStrKeys, kNumberOfStrings, strings) == OK)
-  {
-    int nSize = 0;
-    for (int i = 0; i < kNumberOfStrings; i++)
-    {
-      nSize += strlen(strings[i]) + 1;
-    }
-
-    m_sBuf = new WCHAR[nSize];
-    if (!m_sBuf)
-      return FALSE;
-
-    WCHAR *p = m_sBuf;
-    for (int i = 0; i < kNumberOfStrings; i++)
-    {
-      int len = strlen(strings[i]) + 1;
-      MultiByteToWideChar(CP_UTF8, 0, strings[i], len, p, len);
-      m_arrStrings[i] = p;
-      p += len;
-    }
-
-    bResult = TRUE;
-  }
-
-  return bResult;
-}
-
-const WCHAR* nsSetupStrings::GetString(int nID)
-{
-  if (nID >= kNumberOfStrings)
-    return L"";
-  else
-    return m_arrStrings[nID];
-}
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsSetupStrings.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- *
- * Class to work with localizable string resources
- *
- */
-
-#pragma once
-
-#define STR_KEY(x) StrID_##x,
-enum
-{
-  #include "nsSetupStrings.inc"
-  StrID_NumberOfStrings
-};
-#undef STR_KEY
-
-class nsSetupStrings
-{
-public:
-  nsSetupStrings();
-  ~nsSetupStrings();
-
-  BOOL LoadStrings(TCHAR *sFileName);
-  const TCHAR* GetString(int nID);
-
-private:
-
-  static const int kNumberOfStrings = StrID_NumberOfStrings;
-  TCHAR* m_sBuf;
-  TCHAR* m_arrStrings[kNumberOfStrings];
-};
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/nsSetupStrings.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-  STR_KEY(AppShortName)
-  STR_KEY(AppLongName)
-  STR_KEY(WindowCaption)
-  STR_KEY(InstallTo)
-  STR_KEY(Install)
-  STR_KEY(Cancel)
-  STR_KEY(InstalledSuccessfully)
-  STR_KEY(ExtractionError)
-  STR_KEY(ThereWereErrors)
-  STR_KEY(CreatingUserProfile)
-  STR_KEY(UninstallCaption)
-  STR_KEY(FilesWillBeRemoved)
-  STR_KEY(AreYouSure)
-  STR_KEY(InstallationNotFound)
-  STR_KEY(UninstalledSuccessfully)
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/readme.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-FennecInstaller implementation to replace CAB installer.
-
-This version extracts a 7z file appended to the EXE, i.e. works like a
-self-extracted archive.
-
-For example if you want to install fennec-1.0a3pre.en-US.wince-arm.7z, build
-the program, run the following command:
-
-  cat fennec_installer.exe fennec-1.0a3pre.en-US.wince-arm.7z >fennec-1.0a3pre.en-US.wince-arm.exe
-
-Then copy fennec-1.0a3pre.en-US.wince-arm.exe to a device and run it.
-
-Note: Requires lib7z.
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/resourceppc.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by nsInstallerppc.rc
-//
-#define IDS_APP_TITLE                   1
-#define IDI_NSINSTALLER                 101
-#define IDR_MENU                        102
-#define IDD_MAIN                        103
-#define IDC_BTN_INSTALL                 1000
-#define IDC_PROGRESS                    1001
-#define IDC_CMB_PATH                    1002
-#define IDC_STATUS_TEXT                 1003
-#define IDC_STATIC_TITLE                1004
-#define IDC_STATIC_INSTALL              1005
-#define IDC_STATIC                      -1
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC                     1
-#define _APS_NEXT_RESOURCE_VALUE        129
-#define _APS_NEXT_COMMAND_VALUE         32771
-#define _APS_NEXT_CONTROL_VALUE         1006
-#define _APS_NEXT_SYMED_VALUE           110
-#endif
-#endif
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/uninstall/Makefile.in
+++ /dev/null
@@ -1,66 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# 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 Fennec Installer for WinCE.
-#
-# The Initial Developer of the Original Code is The Mozilla Foundation.
-#
-# Portions created by the Initial Developer are Copyright (C) 2009
-# the Mozilla Foundation <http://www.mozilla.org/>. All Rights Reserved.
-#
-# Contributor(s): 
-#   Alex Pakhotin <alexp@mozilla.com> (original author)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH     = ../../../../..
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-VPATH     = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-PROGRAM   = uninstall$(BIN_SUFFIX)
-
-CPPSRCS = \
-	Uninstall.cpp \
-	../nsSetupStrings.cpp \
-	$(NULL)
-
-LIBS += $(DEPTH)/toolkit/mozapps/readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX)
-
-OS_LIBS += aygshell.lib commctrl.lib
-
-LOCAL_INCLUDES += -I$(srcdir)/.. -I$(srcdir)/../../../readstrings
-
-RCINCLUDE = Uninstall.rc
-
-# Statically link the CRT when possible
-USE_STATIC_LIBS = 1
-
-WIN32_EXE_LDFLAGS += -ENTRY:WinMain
-
-include $(topsrcdir)/config/rules.mk
-
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/uninstall/Uninstall.cpp
+++ /dev/null
@@ -1,543 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; tab-width: 8; indent-tabs-mode: nil; -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- *
- * Uninstall.cpp : Mozilla Fennec Uninstaller
- *
- */
-
-#include <windows.h>
-#include <aygshell.h>
-#include <cfgmgrapi.h>
-
-#include "nsSetupStrings.h"
-#include "resource.h"
-
-#define WM_DIALOGCREATED (WM_USER + 1)
-
-const WCHAR c_sStringsFile[] = L"setup.ini";
-nsSetupStrings Strings;
-
-BOOL g_bRunFromSetupDll = FALSE;
-
-WCHAR g_sInstallPath[MAX_PATH];
-WCHAR g_sUninstallPath[MAX_PATH];
-HWND g_hDlg = NULL;
-
-const WCHAR c_sAppRegKeyTemplate[] = L"Software\\Mozilla\\%s";
-
-const DWORD c_nTempBufSize = MAX_PATH * 2;
-const WCHAR c_sRemoveParam[] = L"[remove]";
-const WCHAR c_sSetupParam[] = L"[setup]";   // means executed by Setup.dll
-
-// Retry counter for the file/directory deletion
-int nTotalRetries = 0;
-const int c_nMaxTotalRetries = 10;
-const int c_nMaxOneFileRetries = 6;
-const int c_nRetryDelay = 500; //milliseconds
-
-int g_nDirsDeleted = 0;
-const int c_nMaxDirs = 25; // approximate number of dirs just to show some progress
-
-enum {
-  ErrOK = 0,
-  ErrCancel = IDCANCEL,
-  ErrNoStrings = -1,
-  ErrInstallationNotFound = -2,
-  ErrShutdownFailed = -3,
-};
-
-int g_nResult = ErrOK;
-
-// Forward declarations
-BOOL GetModulePath(WCHAR *sPath);
-BOOL LoadStrings();
-BOOL GetInstallPath(WCHAR *sPath);
-BOOL DeleteShortcut(HWND hwndParent);
-BOOL DeleteDirectory(const WCHAR* sPathToDelete);
-BOOL DeleteRegistryKey();
-BOOL CopyAndLaunch();
-BOOL ShutdownFastStartService(const WCHAR *sInstallPath);
-BOOL RunSystemUninstall();
-
-BOOL CALLBACK DlgUninstall(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
-BOOL OnDialogInit(HWND hDlg);
-BOOL OnDialogCreated(HWND hDlg);
-int OnUninstall(HWND hDlg);
-void UpdateProgress();
-
-///////////////////////////////////////////////////////////////////////////////
-// Main
-//
-int WINAPI WinMain(HINSTANCE hInstance,
-                   HINSTANCE hPrevInstance,
-                   LPTSTR    lpCmdLine,
-                   int       nCmdShow)
-{
-  HWND hWnd = GetForegroundWindow();
-  *g_sUninstallPath = 0;
-
-  WCHAR *sCommandLine = GetCommandLine();
-  WCHAR *sRemoveParam = wcsstr(sCommandLine, c_sRemoveParam);
-  WCHAR g_bRunFromSetupDll = (wcsstr(sCommandLine, c_sSetupParam) != NULL);
-  if (sRemoveParam != NULL)
-  {
-    // Launched from a temp directory with parameters "[remove] \Program Files\Fennec\"
-    wcscpy(g_sUninstallPath, sRemoveParam + wcslen(c_sRemoveParam) + 1);
-  }
-  else
-  {
-    // Just copy this EXE and launch it from a temp location with a special parameter
-    // to delete itself in the installation directory
-    if (CopyAndLaunch())
-      return ErrOK;
-  }
-  // Perform uninstallation when executed with a special parameter
-  // (or in case when CopyAndLaunch failed - just execute in place)
-
-  if (!LoadStrings())
-  {
-    MessageBoxW(hWnd, L"Cannot find the strings file.", L"Uninstall", MB_OK|MB_ICONWARNING);
-    return ErrNoStrings;
-  }
-
-  if (GetInstallPath(g_sInstallPath))
-  {
-    int nDlgResult = DialogBox(hInstance, (LPCTSTR)IDD_MAIN, NULL, (DLGPROC)DlgUninstall);
-    if (nDlgResult != ErrOK)
-      g_nResult = nDlgResult;
-  }
-  else
-  {
-    MessageBoxW(hWnd, Strings.GetString(StrID_InstallationNotFound),
-                Strings.GetString(StrID_UninstallCaption), MB_OK|MB_ICONINFORMATION);
-    return ErrInstallationNotFound;
-  }
-
-  return g_nResult;
-}
-
-int Uninstall(HWND hWnd)
-{
-  // Remove all installed files
-  DeleteDirectory(g_sInstallPath);
-  DeleteShortcut(hWnd);
-  DeleteRegistryKey();
-
-  if (!g_bRunFromSetupDll)
-    RunSystemUninstall();
-
-  // TODO: May probably handle errors during deletion (such as locked directories)
-  // and notify user. Right now just return OK.
-  return ErrOK;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// Dialog
-//
-BOOL CALLBACK DlgUninstall(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-  switch (message)
-  {
-    case WM_INITDIALOG:
-      return OnDialogInit(hDlg);
-
-    case WM_DIALOGCREATED:
-      return OnDialogCreated(hDlg);
-
-    case WM_COMMAND:
-      switch (LOWORD(wParam))
-      {
-        case IDOK:
-          EndDialog(hDlg, ErrOK);
-          return TRUE;
-
-        case IDCANCEL:
-          EndDialog(hDlg, ErrCancel);
-          return TRUE;
-
-        case IDC_BTN_UNINSTALL:
-          g_nResult = OnUninstall(hDlg);
-          return TRUE;
-      }
-      break;
-
-    case WM_CLOSE:
-      EndDialog(hDlg, ErrCancel);
-      return TRUE;
-  }
-  return FALSE;
-}
-
-BOOL OnDialogCreated(HWND)
-{
-  ShutdownFastStartService(g_sInstallPath);
-  // Just continue regardless of the result
-  return TRUE;
-}
-
-BOOL OnDialogInit(HWND hDlg)
-{
-  g_hDlg = hDlg;
-  PostMessage(hDlg, WM_DIALOGCREATED, 0, 0);
-
-  SetWindowText(hDlg, Strings.GetString(StrID_UninstallCaption));
-
-  SHINITDLGINFO shidi;
-  shidi.dwMask = SHIDIM_FLAGS;
-  shidi.dwFlags = SHIDIF_SIPDOWN | SHIDIF_EMPTYMENU;
-  shidi.hDlg = hDlg;
-  SHInitDialog(&shidi);
-
-  // Hide the Done button
-  SHDoneButton(hDlg, SHDB_HIDE);
-
-  // Init controls
-  WCHAR sMsg[c_nTempBufSize];
-  _snwprintf(sMsg, c_nTempBufSize, L"%s %s", Strings.GetString(StrID_FilesWillBeRemoved), g_sInstallPath);
-  SetWindowText(GetDlgItem(hDlg, IDC_STATIC_TEXT), sMsg);
-  SetWindowText(GetDlgItem(hDlg, IDC_QUESTION_TEXT), Strings.GetString(StrID_AreYouSure));
-  SetWindowText(GetDlgItem(hDlg, IDC_BTN_UNINSTALL), L"OK"); // TODO: Use localized text "Uninstall"
-  SetWindowText(GetDlgItem(hDlg, IDCANCEL), Strings.GetString(StrID_Cancel));
-  ShowWindow(GetDlgItem(hDlg, IDC_PROGRESS), SW_HIDE);
-  ShowWindow(GetDlgItem(hDlg, IDOK), SW_HIDE);
-
-  return TRUE; 
-}
-
-int OnUninstall(HWND hDlg)
-{
-  SetWindowText(GetDlgItem(hDlg, IDC_QUESTION_TEXT), L"");
-  ShowWindow(GetDlgItem(hDlg, IDC_BTN_UNINSTALL), SW_HIDE);
-  ShowWindow(GetDlgItem(hDlg, IDCANCEL), SW_HIDE);
-  ShowWindow(GetDlgItem(hDlg, IDC_PROGRESS), SW_SHOW);
-  SendMessage(GetDlgItem(hDlg, IDC_PROGRESS), PBM_SETRANGE, 0, (LPARAM) MAKELPARAM (0, c_nMaxDirs));
-  SendMessage(GetDlgItem(hDlg, IDC_PROGRESS), PBM_SETPOS, 0, 0);
-
-  UpdateWindow(hDlg); // make sure the text is drawn
-  
-  int ret = Uninstall(hDlg);
-
-  if (ret == ErrOK)
-  {
-    SetWindowText(GetDlgItem(hDlg, IDC_STATIC_TEXT), Strings.GetString(StrID_UninstalledSuccessfully));
-  }
-  else
-  {
-    //TODO: Localize this message. It might be shown later when the errors will be handled
-    SetWindowText(GetDlgItem(hDlg, IDC_STATIC_TEXT), L"There were errors during uninstallation.");
-  }
-
-  ShowWindow(GetDlgItem(hDlg, IDC_PROGRESS), SW_HIDE);
-  ShowWindow(GetDlgItem(hDlg, IDOK), SW_SHOW);
-
-  return ret;
-}
-
-void UpdateProgress()
-{
-  SendMessage(GetDlgItem(g_hDlg, IDC_PROGRESS), PBM_SETPOS, (WPARAM)g_nDirsDeleted, 0);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// Utility functions
-//
-
-BOOL LoadStrings()
-{
-  // Locate and load the strings file used by installer
-  if (*g_sUninstallPath == 0)
-    GetModulePath(g_sUninstallPath);
-
-  WCHAR sStringsFile[MAX_PATH];
-  _snwprintf(sStringsFile, MAX_PATH, L"%s\\%s", g_sUninstallPath, c_sStringsFile);
-
-  return Strings.LoadStrings(sStringsFile);
-}
-
-BOOL GetModulePath(WCHAR *sPath)
-{
-  if (GetModuleFileName(NULL, sPath, MAX_PATH) == 0)
-    return FALSE;
-
-  WCHAR *sSlash = wcsrchr(sPath, L'\\') + 1;
-  *sSlash = L'\0'; // cut the file name
-
-  return TRUE;
-}
-
-BOOL GetInstallPath(WCHAR *sPath)
-{
-  HKEY hKey;
-  WCHAR sRegFennecKey[MAX_PATH];
-  _snwprintf(sRegFennecKey, MAX_PATH, c_sAppRegKeyTemplate, Strings.GetString(StrID_AppShortName));
-
-  LONG result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sRegFennecKey, 0, KEY_ALL_ACCESS, &hKey);
-  if (result == ERROR_SUCCESS)
-  {
-    DWORD dwType = NULL;
-    DWORD dwCount = MAX_PATH * sizeof(WCHAR);
-    result = RegQueryValueEx(hKey, L"Path", NULL, &dwType, (LPBYTE)sPath, &dwCount);
-
-    RegCloseKey(hKey);
-  }
-
-  return (result == ERROR_SUCCESS);
-}
-
-BOOL DeleteDirectory(const WCHAR* sPathToDelete)
-{
-  BOOL            bResult = TRUE;
-  HANDLE          hFile;
-  WCHAR           sFilePath[MAX_PATH];
-  WCHAR           sPattern[MAX_PATH];
-  WIN32_FIND_DATA findData;
-
-  wcscpy(sPattern, sPathToDelete);
-  wcscat(sPattern, L"\\*.*");
-  hFile = FindFirstFile(sPattern, &findData);
-  if (hFile != INVALID_HANDLE_VALUE)
-  {
-    do
-    {
-      if (findData.cFileName[0] != L'.')
-      {
-        _snwprintf(sFilePath, MAX_PATH, L"%s\\%s", sPathToDelete, findData.cFileName);
-
-        if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-        {
-          // Delete subdirectory
-          if (!DeleteDirectory(sFilePath))
-            bResult = FALSE;
-        }
-        else
-        {
-          // Set file attributes
-          if (SetFileAttributes(sFilePath, FILE_ATTRIBUTE_NORMAL))
-          {
-            // Delete file
-            if (!DeleteFile(sFilePath) && nTotalRetries < c_nMaxTotalRetries)
-            {
-              BOOL bDeleted = FALSE;
-              nTotalRetries++;
-              for (int nRetry = 0; nRetry < c_nMaxOneFileRetries; nRetry++)
-              {
-                Sleep(c_nRetryDelay);
-                if (DeleteFile(sFilePath))
-                {
-                  bDeleted = TRUE;
-                  break;
-                }
-              }
-              if (!bDeleted)
-                bResult = FALSE;
-            }
-          }
-        }
-      }
-    } while (FindNextFile(hFile, &findData));
-
-    // Close handle
-    FindClose(hFile);
-  }
-
-  // Set directory attributes
-  if (SetFileAttributes(sPathToDelete, FILE_ATTRIBUTE_NORMAL))
-  {
-    g_nDirsDeleted++;
-    UpdateProgress();
-    // Delete directory
-    if (!RemoveDirectory(sPathToDelete) && nTotalRetries < c_nMaxTotalRetries)
-    {
-      BOOL bDeleted = FALSE;
-      nTotalRetries++;
-      for (int nRetry = 0; nRetry < c_nMaxOneFileRetries; nRetry++)
-      {
-        Sleep(c_nRetryDelay);
-        if (RemoveDirectory(sPathToDelete))
-        {
-          bDeleted = TRUE;
-          break;
-        }
-      }
-      if (!bDeleted)
-        bResult = FALSE;
-    }
-  }
-
-  return bResult;
-}
-
-// Deletes shortcuts for Fennec and FastStart service created by the installer.
-// Note: The shortcut names have to be in sync with CreateShortcut in nsInstallerDlg.cpp
-BOOL DeleteShortcut(HWND hwndParent)
-{
-  BOOL result = FALSE;
-
-  WCHAR sProgramsPath[MAX_PATH];
-  if (SHGetSpecialFolderPath(hwndParent, sProgramsPath, CSIDL_PROGRAMS, FALSE))
-  {
-    WCHAR sShortcutPath[MAX_PATH];
-    _snwprintf(sShortcutPath, MAX_PATH, L"%s\\%s.lnk", sProgramsPath, Strings.GetString(StrID_AppShortName));
-
-
-    if(SetFileAttributes(sShortcutPath, FILE_ATTRIBUTE_NORMAL))
-      result = DeleteFile(sShortcutPath);
-  }
-
-  // Handle faststart shortcut
-  WCHAR sStartupPath[MAX_PATH];
-  if (SHGetSpecialFolderPath(hwndParent, sStartupPath, CSIDL_STARTUP, FALSE))
-  {
-    WCHAR sStartupShortcutPath[MAX_PATH];
-    _snwprintf(sStartupShortcutPath, MAX_PATH, L"%s\\%sFastStart.lnk", sStartupPath, Strings.GetString(StrID_AppShortName));
-
-    // It may not exist - just ignore that
-    if(SetFileAttributes(sStartupShortcutPath, FILE_ATTRIBUTE_NORMAL))
-      DeleteFile(sStartupShortcutPath);
-  }
-
-  return result;
-}
-
-BOOL DeleteRegistryKey()
-{
-  WCHAR sRegFennecKey[MAX_PATH];
-  _snwprintf(sRegFennecKey, MAX_PATH, c_sAppRegKeyTemplate, Strings.GetString(StrID_AppShortName));
-
-  LONG result = RegDeleteKey(HKEY_LOCAL_MACHINE, sRegFennecKey);
-  return (result == ERROR_SUCCESS);
-}
-
-// Copy to a temp directory and launch from there
-BOOL CopyAndLaunch()
-{
-  WCHAR sNewName[] = L"\\Temp\\uninstall.exe";
-  WCHAR sModule[MAX_PATH];
-  if (GetModuleFileName(NULL, sModule, MAX_PATH) == 0 || !GetModulePath(g_sUninstallPath))
-    return FALSE;
-  if (CopyFile(sModule, sNewName, FALSE))
-  {
-    PROCESS_INFORMATION pi;
-    WCHAR sParam[c_nTempBufSize];
-    if (g_bRunFromSetupDll)
-      _snwprintf(sParam, c_nTempBufSize, L"%s %s %s", c_sSetupParam, c_sRemoveParam, g_sUninstallPath);
-    else
-      _snwprintf(sParam, c_nTempBufSize, L"%s %s", c_sRemoveParam, g_sUninstallPath);
-
-    // Launch "\Temp\uninstall.exe remove \Program Files\Fennec\"
-    return CreateProcess(sNewName, sParam, NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
-  }
-  else
-    return FALSE;
-}
-
-BOOL ConvertToChar(const WCHAR *wstr, char *str, DWORD bufSize)
-{
-  return 0 != WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, bufSize, NULL, NULL);
-}
-
-BOOL ShutdownFastStartService(const WCHAR *wsInstallPath)
-{
-  BOOL result = TRUE;
-
-  // Class name: appName + "MessageWindow"
-  WCHAR sClassName[c_nTempBufSize];
-  _snwprintf(sClassName, c_nTempBufSize, L"%s%s", Strings.GetString(StrID_AppShortName), L"MessageWindow");
-
-  HWND handle = ::FindWindowW(sClassName, NULL);
-  if (handle)
-  {
-    char sPath[MAX_PATH];
-    ConvertToChar(wsInstallPath, sPath, MAX_PATH);
-    size_t pathLen = strlen(sPath);
-    if (pathLen > 0 && sPath[pathLen-1] != '\\')
-    {
-      strcat(sPath, "\\");
-      pathLen++;
-    }
-
-    char sCopyData[MAX_PATH * 3];
-    _snprintf(sCopyData, MAX_PATH * 2, "\"%s%S.exe\" -shutdown-faststart", sPath, Strings.GetString(StrID_AppShortName));
-    size_t cmdLineLen = strlen(sCopyData);
-
-    char *sRest = sCopyData + cmdLineLen + 1;
-    strcpy(sRest, sPath);
-
-    COPYDATASTRUCT cds = {
-      1,
-      pathLen + 1 + cmdLineLen,
-      (void*) sCopyData
-    };
-    ::SendMessage(handle, WM_COPYDATA, 0, (LPARAM)&cds);
-
-    // Wait until it's shut down or for some timeout
-    for (int i = 0; i < 20 && handle; i++)
-    {
-      Sleep(500);
-      handle = ::FindWindowW(sClassName, NULL);
-    }
-
-    // The window must not exist if the service shut down properly
-    result = (handle == NULL);
-  }
-  return result;
-}
-
-// Remove the part installed from the CAB
-BOOL RunSystemUninstall()
-{
-  WCHAR sXML[c_nTempBufSize];
-  LPWSTR sXMLOut = NULL;
-
-  _snwprintf(sXML, c_nTempBufSize,
-             L"<wap-provisioningdoc>"
-             L"  <characteristic type=\"UnInstall\">"
-             L"    <characteristic type=\"%s\">"
-             L"      <parm name=\"uninstall\" value=\"1\" />"
-             L"    </characteristic>"
-             L"  </characteristic>"
-             L"</wap-provisioningdoc>",
-             Strings.GetString(StrID_AppLongName));
-
-  HRESULT hr = DMProcessConfigXML(sXML, CFGFLAG_PROCESS, &sXMLOut);
-  delete[] sXMLOut;
-
-  return hr == S_OK;
-}
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/uninstall/Uninstall.rc
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 Fennec Installer for WinCE.
- *
- * The Initial Developer of the Original Code is The Mozilla Foundation.
- *
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Alex Pakhotin <alexp@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-#include "resdefce.h"
-
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-// Dialog
-
-IDD_MAIN DIALOG  0, 0, 120, 77
-STYLE DS_CENTER | DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION
-EXSTYLE 0x80000000L
-CAPTION "Uninstall"
-FONT 9, "MS Shell Dlg"
-BEGIN
-    LTEXT           "",IDC_STATIC_TEXT,6,6,108,24,SS_NOPREFIX
-    LTEXT           "Uninstall?",IDC_QUESTION_TEXT,6,32,132,11,SS_NOPREFIX
-    PUSHBUTTON      "Uninstall",IDC_BTN_UNINSTALL,15,50,40,20
-    PUSHBUTTON      "Cancel",IDCANCEL,65,50,40,20
-    PUSHBUTTON      "OK",IDOK,35,50,50,20
-    CONTROL         "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,4,52,110,9
-END
-
-HI_RES_AWARE CEUX {1}	// turn off the emulation layer
-
-#undef APSTUDIO_READONLY_SYMBOLS
deleted file mode 100644
--- a/toolkit/mozapps/installer/wince/uninstall/resource.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by nsUninstaller.rc
-//
-#define IDD_MAIN                        101
-#define IDC_STATIC_TITLE                1000
-#define IDC_STATIC_TEXT                 1001
-#define IDC_QUESTION_TEXT               1002
-#define IDC_BTN_UNINSTALL               1003
-#define IDC_PROGRESS                    1004
-#define IDC_STATIC                      -1
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC                     1
-#define _APS_NEXT_RESOURCE_VALUE        102
-#define _APS_NEXT_COMMAND_VALUE         32771
-#define _APS_NEXT_CONTROL_VALUE         1005
-#define _APS_NEXT_SYMED_VALUE           110
-#endif
-#endif
deleted file mode 100644
index 0b65049e89134ed3688218f2cf493d06e3a5f397..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -89,19 +89,17 @@ const URI_UPDATES_PROPERTIES    = "chrom
 const URI_UPDATE_NS             = "http://www.mozilla.org/2005/app-update";
 
 const CATEGORY_UPDATE_TIMER               = "update-timer";
 
 const KEY_APPDIR          = "XCurProcD";
 const KEY_GRED            = "GreD";
 
 #ifdef XP_WIN
-#ifndef WINCE
 #define USE_UPDROOT
-#endif
 #elifdef ANDROID
 #define USE_UPDROOT
 #endif
 
 #ifdef USE_UPDROOT
 const KEY_UPDROOT         = "UpdRootD";
 #endif
 
@@ -209,17 +207,16 @@ XPCOMUtils.defineLazyGetter(this, "gCanA
     const NORMAL_FILE_TYPE = Ci.nsILocalFile.NORMAL_FILE_TYPE;
     var updateTestFile = getUpdateFile([FILE_PERMS_TEST]);
     LOG("gCanApplyUpdates - testing write access " + updateTestFile.path);
     if (updateTestFile.exists())
       updateTestFile.remove(false);
     updateTestFile.create(NORMAL_FILE_TYPE, FileUtils.PERMS_FILE);
     updateTestFile.remove(false);
 #ifdef XP_WIN
-#ifndef WINCE
     var sysInfo = Cc["@mozilla.org/system-info;1"].
                   getService(Ci.nsIPropertyBag2);
 
     // Example windowsVersion:  Windows XP == 5.1
     var windowsVersion = sysInfo.getProperty("version");
     LOG("gCanApplyUpdates - windowsVersion = " + windowsVersion);
 
   /**
@@ -280,17 +277,16 @@ XPCOMUtils.defineLazyGetter(this, "gCanA
       // if we're unable to create the test file this will throw an exception.
       var appDirTestFile = FileUtils.getFile(KEY_APPDIR, [FILE_PERMS_TEST]);
       LOG("gCanApplyUpdates - testing write access " + appDirTestFile.path);
       if (appDirTestFile.exists())
         appDirTestFile.remove(false)
       appDirTestFile.create(NORMAL_FILE_TYPE, FileUtils.PERMS_FILE);
       appDirTestFile.remove(false);
     }
-#endif //WINCE
 #endif //XP_WIN
   }
   catch (e) {
      LOG("gCanApplyUpdates - unable to apply updates. Exception: " + e);
     // No write privileges to install directory
     return false;
   }
 
--- a/toolkit/mozapps/update/nsUpdateServiceStub.js
+++ b/toolkit/mozapps/update/nsUpdateServiceStub.js
@@ -42,19 +42,17 @@ Components.utils.import("resource://gre/
 const Ci = Components.interfaces;
 
 const DIR_UPDATES         = "updates";
 const FILE_UPDATE_STATUS  = "update.status";
 
 const KEY_APPDIR          = "XCurProcD";
 
 #ifdef XP_WIN
-#ifndef WINCE
 #define USE_UPDROOT
-#endif
 #elifdef ANDROID
 #define USE_UPDROOT
 #endif
 
 #ifdef USE_UPDROOT
 const KEY_UPDROOT         = "UpdRootD";
 #endif
 
--- a/toolkit/mozapps/update/test/unit/head_update.js.in
+++ b/toolkit/mozapps/update/test/unit/head_update.js.in
@@ -46,22 +46,16 @@ const APP_BIN_SUFFIX = "@BIN_SUFFIX@";
 #endif
 
 #ifdef XP_WIN
 const IS_WIN = true;
 #else
 const IS_WIN = false;
 #endif
 
-#ifdef WINCE
-const IS_WINCE = true;
-#else
-const IS_WINCE = false;
-#endif
-
 #ifdef XP_OS2
 const IS_OS2 = true;
 #else
 const IS_OS2 = false;
 #endif
 
 #ifdef XP_MACOSX
 const IS_MACOSX = true;
@@ -556,17 +550,17 @@ function setupUpdaterTest(aMarFile) {
         testFile.copyTo(testDir, aTestFile.fileName);
         testFile = getApplyDirFile(aTestFile.relPathDir + aTestFile.fileName);
       }
       else {
         testFile = getApplyDirFile(aTestFile.relPathDir + aTestFile.fileName, true);
         writeFile(testFile, aTestFile.originalContents);
       }
 
-      // Skip these tests on Windows (includes WinCE) and OS/2 since their
+      // Skip these tests on Windows and OS/2 since their
       // implementaions of chmod doesn't really set permissions.
       if (!IS_WIN && !IS_OS2 && aTestFile.originalPerms) {
         testFile.permissions = aTestFile.originalPerms;
         // Store the actual permissions on the file for reference later after
         // setting the permissions.
         if (!aTestFile.comparePerms)
           aTestFile.comparePerms = testFile.permissions;
       }
@@ -656,34 +650,29 @@ function cleanupUpdaterTest() {
   cleanUp();
 }
 
 /**
  * Helper function for updater binary tests for verifying the contents of the
  * update log after a successful update.
  */
 function checkUpdateLogContents(aCompareLogFile) {
-  // Skip this test on Windows CE since it doesn't use relative paths.
-  if (IS_WINCE)
-    return;
-
   let updateLog = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX, true);
   updateLog.append(FILE_UPDATE_LOG);
   // Skip the first two lines since they contain absolute paths.
   let updateLogContents = readFileBytes(updateLog).split("\n").slice(2).join("\n");
   updateLogContents = updateLogContents.replace(/\r/g, "");
   // Replace error codes since they are different on each platform.
   updateLogContents = updateLogContents.replace(/, err:.*\n/g, "\n");
   // Replace to make the log parsing happy.
   updateLogContents = updateLogContents.replace(/non-fatal error /g, "");
   // The FindFile results when enumerating the filesystem on Windows is not
   // determistic so the results matching the following need to be ignored.
   updateLogContents = updateLogContents.replace(/.* a\/b\/7\/7text.*\n/g, "");
 
-
   let compareLog = do_get_file(aCompareLogFile);
   let compareLogContents = readFileBytes(compareLog);
 
   do_check_eq(compareLogContents, updateLogContents);
 }
 
 function checkUpdateLogContains(aCheckString) {
   let updateLog = do_get_file(TEST_ID + UPDATES_DIR_SUFFIX, true);
@@ -699,17 +688,17 @@ function checkUpdateLogContains(aCheckSt
 function checkFilesAfterUpdateSuccess() {
   logTestInfo("testing contents of files after a successful update");
   TEST_FILES.forEach(function CFAUS_TF_FE(aTestFile) {
     let testFile = getApplyDirFile(aTestFile.relPathDir + aTestFile.fileName, true);
     logTestInfo("testing file: " + testFile.path);
     if (aTestFile.compareFile || aTestFile.compareContents) {
       do_check_true(testFile.exists());
 
-      // Skip these tests on Windows (includes WinCE) and OS/2 since their
+      // Skip these tests on Windows and OS/2 since their
       // implementaions of chmod doesn't really set permissions.
       if (!IS_WIN && !IS_OS2 && aTestFile.comparePerms) {
         // Check if the permssions as set in the complete mar file are correct.
         let logPerms = "testing file permissions - ";
         if (aTestFile.originalPerms) {
           logPerms += "original permissions: " + aTestFile.originalPerms.toString(8) + ", ";
         }
         logPerms += "compare permissions : " + aTestFile.comparePerms.toString(8) + ", ";
@@ -783,17 +772,17 @@ function checkFilesAfterUpdateSuccess() 
 function checkFilesAfterUpdateFailure() {
   logTestInfo("testing contents of files after a failed update");
   TEST_FILES.forEach(function CFAUF_TF_FE(aTestFile) {
     let testFile = getApplyDirFile(aTestFile.relPathDir + aTestFile.fileName, true);
     logTestInfo("testing file: " + testFile.path);
     if (aTestFile.compareFile || aTestFile.compareContents) {
       do_check_true(testFile.exists());
 
-      // Skip these tests on Windows (includes WinCE) and OS/2 since their
+      // Skip these tests on Windows and OS/2 since their
       // implementaions of chmod doesn't really set permissions.
       if (!IS_WIN && !IS_OS2 && aTestFile.comparePerms) {
         // Check the original permssions are retained on the file.
         let logPerms = "testing file permissions - ";
         if (aTestFile.originalPerms) {
           logPerms += "original permissions: " + aTestFile.originalPerms.toString(8) + ", ";
         }
         logPerms += "compare permissions : " + aTestFile.comparePerms.toString(8) + ", ";
--- a/toolkit/mozapps/update/test/unit/test_0150_appBinReplaced_xp_win_complete.js
+++ b/toolkit/mozapps/update/test/unit/test_0150_appBinReplaced_xp_win_complete.js
@@ -187,17 +187,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : true
 }, {
   description  : "Removed by precomplete (rmdir)",
   relPathDir   : "a/b/2/",
   dirRemoved   : true
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_COMPLETE_WIN_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0151_appBinPatched_xp_win_partial.js
+++ b/toolkit/mozapps/update/test/unit/test_0151_appBinPatched_xp_win_partial.js
@@ -189,17 +189,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : true
 }, {
   description  : "Removed by update.manifest (rmdir)",
   relPathDir   : "a/b/1/",
   dirRemoved   : true
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_IN_USE_WIN_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_win_complete.js
+++ b/toolkit/mozapps/update/test/unit/test_0160_appInUse_xp_win_complete.js
@@ -180,17 +180,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : false
 }, {
   description  : "Not removed for failed update (rmdir)",
   relPathDir   : "a/b/2/",
   dirRemoved   : false
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_COMPLETE_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0170_fileLocked_xp_win_complete.js
+++ b/toolkit/mozapps/update/test/unit/test_0170_fileLocked_xp_win_complete.js
@@ -180,17 +180,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : false
 }, {
   description  : "Not removed for failed update (rmdir)",
   relPathDir   : "a/b/2/",
   dirRemoved   : false
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_COMPLETE_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0171_fileLocked_xp_win_partial.js
+++ b/toolkit/mozapps/update/test/unit/test_0171_fileLocked_xp_win_partial.js
@@ -181,17 +181,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : false
 }, {
   description  : "Not removed for failed update (rmdir)",
   relPathDir   : "a/b/1/",
   dirRemoved   : false
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_PARTIAL_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0180_fileInUse_xp_win_complete.js
+++ b/toolkit/mozapps/update/test/unit/test_0180_fileInUse_xp_win_complete.js
@@ -186,17 +186,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : true
 }, {
   description  : "Removed by precomplete (rmdir)",
   relPathDir   : "a/b/2/",
   dirRemoved   : true
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_COMPLETE_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0181_fileInUse_xp_win_partial.js
+++ b/toolkit/mozapps/update/test/unit/test_0181_fileInUse_xp_win_partial.js
@@ -189,17 +189,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : true
 }, {
   description  : "Removed by update.manifest (rmdir)",
   relPathDir   : "a/b/1/",
   dirRemoved   : true
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_IN_USE_WIN_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0182_rmrfdirFileInUse_xp_win_complete.js
+++ b/toolkit/mozapps/update/test/unit/test_0182_rmrfdirFileInUse_xp_win_complete.js
@@ -186,17 +186,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : true
 }, {
   description  : "Removed by precomplete (rmdir)",
   relPathDir   : "a/b/2/",
   dirRemoved   : true
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_COMPLETE_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0183_rmrfdirFileInUse_xp_win_partial.js
+++ b/toolkit/mozapps/update/test/unit/test_0183_rmrfdirFileInUse_xp_win_partial.js
@@ -229,17 +229,17 @@ ADDITIONAL_TEST_DIRS = [
   dirRemoved   : true
 }, {
   description  : "Removed by update.manifest (rmdir)",
   relPathDir   : "a/b/1/",
   dirRemoved   : true
 }];
 
 function run_test() {
-  if (!IS_WIN || IS_WINCE) {
+  if (!IS_WIN) {
     logTestInfo("this test is only applicable to Windows... returning early");
     return;
   }
 
   do_test_pending();
   do_register_cleanup(cleanupUpdaterTest);
 
   setupUpdaterTest(MAR_IN_USE_WIN_FILE);
--- a/toolkit/mozapps/update/test/unit/test_0200_app_launch_apply_update.js
+++ b/toolkit/mozapps/update/test/unit/test_0200_app_launch_apply_update.js
@@ -107,21 +107,16 @@ XPCOMUtils.defineLazyGetter(this, "gAppB
 });
 
 function run_test() {
   if (IS_ANDROID) {
     logTestInfo("this test is not applicable to Android... returning early");
     return;
   }
 
-  if (IS_WINCE) {
-    logTestInfo("this test is not applicable to Windows CE... returning early");
-    return;
-  }
-
   do_test_pending();
   do_register_cleanup(end_test);
 
   removeUpdateDirsAndFiles();
 
   if (!gAppBinPath) {
     do_throw("Main application binary not found... expected: " +
              APP_BIN_NAME + APP_BIN_SUFFIX);
--- a/toolkit/themes/winstripe/global/toolbar.css
+++ b/toolkit/themes/winstripe/global/toolbar.css
@@ -42,20 +42,18 @@
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 /* ::::: toolbox ::::: */
 
 toolbox {
   -moz-appearance: toolbox;
   background-color: -moz-Dialog;
-%ifndef WINCE
   border-top: 2px solid;
   -moz-border-top-colors: ThreeDShadow ThreeDHighlight;
-%endif
 }
 
 /* ::::: toolbar & menubar ::::: */
 
 toolbar, menubar {
   -moz-appearance: toolbar;
 }
 
--- a/toolkit/toolkit-tiers.mk
+++ b/toolkit/toolkit-tiers.mk
@@ -53,21 +53,18 @@ tier_platform_staticdirs += modules/free
 endif
 
 tier_platform_dirs += xpcom
 
 ifndef MOZ_NATIVE_ZLIB
 tier_platform_dirs += modules/zlib
 endif
 
-ifndef WINCE
-tier_platform_dirs += modules/libreg
-endif
-
 tier_platform_dirs += \
+		modules/libreg \
 		modules/libpref \
 		intl \
 		netwerk \
 		$(NULL)
 
 ifdef MOZ_AUTH_EXTENSION
 tier_platform_dirs += extensions/auth
 endif
@@ -90,20 +87,16 @@ ifndef MOZ_NATIVE_BZ2
 tier_platform_dirs += modules/libbz2
 endif
 tier_platform_dirs += modules/libmar
 tier_platform_dirs += other-licenses/bsdiff
 endif
 
 tier_platform_dirs	+= gfx/qcms
 
-ifeq ($(OS_ARCH),WINCE)
-tier_platform_dirs += modules/lib7z
-endif
-
 #
 # "gecko" - core components
 #
 
 tier_platform_dirs += ipc js/ipc js/jetpack
 
 tier_platform_dirs += \
 		js/src/xpconnect \
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -48,17 +48,17 @@ LIBRARY_NAME = xulapp_s
 LIBXUL_LIBRARY = 1
 
 FORCE_STATIC_LIB = 1
 
 XPIDLSRCS = \
   nsINativeAppSupport.idl \
   $(NULL)
 
-ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
+ifeq ($(OS_ARCH),WINNT)
 XPIDLSRCS += nsIWinAppHelper.idl
 endif
 
 CPPSRCS = \
   nsAppRunner.cpp \
   nsConsoleWriter.cpp \
   nsXREDirProvider.cpp \
   nsNativeAppSupportBase.cpp \
@@ -66,22 +66,18 @@ CPPSRCS = \
   nsSigHandlers.cpp \
   $(NULL)
 
 ifdef MOZ_INSTRUMENT_EVENT_LOOP
 CPPSRCS += EventTracer.cpp
 endif
 
 ifdef MOZ_SPLASHSCREEN
-ifeq ($(OS_ARCH),WINCE)
-CPPSRCS += nsSplashScreenWin.cpp
-else
 CPPSRCS += nsSplashScreenDummy.cpp
 endif
-endif
 
 DEFINES += -DIMPL_XREAPI -DMOZ_APP_NAME='"$(MOZ_APP_NAME)"'
 
 ifndef BUILD_STATIC_LIBS
 CPPSRCS += nsEmbedFunctions.cpp
 endif
 
 ifdef MOZ_UPDATER
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -161,20 +161,18 @@ using mozilla::dom::ContentParent;
 
 #ifdef XP_UNIX
 #include <sys/stat.h>
 #include <unistd.h>
 #include <pwd.h>
 #endif
 
 #ifdef XP_WIN
-#ifndef WINCE
 #include <process.h>
 #include <shlobj.h>
-#endif
 #include "nsThreadUtils.h"
 #endif
 
 #ifdef XP_MACOSX
 #include "nsILocalFileMac.h"
 #include "nsCommandLineServiceMac.h"
 #endif
 
@@ -214,43 +212,16 @@ using mozilla::dom::ContentParent;
 #include "base/command_line.h"
 
 #include "mozilla/FunctionTimer.h"
 
 #ifdef ANDROID
 #include "AndroidBridge.h"
 #endif
 
-#ifdef WINCE
-class WindowsMutex {
-public:
-  WindowsMutex(const wchar_t *name) {
-    mHandle = CreateMutexW(0, FALSE, name);
-  }
-
-  ~WindowsMutex() {
-    Unlock();
-    CloseHandle(mHandle);
-  }
-
-  PRBool Lock(DWORD timeout = INFINITE) {
-    DWORD state = WaitForSingleObject(mHandle, timeout);
-    return state == WAIT_OBJECT_0;
-  }
-  
-  void Unlock() {
-    if (mHandle)
-      ReleaseMutex(mHandle);
-  }
-
-protected:
-  HANDLE mHandle;
-};
-#endif
-
 extern PRUint32 gRestartMode;
 extern void InstallSignalHandlers(const char *ProgramName);
 #include "nsX11ErrorHandler.h"
 
 #define FILE_COMPATIBILITY_INFO NS_LITERAL_CSTRING("compatibility.ini")
 #define FILE_INVALIDATE_CACHES NS_LITERAL_CSTRING(".purgecaches")
 
 int    gArgc;
@@ -841,20 +812,16 @@ typedef enum
 
 // avoid collision with TokeElevationType enum in WinNT.h
 // of the Vista SDK
 #define VistaTokenElevationType static_cast< TOKEN_INFORMATION_CLASS >( 18 )
 
 NS_IMETHODIMP
 nsXULAppInfo::GetUserCanElevate(PRBool *aUserCanElevate)
 {
-#ifdef WINCE
-  *aUserCanElevate = PR_FALSE;
-  return NS_OK;
-#else
   HANDLE hToken;
 
   VISTA_TOKEN_ELEVATION_TYPE elevationType;
   DWORD dwSize; 
 
   if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken) ||
       !GetTokenInformation(hToken, VistaTokenElevationType, &elevationType,
                            sizeof(elevationType), &dwSize)) {
@@ -872,17 +839,16 @@ nsXULAppInfo::GetUserCanElevate(PRBool *
     //      elevated)
     *aUserCanElevate = (elevationType == VistaTokenElevationTypeLimited);
   }
 
   if (hToken)
     CloseHandle(hToken);
 
   return NS_OK;
-#endif // WINCE
 }
 #endif
 
 #ifdef MOZ_CRASHREPORTER
 NS_IMETHODIMP
 nsXULAppInfo::GetEnabled(PRBool *aEnabled)
 {
   *aEnabled = CrashReporter::GetEnabled();
@@ -2886,65 +2852,21 @@ XRE_main(int argc, char* argv[], const n
 
 #ifdef MOZ_SPLASHSCREEN
   // check to see if we need to do a splash screen
   PRBool wantsSplash = PR_TRUE;
   PRBool isNoSplash = (CheckArg("nosplash", PR_FALSE, NULL, PR_FALSE) == ARG_FOUND);
   isNoSplash |= (PR_GetEnv("NO_SPLASH") != 0);
   PRBool isNoRemote = (CheckArg("no-remote", PR_FALSE, NULL, PR_FALSE) == ARG_FOUND);
 
-#ifdef WINCE
-  // synchronize startup; if it looks like we're going to have to
-  // wait, then open up a splash screen
-  WindowsMutex winStartupMutex(L"FirefoxStartupMutex");
-
-  // try to lock the mutex, but only wait 100ms to do so
-  PRBool needsMutexLock = ! winStartupMutex.Lock(100);
-
-  // If we failed to lock the mutex quickly, then we'll want
-  // a splash screen for sure.
-  //
-  // If we did manage to lock it, then we'll only want one
-  // a splash screen if there is no existing message window;
-  // that is, if we are the first instance of the app.
-  if (!needsMutexLock && !isNoRemote) {
-    // check to see if there's a remote firefox up
-    static PRUnichar classNameBuffer[128];
-    _snwprintf(classNameBuffer, sizeof(classNameBuffer) / sizeof(PRUnichar),
-               L"%S%s",
-               gAppData->name, L"MessageWindow");
-    HANDLE h = FindWindowW(classNameBuffer, 0);
-    if (h) {
-      // Someone else has the window, and we were able to grab the mutex,
-      // meaning the other instance ahs presumably already finished starting
-      // up by now.  So no need for a splash screen.
-      wantsSplash = PR_FALSE;
-      CloseHandle(h);
-    } else {
-      // We couldn't find another window, and we were able to lock the mutex;
-      // we're likely the first instance starting up, so make sure a splash
-      // screen gets thrown up.
-      wantsSplash = PR_TRUE;
-    }
-  }
-#endif //WINCE
-
   if (wantsSplash && !isNoSplash)
     splashScreen = nsSplashScreen::GetOrCreate();
 
   if (splashScreen)
     splashScreen->Open();
-
-#ifdef WINCE
-  // Now that the splash screen is open, wait indefinitely
-  // for the startup mutex on this thread if we need to.
-  if (needsMutexLock)
-    winStartupMutex.Lock();
-#endif //WINCE
-
 #endif //MOZ_SPLASHSCREEN
 
 
   ScopedLogging log;
 
   if (!appData.xreDirectory) {
     nsCOMPtr<nsILocalFile> lf;
     rv = XRE_GetBinaryPath(gArgv[0], getter_AddRefs(lf));
@@ -3401,21 +3323,16 @@ XRE_main(int argc, char* argv[], const n
 
     nsCOMPtr<nsILocalFile> profLD;
     rv = profileLock->GetLocalDirectory(getter_AddRefs(profLD));
     NS_ENSURE_SUCCESS(rv, 1);
 
     rv = dirProvider.SetProfile(profD, profLD);
     NS_ENSURE_SUCCESS(rv, 1);
 
-#if defined(WINCE) && defined(MOZ_SPLASHSCREEN)
-    // give up the mutex, let other app startups happen
-    winStartupMutex.Unlock();
-#endif
-
     //////////////////////// NOW WE HAVE A PROFILE ////////////////////////
 
 #ifdef MOZ_CRASHREPORTER
     if (appData.flags & NS_XRE_ENABLE_CRASH_REPORTER)
         MakeOrSetMinidumpPath(profD);
 #endif
 
     nsCAutoString version;
@@ -3942,17 +3859,17 @@ SetupErrorHandling(const char* progname)
 
   HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll");
   SetProcessDEPPolicyFunc _SetProcessDEPPolicy =
     (SetProcessDEPPolicyFunc) GetProcAddress(kernel32, "SetProcessDEPPolicy");
   if (_SetProcessDEPPolicy)
     _SetProcessDEPPolicy(PROCESS_DEP_ENABLE);
 #endif
 
-#if defined (XP_WIN32) && !defined (WINCE)
+#ifdef XP_WIN32
   // Suppress the "DLL Foo could not be found" dialog, such that if dependent
   // libraries (such as GDI+) are not preset, we gracefully fail to load those
   // XPCOM components, instead of being ungraceful.
   UINT realMode = SetErrorMode(0);
   realMode |= SEM_FAILCRITICALERRORS;
   // If XRE_NO_WINDOWS_CRASH_DIALOG is set, suppress displaying the "This
   // application has crashed" dialog box.  This is mainly useful for
   // automated testing environments, e.g. tinderbox, where there's no need
@@ -3963,20 +3880,18 @@ SetupErrorHandling(const char* progname)
   SetErrorMode(realMode);
 
 #endif
 
 #ifndef XP_OS2
   InstallSignalHandlers(progname);
 #endif
 
-#ifndef WINCE
   // Unbuffer stdout, needed for tinderbox tests.
   setbuf(stdout, 0);
-#endif
 
 #if defined(FREEBSD)
   // Disable all SIGFPE's on FreeBSD, as it has non-IEEE-conformant fp
   // trap behavior that trips up on floating-point tests performed by
   // the JS engine.  See bugzilla bug 9967 details.
   fpsetmask(0);
 #endif
 }
--- a/toolkit/xre/nsNativeAppSupportWin.cpp
+++ b/toolkit/xre/nsNativeAppSupportWin.cpp
@@ -71,19 +71,17 @@
 #include "nsIJSContextStack.h"
 #include "nsIWebNavigation.h"
 #include "nsIWindowMediator.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsIAppStartup.h"
 
 #include <windows.h>
 #include <shellapi.h>
-#ifndef WINCE
 #include <ddeml.h>
-#endif
 #include <stdlib.h>
 #include <stdio.h>
 #include <io.h>
 #include <direct.h>
 #include <fcntl.h>
 
 static HWND hwndForDOMWindow( nsISupports * );
 
@@ -102,22 +100,20 @@ GetMostRecentWindow(const PRUnichar* aTy
 }
 
 static
 void
 activateWindow( nsIDOMWindowInternal *win ) {
     // Try to get native window handle.
     HWND hwnd = hwndForDOMWindow( win );
     if ( hwnd ) {
-#ifndef WINCE  // Can't iconify windows on windows ce
         // Restore the window if it is minimized.
         if ( ::IsIconic( hwnd ) ) {
             ::ShowWindow( hwnd, SW_RESTORE );
         }
-#endif
         // Use the OS call, if possible.
         ::SetForegroundWindow( hwnd );
     } else {
         // Use internal method.
         win->Focus();
     }
 }
 
@@ -308,43 +304,39 @@ public:
     NS_DECL_NSIOBSERVER
     NS_DECL_ISUPPORTS_INHERITED
 
     // Overrides of base implementation.
     NS_IMETHOD Start( PRBool *aResult );
     NS_IMETHOD Stop( PRBool *aResult );
     NS_IMETHOD Quit();
     NS_IMETHOD Enable();
-#ifndef WINCE
     // The "old" Start method (renamed).
     NS_IMETHOD StartDDE();
-#endif
     // Utility function to handle a Win32-specific command line
     // option: "-console", which dynamically creates a Windows
     // console.
     void CheckConsole();
 
 private:
     static void HandleCommandLine(const char* aCmdLineString, nsIFile* aWorkingDir, PRUint32 aState);
-#ifndef WINCE
     static HDDEDATA CALLBACK HandleDDENotification( UINT     uType,
                                                     UINT     uFmt,
                                                     HCONV    hconv,
                                                     HSZ      hsz1,
                                                     HSZ      hsz2,
                                                     HDDEDATA hdata,
                                                     ULONG_PTR dwData1,
                                                     ULONG_PTR dwData2 );
     static void ParseDDEArg( HSZ args, int index, nsString& string);
     static void ParseDDEArg( const WCHAR* args, int index, nsString& aString);
     static HDDEDATA CreateDDEData( DWORD value );
     static HDDEDATA CreateDDEData( LPBYTE value, DWORD len );
     static PRBool   InitTopicStrings();
     static int      FindTopic( HSZ topic );
-#endif
     static void ActivateLastWindow();
     static nsresult OpenWindow( const char *urlstr, const char *args );
     static nsresult OpenBrowserWindow();
     static void     SetupSysTrayIcon();
     static void     RemoveSysTrayIcon();
 
     static int   mConversations;
     enum {
@@ -353,19 +345,17 @@ private:
         topicCancelProgress,
         topicVersion,
         topicRegisterViewer,
         topicUnRegisterViewer,
         topicGetWindowInfo,
         // Note: Insert new values above this line!!!!!
         topicCount // Count of the number of real topics
     };
-#ifndef WINCE
     static HSZ   mApplication, mTopics[ topicCount ];
-#endif
     static DWORD mInstance;
     static PRBool mCanHandleRequests;
     static PRUnichar mMutexName[];
     friend struct MessageWindow;
 }; // nsNativeAppSupportWin
 
 NS_INTERFACE_MAP_BEGIN(nsNativeAppSupportWin)
     NS_INTERFACE_MAP_ENTRY(nsIObserver)
@@ -377,17 +367,16 @@ NS_IMPL_RELEASE_INHERITED(nsNativeAppSup
 void
 nsNativeAppSupportWin::CheckConsole() {
     for ( int i = 1; i < gArgc; i++ ) {
         if ( strcmp( "-console", gArgv[i] ) == 0
              ||
              strcmp( "/console", gArgv[i] ) == 0 ) {
             // Users wants to make sure we have a console.
             // Try to allocate one.
-#ifndef WINCE
             BOOL rc = ::AllocConsole();
             if ( rc ) {
                 // Console allocated.  Fix it up so that output works in
                 // all cases.  See http://support.microsoft.com/support/kb/articles/q105/3/05.asp.
 
                 // stdout
                 int hCrt = ::_open_osfhandle( (intptr_t)GetStdHandle( STD_OUTPUT_HANDLE ),
                                             _O_TEXT );
@@ -424,17 +413,16 @@ nsNativeAppSupportWin::CheckConsole() {
                         *stdin = *hf;
                     }
                 }
                 */
             } else {
                 // Failed.  Probably because there already is one.
                 // There's little we can do, in any case.
             }
-#endif
             // Remove the console argument from the command line.
             do {
                 gArgv[i] = gArgv[i + 1];
                 ++i;
             } while (gArgv[i]);
 
             --gArgc;
 
@@ -476,20 +464,18 @@ const char * const topicNames[] = { "WWW
                                     "WWW_CancelProgress",
                                     "WWW_Version",
                                     "WWW_RegisterViewer",
                                     "WWW_UnRegisterViewer",
                                     "WWW_GetWindowInfo" };
 
 // Static member definitions.
 int   nsNativeAppSupportWin::mConversations = 0;
-#ifndef WINCE
 HSZ   nsNativeAppSupportWin::mApplication   = 0;
 HSZ   nsNativeAppSupportWin::mTopics[nsNativeAppSupportWin::topicCount] = { 0 };
-#endif
 DWORD nsNativeAppSupportWin::mInstance      = 0;
 PRBool nsNativeAppSupportWin::mCanHandleRequests   = PR_FALSE;
 
 PRUnichar nsNativeAppSupportWin::mMutexName[ 128 ] = { 0 };
 
 
 // Message window encapsulation.
 struct MessageWindow {
@@ -574,44 +560,31 @@ struct MessageWindow {
 
     // SendRequest: Pass the command line via WM_COPYDATA to message window.
     NS_IMETHOD SendRequest() {
         WCHAR *cmd = ::GetCommandLineW();
         WCHAR cwd[MAX_PATH];
         _wgetcwd(cwd, MAX_PATH);
 
         // Construct a narrow UTF8 buffer <commandline>\0<workingdir>\0
-#ifdef WINCE
-        // For WinCE, we're stuck with providing our own argv[0] for the remote
-        // command-line.
-        NS_ConvertUTF16toUTF8 utf8buffer(L"dummy ");
-        AppendUTF16toUTF8(cmd, utf8buffer);
-#else
         NS_ConvertUTF16toUTF8 utf8buffer(cmd);
-#endif
         utf8buffer.Append('\0');
         AppendUTF16toUTF8(cwd, utf8buffer);
         utf8buffer.Append('\0');
 
         // We used to set dwData to zero, when we didn't send the working dir.
         // Now we're using it as a version number.
         COPYDATASTRUCT cds = {
             1,
             utf8buffer.Length(),
             (void*) utf8buffer.get()
         };
         // Bring the already running Mozilla process to the foreground.
         // nsWindow will restore the window (if minimized) and raise it.
-#ifdef WINCE
-        // for activating the existing window on wince we need "| 0x01"
-        // see http://msdn.microsoft.com/en-us/library/ms940024.aspx for details
-        ::SetForegroundWindow( (HWND)(((ULONG) mHandle) | 0x01) );
-#else
         ::SetForegroundWindow( mHandle );
-#endif
         ::SendMessage( mHandle, WM_COPYDATA, 0, (LPARAM)&cds );
         return NS_OK;
     }
 
     // Window proc.
     static LRESULT CALLBACK WindowProc( HWND msgWindow, UINT msg, WPARAM wp, LPARAM lp ) {
         if ( msg == WM_COPYDATA ) {
             if (!nsNativeAppSupportWin::mCanHandleRequests)
@@ -697,30 +670,28 @@ nsNativeAppSupportWin::Start( PRBool *aR
     MessageWindow msgWindow;
     if ( (HWND)msgWindow ) {
         // We are a client process.  Pass request to message window.
         rv = msgWindow.SendRequest();
     } else {
         // We will be server.
         rv = msgWindow.Create();
         if ( NS_SUCCEEDED( rv ) ) {
-#ifndef WINCE
             // Start up DDE server.
             this->StartDDE();
-#endif
             // Tell caller to spin message loop.
             *aResult = PR_TRUE;
         }
     }
 
     startupLock.Unlock();
 
     return rv;
 }
-#ifndef WINCE
+
 PRBool
 nsNativeAppSupportWin::InitTopicStrings() {
     for ( int i = 0; i < topicCount; i++ ) {
         if ( !( mTopics[ i ] = DdeCreateStringHandleA( mInstance, const_cast<char *>(topicNames[ i ]), CP_WINANSI ) ) ) {
             return PR_FALSE;
         }
     }
     return PR_TRUE;
@@ -766,17 +737,17 @@ nsNativeAppSupportWin::StartDDE() {
     NS_ENSURE_TRUE( DdeNameService( mInstance, mApplication, 0, DNS_REGISTER ), NS_ERROR_FAILURE );
 
 #if MOZ_DEBUG_DDE
     printf( "DDE server started\n" );
 #endif
 
     return NS_OK;
 }
-#endif /* WINCE */
+
 // If no DDE conversations are pending, terminate DDE.
 NS_IMETHODIMP
 nsNativeAppSupportWin::Stop( PRBool *aResult ) {
     NS_ENSURE_ARG( aResult );
     NS_ENSURE_TRUE( mInstance, NS_ERROR_NOT_INITIALIZED );
 
     nsresult rv = NS_OK;
     *aResult = PR_TRUE;
@@ -828,31 +799,29 @@ nsNativeAppSupportWin::Quit() {
     // get rid of it as we are shutting down.
     // Note:  Destroy calls DestroyWindow, which will only work on a window
     //  created by the same thread.
     MessageWindow mw;
     mw.Destroy();
 
     if ( mInstance ) {
         // Unregister application name.
-#ifndef WINCE
         DdeNameService( mInstance, mApplication, 0, DNS_UNREGISTER );
         // Clean up strings.
         if ( mApplication ) {
             DdeFreeStringHandle( mInstance, mApplication );
             mApplication = 0;
         }
         for ( int i = 0; i < topicCount; i++ ) {
             if ( mTopics[i] ) {
                 DdeFreeStringHandle( mInstance, mTopics[i] );
                 mTopics[i] = 0;
             }
         }
         DdeUninitialize( mInstance );
-#endif
         mInstance = 0;
 #if MOZ_DEBUG_DDE
     printf( "DDE server stopped\n" );
 #endif
     }
 
     return NS_OK;
 }
@@ -908,17 +877,17 @@ static nsCString hszValue( DWORD instanc
     if ( len ) {
         char buffer[ 256 ];
         DdeQueryString( instance, hsz, buffer, sizeof buffer, CP_WINANSI );
         result += buffer;
     }
     result += "]";
     return result;
 }
-#elif !defined(WINCE)
+#else
 // These are purely a safety measure to avoid the infamous "won't
 // build non-debug" type Tinderbox flames.
 static nsCString uTypeDesc( UINT ) {
     return nsCString( "?" );
 }
 static nsCString hszValue( DWORD, HSZ ) {
     return nsCString( "?" );
 }
@@ -939,17 +908,16 @@ static void escapeQuotes( nsAString &aSt
            aString.Insert( PRUnichar('\\'), offset );
            // Increment offset because we just inserted a slash
            offset++;
        }
     }
     return;
 }
 
-#ifndef WINCE
 HDDEDATA CALLBACK
 nsNativeAppSupportWin::HandleDDENotification( UINT uType,       // transaction type
                                               UINT uFmt,        // clipboard data format
                                               HCONV hconv,      // handle to the conversation
                                               HSZ hsz1,         // handle to a string
                                               HSZ hsz2,         // handle to a string
                                               HDDEDATA hdata,   // handle to a global memory object
                                               ULONG_PTR dwData1,    // transaction-specific data
@@ -1190,17 +1158,17 @@ nsNativeAppSupportWin::HandleDDENotifica
         }
     } else if ( uType & XCLASS_NOTIFICATION ) {
     }
 #if MOZ_DEBUG_DDE
     printf( "DDE result=%d (0x%08X)\n", (int)result, (int)result );
 #endif
     return result;
 }
-#endif /* WINCE */
+
 // Utility function to advance to end of quoted string.
 // p+offset must point to the comma preceding the arg on entry.
 // On return, p+result points to the closing '"' (or end of the string
 // if the closing '"' is missing) if the arg is quoted.  If the arg
 // is not quoted, then p+result will point to the first character
 // of the arg.
 static PRInt32 advanceToEndOfQuotedArg( const WCHAR *p, PRInt32 offset, PRInt32 len ) {
     // Check whether the current arg is quoted.
@@ -1212,17 +1180,16 @@ static PRInt32 advanceToEndOfQuotedArg( 
             if ( p[offset] == '\\' ) {
                 offset++;
             }
         }
     }
     return offset;
 }
 
-#ifndef WINCE
 void nsNativeAppSupportWin::ParseDDEArg( const WCHAR* args, int index, nsString& aString) {
     if ( args ) {
         nsDependentString temp(args);
 
         // offset points to the comma preceding the desired arg.
         PRInt32 offset = -1;
         // Skip commas till we get to the arg we want.
         while( index-- ) {
@@ -1281,17 +1248,16 @@ HDDEDATA nsNativeAppSupportWin::CreateDD
                                            value,
                                            len,
                                            0,
                                            mApplication,
                                            CF_TEXT,
                                            0 );
     return result;
 }
-#endif /* WINCE */
 
 void nsNativeAppSupportWin::ActivateLastWindow() {
     nsCOMPtr<nsIDOMWindowInternal> navWin;
     GetMostRecentWindow( NS_LITERAL_STRING("navigator:browser").get(), getter_AddRefs( navWin ) );
     if ( navWin ) {
         // Activate that window.
         activateWindow( navWin );
     } else {
deleted file mode 100644
--- a/toolkit/xre/nsSplashScreenWin.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * 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 code.
- *
- * The Initial Developer of the Original Code is
- *   mozilla.org
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Vladimir Vukicevic <vladimir@pobox.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsSplashScreen.h"
-
-#include <windows.h>
-
-static ATOM gSplashScreenClass = 0;
-
-class nsSplashScreenWin;
-
-static nsSplashScreenWin *gSplashScreen = NULL;
-
-class nsSplashScreenWin :
-    public nsSplashScreen
-{
-public:
-    nsSplashScreenWin();
-
-    virtual void Open();
-    virtual void Close();
-    virtual void Update(PRInt32 progress);
-
-protected:
-    HWND mDialog;
-    HBITMAP mSplashBitmap, mOldBitmap;
-    HDC mSplashBitmapDC;
-    int mWidth, mHeight;
-
-    static DWORD WINAPI ThreadProc(LPVOID splashScreen);
-
-    static LRESULT CALLBACK DialogProc (HWND hWnd,
-                                        UINT uMsg,
-                                        WPARAM wParam,
-                                        LPARAM lParam);
-
-    void OnPaint(HDC dc, const PAINTSTRUCT *ps);
-
-    PRInt32 mProgress;
-};
-
-nsSplashScreen *
-nsSplashScreen::GetOrCreate()
-{
-    if (!gSplashScreen)
-        gSplashScreen = new nsSplashScreenWin();
-
-    return gSplashScreen;
-}
-
-nsSplashScreen *
-nsSplashScreen::Get()
-{
-    return gSplashScreen;
-}
-
-nsSplashScreenWin::nsSplashScreenWin()
-    : mDialog(NULL), mSplashBitmap(NULL), mOldBitmap(NULL),
-      mSplashBitmapDC(NULL),
-      mWidth(200), mHeight(100),
-      mProgress(-1)
-{
-}
-
-void
-nsSplashScreenWin::Open()
-{
-    if (mIsOpen || mDialog)
-        return;
-
-    mIsOpen = PR_TRUE;
-
-    if (gSplashScreenClass == 0) {
-        WNDCLASS wc;
-        memset(&wc, 0, sizeof(WNDCLASS));
-
-        wc.style = CS_NOCLOSE;
-        wc.lpfnWndProc = (WNDPROC) DialogProc;
-        wc.hInstance = GetModuleHandle(0);
-        wc.hIcon = NULL;
-        wc.hCursor = NULL;
-        wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
-        wc.lpszMenuName = NULL;
-        wc.lpszClassName = TEXT("MozillaSplashScreen");
-
-        gSplashScreenClass = RegisterClass(&wc);
-    }
-
-    if (mSplashBitmap == NULL) {
-        wchar_t path[_MAX_PATH];
-        if (::GetModuleFileNameW(0, path, _MAX_PATH)) {
-            wchar_t *slash = wcsrchr(path, '\\');
-            if (slash != NULL)
-                slash[1] = 0;
-
-            wcscat(path, L"splash.bmp");
-
-#ifdef WINCE
-            mSplashBitmap = ::SHLoadDIBitmap(path);
-#else
-#warning splashscreen needs some code to load bitmaps on non-WinCE
-            mSplashBitmap = nsnull;
-#endif
-
-            if (mSplashBitmap) {
-                BITMAP bmo;
-                if (GetObject(mSplashBitmap, sizeof(BITMAP), &bmo) > 0) {
-                    mWidth = bmo.bmWidth;
-                    mHeight = bmo.bmHeight;
-
-                    mSplashBitmapDC = CreateCompatibleDC(NULL);
-                    mOldBitmap = (HBITMAP) SelectObject(mSplashBitmapDC, mSplashBitmap);
-                } else {
-                    DeleteObject(mSplashBitmap);
-                    mSplashBitmap = NULL;
-                }
-            }
-        }
-    }
-
-    DWORD threadID = 0;
-    CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ThreadProc, this, 0, &threadID);
-}
-
-DWORD WINAPI
-nsSplashScreenWin::ThreadProc(LPVOID splashScreen)
-{
-    nsSplashScreenWin *sp = (nsSplashScreenWin*) splashScreen;
-
-    int screenWidth = GetSystemMetrics(SM_CXSCREEN);
-    int screenHeight = GetSystemMetrics(SM_CYSCREEN);
-
-    LONG horizPad = (screenWidth  - sp->mWidth) / 2;
-    LONG vertPad  = (screenHeight - sp->mHeight) / 2;
-    RECT r = { horizPad,
-	       vertPad,
-	       horizPad + sp->mWidth,
-	       vertPad  + sp->mHeight };
-
-    DWORD winStyle = (WS_POPUP | WS_BORDER);
-    DWORD winStyleEx = WS_EX_NOACTIVATE;
-
-    if(!::AdjustWindowRectEx(&r, winStyle, FALSE, winStyleEx))
-      return 0;
-
-    HWND dlg = CreateWindowEx(
-	 winStyleEx,
-         TEXT("MozillaSplashScreen"),
-         TEXT("Starting up..."),
-	 winStyle,
-	 r.left, r.top,
-         (r.right - r.left), (r.bottom - r.top),
-         HWND_DESKTOP,
-         NULL,
-         GetModuleHandle(0),
-         NULL);
-
-    sp->mDialog = dlg;
-
-    ShowWindow(dlg, SW_SHOW);
-    SetForegroundWindow(dlg);
-
-    MSG msg;
-    while (::GetMessage(&msg, NULL, 0, 0)) {
-        DispatchMessage(&msg);
-    }
-
-    // window was destroyed, nothing to do
-    return 0;
-}
-
-void
-nsSplashScreenWin::Close()
-{
-    if (mDialog) {
-        ShowWindow(mDialog, SW_HIDE);
-        PostMessage(mDialog, WM_QUIT, 0, 0);
-        mDialog = NULL;
-    }
-
-    if (mSplashBitmap) {
-        SelectObject(mSplashBitmapDC, mOldBitmap);
-        DeleteObject(mSplashBitmapDC);
-        DeleteObject(mSplashBitmap);
-        mOldBitmap = NULL;
-        mSplashBitmapDC = NULL;
-        mSplashBitmap = NULL;
-    }
-
-    mIsOpen = PR_FALSE;
-}
-
-void
-nsSplashScreenWin::Update(PRInt32 progress)
-{
-    if (progress >= 0)
-        mProgress = progress > 100 ? 100 : progress;
-
-    InvalidateRect(mDialog, NULL, FALSE);
-}
-
-void
-nsSplashScreenWin::OnPaint(HDC dc, const PAINTSTRUCT *ps)
-{
-    RECT progressBar;
-
-    // Paint the splash screen
-    if (mSplashBitmapDC) {
-        BitBlt(dc,
-               0, 0, gSplashScreen->mWidth, gSplashScreen->mHeight,
-               gSplashScreen->mSplashBitmapDC,
-               0, 0,
-               SRCCOPY);
-    } else {
-        HBRUSH bkgr = CreateSolidBrush(RGB(200,200,200));
-        RECT r = { 0, 0, mWidth, mHeight };
-        FillRect(dc, &r, bkgr);
-        DeleteObject(bkgr);
-    }
-
-    // Size of progress bar area
-    if (mSplashBitmapDC &&
-        gSplashScreen->mWidth == 440 &&
-        gSplashScreen->mHeight == 180) {
-        // For now we're tightly tied to a specific splash.bmp design,
-        // ideally we would determine the region automagically.
-        progressBar.left   = 183;
-        progressBar.right  = 410;
-        progressBar.top    = 148;
-        progressBar.bottom = 153;
-    } else {
-        // The default progress bar will be 2/3 the width of the splash box,
-        // 9 pixels tall, 10 pixels from the bottom.
-        progressBar.left   = (mWidth / 6);
-        progressBar.right  = mWidth - (mWidth / 6);
-        progressBar.top    = mHeight - 19;
-        progressBar.bottom = mHeight - 10;
-    }
-
-    if (mProgress != -1) {
-        HBRUSH fill = CreateSolidBrush(RGB(0x77,0xC7,0x1C));
-
-        int maxWidth = progressBar.right - progressBar.left;
-        progressBar.right = progressBar.left + maxWidth * mProgress / 100;
-        FillRect(dc, &progressBar, fill);
-
-        DeleteObject(fill);
-    }
-}
-
-LRESULT CALLBACK
-nsSplashScreenWin::DialogProc (HWND hWnd,
-                               UINT uMsg,
-                               WPARAM wParam,
-                               LPARAM lParam)
-{
-    switch (uMsg) {
-        case WM_PAINT: {
-            PAINTSTRUCT ps;
-            HDC dc = BeginPaint(hWnd, &ps);
-
-            if (gSplashScreen)
-                gSplashScreen->OnPaint(dc, &ps);
-
-            EndPaint(hWnd, &ps);
-            return TRUE;
-        }
-            break;
-
-        case WM_DESTROY:
-            return TRUE;
-
-        case WM_QUIT:
-            DestroyWindow(hWnd);
-            return TRUE;
-
-        default:
-            return DefWindowProc(hWnd, uMsg, wParam, lParam);
-    }
-
-    return FALSE;
-}
--- a/toolkit/xre/nsWindowsRestart.cpp
+++ b/toolkit/xre/nsWindowsRestart.cpp
@@ -167,30 +167,16 @@ MakeCommandLine(int argc, PRUnichar **ar
 {
   int i;
   int len = 0;
 
   // The + 1 of the last argument handles the allocation for null termination
   for (i = 0; i < argc; ++i)
     len += ArgStrLen(argv[i]) + 1;
 
-#ifdef WINCE
-  wchar_t *env = mozce_GetEnvironmentCL();
-  // XXX There's a buffer overrun here somewhere that causes a heap
-  // check to fail in the final free of the results of this function
-  // in WinLaunchChild.  I can't honestly figure out where it is,
-  // because I'm pretty sure with the + 1 above and the wcslen here,
-  // we have enough room for a trailing NULL.  But, adding a little
-  // bit more slop (the +10) seems to fix the problem.
-  //
-  // Supposedly CreateProcessW can modify its arguments, so maybe it's
-  // doing some scribbling?
-  len += (wcslen(env)) + 10;
-#endif
-
   // Protect against callers that pass 0 arguments
   if (len == 0)
     len = 1;
 
   PRUnichar *s = (PRUnichar*) malloc(len * sizeof(PRUnichar));
   if (!s)
     return NULL;
 
@@ -200,21 +186,16 @@ MakeCommandLine(int argc, PRUnichar **ar
     if (i + 1 != argc) {
       *c = ' ';
       ++c;
     }
   }
 
   *c = '\0';
 
-#ifdef WINCE
-  wcscat(s, env);
-  if (env)
-    free(env);
-#endif
   return s;
 }
 
 /**
  * Convert UTF8 to UTF16 without using the normal XPCOM goop, which we
  * can't link to updater.exe.
  */
 static PRUnichar*
@@ -272,28 +253,16 @@ WinLaunchChild(const PRUnichar *exePath,
 }
 
 BOOL
 WinLaunchChild(const PRUnichar *exePath, int argc, PRUnichar **argv)
 {
   PRUnichar *cl;
   BOOL ok;
 
-#ifdef WINCE
-  // Windows Mobile Issue: 
-  // When passing both an image name and a command line to
-  // CreateProcessW, you need to make sure that the image name
-  // identially matches the first argument of the command line.  If
-  // they do not match, Windows Mobile will send two "argv[0]" values.
-  // To avoid this problem, we will strip off the argv here, and
-  // depend only on the exePath.
-  argv = argv + 1;
-  argc--;
-#endif
-
   cl = MakeCommandLine(argc, argv);
   if (!cl)
     return FALSE;
 
   STARTUPINFOW si = {sizeof(si), 0};
   PROCESS_INFORMATION pi = {0};
 
   ok = CreateProcessW(exePath,
--- a/toolkit/xre/nsWindowsWMain.cpp
+++ b/toolkit/xre/nsWindowsWMain.cpp
@@ -68,35 +68,16 @@ FreeAllocStrings(int argc, char **argv)
   while (argc) {
     --argc;
     delete [] argv[argc];
   }
 
   delete [] argv;
 }
 
-#ifdef WINCE
-/** argc/argv are in/out parameters */
-void ExtractEnvironmentFromCL(int &argc, char **&argv)
-{
-  for (int x = argc - 1; x >= 0; x--) {
-    if (!strncmp(argv[x], "--environ:", 10)) {
-      char* key_val = strdup(argv[x]+10);
-      putenv(key_val);
-      free(key_val);
-      argc -= 1;
-      char *delete_argv = argv[x];
-      if (x < argc) /* if the current argument is not at the tail, shift following arguments. */
-        memcpy(&argv[x], &argv[x+1], (argc - x) * sizeof(char*));
-      delete [] delete_argv;
-    }
-  } 
-}
-#endif  
-
 int wmain(int argc, WCHAR **argv)
 {
 #ifndef XRE_DONT_PROTECT_DLL_LOAD
   mozilla::NS_SetDllDirectory(L"");
 #endif
 
 #ifdef XRE_WANT_DLL_BLOCKLIST
   SetupDllBlocklist();
@@ -107,19 +88,16 @@ int wmain(int argc, WCHAR **argv)
     return 127;
 
   for (int i = 0; i < argc; ++i) {
     argvConverted[i] = AllocConvertUTF16toUTF8(argv[i]);
     if (!argvConverted[i]) {
       return 127;
     }
   }
-#ifdef WINCE
-  ExtractEnvironmentFromCL(argc, argvConverted);
-#endif
   argvConverted[argc] = NULL;
 
   // need to save argvConverted copy for later deletion.
   char **deleteUs = new char*[argc+1];
   if (!deleteUs) {
     FreeAllocStrings(argc, argvConverted);
     return 127;
   }
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -254,20 +254,20 @@ nsXREDirProvider::GetFile(const char* aP
         rv = file->AppendNative(NS_LITERAL_CSTRING("pref"));
     }
   }
   else if (!strcmp(aProperty, NS_APP_APPLICATION_REGISTRY_DIR) ||
            !strcmp(aProperty, XRE_USER_APP_DATA_DIR)) {
     rv = GetUserAppDataDirectory((nsILocalFile**)(nsIFile**) getter_AddRefs(file));
   }
   else if (!strcmp(aProperty, XRE_UPDATE_ROOT_DIR)) {
-#if defined(XP_WIN) && !defined(WINCE)
+#if defined(XP_WIN)
     rv = GetUpdateRootDir(getter_AddRefs(file));
 #else
-    // Only supported on Windows other than WINCE, so just immediately fail.
+    // Only supported on Windows, so just immediately fail.
     return NS_ERROR_FAILURE;
 #endif
   }
   else if (!strcmp(aProperty, NS_APP_APPLICATION_REGISTRY_FILE)) {
     rv = GetUserAppDataDirectory((nsILocalFile**)(nsIFile**) getter_AddRefs(file));
     if (NS_SUCCEEDED(rv))
       rv = file->AppendNative(NS_LITERAL_CSTRING(APP_REGISTRY_NAME));
   }
@@ -819,54 +819,34 @@ static nsresult
 GetShellFolderPath(int folder, nsAString& _retval)
 {
   PRUnichar* buf;
   PRUint32 bufLength = _retval.GetMutableData(&buf, MAXPATHLEN + 3);
   NS_ENSURE_TRUE(bufLength >= (MAXPATHLEN + 3), NS_ERROR_OUT_OF_MEMORY);
 
   nsresult rv = NS_OK;
 
-#if defined(WINCE) && !defined(WINCE_WINDOWS_MOBILE)
-  if (folder == CSIDL_APPDATA || folder == CSIDL_LOCAL_APPDATA)
-    folder = CSIDL_PROFILE;
-
-  BOOL ok = SHGetSpecialFolderPath(NULL, buf, folder, true);
-  if (!ok) {
-    _retval.SetLength(0);
-    return NS_ERROR_FAILURE;
-  }
-
-  buf[bufLength - 1] = L'\0';
-  _retval.SetLength(wcslen(buf));
-
-  // sometimes CSIDL_PROFILE shows up without a root slash
-  if (folder == CSIDL_PROFILE && buf[0] != '\\') {
-    _retval.Insert('\\', 0);
-  }
-#else
   LPITEMIDLIST pItemIDList = NULL;
 
   if (SUCCEEDED(SHGetSpecialFolderLocation(NULL, folder, &pItemIDList)) &&
       SHGetPathFromIDListW(pItemIDList, buf)) {
     // We're going to use wcslen (wcsnlen not available in msvc7.1) so make
     // sure to null terminate.
     buf[bufLength - 1] = L'\0';
     _retval.SetLength(wcslen(buf));
   } else {
     _retval.SetLength(0);
     rv = NS_ERROR_NOT_AVAILABLE;
   }
 
   CoTaskMemFree(pItemIDList);
-#endif
 
   return rv;
 }
 
-#ifndef WINCE
 /**
  * Provides a fallback for getting the path to APPDATA or LOCALAPPDATA by
  * querying the registry when the call to SHGetSpecialFolderLocation or
  * SHGetPathFromIDListW is unable to provide these paths (Bug 513958).
  */
 static nsresult
 GetRegWindowsAppDataFolder(PRBool aLocal, nsAString& _retval)
 {
@@ -908,17 +888,16 @@ GetRegWindowsAppDataFolder(PRBool aLocal
   ::RegCloseKey(key);
   if (res != ERROR_SUCCESS) {
     _retval.SetLength(0);
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   return NS_OK;
 }
-#endif
 
 nsresult
 nsXREDirProvider::GetUpdateRootDir(nsIFile* *aResult)
 {
   nsCOMPtr<nsIFile> appDir = GetAppDir();
 
   nsAutoString appPath;
   nsresult rv = appDir->GetPath(appPath);
@@ -927,27 +906,24 @@ nsXREDirProvider::GetUpdateRootDir(nsIFi
   // AppDir may be a short path. Convert to long path to make sure
   // the consistency of the update folder location
   nsString longPath;
   PRUnichar* buf;
 
   PRUint32 bufLength = longPath.GetMutableData(&buf, MAXPATHLEN);
   NS_ENSURE_TRUE(bufLength >= MAXPATHLEN, NS_ERROR_OUT_OF_MEMORY);
 
-#ifdef WINCE
-  longPath.Assign(appPath);
-#else
   DWORD len = GetLongPathNameW(appPath.get(), buf, bufLength);
 
   // Failing GetLongPathName() is not fatal.
   if (len <= 0 || len >= bufLength)
     longPath.Assign(appPath);
   else
     longPath.SetLength(len);
-#endif
+
   // Use <UserLocalDataDir>\updates\<relative path to app dir from
   // Program Files> if app dir is under Program Files to avoid the
   // folder virtualization mess on Windows Vista
   nsAutoString programFiles;
   rv = GetShellFolderPath(CSIDL_PROGRAM_FILES, programFiles);
   NS_ENSURE_SUCCESS(rv, rv);
 
   programFiles.AppendLiteral("\\");
@@ -1044,30 +1020,25 @@ nsXREDirProvider::GetUserDataDirectoryHo
   rv = dirFileMac->InitWithFSRef(&fsRef);
   NS_ENSURE_SUCCESS(rv, rv);
 
   localDir = do_QueryInterface(dirFileMac, &rv);
 #elif defined(XP_WIN)
   nsString path;
   if (aLocal) {
     rv = GetShellFolderPath(CSIDL_LOCAL_APPDATA, path);
-#ifndef WINCE
     if (NS_FAILED(rv))
       rv = GetRegWindowsAppDataFolder(aLocal, path);
-#endif
   }
   if (!aLocal || NS_FAILED(rv)) {
     rv = GetShellFolderPath(CSIDL_APPDATA, path);
-#ifndef WINCE
     if (NS_FAILED(rv)) {
       if (!aLocal)
         rv = GetRegWindowsAppDataFolder(aLocal, path);
     }
-#endif
-
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = NS_NewLocalFile(path, PR_TRUE, getter_AddRefs(localDir));
 #elif defined(XP_OS2)
 #if 0 /* For OS/2 we want to always use MOZILLA_HOME */
   // we want an environment variable of the form
   // FIREFOX_HOME, etc