def add_dependencies_to_cmake(self, results): self.builder.write(results['cmake_before']) for directory in results['headers']: self.builder.include_directories(directory) for directory in results['subdirectories']: self.builder.add_subdirectory(directory) def add_platform(platform_name): for dep_config, paths in results['link_directories'].items(): if dep_config[0] != platform_name: continue if dep_config[1] != config.buildArchitecture: continue for path in paths: self.builder.link_dir(path) for dep_config, lib_names in dict(results['libs']).items(): if dep_config[0] != platform_name: continue if dep_config[1] != config.buildArchitecture: continue modificator = 'general' if dep_config[2] == 'release' else 'debug' for lib_params in lib_names: self.builder.link_library(self.target_name, lib_params['path'], modificator, is_libname=lib_params['is_libname']) if is_windows(): add_platform('windows') elif is_linux(): add_platform('linux') self.builder.write(results['cmake_after'])
def build_lib(architecture): if is_linux(): assembly.make(origin_dir) if is_windows(): vcxproj_path = vcxproj_file.format(architecture) assembly.set_vcxproj_runtime_library(vcxproj_path, config.visual_studio_runtime_library) assembly.set_vcxproj_platform_toolset(vcxproj_path, config.visual_studio_toolset) assembly.build_vcxproj(vcxproj_path, lib_directory)
def build(module_params): if is_linux(): check_dependencies(['gksudo']) assembly.install_distro_dependencies(['git']) elif is_windows(): net.download_file("https://dl.dropboxusercontent.com/u/92011034/git.zip", git_archive) archives.extract_7_zip(git_archive, git_path) fs.remove(git_archive)
def chmod(file, value, forceBySudo=False): if not is_linux(): print("Try to change permissions on windows-based system", file=sys.stderr) return if forceBySudo: sudo(["chmod", value, file]) else: os.chmod(file, value)
def integration(module_params): cmake.add_location(os.path.join(build_dir, 'lowlevel', 'inc')) cmake.add_location(os.path.join(build_dir, 'studio', 'inc')) # LOWLEVEL if is_windows(): add_windows_libraries() elif is_linux(): add_linux_libraries()
def build(module_params): if is_linux(): check_dependencies(['gksudo']) assembly.install_distro_dependencies(['cmake']) elif is_windows(): check_dependencies(False, ['version']) version = module_params['version'] cmake_url = "http://www.cmake.org/files/v{0}/" \ "cmake-{1}-win32-x86.zip".format(re.search('\.[0-9]+$', version).group(1), version) net.download_file(cmake_url, cmake_path) archives.extract_7_zip(cmake_path, s_config.tools_directory + os.path.sep) fs.remove(cmake_path) fs.rename(os.path.join(s_config.tools_directory, 'cmake-*'), os.path.join(s_config.tools_directory, 'cmake'))
def build(module_params): if is_linux(): check_dependencies(['gksudo']) assembly.install_distro_dependencies(['cmake']) elif is_windows(): check_dependencies(False, ['version']) small_version = '.'.join(str(module_params['version']).split('.')[0:2]) cmake_url = "http://www.cmake.org/files/v{0}/cmake-{1}-win32-x86.zip".format(small_version, module_params['version']) net.download_file(cmake_url, cmake_path) archives.extract_7_zip(cmake_path, s_config.tools_directory + os.path.sep) fs.remove(cmake_path) fs.rename(os.path.join(s_config.tools_directory, 'cmake-*'), os.path.join(s_config.tools_directory, 'cmake'), True)
def build(module_params): check_dependencies((), ['version'], module_params) version = module_params['version'] if is_windows(): url_to_installer = "http://www.fmod.org/download/fmodstudio/api/Win/fmodstudioapi{}win-installer.exe".format( version) net.download_file(url_to_installer, fmod_path) archives.extract_7_zip(fmod_path, origin_dir) elif is_linux(): url_to_installer = "http://www.fmod.org/download/fmodstudio/api/Linux/fmodstudioapi{}linux.tar.gz".format( version) net.download_file(url_to_installer, fmod_path) archives.extract_tar(fmod_path) fs.remove(origin_dir) fs.rename('fmodstudioapi*', origin_dir, True) fs.remove(build_dir) fs.remove(os.path.join(origin_dir, 'api', '*', 'examples')) fs.rename(os.path.join(origin_dir, 'api'), build_dir, True) fs.remove(fmod_path) fs.remove(origin_dir)
def build(module_params): # TODO: Looks like windows is working, problems with linux version (extract .so from binary) check_dependencies(False, ['version'], module_params) fs.remove(origin_dir) if is_windows(): net.download_file( 'http://images.autodesk.com/adsk/files/fbx{version}_fbxsdk_vs2013_win.exe' .format(version=module_params['version']), exe_path) archives.extract_7_zip(exe_path, origin_dir) elif is_linux(): net.download_file( 'http://images.autodesk.com/adsk/files/fbx{version}_fbxsdk_linux.tar.gz' .format(version=module_params['version']), 'origin.tar.gz') archives.extract_tar('origin.tar.gz', origin_dir) fs.rename(os.path.join(origin_dir, 'include'), headers_dir, True) fs.rename(os.path.join(origin_dir, 'lib', 'vs2013'), lib_directory, True) fs.remove(origin_dir) fs.remove(exe_path)
def integration(module_params): results = LibraryModule.current_working_module_results if is_linux(): results['path'] = which('cmake') elif is_windows(): results['path'] = cmake_exe_path
def build(module_params): if is_linux(): check_dependencies(["gksudo"]) assembly.install_distro_dependencies(["p7zip-full"])
def integration(module_params): results = LibraryModule.results if is_linux(): results["path"] = which("7z") elif is_windows(): results["path"] = os.path.join(s_config.tools_directory, "7z.exe")
def integration(module_params): results = LibraryModule.results if is_linux(): results['path'] = which('7z') elif is_windows(): results['path'] = os.path.join(s_config.tools_directory, '7z.exe')
def integration(module_params): results = LibraryModule.current_working_module_results if is_linux(): results['path'] = which('git') elif is_windows(): results['path'] = git_exe_path
def integration(module_params): results = LibraryModule.results if is_linux(): results['path'] = which('cmake') elif is_windows(): results['path'] = cmake_exe_path
def build(module_params): if is_linux(): check_dependencies(['gksudo']) assembly.install_distro_dependencies(['p7zip-full'])