Bug 1177128 - Modified bootstrap.py to dispatch between MozillaBuild and MSYS2 bootstrappers. r?gps
MozReview-Commit-ID: L1N0BfeP2p1
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -2,29 +2,31 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# If we add unicode_literals, Python 2.6.1 (required for OS X 10.6) breaks.
from __future__ import print_function
import platform
import sys
+import os
import os.path
import subprocess
# Don't forgot to add new mozboot modules to the bootstrap download
# list in bin/bootstrap.py!
from mozboot.centosfedora import CentOSFedoraBootstrapper
from mozboot.debian import DebianBootstrapper
from mozboot.freebsd import FreeBSDBootstrapper
from mozboot.gentoo import GentooBootstrapper
from mozboot.osx import OSXBootstrapper
from mozboot.openbsd import OpenBSDBootstrapper
from mozboot.archlinux import ArchlinuxBootstrapper
from mozboot.windows import WindowsBootstrapper
+from mozboot.mozillabuild import MozillaBuildBootstrapper
from mozboot.util import (
get_state_dir,
)
APPLICATION_CHOICE = '''
Please choose the version of Firefox you want to build:
%s
@@ -185,17 +187,20 @@ class Bootstrapper(object):
elif sys.platform.startswith('dragonfly') or \
sys.platform.startswith('freebsd'):
cls = FreeBSDBootstrapper
args['version'] = platform.release()
args['flavor'] = platform.system()
elif sys.platform.startswith('win32') or sys.platform.startswith('msys'):
- cls = WindowsBootstrapper
+ if os.environ.get('MSYSTEM') == 'MINGW64':
+ cls = WindowsBootstrapper
+ elif os.environ.get('MSYSTEM') == 'MINGW32':
+ cls = MozillaBuildBootstrapper
if cls is None:
raise NotImplementedError('Bootstrap support is not yet available '
'for your OS.')
self.instance = cls(**args)
def bootstrap(self):