mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 774112 - Part 2: Implement bootstrap support for popular Linux distros; r=gps
This commit is contained in:
parent
85d2b228c5
commit
345c1421a1
@ -5,6 +5,9 @@
|
||||
import platform
|
||||
import sys
|
||||
|
||||
from mozboot.centos import CentOSBootstrapper
|
||||
from mozboot.fedora import FedoraBootstrapper
|
||||
from mozboot.mint import MintBootstrapper
|
||||
from mozboot.osx import OSXBootstrapper
|
||||
from mozboot.ubuntu import UbuntuBootstrapper
|
||||
|
||||
@ -19,7 +22,13 @@ class Bootstrapper(object):
|
||||
if sys.platform.startswith('linux'):
|
||||
distro, version, dist_id = platform.linux_distribution()
|
||||
|
||||
if distro == 'Ubuntu':
|
||||
if distro == 'CentOS':
|
||||
cls = CentOSBootstrapper
|
||||
elif distro == 'Fedora':
|
||||
cls = FedoraBootstrapper
|
||||
elif distro == 'Mint':
|
||||
cls = MintBootstrapper
|
||||
elif distro == 'Ubuntu':
|
||||
cls = UbuntuBootstrapper
|
||||
else:
|
||||
raise NotImplementedError('Bootstrap support for this Linux '
|
||||
|
30
python/mozboot/mozboot/centos.py
Normal file
30
python/mozboot/mozboot/centos.py
Normal file
@ -0,0 +1,30 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import os
|
||||
import platform
|
||||
|
||||
from mozboot.base import BaseBootstrapper
|
||||
|
||||
class CentOSBootstrapper(BaseBootstrapper):
|
||||
def __init__(self, version, dist_id):
|
||||
BaseBootstrapper.__init__(self)
|
||||
|
||||
self.version = version
|
||||
self.dist_id = dist_id
|
||||
|
||||
def install_system_packages(self):
|
||||
kern = platform.uname()
|
||||
os.system("sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'")
|
||||
os.system("sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-devel alsa-lib-devel libXt-devel")
|
||||
os.system("sudo yum install gtk2-devel")
|
||||
os.system("sudo yum install dbus-glib-devel")
|
||||
|
||||
if ('x86_64' in kern[2]):
|
||||
os.system("sudo rpm -ivh http://pkgs.repoforge.org/yasm/yasm-1.1.0-1.el6.rf.x86_64.rpm")
|
||||
else:
|
||||
os.system("sudo rpm -ivh http://pkgs.repoforge.org/yasm/yasm-1.1.0-1.el6.rf.i686.rpm")
|
||||
|
||||
os.system("sudo yum install curl-devel")
|
||||
|
18
python/mozboot/mozboot/fedora.py
Normal file
18
python/mozboot/mozboot/fedora.py
Normal file
@ -0,0 +1,18 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import os
|
||||
|
||||
from mozboot.base import BaseBootstrapper
|
||||
|
||||
class FedoraBootstrapper(BaseBootstrapper):
|
||||
def __init__(self, version, dist_id):
|
||||
BaseBootstrapper.__init__(self)
|
||||
|
||||
self.version = version
|
||||
self.dist_id = dist_id
|
||||
|
||||
def install_system_packages(self):
|
||||
os.system("sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'")
|
||||
os.system("sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL-devel alsa-lib-devel libXt-devel")
|
18
python/mozboot/mozboot/mint.py
Normal file
18
python/mozboot/mozboot/mint.py
Normal file
@ -0,0 +1,18 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import os
|
||||
|
||||
from mozboot.base import BaseBootstrapper
|
||||
|
||||
class MintBootstrapper(BaseBootstrapper):
|
||||
def __init__(self, version, dist_id):
|
||||
BaseBootstrapper.__init__(self)
|
||||
|
||||
self.version = version
|
||||
self.dist_id = dist_id
|
||||
|
||||
def install_system_packages(self):
|
||||
os.system("sudo apt-get build-dep firefox")
|
||||
os.system("sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm uuid")
|
@ -2,6 +2,8 @@
|
||||
# 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/.
|
||||
|
||||
import os
|
||||
|
||||
from mozboot.base import BaseBootstrapper
|
||||
|
||||
class UbuntuBootstrapper(BaseBootstrapper):
|
||||
@ -12,4 +14,5 @@ class UbuntuBootstrapper(BaseBootstrapper):
|
||||
self.dist_id = dist_id
|
||||
|
||||
def install_system_packages(self):
|
||||
raise NotImplementedError('Bootstrap for Ubuntu not yet implemented.')
|
||||
os.system("sudo apt-get build-dep firefox")
|
||||
os.system("sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm uuid")
|
||||
|
Loading…
Reference in New Issue
Block a user