Пример #1
0
def main(args):
    if iswindows:
        with current_dir('msvc'):
            msbuild('Hunspell.sln', configuration='Release_dll')
            dll = lib = False
            for f in walk('.'):
                if os.path.basename(f) == 'libhunspell.dll':
                    install_binaries(f, 'bin')
                    dll = True
                elif os.path.basename(f) == 'libhunspell.lib':
                    install_binaries(f, 'lib')
                    lib = True
            if not dll or not lib:
                raise Exception('Failed to find the hunspell dlls')
        # from bypy.utils import run_shell
        # run_shell()
        copy_headers('src/hunspell/*.hxx', destdir='include/hunspell')
        copy_headers('src/hunspell/*.h', destdir='include/hunspell')
        copy_headers('msvc/*.h', destdir='include/hunspell')
    else:
        env = {}
        if ismacos:
            env['PATH'] = BIN + os.pathsep + os.environ['PATH']
            env['LIBTOOLIZE'] = 'glibtoolize'
            env['LIBTOOL'] = 'glibtool'
        with ModifiedEnv(**env):
            run('autoreconf -fiv')
        conf = '--disable-dependency-tracking'
        env = {}
        if ismacos:
            conf += ' --host x86_64-apple-darwin'
        simple_build(conf)
Пример #2
0
def main(args):
    if iswindows:
        shutil.rmtree('lib'), shutil.rmtree('lib64')
        os.mkdir('lib'), os.mkdir('lib64')
        msbuild('libiconv.vcxproj')
        copy_headers('include/iconv.h')
        install_binaries('./lib*/libiconv.dll', 'bin')
        install_binaries('./lib*/libiconv.lib', 'lib')
        # from bypy.utils import run_shell
        # run_shell()
    else:
        simple_build(
            '--disable-dependency-tracking --disable-static --enable-shared')
Пример #3
0
def main(args):
    if iswindows:
        sln = r'jxrencoderdecoder\JXRDecApp_vc14.vcxproj'
        msbuild(sln)

        def fname_map(x):
            return os.path.basename(x).rpartition('.')[0] + '-calibre.exe'

        for f in walk():
            if f.endswith('.exe'):
                install_binaries(f, 'bin', fname_map=fname_map)
    else:
        run('make', os.path.join(os.getcwd(), 'build/JxrDecApp'))
        install_binaries('build/JxrDecApp', 'bin')
Пример #4
0
def solution_build():
    os.chdir('..')
    try:
        msbuild(r'source\allinone\allinone.sln', '/p:SkipUWP=true',
                PYTHONPATH=os.path.abspath(os.path.join('source', 'data')))
    except Exception:
        # the build fails while building the data/tools, which we dont need
        pass
    suffix = '64' if is64bit else ''
    dll_pat = f'bin{suffix}/icu*.dll'
    dlls = install_binaries(dll_pat, 'bin')
    if len(dlls) < 5:
        raise SystemExit(f'Failed to build ICU dlls in {dll_pat}')
    install_binaries(f'lib{suffix}/*.lib')
    shutil.copytree('include', os.path.join(build_dir(), 'include'))
Пример #5
0
def main(args):
    replace_in_file('dll.cpp', 'WideToChar', 'WideToUtf')
    if iswindows:
        # see https://github.com/microsoft/vcpkg/pull/8053
        replace_in_file(
            'UnRARDll.vcxproj',
            '<StructMemberAlignment>4Bytes</StructMemberAlignment>', '')
        msbuild('UnRARDll.vcxproj')
        install_binaries('./build/*/Release/unrar.dll', 'bin')
        install_binaries('./build/*/Release/UnRAR.lib', 'lib')
        # from bypy.utils import run_shell
        # run_shell()
    else:
        if ismacos:
            replace_in_file('makefile', 'libunrar.so', 'libunrar.dylib')
        run('make -j4 lib CXXFLAGS=-fPIC')
        install_binaries('libunrar.' + ('dylib' if ismacos else 'so'), 'lib')
    copy_headers('*.hpp', destdir='include/unrar')
Пример #6
0
def main(args):
    if iswindows:
        sln = r'jxrencoderdecoder\JXRDecApp_vc14.vcxproj'
        msbuild(sln)

        def fname_map(x):
            return os.path.basename(x).rpartition('.')[0] + '-calibre.exe'

        for f in walk():
            if f.endswith('.exe'):
                install_binaries(f, 'bin', fname_map=fname_map)
    else:
        if ismacos:
            flags = ''
            if current_build_arch():
                flags += f'-arch {current_build_arch()} '
            replace_in_file('Makefile', 'CFLAGS=', f'CFLAGS={flags}')
            replace_in_file('Makefile', 'CXXFLAGS=', f'CXXFLAGS={flags}')
        run('make', os.path.join(os.getcwd(), 'build/JxrDecApp'))
        install_binaries('build/JxrDecApp', 'bin')
Пример #7
0
 def build(static=False):
     conf = 'Release'
     if static:
         conf += ' Static'
     msbuild('builds/windows/vc2010/freetype.sln', configuration=conf)