Exemplo n.º 1
0
def _build_win32(working_directory_path, root_project_path):
    source_folder_path = _download_and_extract(working_directory_path)

    vc14_solution_file_path = os.path.join(
        source_folder_path, 'projects/Windows/VC14/lib/libcurl.sln')

    override_props_file = os.path.abspath('override_win32.props')
    msbuild_args = [
        "/p:ForceImportBeforeCppTargets={}".format(override_props_file)
    ]
    toolset = build_config.get_msvc_toolset_ver_win32()

    build_utils.build_vs(vc14_solution_file_path,
                         'LIB Debug',
                         'Win32',
                         'libcurl',
                         toolset=toolset,
                         msbuild_args=msbuild_args)
    build_utils.build_vs(vc14_solution_file_path,
                         'LIB Release',
                         'Win32',
                         'libcurl',
                         toolset=toolset,
                         msbuild_args=msbuild_args)
    build_utils.build_vs(vc14_solution_file_path,
                         'LIB Debug',
                         'x64',
                         'libcurl',
                         toolset=toolset,
                         msbuild_args=msbuild_args)
    build_utils.build_vs(vc14_solution_file_path,
                         'LIB Release',
                         'x64',
                         'libcurl',
                         toolset=toolset,
                         msbuild_args=msbuild_args)

    libs_win_root = os.path.join(root_project_path, 'Libs/lib_CMake/win')

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win32/VC14/LIB Debug/libcurld.lib'),
        os.path.join(libs_win_root, 'x86/Debug/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win32/VC14/LIB Release/libcurl.lib'),
        os.path.join(libs_win_root, 'x86/Release/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win64/VC14/LIB Debug/libcurld.lib'),
        os.path.join(libs_win_root, 'x64/Debug/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win64/VC14/LIB Release/libcurl.lib'),
        os.path.join(libs_win_root, 'x64/Release/libcurl.lib'))

    _copy_headers(source_folder_path, root_project_path)
Exemplo n.º 2
0
def _build_win32(working_directory_path, root_project_path):
    source_folder_path = _download(working_directory_path, root_project_path)

    vc_solution_path = os.path.join(source_folder_path, 'FCollada')
    vc_solution_file = os.path.join(vc_solution_path, 'FColladaVS2010.sln')

    override_props_file = os.path.abspath('override.props')
    msbuild_args = [
        "/p:ForceImportBeforeCppTargets={}".format(override_props_file),
    ]

    toolset = build_config.get_msvc_toolset_ver_win32()
    build_utils.build_vs(vc_solution_file,
                         'Debug',
                         'Win32',
                         'FColladaVS2010',
                         toolset,
                         msbuild_args=msbuild_args)
    build_utils.build_vs(vc_solution_file,
                         'Release',
                         'Win32',
                         'FColladaVS2010',
                         toolset,
                         msbuild_args=msbuild_args)
    build_utils.build_vs(vc_solution_file,
                         'Debug',
                         'x64',
                         'FColladaVS2010',
                         toolset,
                         msbuild_args=msbuild_args)
    build_utils.build_vs(vc_solution_file,
                         'Release',
                         'x64',
                         'FColladaVS2010',
                         toolset,
                         msbuild_args=msbuild_args)

    shutil.copyfile(
        os.path.join(vc_solution_path,
                     'Output/Debug Win32/FColladaVS2010.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win/x86/Debug/FColladaVS2010.lib'))
    shutil.copyfile(
        os.path.join(vc_solution_path,
                     'Output/Release Win32/FColladaVS2010.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win/x86/Release/FColladaVS2010.lib'))
    shutil.copyfile(
        os.path.join(vc_solution_path, 'Output/Debug x64/FColladaVS2010.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win/x64/Debug/FColladaVS2010.lib'))
    shutil.copyfile(
        os.path.join(vc_solution_path,
                     'Output/Release x64/FColladaVS2010.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win/x64/Release/FColladaVS2010.lib'))
