'Load proprietary datatypes and return information needed for loading custom
datatypes converters and display applications later.'

def load_installed_datatypes(self, repository, relative_install_dir, deactivate=False):

    metadata = repository.metadata
    repository_dict = None
    datatypes_config = hg_util.get_config_from_disk(suc.DATATYPES_CONFIG_FILENAME, relative_install_dir)
    if datatypes_config:
        (converter_path, display_path) = self.alter_config_and_load_prorietary_datatypes(datatypes_config, relative_install_dir, deactivate=deactivate)
        if (converter_path or display_path):
            repository_dict = self.create_repository_dict_for_proprietary_datatypes(tool_shed=repository.tool_shed, name=repository.name, owner=repository.owner, installed_changeset_revision=repository.installed_changeset_revision, tool_dicts=metadata.get('tools', []), converter_path=converter_path, display_path=display_path)
    return repository_dict
