def configure_qt(*args): if sys.platform == 'win32': configure_exe = 'configure.bat' if is_qt5() else 'configure.exe' else: configure_exe = './configure' sdk.sh(configure_exe, *args)
def qtmake(*args): try: sdk.sh('jom', '/VERSION') except: make(*args) else: sdk.sh('jom', '-j%s' % str(multiprocessing.cpu_count() + 1), *args)
def qtmake(*args): if sys.platform == 'win32': make(*args) else: try: sdk.sh('jom', '/VERSION') except: make(*args) else: sdk.sh('jom', '-j%s' % str(multiprocessing.cpu_count() + 1), *args)
def install_qt_requirements(): def is_ubuntu(): if os.path.exists("/etc/lsb-release"): with open("/etc/lsb-release") as f: for line in f: if line.startswith("DISTRIB_ID"): return "Ubuntu" in line return False if is_ubuntu(): sdk.sh("sudo", "apt-get", "install", "-y", "libfontconfig1-dev", "libfreetype6-dev", "libx11-dev", "libxcursor-dev", "libxext-dev", "libxfixes-dev", "libxft-dev", "libxi-dev", "libxrandr-dev", "libxrender-dev", "libgl1-mesa-dev", "libglu1-mesa-dev", "libcups2-dev", "python-dev")
def configure_ng(*args): sdk.sh(sys.executable, 'configure-ng.py', *args)
def configure(*args): sdk.sh(sys.executable, 'configure.py', *args)
def build_icu(layout, debug, profile): # NOTE: We always build ICU in release mode since we don't usually need to debug it. os.chdir('source') if sys.platform == 'darwin': sdk.sh('chmod', '+x', 'configure', 'runConfigureICU') sdk.sh('bash', 'runConfigureICU', 'MacOSX', '--prefix=%s' % layout['root'], '--disable-debug', '--enable-release') sdk.sh('make') sdk.sh('make', 'install') elif sys.platform == 'linux2': sdk.sh('chmod', '+x', 'configure', 'runConfigureICU') sdk.sh('bash', 'runConfigureICU', 'Linux', '--prefix=%s' % layout['root'], '--disable-debug', '--enable-release') sdk.sh('make') sdk.sh('make', 'install') elif sys.platform == 'win32': # Convert native install_root path to one accepted by Cygwin (e.g.: /cygdrive/c/foo/bar) cy_install_root = layout['root'].replace('\\', '/') cy_install_root = cy_install_root.replace('C:/', '/cygdrive/c/') sdk.sh('bash', 'runConfigureICU', 'Cygwin/MSVC', '--prefix=%s' % cy_install_root, '--disable-debug', '--enable-release') sdk.sh('bash', '-c', 'make') # We have to use GNU make here, so no make() wrapper... sdk.sh('bash', '-c', 'make install') else: sdk.die('You have to rebuild ICU only on OS X or Windows')
def make(*args): if sys.platform == 'win32': sdk.sh('nmake', *args) else: sdk.sh('make', '-j%s' % str(multiprocessing.cpu_count() + 1), *args)
def svn_update_current_platform(install_root): with sdk.chdir(HERE): sdk.sh('svn', 'revert', '-R', install_root) sdk.sh('svn', 'up', install_root)
def check_bash(): try: sdk.sh("bash", "--version") except: sdk.die("ERROR: unable to run 'bash', check your PATH")
def svn_update_current_platform(install_root): with sdk.chdir(HERE): sdk.sh('svn', 'up', install_root)