Exemplo n.º 3
0
def _build_win10(working_directory_path, root_project_path):
    source_folder_path = _download_and_extract(working_directory_path, 'win10')

    build_utils.run_process(['ms\\do_vsprojects14.bat'],
                            process_cwd=source_folder_path,
                            shell=True)

    vs_solution_path = 'vsout/NT-Universal-10.0-Static-Unicode/NT-Universal-10.0-Static-Unicode.vcxproj'

    build_utils.build_vs(os.path.join(source_folder_path, vs_solution_path),
                         'Debug', 'Win32')
    build_utils.build_vs(os.path.join(source_folder_path, vs_solution_path),
                         'Release', 'Win32')
    build_utils.build_vs(os.path.join(source_folder_path, vs_solution_path),
                         'Debug', 'x64')
    build_utils.build_vs(os.path.join(source_folder_path, vs_solution_path),
                         'Release', 'x64')
    build_utils.build_vs(os.path.join(source_folder_path, vs_solution_path),
                         'Debug', 'ARM')
    build_utils.build_vs(os.path.join(source_folder_path, vs_solution_path),
                         'Release', 'ARM')

    build_utils.run_process(['ms\\do_packwinuniversal.bat'],
                            process_cwd=source_folder_path,
                            shell=True)

    package_folder_path = os.path.join(source_folder_path, 'vsout/package')
    libs_folder_path = os.path.join(package_folder_path,
                                    'lib/Universal/10.0/Static/Unicode')

    libraries_win10_root = os.path.join(root_project_path,
                                        'Libs/lib_CMake/win10')

    libssl_path_x86_debug = os.path.join(libs_folder_path,
                                         'Debug/Win32/ssleay32.lib')
    libcrypto_path_x86_debug = os.path.join(libs_folder_path,
                                            'Debug/Win32/libeay32.lib')
    shutil.copyfile(
        libssl_path_x86_debug,
        os.path.join(libraries_win10_root, 'Win32/Debug/ssleay32.lib'))
    shutil.copyfile(
        libcrypto_path_x86_debug,
        os.path.join(libraries_win10_root, 'Win32/Debug/libeay32.lib'))

    libssl_path_x86_release = os.path.join(libs_folder_path,
                                           'Release/Win32/ssleay32.lib')
    libcrypto_path_x86_release = os.path.join(libs_folder_path,
                                              'Release/Win32/libeay32.lib')
    shutil.copyfile(
        libssl_path_x86_release,
        os.path.join(libraries_win10_root, 'Win32/Release/ssleay32.lib'))
    shutil.copyfile(
        libcrypto_path_x86_release,
        os.path.join(libraries_win10_root, 'Win32/Release/libeay32.lib'))

    libssl_path_x64_debug = os.path.join(libs_folder_path,
                                         'Debug/x64/ssleay32.lib')
    libcrypto_path_x64_debug = os.path.join(libs_folder_path,
                                            'Debug/x64/libeay32.lib')
    shutil.copyfile(
        libssl_path_x64_debug,
        os.path.join(libraries_win10_root, 'x64/Debug/ssleay32.lib'))
    shutil.copyfile(
        libcrypto_path_x64_debug,
        os.path.join(libraries_win10_root, 'x64/Debug/libeay32.lib'))

    libssl_path_x64_release = os.path.join(libs_folder_path,
                                           'Release/x64/ssleay32.lib')
    libcrypto_path_x64_release = os.path.join(libs_folder_path,
                                              'Release/x64/libeay32.lib')
    shutil.copyfile(
        libssl_path_x64_release,
        os.path.join(libraries_win10_root, 'x64/Release/ssleay32.lib'))
    shutil.copyfile(
        libcrypto_path_x64_release,
        os.path.join(libraries_win10_root, 'x64/Release/libeay32.lib'))

    libssl_path_arm_debug = os.path.join(libs_folder_path,
                                         'Debug/arm/ssleay32.lib')
    libcrypto_path_arm_debug = os.path.join(libs_folder_path,
                                            'Debug/arm/libeay32.lib')
    shutil.copyfile(
        libssl_path_arm_debug,
        os.path.join(libraries_win10_root, 'arm/Debug/ssleay32.lib'))
    shutil.copyfile(
        libcrypto_path_arm_debug,
        os.path.join(libraries_win10_root, 'arm/Debug/libeay32.lib'))

    libssl_path_arm_release = os.path.join(libs_folder_path,
                                           'Release/arm/ssleay32.lib')
    libcrypto_path_arm_release = os.path.join(libs_folder_path,
                                              'Release/arm/libeay32.lib')
    shutil.copyfile(
        libssl_path_arm_release,
        os.path.join(libraries_win10_root, 'arm/Release/ssleay32.lib'))
    shutil.copyfile(
        libcrypto_path_arm_release,
        os.path.join(libraries_win10_root, 'arm/Release/libeay32.lib'))

    _copy_headers(package_folder_path, root_project_path, 'uwp')
