Example #1
0
 def __init__(self,
              version,
              base_url=None,
              platform="linux",
              dest=drake.Path("Assimp"),
              expected_headers=None):
     super().__init__("Assimp")
     self.__base_url = base_url or "https://github.com/assimp/assimp/archive"
     self.__version = version
     self.__platform = "linux"
     self.__tar = drake.Node(
         dest / "v{version}.tar.gz".format(version=self.__version))
     self.__path = dest / "assimp-{version}".format(version=self.__version)
     self.__include_path = self.__path / "include"
     self.__library_path = self.__path / "lib"
     self.__cmake_lists = drake.Node(self.__path / "CMakeLists.txt")
     self.__makefile = drake.Node(self.__path / "Makefile")
     drake.HTTPDownload(url=self.url, dest=self.__tar)
     drake.Extractor(
         tarball=self.__tar,
         targets=[
             str(self.__cmake_lists.name_absolute())[len(str(dest)) + 1:]
         ]).targets()
     drake.ShellCommand(sources=[self.__cmake_lists],
                        targets=self.headers + [self.__makefile],
                        command=['cmake', '.'],
                        cwd=self.__path)
     drake.ShellCommand(sources=[self.__makefile],
                        targets=self.libraries,
                        command=['make', 'assimp'],
                        cwd=self.__path)
Example #2
0
 def __init__(self,
              version,
              base_url = None,
              platform = "linux",
              dest = drake.Path("imgui"),
              expected_headers = None):
   super().__init__("imgui")
   self.__base_url = base_url or "https://github.com/ocornut/imgui/archive"
   self.__version = version
   self.__platform = "linux"
   self.__tar = drake.Node(dest  / "v{version}.tar.gz".format(version = self.__version))
   self.__path = dest / "imgui-{version}".format(version = self.__version)
   self.__include_path = self.__path
   self.__source_path = self.__path
   self.__library_path = self.__path
   self.__cmake_lists = drake.Node(self.__path / "CMakeLists.txt")
   self.__makefile = drake.Node(self.__path / "Makefile")
   drake.HTTPDownload(url = self.url, dest = self.__tar)
   drake.Extractor(tarball = self.__tar,
                   targets = map(lambda f: str(f.name_absolute())[len(str(dest)) + 1:],
                                 self.headers + self.sources))
   for index, cpp in enumerate(self.sources):
     drake.ShellCommand(
       sources = [cpp],
       targets = [self.libraries[index]],
       command = [
         'g++', '-shared', '-fPIC', str(cpp.path().basename()), '-o',
         str(self.libraries[index].path().basename())
       ],
       cwd = self.__path)
Example #3
0
    def __init__(self,
                 version,
                 base_url=None,
                 platform="linux",
                 dest=drake.Path("vulkan"),
                 expected_headers=None):
        super().__init__("Vulkan")
        self.__base_url = base_url or "https://sdk.lunarg.com/sdk/download"
        self.__version = version
        self.__platform = "linux"
        self.__run = drake.Node(dest / "install.run")
        self.__base_path = dest / "VulkanSDK"
        self.__path = self.__base_path / "{version}/x86_64".format(
            version=self.__version)
        self.__include_path = self.__path / "include"
        self.__library_path = self.__path / "lib"
        self.__binary_path = self.__path / "bin"

        drake.HTTPDownload(url=self.url, dest=self.__run)
        drake.ShellCommand(
            sources=[self.__run],
            targets=self.headers + self.libraries + self.others,
            command=['bash',
                     str(self.__run), '--target',
                     str(self.base_path)])
Example #4
0
 def __init__(self,
              version,
              base_url=None,
              platform="linux",
              dest=drake.Path("GLFW"),
              expected_headers=None):
     super().__init__("GLFW")
     self.__base_url = base_url or "https://github.com/glfw/glfw/releases/download"
     self.__version = version
     self.__platform = "linux"
     self.__zip = drake.node(dest /
                             "{version}.zip".format(version=self.__version))
     self.__path = dest / "glfw-{version}".format(version=self.__version)
     self.__include_path = self.__path / "include"
     self.__library_path = self.__path / "src"
     self.__cmake_lists = drake.Node(self.__path / "CMakeLists.txt")
     self.__makefile = drake.Node(self.__path / "Makefile")
     drake.HTTPDownload(url=self.url, dest=self.__zip)
     drake.Extractor(tarball=self.__zip,
                     targets=[str(self.__cmake_lists.name_absolute())[5:]
                              ]).targets()
     drake.ShellCommand(sources=[self.__cmake_lists],
                        targets=self.headers + [self.__makefile],
                        command=['cmake', '.'],
                        cwd=self.__path)
     drake.ShellCommand(sources=[self.__makefile],
                        targets=self.libraries,
                        command=['make', 'glfw'],
                        cwd=self.__path)