def _patch_sources(source_folder_paths, working_directory_path): shutil.copyfile('CMakeLists.txt', os.path.join(source_folder_paths['lua'], 'CMakeLists.txt')) shutil.copyfile(os.path.join(source_folder_paths['bit'], 'bit.c'), os.path.join(source_folder_paths['lua'], 'src', 'bit.c')) build_utils.apply_patch(os.path.abspath('patch.diff'), working_directory_path)
def _patch_sources(source_folder_path, working_directory_path): # Apply fixes build_utils.apply_patch( os.path.abspath('patch.diff'), working_directory_path) # Add configuration file to source folder # It is used to generate additional header & source files shutil.copyfile( 'pngusr.dfa', os.path.join(source_folder_path, 'pngusr.dfa'))
def _patch_sources_android(source_folder_path, working_directory_path): try: if source_folder_path in _patch_sources_android.cache: return except AttributeError: _patch_sources_android.cache = [] pass build_utils.apply_patch(os.path.abspath('patch_android.diff'), working_directory_path) _patch_sources_android.cache.append(source_folder_path)
def _patch_sources(source_folder_path, working_directory_path, patch_postifx): try: if source_folder_path in _patch_sources.cache: return except AttributeError: _patch_sources.cache = [] pass # Apply fixes build_utils.apply_patch(os.path.abspath('patch' + patch_postifx + '.diff'), working_directory_path) _patch_sources.cache.append(source_folder_path)
def _patch_sources(source_folder_path, working_directory_path, patch_file_path): try: if source_folder_path in _patch_sources.cache: return except AttributeError: _patch_sources.cache = [] pass shutil.copyfile('WIN32.MAK', os.path.join(source_folder_path, 'WIN32.MAK')) build_utils.run_process(['nmake', '/f', 'makefile.vc', 'setup-v10'], process_cwd=source_folder_path, shell=True, environment=build_utils.get_win32_vs_x86_env()) build_utils.apply_patch(os.path.abspath(patch_file_path), working_directory_path) _patch_sources.cache.append(source_folder_path)
def _patch_sources_windows(source_folder_path, working_directory_path): try: if source_folder_path in _patch_sources_windows.cache: return except AttributeError: _patch_sources_windows.cache = [] pass """ Patch for libxml2 v2.7.8 """ build_utils.apply_patch(os.path.abspath('patch_win_v2.7.8.diff'), working_directory_path) """ Patch for libxml2 v2.9.0 and later shutil.copytree( os.path.join(source_folder_path, 'win32/VC10'), os.path.join(source_folder_path, 'win32/Win10')) build_utils.apply_patch( os.path.abspath('patch_win.diff'), working_directory_path) """ _patch_sources_windows.cache.append(source_folder_path)
def _patch_sources(source_folder_path, patch_name): build_utils.apply_patch(os.path.abspath(patch_name), source_folder_path)
def _patch_sources(source_folder_path, working_directory_path): shutil.copyfile( 'CMakeLists.txt', os.path.join(source_folder_path, 'CMakeLists.txt')) build_utils.apply_patch( os.path.abspath('patch.diff'), working_directory_path)
def _patch_sources(source_folder_path, working_directory_path): build_utils.apply_patch(os.path.abspath('patch_win.diff'), working_directory_path)
def _patch_sources(working_directory_path): build_utils.apply_patch( os.path.abspath('patch.diff'), working_directory_path)
def _patch_sources(common_patch_name, patch_name, working_directory_path): build_utils.apply_patch(os.path.abspath(common_patch_name), working_directory_path) if patch_name != '': build_utils.apply_patch(os.path.abspath(patch_name), working_directory_path)
def _build_win32(working_directory_path, root_project_path): source_folder_path = _download_and_extract(working_directory_path) build_utils.apply_patch( os.path.abspath('patch_debug_and_dynamic_runtime.diff'), working_directory_path) # Build only detours library excluding examples makefile_path = os.path.join(source_folder_path, 'src') # x86 debug build env = build_utils.get_win32_vs_x86_env() env['DETOURS_TARGET_PROCESSOR'] = 'X86' env['DETOURS_RUNTIME'] = 'DYNAMIC' env['DETOURS_BUILD_MODE'] = 'DEBUG' env['DETOURS_CONFIG'] = '.debug' build_utils.run_process(['nmake'], process_cwd=makefile_path, shell=True, environment=env) # x86 release build env = build_utils.get_win32_vs_x86_env() env['DETOURS_TARGET_PROCESSOR'] = 'X86' env['DETOURS_RUNTIME'] = 'DYNAMIC' env['DETOURS_BUILD_MODE'] = 'RELEASE' env['DETOURS_CONFIG'] = '.release' build_utils.run_process(['nmake'], process_cwd=makefile_path, shell=True, environment=env) # x64 debug build env = build_utils.get_win32_vs_x64_env() env['DETOURS_TARGET_PROCESSOR'] = 'X64' env['DETOURS_RUNTIME'] = 'DYNAMIC' env['DETOURS_BUILD_MODE'] = 'DEBUG' env['DETOURS_CONFIG'] = '.debug' build_utils.run_process(['nmake'], process_cwd=makefile_path, shell=True, environment=env) # x64 release build env = build_utils.get_win32_vs_x64_env() env['DETOURS_TARGET_PROCESSOR'] = 'X64' env['DETOURS_RUNTIME'] = 'DYNAMIC' env['DETOURS_BUILD_MODE'] = 'RELEASE' env['DETOURS_CONFIG'] = '.release' build_utils.run_process(['nmake'], process_cwd=makefile_path, shell=True, environment=env) libraries_win_root = os.path.join(root_project_path, 'Libs/lib_CMake/win') shutil.copyfile( os.path.join(source_folder_path, 'lib.X86.debug/detours.lib'), os.path.join(libraries_win_root, 'x86/Debug/detours.lib')) shutil.copyfile( os.path.join(source_folder_path, 'lib.X86.release/detours.lib'), os.path.join(libraries_win_root, 'x86/Release/detours.lib')) shutil.copyfile( os.path.join(source_folder_path, 'lib.X64.debug/detours.lib'), os.path.join(libraries_win_root, 'x64/Debug/detours.lib')) shutil.copyfile( os.path.join(source_folder_path, 'lib.X64.release/detours.lib'), os.path.join(libraries_win_root, 'x64/Release/detours.lib')) _copy_headers(source_folder_path, root_project_path)
def _patch_sources(source_folder_path, working_directory_path, patch_name): # Apply fixes build_utils.apply_patch(os.path.abspath(patch_name), working_directory_path)