Exemplo n.º 4
0
def _build_win10(working_directory_path, root_project_path):
    source_folder_path = _download_and_extract(working_directory_path, 'win',
                                               '_win10')
    _patch_sources(source_folder_path, working_directory_path,
                   'patch_win10.diff')

    sln_path = os.path.join(source_folder_path, 'jpeg.sln')
    build_utils.build_vs(sln_path, 'Debug', 'Win32')
    build_utils.build_vs(sln_path, 'Release', 'Win32')
    build_utils.build_vs(sln_path, 'Debug', 'x64')
    build_utils.build_vs(sln_path, 'Release', 'x64')
    build_utils.build_vs(sln_path, 'Debug', 'ARM')
    build_utils.build_vs(sln_path, 'Release', 'ARM')

    libs_win10_root = os.path.join(root_project_path, 'Libs/lib_CMake/win10')

    lib_path_x86_debug = os.path.join(source_folder_path, 'Debug/jpeg.lib')
    lib_path_x86_release = os.path.join(source_folder_path, 'Release/jpeg.lib')
    shutil.copyfile(
        lib_path_x86_debug,
        os.path.join(libs_win10_root, 'Win32/Debug/jpeg_win10.lib'))
    shutil.copyfile(
        lib_path_x86_release,
        os.path.join(libs_win10_root, 'Win32/Release/jpeg_win10.lib'))

    lib_path_x64_debug = os.path.join(source_folder_path, 'x64/Debug/jpeg.lib')
    lib_path_x64_release = os.path.join(source_folder_path,
                                        'x64/Release/jpeg.lib')
    shutil.copyfile(lib_path_x64_debug,
                    os.path.join(libs_win10_root, 'x64/Debug/jpeg_win10.lib'))
    shutil.copyfile(
        lib_path_x64_release,
        os.path.join(libs_win10_root, 'x64/Release/jpeg_win10.lib'))

    lib_path_arm_debug = os.path.join(source_folder_path, 'ARM/Debug/jpeg.lib')
    lib_path_arm_release = os.path.join(source_folder_path,
                                        'ARM/Release/jpeg.lib')
    shutil.copyfile(lib_path_arm_debug,
                    os.path.join(libs_win10_root, 'arm/Debug/jpeg_win10.lib'))
    shutil.copyfile(
        lib_path_arm_release,
        os.path.join(libs_win10_root, 'arm/Release/jpeg_win10.lib'))

    _copy_headers(source_folder_path, root_project_path)
