def build_type(self, build_type):
        os.chdir(self.path)
        helpers.mkdir(self.bldpath)
        os.chdir(self.bldpath)
        helpers.mkdir(build_type)
        os.chdir(build_type)

        cmdline = [
            "cmake", self.path, "-G", "Visual Studio 14 2015 Win64",
            '-DCMAKE_BUILD_TYPE=Release'.format(build_type),
            '-DCMAKE_INSTALL_PREFIX={}'.format(self.env.getInstallDir())
        ]

        result = helpers.execute(cmdline, "configure-out.txt",
                                 "configure-err.txt")
        if not result:
            print("Cannot configure.")
            return False

        cmdline = ["cmake", "--build", ".", "--config", build_type]

        result = helpers.execute(cmdline, "compile-out.txt", "compile-err.txt")
        if result:
            self.setBuilt()
        return result
Exemple #2
0
    def compile(self, btype):
        os.chdir(self.path)
        helpers.mkdir (self.bldpath)
        os.chdir(self.bldpath)

        os.environ.putenv("OSGEO4W_ROOT", os.path.join(self.env.getInstallDir()))
        os.environ.putenv("GMP_DIR", os.path.join(self.env.getInstallDir()))
        os.environ.putenv("MPFR_DIR", os.path.join(self.env.getInstallDir()))
        os.environ.putenv("BOOST_ROOT", os.path.join(self.env.getInstallDir()))

        cmdline = ["cmake", self.path,
                   "-G", "Visual Studio 14 2015 Win64",
                   '-DCMAKE_BUILD_TYPE={}'.format(btype), 
                   ]

        result = helpers.execute(cmdline, "configure-out.txt", "configure-err.txt")
        if not result:
            print("Cannot configure.")
            return False

        cmdline = ["cmake", "--build", ".", "--config", btype]

        result = helpers.execute(cmdline, "compile-out.txt", "compile-err.txt")
        if result:
            self.setBuilt()
        return result
Exemple #3
0
    def compile(self, btype):
        os.chdir(self.path)
        shutil.copy(
            os.path.join(self.env.getDataDir(), "geos",
                         "GenerateSourceGroups.cmake"),
            os.path.join("cmake", "modules"))
        helpers.mkdir(self.bldpath)
        os.chdir(self.bldpath)

        os.environ.putenv("OSGEO4W_ROOT",
                          os.path.join(self.env.getInstallDir()))
        os.environ.putenv("GMP_DIR", os.path.join(self.env.getInstallDir()))
        os.environ.putenv("MPFR_DIR", os.path.join(self.env.getInstallDir()))
        os.environ.putenv("BOOST_ROOT", os.path.join(self.env.getInstallDir()))

        cmdline = [
            "cmake", self.path, "-G", "Visual Studio 14 2015 Win64",
            '-DCMAKE_BUILD_TYPE={}'.format(btype),
            '-DCMAKE_INSTALL_PREFIX={}'.format(self.env.getInstallDir())
        ]

        result = helpers.execute(cmdline, "configure-out.txt",
                                 "configure-err.txt")
        if not result:
            print("Cannot configure.")
            return False

        cmdline = ["cmake", "--build", ".", "--config", btype]

        result = helpers.execute(cmdline, "compile-out.txt", "compile-err.txt")
        if result:
            self.setBuilt()
        return result
Exemple #4
0
    def compile(self, btype):
        os.chdir(self.path)
        if os.path.exists("src\\CGAL_ImageIO"):
            shutil.rmtree("src\\CGAL_ImageIO")
        if os.path.exists("src\\CGAL_Qt5"):
            shutil.rmtree("src\\CGAL_Qt5")

        helpers.mkdir(self.bldpath)
        os.chdir(self.bldpath)

        os.environ.putenv("GMP_DIR", os.path.join(self.env.getInstallDir()))
        os.environ.putenv("MPFR_DIR", os.path.join(self.env.getInstallDir()))
        os.environ.putenv("BOOST_ROOT", os.path.join(self.env.getInstallDir()))

        cmdline = [
            "cmake",
            self.path,
            "-G",
            "Visual Studio 14 2015 Win64",
            '-DCMAKE_BUILD_TYPE={}'.format(btype),
        ]
        #'-DCMAKE_INSTALL_PREFIX={}'.format(self.env.getInstallDir()),

        result = helpers.execute(cmdline, "configure-out.txt",
                                 "configure-err.txt")
        if not result:
            print("Cannot configure.")
            return False

        #cmdline = ["msbuild", "CGAL.sln", "/p:BuildInParallel=true", "/p:Platform=x64"]
        #cmdline.append('/p:Configuration={}'.format(self.BuildType))
        cmdline = ["cmake", "--build", ".", "--config", btype]

        result = helpers.execute(cmdline, "compile-out.txt", "compile-err.txt")
        return result
Exemple #5
0
    def install(self):
        os.chdir(self.path)

        cmdline = ["b2"]
        cmdline.append('--prefix={}'.format(self.env.getInstallDir()))
        cmdline.append("variant=release,debug")
        cmdline.extend(self.getB2Options())
        cmdline.append("install")

        result = helpers.execute(cmdline,
                                 os.path.join(self.path, "install-out.txt"),
                                 os.path.join(self.path, "install-err.txt"))

        if not result:
            return False

        # Fix the include tree
        os.chdir(self.env.getInstallIncludeDir())
        shutil.rmtree("boost", ignore_errors=True)
        shutil.move(os.path.join("boost-1_63", "boost"), ".")
        os.rmdir("boost-1_63")

        self.setInstalled()

        return True
