Exemplo n.º 1
0
def make_libs(params):
    from utils.build import build

    params['install'] = False

    opencv = OpenCVConfig(params)
    # some script debugging options:
    # opencv.force = True
    print(opencv)
    build(opencv)

    # Exiv2
    expat = ExpatConfig(params)
    build(expat)

    exiv2 = ExifConfig(params)
    exiv2.additional_cmake_args = opencv.cmake_zlib()
    build(exiv2)

    # libraw
    libraw = LibrawConfig(params)
    build(libraw)

    # quazip
    quazip = QuazipConfig(params)
    quazip.additional_cmake_args = opencv.cmake_zlib()
    build(quazip)
Exemplo n.º 2
0
def make_imageformats(params):

    params['install'] = False

    # config libde265 which we need for libheif
    libde265 = FormatsConfig(params, "libde265")
    libde265.builddir = os.path.join(libde265.builddir, libde265.name)
    libde265.binaryfile = os.path.join(
        libde265.builddir, libde265.name, "Release", libde265.name + ".dll")
    build(libde265)

    # config libheif
    libheif = FormatsConfig(params, "libheif")
    libheif.builddir = os.path.join(libheif.builddir, libheif.name)
    libheif.binaryfile = os.path.join(
        libheif.builddir, "libheif", "Release", "heif.dll")
    build(libheif)

    # configure image formats
    params["srcpath"] = params["repopath"]
    params['install'] = True
    imageformats = FormatsConfig(params, "imageformats")
    build(imageformats)
Exemplo n.º 3
0
def install_apps():
    prebuild()
    build()
Exemplo n.º 4
0
    parser.add_argument('--build-dir', dest='builddir', type=str, default="",
                        help='Specify the build directory')
    parser.add_argument('--build-config', dest='buildconfig', type=str, default="",
                        help='build configuration [debug|release]')
    parser.add_argument('--project', dest='project', type=str, default="all",
                        help='comma separated name of the project(s) to be built (\'all\' will build everything)')
    parser.add_argument('--force', action='store_true',
                        help='forces building the project')
    parser.add_argument('--configure', action='store_true',
                        help='if set, projects are only configured rather than built')

    # make args a dict
    params = vars(parser.parse_args())

    # get the repository path
    if not params['repopath']:
        params['repopath'] = repopath(sys.argv[0])

    params['project'] = params['project'].split(',')

    c = NomacsConfig(params)

    # only build libs if they were not specified
    if not params['libpath']:
        configure_libs(params, c)

    # uncomment for debugging
    print(c)

    build(c)
Exemplo n.º 5
0
                os.mkdir(INSTALL_PATH)

                # clone and build
                log("Removing existing repository and reinitializing...")

                git_clone_start_time = datetime.now()

                a = git.Git(BASE_PATH).clone(GIT_URL)
                with open(BASE_PATH + '/git_log.txt', 'a+') as file:
                    file.write("git clone log: \n")
                    file.write(a)

                git_clone_end_time = datetime.now()
                git_clone_runtime = git_clone_end_time - git_clone_start_time

                build(REPOSITORY_PATH, BUILD_PATH, INSTALL_PATH, BASE_PATH)

            else:
                branch = (git.Repo(REPOSITORY_PATH)).active_branch
                commit = (git.Repo(REPOSITORY_PATH)).head.commit

                if (UPDATE):
                    # call git pull
                    log("Updating repository...")
                    git_pull_start_time = datetime.now()
                    a = git.Git().pull()

                    with open(BASE_PATH + '/git_log.txt', 'a+') as file:
                        file.write("git pull log: \n")
                        file.write(a)