Exemplo n.º 5
0
def _build_win32(working_directory_path, root_project_path):
    source_folder_path = _download_and_extract(working_directory_path)
    _patch_sources('patch_common.diff', 'patch_win32.diff',
                   working_directory_path)
    project_x86_path = os.path.join(source_folder_path, 'PhysX_3.4', 'Source',
                                    'compiler', 'vc14win32', 'PhysX.sln')
    project_x64_path = os.path.join(source_folder_path, 'PhysX_3.4', 'Source',
                                    'compiler', 'vc14win64', 'PhysX.sln')

    binary_dst_path = os.path.join(root_project_path, 'Modules', 'Physics',
                                   'Libs', 'Win32')
    x86_binary_dst_path = os.path.join(binary_dst_path, 'x86')
    x64_binary_dst_path = os.path.join(binary_dst_path, 'x64')

    toolset = build_config.get_msvc_toolset_ver_win32()

    override_props_file = os.path.abspath('override_win32.props')
    msbuild_args = [
        "/p:ForceImportBeforeCppTargets={}".format(override_props_file)
    ]

    # x86
    build_utils.build_vs(project_x86_path,
                         'debug',
                         toolset=toolset,
                         msbuild_args=msbuild_args)
    #build_utils.build_vs(project_x86_path, 'profile', toolset=toolset, msbuild_args=msbuild_args)
    #build_utils.build_vs(project_x86_path, 'checked', toolset=toolset, msbuild_args=msbuild_args)
    build_utils.build_vs(project_x86_path,
                         'release',
                         toolset=toolset,
                         msbuild_args=msbuild_args)
    _copy_libs(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Bin', 'vc14win32'),
        x86_binary_dst_path, '.dll')
    _copy_libs(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Lib', 'vc14win32'),
        x86_binary_dst_path, '.lib')
    _copy_libs(
        os.path.join(source_folder_path, 'PxShared', 'bin', 'vc14win32'),
        x86_binary_dst_path, '.dll')
    _copy_libs(
        os.path.join(source_folder_path, 'PxShared', 'lib', 'vc14win32'),
        x86_binary_dst_path, '.lib')

    # x64
    build_utils.build_vs(project_x64_path,
                         'debug',
                         'x64',
                         toolset=toolset,
                         msbuild_args=msbuild_args)
    #build_utils.build_vs(project_x64_path, 'profile', 'x64', toolset=toolset, msbuild_args=msbuild_args)
    #build_utils.build_vs(project_x64_path, 'checked', 'x64', toolset=toolset, msbuild_args=msbuild_args)
    build_utils.build_vs(project_x64_path,
                         'release',
                         'x64',
                         toolset=toolset,
                         msbuild_args=msbuild_args)
    _copy_libs(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Bin', 'vc14win64'),
        x64_binary_dst_path, '.dll')
    _copy_libs(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Lib', 'vc14win64'),
        x64_binary_dst_path, '.lib')
    _copy_libs(
        os.path.join(source_folder_path, 'PxShared', 'bin', 'vc14win64'),
        x64_binary_dst_path, '.dll')
    _copy_libs(
        os.path.join(source_folder_path, 'PxShared', 'lib', 'vc14win64'),
        x64_binary_dst_path, '.lib')

    _copy_headers(source_folder_path, root_project_path)
