Esempio n. 1
0
def clear_waf_timestamp_files(conf):
    """
    Remove timestamp files to force builds of generate_uber_files and project gen even if
    some command after configure failes

    :param conf:
    """

    # Remove timestamp files to force builds even if some command after configure fail
    force_timestamp_files = CONFIGURE_FORCE_TIMESTAMP_FILES
    for force_timestamp_file in force_timestamp_files:
        try:
            force_timestamp_node = conf.get_bintemp_folder_node().make_node(
                force_timestamp_file)
            os.stat(force_timestamp_node.abspath())
        except OSError:
            pass
        else:
            force_timestamp_node.delete()

    # Add timestamp files for files generated by configure
    check_timestamp_files = CONFIGURE_TIMESTAMP_FILES
    for check_timestamp_file in check_timestamp_files:
        check_timestamp_node = conf.get_bintemp_folder_node().make_node(
            check_timestamp_file)
        check_timestamp_node.write('')
Esempio n. 2
0
def configure_protoc(conf):
    v = conf.env
    bin_temp_folder_node = conf.get_bintemp_folder_node().make_node(
        'protobuf').make_node('GeneratedFiles')
    proto_compiler_folder = conf.CreateRootRelativePath(
        'Code/SDKs/protobuf-3.1.0')
    proto_plugin_folder = conf.CreateRootRelativePath(proto_plugins_rpath)

    if 'linux' in sys.platform:
        v['PROTOC'] = proto_compiler_folder + '/bin/linux/protoc'
    else:
        v['PROTOC'] = proto_compiler_folder + '/bin/win_x86/protoc.exe'

    #conf.check_cfg(package="protobuf", uselib_store="PROTOBUF", args=['--cflags', '--libs'])
    #conf.find_program('protoc', var='PROTOC')

    protobuf_include_path = [
        conf.CreateRootRelativePath('Code/SDKs/protobuf-3.1.0/include/'),
        conf.CreateRootRelativePath('Code/CryCloud/ProtocolBase/'),
        conf.CreateRootRelativePath('Code/CryCloud/Messaging/'),
        conf.CreateRootRelativePath(
            'Code/CryCloud/GameModules/Common/GameCommon/Protobuf/'),
        conf.CreateRootRelativePath(
            'Code/CryCloud/GameTelemetryProvider/protobuf/'),
        conf.get_bintemp_folder_node().make_node('protobuf').abspath(),
        bin_temp_folder_node.abspath()
    ]
    v['PROTOC_INCLUDE_PATHS'] = protobuf_include_path
    v['PROTOC_INCLUDE_ST'] = '-I%s'
    v['PROTOC_FLAGS'] = '--cpp_out=%s' % bin_temp_folder_node.abspath()
    v['PROTOCPLUGIN_FLAGS'] = '--cry_out=%s' % bin_temp_folder_node.abspath()
    v['PROTOCPLUGIN'] = '--plugin=protoc-gen-cry=%s' % (
        os.path.normpath(proto_plugin_folder + cpp_plugin_file))
Esempio n. 3
0
def get_validated_platforms_node(conf):
    return conf.get_bintemp_folder_node().make_node(
        VALIDATED_CONFIGURATIONS_FILENAME)