Example #1
0
def install_sdl_full():
    d = zls.Dirs()
    d.mdcd("ThirdParty")
    d.push()
    d.mdcd("sources")
    if not d.exists("SDL"):
        download_sdl()
    sourceDir = d.cwd()
    d.pop()
    d.mdcd("build")
    for is64bit in [False, True]:
        if is64bit:
            if not sdl_build_64_bit:
                continue
            d.push()
            d.mdcd("SDL_x64")
        else:
            if not sdl_build_32_bit:
                continue
            d.push()
            d.mdcd("SDL_x86")
        if True:
            config_sdl(is64bit)

        for config in sdl_build_configs:
            if True:
                build_sdl(config)
            if True:
                install_sdl(config)
        d.pop()
Example #2
0
def install_opencv_full():
    d = zls.Dirs()
    d.mdcd("ThirdParty")
    d.push()
    d.mdcd("sources")
    if not d.exists("OpenCV"):
        download_opencv()
    sourceDir = d.cwd()
    d.pop()
    d.mdcd("build")
    for is64bit in [False, True]:
        if is64bit:
            if not opencv_build_64_bit:
                continue
            d.push()
            d.mdcd("OpenCV_x64")
        else:
            if not opencv_build_32_bit:
                continue
            d.push()
            d.mdcd("OpenCV_x86")
        if not d.exists("cvconfig.h"):
            config_opencv(is64bit)

        for config in opencv_build_configs:
            if d.exists("cvconfig.h") and not d.exists("bin"):
                build_opencv(config)
            if d.exists("bin"):
                install_opencv(config)
        d.pop()
Example #3
0
def config_osvr_core(build="Debug"):
    root = os.getcwd() + "/"
    dirs = zls.Dirs("OSVR-Core")
    dirs.mkdir("build", True)

    cmake = zls.CMake()

    libroot = root + "Libs/"
    cmake.add_definition("libfunctionality_DIR",
                         libroot + "libfunctionality/install")
    cmake.add_definition("DIRECTSHOW_QEDIT_INCLUDE_DIR",
                         libroot + "DirectShow/include/")
    cmake.add_definition("DIRECTSHOW_STRMIIDS_LIBRARY",
                         libroot + "DirectShow/lib_x86/strmiids.lib")
    cmake.add_definition("OpenCV_DIR", "C:/OpenCV")
    #cmake.add_definition("OpenCV_STATIC", "OFF")
    cmake.add_definition(
        "JsonCpp_INCLUDE_DIR",
        root + "OSVR-Core/vendor/vrpn/submodules/jsoncpp/include")
    cmake.add_definition(
        "JsonCpp_LIBRARY",
        root + "OSVR-Core/vendor/vrpn/submodules/jsoncpp/build/lib/" + build +
        "/jsoncpp.lib")
    cmake.add_definition("BOOST_ROOT", "C:/Boost")
    cmake.add_definition(
        "CMAKE_CXX_FLAGS",
        "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING /EHsc /MP")
    #cmake.add_definition("BOOST_INCLUDEDIR", "C:/Boost/include/boost-1_70")

    proc = cmake.config()
    print(proc)
Example #4
0
def install_osvr_core_full():
    d = zls.Dirs()
    d.mdcd("sources")
    if not d.exists("OSVR-Core"):
        download_osvr_core()
    sourceDir = d.cwd()
    d.pop()
    d.mdcd("build")
    for is64bit in [False, True]:
        if is64bit:
            if not osvr_core_build_64_bit:
                continue
            d.push()
            d.mdcd("OSVR-Core_x64")
        else:
            if not osvr_core_build_32_bit:
                continue
            d.push()
            d.mdcd("OSVR-Core_x86")
        if not d.exists("CMakeFiles"):
            config_osvr_core(is64bit)

        for config in osvr_core_build_configs:
            if True or d.exists("CMakeFiles") and not d.exists("bin"):
                build_osvr_core(config)
            if True or d.exists("bin"):
                install_osvr_core()
        d.pop()
def install_jsoncpp_full():
    d = zls.Dirs()
    d.mdcd("ThirdParty")
    d.push()
    d.mdcd("sources")
    if not d.exists("jsoncpp"):
        download_jsoncpp()
    sourceDir = d.cwd()
    d.pop()
    d.mdcd("build")
    for is64bit in [False, True]:
        if is64bit:
            if not jsoncpp_build_64_bit:
                continue
            d.push()
            d.mdcd("jsoncpp_x64")
        else:
            if not jsoncpp_build_32_bit:
                continue
            d.push()
            d.mdcd("jsoncpp_x86")
        if not d.exists("CMakeFiles"):
            config_jsoncpp(is64bit)

        for config in jsoncpp_build_configs:
            if True or d.exists("CMakeFiles") and not d.exists(
                    config):  #x64/config | config
                build_jsoncpp(config)
            if True or d.exists(config):
                install_jsoncpp(config)
        d.pop()