Exemplo n.º 6
0
def _build_win10(working_directory_path, root_project_path):
    source_folder_path = _download_and_extract(working_directory_path)
    _patch_sources('patch_common.diff', 'patch_win10.diff',
                   working_directory_path)

    project_x86_path = os.path.join(source_folder_path, 'PhysX_3.4', 'Source',
                                    'compiler', 'vc14win32', 'PhysX.sln')
    project_x64_path = os.path.join(source_folder_path, 'PhysX_3.4', 'Source',
                                    'compiler', 'vc14win64', 'PhysX.sln')

    binary_dst_path = os.path.join(root_project_path, 'Modules', 'Physics',
                                   'Libs', 'Win10')
    x86_binary_dst_path = os.path.join(binary_dst_path, 'Win32')
    x64_binary_dst_path = os.path.join(binary_dst_path, 'x64')

    debug_libs_list_x86 = [
        'LowLevelAABBDEBUG.lib', 'LowLevelClothDEBUG.lib', 'LowLevelDEBUG.lib',
        'LowLevelDynamicsDEBUG.lib', 'LowLevelParticlesDEBUG.lib',
        'nvToolsExt32_1.dll', 'nvToolsExt64_1.dll',
        'PhysX3CharacterKinematicDEBUG_x86.dll',
        'PhysX3CharacterKinematicDEBUG_x86.lib', 'PhysX3CommonDEBUG_x86.dll',
        'PhysX3CommonDEBUG_x86.lib', 'PhysX3CookingDEBUG_x86.dll',
        'PhysX3CookingDEBUG_x86.lib', 'PhysX3DEBUG_x86.dll',
        'PhysX3DEBUG_x86.lib', 'PhysX3ExtensionsDEBUG.lib',
        'PhysX3VehicleDEBUG.lib', 'PsFastXmlDEBUG_x86.lib',
        'PxFoundationDEBUG_x86.dll', 'PxFoundationDEBUG_x86.lib',
        'PxPvdSDKDEBUG_x86.dll', 'PxPvdSDKDEBUG_x86.lib',
        'PxTaskDEBUG_x86.lib', 'SceneQueryDEBUG.lib',
        'SimulationControllerDEBUG.lib'
    ]

    release_libs_list_x86 = map(lambda libName: libName.replace('DEBUG', ''),
                                debug_libs_list_x86)
    debug_libs_list_x64 = map(lambda libName: libName.replace('x86', 'x64'),
                              debug_libs_list_x86)
    release_libs_list_x64 = map(lambda libName: libName.replace('x86', 'x64'),
                                release_libs_list_x86)

    build_utils.build_vs(project_x86_path, 'debug')
    #build_utils.build_vs(project_x86_path, 'profile')
    #build_utils.build_vs(project_x86_path, 'checked')
    build_utils.build_vs(project_x86_path, 'release')

    debug_win32_dst_path = os.path.join(binary_dst_path, 'Win32', 'Debug')
    release_win32_dst_path = os.path.join(binary_dst_path, 'Win32', 'Release')

    debug_win64_dst_path = os.path.join(binary_dst_path, 'x64', 'Debug')
    release_win64_dst_path = os.path.join(binary_dst_path, 'x64', 'Release')

    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Bin', 'vc14win32'),
        debug_win32_dst_path, debug_libs_list_x86)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Lib', 'vc14win32'),
        debug_win32_dst_path, debug_libs_list_x86)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'bin', 'vc14win32'),
        debug_win32_dst_path, debug_libs_list_x86)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'lib', 'vc14win32'),
        debug_win32_dst_path, debug_libs_list_x86)

    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Bin', 'vc14win32'),
        release_win32_dst_path, release_libs_list_x86)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Lib', 'vc14win32'),
        release_win32_dst_path, release_libs_list_x86)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'bin', 'vc14win32'),
        release_win32_dst_path, release_libs_list_x86)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'lib', 'vc14win32'),
        release_win32_dst_path, release_libs_list_x86)

    build_utils.build_vs(project_x64_path, 'debug', 'x64')
    #build_utils.build_vs(project_x64_path, 'profile', 'x64')
    #build_utils.build_vs(project_x64_path, 'checked', 'x64')
    build_utils.build_vs(project_x64_path, 'release', 'x64')
    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Bin', 'vc14win64'),
        debug_win64_dst_path, debug_libs_list_x64)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Lib', 'vc14win64'),
        debug_win64_dst_path, debug_libs_list_x64)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'bin', 'vc14win64'),
        debug_win64_dst_path, debug_libs_list_x64)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'lib', 'vc14win64'),
        debug_win64_dst_path, debug_libs_list_x64)

    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Bin', 'vc14win64'),
        release_win64_dst_path, release_libs_list_x64)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PhysX_3.4', 'Lib', 'vc14win64'),
        release_win64_dst_path, release_libs_list_x64)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'bin', 'vc14win64'),
        release_win64_dst_path, release_libs_list_x64)
    _copy_libs_list(
        os.path.join(source_folder_path, 'PxShared', 'lib', 'vc14win64'),
        release_win64_dst_path, release_libs_list_x64)
    _copy_headers(source_folder_path, root_project_path)
Exemplo n.º 7
0
def _build_win10(working_directory_path, root_project_path):
    prefix = '_win10'
    source_folder_path = _download_and_extract(working_directory_path,
                                               'windows', prefix)
    _patch_sources(source_folder_path, working_directory_path, prefix)

    vc_solution_file_path = os.path.join(source_folder_path,
                                         'source/allinone/allinone.sln')
    build_utils.build_vs(vc_solution_file_path, 'Debug', 'Win32', 'common')
    build_utils.build_vs(vc_solution_file_path, 'Release', 'Win32', 'common')
    build_utils.build_vs(vc_solution_file_path, 'Debug', 'x64', 'common')
    build_utils.build_vs(vc_solution_file_path, 'Release', 'x64', 'common')
    build_utils.build_vs(vc_solution_file_path, 'Debug', 'ARM', 'common')
    build_utils.build_vs(vc_solution_file_path, 'Release', 'ARM', 'common')
