def build_icu_linux(environment, icu_src_base_dir, archive_icu): bldinstallercommon.create_dirs(os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME)) exec_path = icu_src_base_dir # configure environment['LFLAGS'] = '-Wl,-rpath,\$ORIGIN' cmd_args = ['./runConfigureICU', 'Linux', '--enable-rpath', '--prefix=' + os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME)] exec_path = os.path.dirname(bldinstallercommon.locate_file(os.path.join(SCRIPT_ROOT_DIR, ICU_SRC_DIR_NAME), 'configure')) bldinstallercommon.do_execute_sub_process(cmd_args, exec_path, extra_env=environment) # build cmd_args = ['make', '-j' + str(multiprocessing.cpu_count() + 1)] bldinstallercommon.do_execute_sub_process(cmd_args, exec_path, extra_env=environment) cmd_args = ['make', 'install'] bldinstallercommon.do_execute_sub_process(cmd_args, exec_path, extra_env=environment) # patch RPath exec_path = os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME, 'lib') files = bldinstallercommon.make_files_list(exec_path, '.so$') for item in files: cmd_args = 'chrpath -r $ORIGIN ' + item bldinstallercommon.do_execute_sub_process(cmd_args.split(' '), exec_path, extra_env=environment) icu_configuration = ICUConfiguration search_path = os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME) icu_configuration.icu_include_path = bldinstallercommon.locate_directory(search_path, 'include') icu_configuration.icu_lib_path = bldinstallercommon.locate_directory(search_path, 'lib') # archvive icu build artifacts if requested if archive_icu: archive_build_artifacts(search_path) return icu_configuration
def erase_qmake_prl_build_dir(): print_wrap('--- Fix .prl files ---') # fetch all .prl files file_list = bldinstallercommon.make_files_list(MAKE_INSTALL_ROOT_DIR, '\\.prl') # erase lines starting with 'QMAKE_PRL_BUILD_DIR' from .prl files for item in file_list: found = False for line in fileinput.FileInput(item, inplace = 1): if line.startswith('QMAKE_PRL_BUILD_DIR'): found = True print '' else: print line, if found: print_wrap('Erased \'QMAKE_PRL_BUILD_DIR\' from: ' + item)
def erase_qmake_prl_build_dir(search_path): print('--- Fix .prl files ---') # fetch all .prl files file_list = bldinstallercommon.make_files_list(search_path, '\\.prl') # erase lines starting with 'QMAKE_PRL_BUILD_DIR' from .prl files for item in file_list: found = False for line in fileinput.FileInput(item, inplace=1): if line.startswith('QMAKE_PRL_BUILD_DIR'): found = True print(''.rstrip('\n')) else: print(line.rstrip('\n')) if found: print('Erased \'QMAKE_PRL_BUILD_DIR\' from: ' + item)
def erase_qmake_prl_build_dir(search_path): print('--- Fix .prl files ---') # fetch all .prl files file_list = bldinstallercommon.make_files_list(search_path, '\\.prl') # erase lines starting with 'QMAKE_PRL_BUILD_DIR' from .prl files for item in file_list: found = False for line in fileinput.FileInput(item, inplace = 1): if line.startswith('QMAKE_PRL_BUILD_DIR'): found = True print(''.rstrip('\n')) else: print(line.rstrip('\n')) if found: print('Erased \'QMAKE_PRL_BUILD_DIR\' from: ' + item)
def build_icu_linux(environment, icu_src_base_dir, archive_icu): bldinstallercommon.create_dirs( os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME)) exec_path = icu_src_base_dir # configure environment['LFLAGS'] = '-Wl,-rpath,\$ORIGIN' cmd_args = [ './runConfigureICU', 'Linux', '--enable-rpath', '--prefix=' + os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME) ] exec_path = os.path.dirname( bldinstallercommon.locate_file( os.path.join(SCRIPT_ROOT_DIR, ICU_SRC_DIR_NAME), 'configure')) bldinstallercommon.do_execute_sub_process(cmd_args, exec_path, extra_env=environment) # build cmd_args = ['make', '-j' + str(multiprocessing.cpu_count() + 1)] bldinstallercommon.do_execute_sub_process(cmd_args, exec_path, extra_env=environment) cmd_args = ['make', 'install'] bldinstallercommon.do_execute_sub_process(cmd_args, exec_path, extra_env=environment) # patch RPath exec_path = os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME, 'lib') files = bldinstallercommon.make_files_list(exec_path, '.so$') for item in files: cmd_args = 'chrpath -r $ORIGIN ' + item bldinstallercommon.do_execute_sub_process(cmd_args.split(' '), exec_path, extra_env=environment) icu_configuration = ICUConfiguration search_path = os.path.join(SCRIPT_ROOT_DIR, ICU_INSTALL_DIR_NAME) icu_configuration.icu_include_path = bldinstallercommon.locate_directory( search_path, 'include') icu_configuration.icu_lib_path = bldinstallercommon.locate_directory( search_path, 'lib') # archvive icu build artifacts if requested if archive_icu: archive_build_artifacts(search_path) return icu_configuration
ret = runInstallCommand( ['install', 'INSTALL_ROOT=' + qtModuleInstallDirectory], currentWorkingDirectory=qtModuleBuildDirectory, callerArguments=callerArguments, init_environment=environment) if ret: raise RuntimeError('Failure running the last command: %i' % ret) # patch .so filenames on Windows/Android if bldinstallercommon.is_win_platform() and os.environ.get( 'DO_PATCH_ANDROID_SONAME_FILES'): bldinstallercommon.rename_android_soname_files(qtModuleInstallDirectory) #doc collection if callerArguments.collectDocs: doc_list = bldinstallercommon.make_files_list(qtModuleSourceDirectory, '\\.qch') doc_install_dir = os.path.join(qtModuleInstallDirectory, 'doc') bldinstallercommon.create_dirs(doc_install_dir) for item in doc_list: shutil.copy(item, doc_install_dir) # enginio etc. docs creation if callerArguments.makeDocs: # build docs first ret = runInstallCommand('docs', currentWorkingDirectory=qtModuleBuildDirectory, callerArguments=callerArguments, init_environment=environment) if ret: raise RuntimeError('Failure running the last command: %i' % ret) # then make install those
if ret: raise RuntimeError('Failure running the last command: %i' % ret) ret = runInstallCommand(['install', 'INSTALL_ROOT=' + qtModuleInstallDirectory], currentWorkingDirectory = qtModuleBuildDirectory, callerArguments = callerArguments, init_environment = environment) if ret: raise RuntimeError('Failure running the last command: %i' % ret) # patch .so filenames on Windows/Android if bldinstallercommon.is_win_platform() and os.environ.get('DO_PATCH_ANDROID_SONAME_FILES'): bldinstallercommon.rename_android_soname_files(qtModuleInstallDirectory) #doc collection if callerArguments.collectDocs: doc_list = bldinstallercommon.make_files_list(qtModuleSourceDirectory, '\\.qch') doc_install_dir = os.path.join(qtModuleInstallDirectory, 'doc') bldinstallercommon.create_dirs(doc_install_dir) for item in doc_list: shutil.copy(item, doc_install_dir) # enginio etc. docs creation if callerArguments.makeDocs: # build docs first ret = runInstallCommand('docs', currentWorkingDirectory = qtModuleBuildDirectory, callerArguments = callerArguments, init_environment = environment) if ret: raise RuntimeError('Failure running the last command: %i' % ret) # then make install those ret = runInstallCommand(['install_docs', 'INSTALL_ROOT=' + qtModuleInstallDirectory],