mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1620511 - Make ensure_mobile_android_packages Python3 compatible. r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D65683 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
72e401a747
commit
070a000dd4
@ -74,15 +74,18 @@ class MozillaBuildBootstrapper(BaseBootstrapper):
|
||||
|
||||
def ensure_mobile_android_packages(self, artifact_mode=False):
|
||||
# Get java path from registry key
|
||||
import _winreg
|
||||
try:
|
||||
import _winreg
|
||||
except ImportError:
|
||||
import winreg as _winreg
|
||||
|
||||
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
|
||||
r'SOFTWARE\JavaSoft\Java Development Kit\1.8')
|
||||
java_path, regtype = _winreg.QueryValueEx(key, 'JavaHome')
|
||||
_winreg.CloseKey(key)
|
||||
os.environ['PATH'] = \
|
||||
'{}{}{}'.format(os.path.join(java_path, 'bin'), os.pathsep,
|
||||
os.environ['PATH']).encode('mbcs')
|
||||
from mach.util import setenv
|
||||
setenv('PATH', '{}{}{}'.format(os.path.join(java_path, 'bin'), os.pathsep,
|
||||
os.environ['PATH']))
|
||||
self.ensure_java()
|
||||
|
||||
from mozboot import android
|
||||
|
Loading…
Reference in New Issue
Block a user