Exemplo n.º 8
0
def _build_win10(working_directory_path, root_project_path):
    source_folder_path = _download_and_extract(working_directory_path)
    _patch_sources_windows(source_folder_path, working_directory_path)

    sln_path = os.path.join(source_folder_path, 'win32/Win10/libxml2.sln')
    build_utils.build_vs(sln_path, 'Debug', 'Win32', target='libxml2')
    build_utils.build_vs(sln_path, 'Release', 'Win32', target='libxml2')
    build_utils.build_vs(sln_path, 'Debug', 'x64', target='libxml2')
    build_utils.build_vs(sln_path, 'Release', 'x64', target='libxml2')
    build_utils.build_vs(sln_path, 'Debug', 'ARM', target='libxml2')
    build_utils.build_vs(sln_path, 'Release', 'ARM', target='libxml2')

    libraries_win10_root = os.path.join(root_project_path,
                                        'Libs/lib_CMake/win10')

    lib_path_x86_debug = os.path.join(source_folder_path,
                                      'win32/Win10/Debug/libxml2.lib')
    lib_path_x86_release = os.path.join(source_folder_path,
                                        'win32/Win10/Release/libxml2.lib')
    shutil.copyfile(
        lib_path_x86_debug,
        os.path.join(libraries_win10_root, 'Win32/Debug/libxml.lib'))
    shutil.copyfile(
        lib_path_x86_release,
        os.path.join(libraries_win10_root, 'Win32/Release/libxml.lib'))

    lib_path_x64_debug = os.path.join(source_folder_path,
                                      'win32/Win10/x64/Debug/libxml2.lib')
    lib_path_x64_release = os.path.join(source_folder_path,
                                        'win32/Win10/x64/Release/libxml2.lib')
    shutil.copyfile(lib_path_x64_debug,
                    os.path.join(libraries_win10_root, 'x64/Debug/libxml.lib'))
    shutil.copyfile(
        lib_path_x64_release,
        os.path.join(libraries_win10_root, 'x64/Release/libxml.lib'))

    lib_path_arm_debug = os.path.join(source_folder_path,
                                      'win32/Win10/ARM/Debug/libxml2.lib')
    lib_path_arm_release = os.path.join(source_folder_path,
                                        'win32/Win10/ARM/Release/libxml2.lib')
    shutil.copyfile(lib_path_arm_debug,
                    os.path.join(libraries_win10_root, 'arm/Debug/libxml.lib'))
    shutil.copyfile(
        lib_path_arm_release,
        os.path.join(libraries_win10_root, 'arm/Release/libxml.lib'))

    _copy_headers(source_folder_path, root_project_path)
Exemplo n.º 9
0
def _build_win32(working_directory_path, root_project_path):
    source_folder_path = _download(working_directory_path)

    build_folder_path = os.path.join(working_directory_path, 'gen/build_win32')
    build_folder_path_x86 = os.path.join(build_folder_path, 'x86')
    build_folder_path_x86_debug = os.path.join(build_folder_path_x86, 'Debug')
    build_folder_path_x86_release = os.path.join(build_folder_path_x86, 'Release')
    build_folder_path_x64 = os.path.join(build_folder_path, 'x64')
    build_folder_path_x64_debug = os.path.join(build_folder_path_x64, 'Debug')
    build_folder_path_x64_release = os.path.join(build_folder_path_x64, 'Release')

    os.makedirs(build_folder_path_x86_debug)
    os.makedirs(build_folder_path_x86_release)
    os.makedirs(build_folder_path_x64_debug)
    os.makedirs(build_folder_path_x64_release)

    vc_solution_file=os.path.join(source_folder_path, 'uv.sln')
    override_props_file=os.path.abspath('override_win32.props')
    toolset=build_config.get_msvc_toolset_ver_win32()
    msbuild_args=[
        "/p:ForceImportBeforeCppTargets={}".format(override_props_file),
        "/p:WindowsTargetPlatformVersion={}".format(build_config.get_msvc_sdk_version_win32())
    ]

    # x86
    x86_env = build_utils.get_win32_vs_x86_env()
    x86_env['GYP_MSVS_VERSION'] = build_config.get_gyp_msvs_version()
    build_utils.run_process(
        ['vcbuild.bat', 'x86', 'nobuild'],
        process_cwd=source_folder_path,
        environment=x86_env,
        shell=True)

    build_utils.build_vs(vc_solution_file, 'Debug', 'Win32', 'libuv', toolset, msbuild_args=msbuild_args)
    build_utils.build_vs(vc_solution_file, 'Release', 'Win32', 'libuv', toolset, msbuild_args=msbuild_args)

    lib_path_x86_debug = os.path.join(build_folder_path_x86_debug, 'libuv.lib')
    lib_path_x86_release = os.path.join(build_folder_path_x86_release, 'libuv.lib')
    shutil.copyfile(
        os.path.join(source_folder_path, 'Debug/lib/libuv.lib'),
        lib_path_x86_debug)
    shutil.copyfile(
        os.path.join(source_folder_path, 'Release/lib/libuv.lib'),
        lib_path_x86_release)

    build_utils.run_process(
        ['vcbuild.bat', 'clean'],
        process_cwd=source_folder_path,
        environment=x86_env,
        shell=True)

    # x64
    x64_env = build_utils.get_win32_vs_x64_env()
    x64_env['GYP_MSVS_VERSION'] = build_config.get_gyp_msvs_version()
    build_utils.run_process(
        ['vcbuild.bat', 'x64', 'nobuild'],
        process_cwd=source_folder_path,
        environment=x64_env,
        shell=True)

    build_utils.build_vs(vc_solution_file, 'Debug', 'x64', 'libuv', toolset, msbuild_args=msbuild_args)
    build_utils.build_vs(vc_solution_file, 'Release', 'x64', 'libuv', toolset, msbuild_args=msbuild_args)

    lib_path_x64_debug = os.path.join(build_folder_path_x64_debug, 'libuv.lib')
    lib_path_x64_release = os.path.join(build_folder_path_x64_release, 'libuv.lib')
    shutil.copyfile(
        os.path.join(source_folder_path, 'Debug/lib/libuv.lib'),
        lib_path_x64_debug)
    shutil.copyfile(
        os.path.join(source_folder_path, 'Release/lib/libuv.lib'),
        lib_path_x64_release)

    # copy libs
    libs_win_root = os.path.join(root_project_path, 'Libs/lib_CMake/win')
    shutil.copyfile(
        lib_path_x86_debug,
        os.path.join(libs_win_root, 'x86/Debug/libuv.lib'))
    shutil.copyfile(
        lib_path_x86_release,
        os.path.join(libs_win_root, 'x86/Release/libuv.lib'))
    shutil.copyfile(
        lib_path_x64_debug,
        os.path.join(libs_win_root, 'x64/Debug/libuv.lib'))
    shutil.copyfile(
        lib_path_x64_release,
        os.path.join(libs_win_root, 'x64/Release/libuv.lib'))

    _copy_headers(source_folder_path, root_project_path)