def install_libFunctionality_full():
    d = zls.Dirs()
    d.mdcd("sources")
    if not d.exists("libFunctionality"):
        download_libFunctionality()
    sourceDir = d.cwd()
    d.pop()
    d.mdcd("build")
    for is64bit in [False, True]:
        if is64bit:
            if not libFunctionality_build_64_bit:
                continue
            d.push()
            d.mdcd("libFunctionality_x64")
        else:
            if not libFunctionality_build_32_bit:
                continue
            d.push()
            d.mdcd("libFunctionality_x86")
        if not d.exists("CMakeFiles"):
            config_libFunctionality(is64bit)

        for config in libFunctionality_build_configs:
            if True or d.exists("CMakeFiles") and not d.exists("bin"):
                build_libFunctionality(config)
            if d.exists("bin"):
                install_libFunctionality(config)
        d.pop()
Example #7
0
def main():
    dirs = zls.Dirs("..")
    config_jsoncpp()
    build_jsoncpp()
    #install_jsoncpp()
    config_osvr_core()
    build_osvr_core()
    install_osvr_core()
def install_dshow_camera_full():
    d = zls.Dirs()
    target = zls.getInstallPath(None, zls.Arch.Common)
    target = target.replace("\\", "/")
    target = target.split("/")
    d.cd(target.pop(0) + "/")
    for path in target:
        d.mdcd(path)
    download_dshow_camera()
Example #9
0
def install_boost_full():
    d = zls.Dirs()
    d.mdcd("ThirdParty")
    d.mdcd("sources")
    if not d.exists("Boost"):
        download_boost()
    d.cd("Boost")
    if not d.exists("bootstrap.log"):
        bootstrap_boost()
    build_and_install_boost()
Example #10
0
def install_jsoncpp():
    dirs = zls.Dirs("OSVR-Core")
    dirs.chdir("vendor")
    dirs.chdir("vrpn")
    dirs.chdir("submodules")
    dirs.chdir("jsoncpp")
    dirs.chdir("build")
    cmake = zls.CMake()
    cmake.set_build_config("Debug")
    cmake.set_build_target("install")
    cmake.build()
Example #11
0
def init_opencv():
    dir = zls.Dirs("Libs")
    if not dir.exists("OpenCV"):
        download_opencv()
    dir.chdir("OpenCV")
    dir.mkdir("build_x86", True)
    config_opencv()
    build_opencv("Debug")
    build_opencv("Release")
    install_opencv("Debug")
    install_opencv("Release")
Example #12
0
def build_jsoncpp():
    dirs = zls.Dirs("OSVR-Core")
    dirs.chdir("vendor")
    dirs.chdir("vrpn")
    dirs.chdir("submodules")
    dirs.chdir("jsoncpp")
    dirs.mkdir("build", True)
    cmake = zls.CMake()
    cmake.set_build_config("Debug")
    cmake.build()
    cmake.set_build_config("Release")
    cmake.build()
Example #13
0
def config_jsoncpp():
    dirs = zls.Dirs("OSVR-Core")
    dirs.chdir("vendor")
    dirs.chdir("vrpn")
    dirs.chdir("submodules")
    dirs.chdir("jsoncpp")
    dirs.mkdir("build", True)
    cmake = zls.CMake()
    cmake.add_definition("JSONCPP_WITH_TESTS", "OFF")
    cmake.add_definition("JSONCPP_WITH_POST_BUILD_UNITTEST", "OFF")
    #cmake.add_definition("JSONCPP_WITH_CMAKE_PACKAGE", "ON")
    #cmake.add_definition("CMAKE_INSTALL_PREFIX")
    cmake.config()
Example #14
0
def init_libfunctionality():
    dir = zls.Dirs("Libs")
    dir.chdir("libfunctionality")
    cmake = zls.CMake()
    dir.mkdir("build", True)
    cmake.add_definition("CMAKE_CXX_FLAGS", "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
    cmake.add_definition("CMAKE_INSTALL_PREFIX", "../install")
    cmake.config()
    cmake.build()
    cmake.set_build_target("INSTALL")
    cmake.build()
    cmake.set_build_config("Release")
    cmake.build()
Example #15
0
def init_boost():
    dir = zls.Dirs("Libs")
    if not dir.exists("boost"):
        download_boost()
    dir.chdir("boost")
    subprocess.run(["bootstrap.bat"])
    #subprocess.run(["b2", "install", "--with-thread", "--with-system", "--with-date_time", "--with-chrono", "--with-program_options", "--with-filesystem", "--with-locale", "link=static", "runtime-link=shared", "threading=multi"])
    command = ["b2", "install"]
    justRequiredModules = True
    if justRequiredModules:
        command.append("--with-thread")
        command.append("--with-system")
        command.append("--with-date_time")
        command.append("--with-chrono")
        command.append("--with-program_options")
        command.append("--with-filesystem")
        command.append("--with-locale")
    command.append("link=static")
    command.append("runtime-link=shared")
    command.append("threading=multi")
    subprocess.run(["b2", "install", "link=static", "runtime-link=shared", "threading=multi"])
Example #16
0
def build_osvr_core():
    dirs = zls.Dirs("OSVR-Core")
    dirs.chdir("build")
    cmake = zls.CMake()
    cmake.build()
Example #17
0
def install_osvr_core():
    dirs = zls.Dirs("OSVR-Core")
    dirs.chdir("build")
    cmake = zls.CMake()
    cmake.set_build_target("INSTALL")
    cmake.build()
Example #18
0
def main():
    dir = zls.Dirs("..")
    #download_all_submodules()
    #init_boost()
    #init_opencv()
    init_libfunctionality()