Exemple #6
0
    def deploy(self, btype):
        os.chdir(self.bldpath)

        cmdline = ["cmake", "--build", ".", "--config", btype, "--target", "INSTALL"]
        result = helpers.execute(cmdline, "compile-out.txt", "compile-err.txt")
        if not result:
            return False
        return True
Exemple #7
0
    def compile(self, btype):
        os.chdir(self.bldpath)
        cmdline = ["msbuild", "dll_mpfr.sln", "/t:dll_mpfr"]
        cmdline.append("/p:BuildInParallel=true")
        cmdline.append('/p:Configuration={}'.format(btype))
        cmdline.append("/p:Platform=x64")

        result = helpers.execute(cmdline, "build-out.txt", "build-err.txt")
        return result
Exemple #8
0
    def compile(self, btype):
        os.chdir(self.bldpath)
        cmdline = ["msbuild", self.Processor, "DLL", "x64", btype]
        cmdline.append("/p:BuildInParallel=true")
        #cmdline.append('/p:Configuration={}'.format(self.BuildType))

        result = helpers.execute(cmdline, "build-out.txt", "build-err.txt")
        if result:
            self.setBuilt()
        return result
Exemple #9
0
    def build(self):
        print("Entering: ", self.path)
        os.chdir(self.path)

        cmdline = ["bootstrap"]
        result = helpers.execute(cmdline,
                                 os.path.join(self.path, "bootstrap-out.txt"),
                                 os.path.join(self.path, "bootstrap-err.txt"))

        if not result:
            return False

        cmdline = ["b2"]
        cmdline.append("variant=release")
        cmdline.extend(self.getB2Options())
        cmdline.append("stage")

        result = helpers.execute(cmdline,
                                 os.path.join(self.path, "build-out.txt"),
                                 os.path.join(self.path, "build-err.txt"))

        if not result:
            return False

        cmdline = ["b2"]
        cmdline.append("variant=debug")
        cmdline.extend(self.getB2Options())
        cmdline.append("define=_ITERATOR_DEBUG_LEVEL=2")
        cmdline.append("stage")

        result = helpers.execute(cmdline,
                                 os.path.join(self.path, "build-out.txt"),
                                 os.path.join(self.path, "build-err.txt"))

        if result:
            self.setBuilt()

        return result
Exemple #10
0
    def deploy(self):
        os.chdir(self.bldpath)

        cmdline = ["nmake", 
                   'INCDIR={}\include\gdal'.format(self.env.getInstallDir()),
                   "/f", "makefile.vc", 
                   "devinstall"]
        result = helpers.execute(cmdline, "install-out.txt", "install-err.txt")
        if not result:
            return False

        #os.chdir(self.env.getInstallDir())
        #helpers.move(glob.glob("bin\\*.dll"), "lib\\")
        
        self.setInstalled()
        return True
    def install_type(self, build_type):
        os.chdir(self.bldpath)
        os.chdir(build_type)

        cmdline = [
            "cmake", "--build", ".", "--config", build_type, "--target",
            "install"
        ]
        result = helpers.execute(cmdline, "install-out.txt", "install-err.txt")
        if not result:
            return False

        os.chdir(self.env.getInstallDir())
        helpers.move(glob.glob("bin\\*.dll"), "lib\\")

        self.setInstalled()
        return True
Exemple #12
0
    def compile(self):
        os.chdir(self.path)

        with open("nmake.local", "w") as cfg:
            cfg.write('GDAL_HOME={}\n'.format(self.env.getInstallDir()))
            cfg.write("WIN64=YES\n")
            cfg.write("PLATFORM=x64")
            cfg.write('GEOS_DIR={}\n'.format(self.env.getInstallDir()))
            cfg.write('GEOS_CFLAGS = -I{}\\include -DHAVE_GEOS\n'.format(self.env.getInstallDir()))
            cfg.write('GEOS_LIB = {}\\lib\\geos_c.lib\n'.format(self.env.getInstallDir()))
            cfg.write('PROJ_INCLUDE = -I{}'.format(self.env.getInstallIncludeDir()))
            cfg.write('PROJ_LIBRARY = {}\proj_4_9.lib'.format(self.env.getInstallLibDir()))

        with open("nmake.opt", "a") as nm:
            nm.write("\nEXTERNAL_LIBS =	$(EXTERNAL_LIBS) legacy_stdio_definitions.lib\n")

        helpers.mkdir (self.bldpath)
        os.chdir(self.bldpath)

        shutil.copy(os.path.join(self.env.getDataDir(), "gdal","cpl_config.h"),
                    "port")

        cmdline = ["nmake", "/f", "makefile.vc",
                   'GDAL_ROOT={}'.format(self.path),
                   'INCDIR={}\include\gdal'.format(self.path),
                   "MSC_VER=1900", "WIN64=YES"
                   ]

        result = helpers.execute(cmdline, "build-out.txt", "build-err.txt")
        if not result:
            print("Cannot configure.")
            return False

        if result:
            self.setBuilt()
        return result