Exemplo n.º 10
0
def _build_win10(working_directory_path, root_project_path):
    source_folder_path = _download_and_extract(working_directory_path)
    _patch_sources(source_folder_path, working_directory_path,
                   'patch_win10.diff')

    vc14_solution_file_path = os.path.join(
        source_folder_path, 'projects/Windows/VC14/lib/libcurl.sln')

    build_utils.build_vs(vc14_solution_file_path, 'LIB Debug - LIB OpenSSL',
                         'Win32', 'libcurl')
    build_utils.build_vs(vc14_solution_file_path, 'LIB Release - LIB OpenSSL',
                         'Win32', 'libcurl')
    build_utils.build_vs(vc14_solution_file_path, 'LIB Debug - LIB OpenSSL',
                         'x64', 'libcurl')
    build_utils.build_vs(vc14_solution_file_path, 'LIB Release - LIB OpenSSL',
                         'x64', 'libcurl')
    build_utils.build_vs(vc14_solution_file_path, 'LIB Debug - LIB OpenSSL',
                         'ARM', 'libcurl')
    build_utils.build_vs(vc14_solution_file_path, 'LIB Release - LIB OpenSSL',
                         'ARM', 'libcurl')

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win32/VC14/LIB Debug - LIB OpenSSL/libcurld.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win10/Win32/Debug/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win32/VC14/LIB Release - LIB OpenSSL/libcurl.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win10/Win32/Release/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win64/VC14/LIB Debug - LIB OpenSSL/libcurld.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win10/x64/Debug/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/Win64/VC14/LIB Release - LIB OpenSSL/libcurl.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win10/x64/Release/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/ARM/VC14/LIB Debug - LIB OpenSSL/libcurld.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win10/arm/Debug/libcurl.lib'))

    shutil.copyfile(
        os.path.join(source_folder_path,
                     'build/ARM/VC14/LIB Release - LIB OpenSSL/libcurl.lib'),
        os.path.join(root_project_path,
                     'Libs/lib_CMake/win10/arm/Release/libcurl.lib'))

    _copy_headers(source_folder_path, root_project_path)