/* launcher.c generated by valac 0.56.19, the Vala compiler
 * generated from launcher.vala, do not modify */

#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <glib-object.h>
#include <glib/gstdio.h>
#include <gee.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PROTON_PLUS_MODELS_LAUNCHER_0_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHER_FAMILY_ID_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHER_INSTANCE_ID_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_FAMILY_ID_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_ID_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHER_GAME_LIBRARY_AVAILABLE_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHER_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ProtonPlusModelsLauncherLoadGameLibraryData ProtonPlusModelsLauncherLoadGameLibraryData;
typedef struct _ProtonPlusModelsLauncherGetAllData ProtonPlusModelsLauncherGetAllData;
typedef struct _ProtonPlusModelsLauncherInitializeLaunchersData ProtonPlusModelsLauncherInitializeLaunchersData;
typedef struct _ProtonPlusModelsLauncherSetupProfileLibraryForTestData ProtonPlusModelsLauncherSetupProfileLibraryForTestData;
typedef struct _ProtonPlusModelsLauncherEnsureGroupDirectoryData ProtonPlusModelsLauncherEnsureGroupDirectoryData;

struct _ProtonPlusModelsLauncherPrivate {
	gchar* _family_id;
	gchar* _instance_id;
	gchar* _tool_target_family_id;
	gchar* _tool_target_id;
	gboolean _game_library_available;
};

struct _ProtonPlusModelsLauncherLoadGameLibraryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsLauncher* self;
	gboolean result;
};

struct _ProtonPlusModelsLauncherGetAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GeeLinkedList* launchers;
	gboolean result;
	GeeLinkedList* _launchers;
	GeeLinkedList* _tmp0_;
	ProtonPlusModelsProvidersProviderRegistry* definitions;
	ProtonPlusModelsProvidersProviderRegistry* _tmp1_;
	ProtonPlusModelsLauncher** candidates;
	ProtonPlusModelsLaunchersSteam* _tmp2_;
	ProtonPlusModelsLaunchersSteam* _tmp3_;
	ProtonPlusModelsLaunchersSteam* _tmp4_;
	ProtonPlusModelsLaunchersFaugusLauncher* _tmp5_;
	ProtonPlusModelsLaunchersFaugusLauncher* _tmp6_;
	ProtonPlusModelsLaunchersLutris* _tmp7_;
	ProtonPlusModelsLaunchersLutris* _tmp8_;
	ProtonPlusModelsLaunchersBottles* _tmp9_;
	ProtonPlusModelsLaunchersBottles* _tmp10_;
	ProtonPlusModelsLaunchersHeroicGamesLauncher* _tmp11_;
	ProtonPlusModelsLaunchersHeroicGamesLauncher* _tmp12_;
	ProtonPlusModelsLaunchersWineZGUI* _tmp13_;
	ProtonPlusModelsLaunchersWineZGUI* _tmp14_;
	ProtonPlusModelsLauncher** _tmp15_;
	gint candidates_length1;
	gint _candidates_size_;
	ProtonPlusModelsLauncher** _tmp16_;
	gint _tmp16__length1;
	ProtonPlusModelsLauncher** launcher_collection;
	gint launcher_collection_length1;
	gint _launcher_collection_size_;
	gint launcher_it;
	ProtonPlusModelsLauncher* _tmp17_;
	ProtonPlusModelsLauncher* launcher;
	ProtonPlusModelsLauncher* _tmp18_;
	GeeLinkedList* _tmp19_;
	ProtonPlusModelsLauncher* _tmp20_;
	GeeLinkedList* _tmp21_;
	gboolean _tmp22_;
	GeeLinkedList* _tmp23_;
	GeeLinkedList* _tmp24_;
	gint _tmp25_;
	gint _tmp26_;
	gboolean initialized;
	GeeLinkedList* _tmp27_;
	ProtonPlusModelsProvidersProviderRegistry* _tmp28_;
};

struct _ProtonPlusModelsLauncherInitializeLaunchersData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GeeLinkedList* launchers;
	ProtonPlusModelsProvidersProviderRegistry* definitions;
	gboolean result;
	GeeLinkedList* _launcher_list;
	gint _launcher_size;
	GeeLinkedList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _launcher_index;
	gint _tmp3_;
	gint _tmp4_;
	ProtonPlusModelsLauncher* launcher;
	GeeLinkedList* _tmp5_;
	gpointer _tmp6_;
	ProtonPlusModelsProvidersCategory* categories;
	ProtonPlusModelsLauncher* _tmp7_;
	gint _tmp8_;
	ProtonPlusModelsProvidersCategory* _tmp9_;
	gint categories_length1;
	gint _categories_size_;
	ProtonPlusModelsProvidersCategory* _tmp10_;
	gint _tmp10__length1;
	GeeArrayList* launcher_groups;
	GeeArrayList* _tmp11_;
	ProtonPlusModelsProvidersCategory* _tmp12_;
	gint _tmp12__length1;
	ProtonPlusModelsProvidersCategory* category_collection;
	gint category_collection_length1;
	gint _category_collection_size_;
	gint category_it;
	ProtonPlusModelsProvidersCategory category;
	gchar* group_title;
	gchar* _tmp13_;
	gchar* group_description;
	gchar* _tmp14_;
	gchar* group_directory;
	ProtonPlusModelsLauncher* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	ProtonPlusModelsLauncher* _tmp18_;
	const gchar* _tmp19_;
	ProtonPlusModelsLauncher* _tmp20_;
	const gchar* _tmp21_;
	ProtonPlusModelsLauncher* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	ProtonPlusModelsGroup* app_group;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	const gchar* _tmp31_;
	ProtonPlusModelsLauncher* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	ProtonPlusModelsGroup* _tmp35_;
	ProtonPlusModelsGroup* _tmp36_;
	ProtonPlusModelsGroup* _tmp37_;
	GeeLinkedList* _tmp38_;
	GeeLinkedList* _tmp39_;
	gint _tmp40_;
	ProtonPlusModelsProvidersProviderDefinition** _tmp41_;
	ProtonPlusModelsProvidersProviderDefinition** definition_collection;
	gint definition_collection_length1;
	gint _definition_collection_size_;
	gint definition_it;
	ProtonPlusModelsProvidersProviderDefinition* _tmp42_;
	ProtonPlusModelsProvidersProviderDefinition* definition;
	ProtonPlusModelsLauncher* _tmp43_;
	ProtonPlusModelsProvidersProviderDefinition* _tmp44_;
	ProtonPlusModelsToolsProviderTool* tool;
	ProtonPlusModelsProvidersProviderDefinition* _tmp45_;
	ProtonPlusModelsGroup* _tmp46_;
	ProtonPlusModelsToolsProviderTool* _tmp47_;
	ProtonPlusModelsToolsProviderTool* _tmp48_;
	ProtonPlusModelsGroup* _tmp49_;
	GeeLinkedList* _tmp50_;
	GeeLinkedList* _tmp51_;
	ProtonPlusModelsToolsProviderTool* _tmp52_;
	gboolean _tmp53_;
	ProtonPlusModelsLauncher* _tmp54_;
	ProtonPlusModelsGroup* _tmp55_;
	GeeLinkedList* _tmp56_;
	GeeLinkedList* _tmp57_;
	ProtonPlusModelsGroup* _tmp58_;
	ProtonPlusModelsToolsSteamTinkerLaunch* _tmp59_;
	ProtonPlusModelsToolsSteamTinkerLaunch* _tmp60_;
	GeeArrayList* _tmp61_;
	ProtonPlusModelsGroup* _tmp62_;
	ProtonPlusModelsLauncher* _tmp63_;
	GeeArrayList* _tmp64_;
	gint _tmp65_;
	gpointer* _tmp66_;
	ProtonPlusModelsLauncher* _tmp67_;
	ProtonPlusModelsLauncher* _tmp68_;
};

struct _ProtonPlusModelsLauncherSetupProfileLibraryForTestData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsLauncher* self;
	gboolean result;
	gboolean games_loaded;
	ProtonPlusModelsLaunchersSteam* steam_launcher;
	ProtonPlusModelsLaunchersSteam* _tmp0_;
	GList* discovered_profiles;
	ProtonPlusModelsLaunchersSteam* _tmp1_;
	GList* _tmp2_;
	ProtonPlusModelsLaunchersSteam* _tmp3_;
	GList* _tmp4_;
	GList* profile_collection;
	GList* profile_it;
	ProtonPlusModelsSteamProfile* _tmp5_;
	ProtonPlusModelsSteamProfile* profile;
	ProtonPlusModelsSteamProfile* _tmp6_;
	ProtonPlusModelsLaunchersSteam* _tmp7_;
	ProtonPlusModelsSteamProfile* _tmp8_;
	ProtonPlusModelsSteamProfile* _tmp9_;
	ProtonPlusModelsLaunchersSteam* _tmp10_;
	GList* _tmp11_;
	gchar* _tmp12_;
	GSettings* _tmp13_;
	GSettings* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* selected_profile_id;
	gchar* _tmp17_;
	ProtonPlusModelsSteamProfile* selected_profile;
	ProtonPlusModelsLaunchersSteam* _tmp18_;
	const gchar* _tmp19_;
	ProtonPlusModelsSteamProfile* _tmp20_;
	ProtonPlusModelsSteamProfile* _tmp21_;
	ProtonPlusModelsSteamProfile* _tmp22_;
	ProtonPlusModelsSteamProfile* _tmp23_;
	ProtonPlusModelsLaunchersSteam* _tmp24_;
	GList* _tmp25_;
	gconstpointer _tmp26_;
	ProtonPlusModelsLaunchersSteam* _tmp27_;
};

struct _ProtonPlusModelsLauncherEnsureGroupDirectoryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsLauncher* self;
	gchar* group_directory;
	gboolean result;
	gchar* target_directory;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
};

static gint ProtonPlusModelsLauncher_private_offset;
static gpointer proton_plus_models_launcher_parent_class = NULL;

static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void proton_plus_models_launcher_set_family_id (ProtonPlusModelsLauncher* self,
                                                const gchar* value);
static gchar* proton_plus_models_launcher_get_installation_type_id (ProtonPlusModelsLauncherInstallationTypes installation_type);
static void proton_plus_models_launcher_set_instance_id (ProtonPlusModelsLauncher* self,
                                                  const gchar* value);
static void proton_plus_models_launcher_set_tool_target_family_id (ProtonPlusModelsLauncher* self,
                                                            const gchar* value);
static void proton_plus_models_launcher_set_tool_target_id (ProtonPlusModelsLauncher* self,
                                                     const gchar* value);
static void proton_plus_models_launcher_real_load_game_library_data_free (gpointer _data);
static void proton_plus_models_launcher_real_load_game_library (ProtonPlusModelsLauncher* self,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static gboolean proton_plus_models_launcher_real_load_game_library_co (ProtonPlusModelsLauncherLoadGameLibraryData* _data_);
static ProtonPlusModelsSteamRestartTarget* proton_plus_models_launcher_real_get_steam_restart_target (ProtonPlusModelsLauncher* self);
static void proton_plus_models_launcher_get_all_data_free (gpointer _data);
static gboolean proton_plus_models_launcher_get_all_co (ProtonPlusModelsLauncherGetAllData* _data_);
static void proton_plus_models_launcher_get_all_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
static void proton_plus_models_launcher_initialize_launchers_data_free (gpointer _data);
static gboolean proton_plus_models_launcher_initialize_launchers_co (ProtonPlusModelsLauncherInitializeLaunchersData* _data_);
static ProtonPlusModelsProvidersCategory* proton_plus_models_launcher_get_categories_for_launcher (ProtonPlusModelsLauncher* launcher,
                                                                                            gint* result_length1);
static gchar* proton_plus_models_launcher_get_group_title (ProtonPlusModelsProvidersCategory category);
static gchar* proton_plus_models_launcher_get_group_description (ProtonPlusModelsProvidersCategory category);
static gchar* proton_plus_models_launcher_get_group_directory (ProtonPlusModelsLauncher* launcher,
                                                        ProtonPlusModelsProvidersCategory category);
static void proton_plus_models_launcher_initialize_launchers_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_);
static gchar* proton_plus_models_launcher_get_group_id (ProtonPlusModelsProvidersCategory category);
static void proton_plus_models_launcher_real_setup_profile_library_for_test_data_free (gpointer _data);
static void proton_plus_models_launcher_real_setup_profile_library_for_test (ProtonPlusModelsLauncher* self,
                                                                      GAsyncReadyCallback _callback_,
                                                                      gpointer _user_data_);
static gboolean proton_plus_models_launcher_real_setup_profile_library_for_test_co (ProtonPlusModelsLauncherSetupProfileLibraryForTestData* _data_);
static void proton_plus_models_launcher_set_game_library_available (ProtonPlusModelsLauncher* self,
                                                             gboolean value);
static void proton_plus_models_launcher_setup_profile_library_for_test_ready (GObject* source_object,
                                                                       GAsyncResult* _res_,
                                                                       gpointer _user_data_);
static GList* proton_plus_models_launcher_real_get_managed_tool_directories (ProtonPlusModelsLauncher* self,
                                                                      ProtonPlusModelsGroup* group);
static gchar* proton_plus_models_launcher_real_get_primary_managed_tool_directory (ProtonPlusModelsLauncher* self,
                                                                            ProtonPlusModelsGroup* group);
static void proton_plus_models_launcher_real_ensure_group_directory_data_free (gpointer _data);
static void proton_plus_models_launcher_real_ensure_group_directory (ProtonPlusModelsLauncher* self,
                                                              const gchar* group_directory,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static gboolean proton_plus_models_launcher_real_ensure_group_directory_co (ProtonPlusModelsLauncherEnsureGroupDirectoryData* _data_);
static void proton_plus_models_launcher_ensure_group_directory_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_);
static gchar* proton_plus_models_launcher_real_get_install_target_error (ProtonPlusModelsLauncher* self,
                                                                  const gchar* target_directory);
static gboolean proton_plus_models_launcher_real_supports_provider_definition (ProtonPlusModelsLauncher* self,
                                                                        ProtonPlusModelsProvidersProviderDefinition* definition);
static gint proton_plus_models_launcher_real_get_compatibility_tool_usage_count (ProtonPlusModelsLauncher* self,
                                                                          const gchar* compatibility_tool_name);
static void proton_plus_models_launcher_real_register_compatibility_tool_from_path (ProtonPlusModelsLauncher* self,
                                                                             const gchar* tool_path);
static void proton_plus_models_launcher_real_unregister_compatibility_tool_by_path (ProtonPlusModelsLauncher* self,
                                                                             const gchar* tool_path);
static void proton_plus_models_launcher_finalize (GObject * obj);
static GType proton_plus_models_launcher_get_type_once (void);
static void _vala_proton_plus_models_launcher_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_proton_plus_models_launcher_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_models_launcher_get_instance_private (ProtonPlusModelsLauncher* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsLauncher_private_offset);
}

static GType
proton_plus_models_launcher_installation_types_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM, "PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM", "system"}, {PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK, "PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK", "flatpak"}, {PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP, "PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP", "snap"}, {0, NULL, NULL}};
	GType proton_plus_models_launcher_installation_types_type_id;
	proton_plus_models_launcher_installation_types_type_id = g_enum_register_static ("ProtonPlusModelsLauncherInstallationTypes", values);
	return proton_plus_models_launcher_installation_types_type_id;
}

GType
proton_plus_models_launcher_installation_types_get_type (void)
{
	static volatile gsize proton_plus_models_launcher_installation_types_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_launcher_installation_types_type_id__once)) {
		GType proton_plus_models_launcher_installation_types_type_id;
		proton_plus_models_launcher_installation_types_type_id = proton_plus_models_launcher_installation_types_get_type_once ();
		g_once_init_leave (&proton_plus_models_launcher_installation_types_type_id__once, proton_plus_models_launcher_installation_types_type_id);
	}
	return proton_plus_models_launcher_installation_types_type_id__once;
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

ProtonPlusModelsLauncher*
proton_plus_models_launcher_construct (GType object_type,
                                       const gchar* title,
                                       ProtonPlusModelsLauncherInstallationTypes installation_type,
                                       const gchar* icon_path,
                                       gchar** directories,
                                       gint directories_length1,
                                       const gchar* family_id,
                                       gchar** detection_markers,
                                       gint detection_markers_length1,
                                       const gchar* tool_target_directory,
                                       const gchar* tool_target_family_id,
                                       const gchar* tool_target_id)
{
	ProtonPlusModelsLauncher * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean installed = FALSE;
	GeeLinkedList* _tmp26_;
	ProtonPlusModelsGroup** _tmp27_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (icon_path != NULL, NULL);
	g_return_val_if_fail (family_id != NULL, NULL);
	self = (ProtonPlusModelsLauncher*) g_object_new (object_type, NULL);
	proton_plus_models_launcher_set_family_id (self, family_id);
	_tmp0_ = proton_plus_models_launcher_get_installation_type_id (installation_type);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf ("%s-%s", family_id, _tmp1_);
	_tmp3_ = _tmp2_;
	proton_plus_models_launcher_set_instance_id (self, _tmp3_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	_tmp4_ = tool_target_family_id;
	if (_tmp4_ == NULL) {
		_tmp4_ = family_id;
	}
	proton_plus_models_launcher_set_tool_target_family_id (self, _tmp4_);
	_tmp5_ = tool_target_id;
	if (_tmp5_ == NULL) {
		const gchar* _tmp6_;
		_tmp6_ = self->priv->_instance_id;
		_tmp5_ = _tmp6_;
	}
	proton_plus_models_launcher_set_tool_target_id (self, _tmp5_);
	_tmp7_ = g_strdup (title);
	_g_free0 (self->title);
	self->title = _tmp7_;
	self->installation_type = installation_type;
	_tmp8_ = g_strdup (icon_path);
	_g_free0 (self->icon_path);
	self->icon_path = _tmp8_;
	_tmp9_ = g_strdup ("");
	_g_free0 (self->directory);
	self->directory = _tmp9_;
	installed = FALSE;
	if (detection_markers != NULL) {
		{
			gchar** marker_collection = NULL;
			gint marker_collection_length1 = 0;
			gint _marker_collection_size_ = 0;
			gint marker_it = 0;
			marker_collection = detection_markers;
			marker_collection_length1 = detection_markers_length1;
			for (marker_it = 0; marker_it < marker_collection_length1; marker_it = marker_it + 1) {
				gchar* _tmp10_;
				gchar* marker = NULL;
				_tmp10_ = g_strdup (marker_collection[marker_it]);
				marker = _tmp10_;
				{
					const gchar* _tmp11_;
					_tmp11_ = marker;
					if (!g_file_test (_tmp11_, G_FILE_TEST_EXISTS)) {
						_g_free0 (marker);
						continue;
					}
					installed = TRUE;
					_g_free0 (marker);
					break;
				}
			}
		}
	} else {
		{
			gchar** current_path_collection = NULL;
			gint current_path_collection_length1 = 0;
			gint _current_path_collection_size_ = 0;
			gint current_path_it = 0;
			current_path_collection = directories;
			current_path_collection_length1 = directories_length1;
			for (current_path_it = 0; current_path_it < current_path_collection_length1; current_path_it = current_path_it + 1) {
				gchar* _tmp12_;
				gchar* current_path = NULL;
				_tmp12_ = g_strdup (current_path_collection[current_path_it]);
				current_path = _tmp12_;
				{
					const gchar* _tmp13_;
					gboolean _tmp14_ = FALSE;
					gboolean steam_installation_valid = FALSE;
					const gchar* _tmp23_;
					gchar* _tmp24_;
					_tmp13_ = current_path;
					if (!g_file_test (_tmp13_, G_FILE_TEST_IS_DIR)) {
						_g_free0 (current_path);
						continue;
					}
					if (!PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (self)) {
						_tmp14_ = TRUE;
					} else {
						gboolean _tmp15_ = FALSE;
						const gchar* _tmp16_;
						gchar* _tmp17_;
						gchar* _tmp18_;
						gboolean _tmp19_;
						_tmp16_ = current_path;
						_tmp17_ = g_build_filename (_tmp16_, "steamclient.dll", NULL);
						_tmp18_ = _tmp17_;
						_tmp19_ = g_file_test (_tmp18_, G_FILE_TEST_IS_REGULAR);
						_g_free0 (_tmp18_);
						if (_tmp19_) {
							const gchar* _tmp20_;
							gchar* _tmp21_;
							gchar* _tmp22_;
							_tmp20_ = current_path;
							_tmp21_ = g_build_filename (_tmp20_, "steamclient64.dll", NULL);
							_tmp22_ = _tmp21_;
							_tmp15_ = g_file_test (_tmp22_, G_FILE_TEST_IS_REGULAR);
							_g_free0 (_tmp22_);
						} else {
							_tmp15_ = FALSE;
						}
						_tmp14_ = _tmp15_;
					}
					steam_installation_valid = _tmp14_;
					if (!steam_installation_valid) {
						_g_free0 (current_path);
						continue;
					}
					_tmp23_ = current_path;
					_tmp24_ = g_strdup (_tmp23_);
					_g_free0 (self->directory);
					self->directory = _tmp24_;
					installed = TRUE;
					_g_free0 (current_path);
					break;
				}
			}
		}
	}
	if (tool_target_directory != NULL) {
		gchar* _tmp25_;
		_tmp25_ = g_strdup (tool_target_directory);
		_g_free0 (self->directory);
		self->directory = _tmp25_;
	}
	_tmp26_ = gee_linked_list_new (PROTON_PLUS_MODELS_TYPE_COMPATIBILITY_TOOL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->compatibility_tools);
	self->compatibility_tools = _tmp26_;
	(self->games == NULL) ? NULL : (self->games = (_g_list_free__g_object_unref0_ (self->games), NULL));
	self->games = NULL;
	_tmp27_ = g_new0 (ProtonPlusModelsGroup*, 0 + 1);
	self->groups = (_vala_array_free (self->groups, self->groups_length1, (GDestroyNotify) g_object_unref), NULL);
	self->groups = _tmp27_;
	self->groups_length1 = 0;
	self->installed = installed;
	return self;
}

ProtonPlusModelsLauncher*
proton_plus_models_launcher_new (const gchar* title,
                                 ProtonPlusModelsLauncherInstallationTypes installation_type,
                                 const gchar* icon_path,
                                 gchar** directories,
                                 gint directories_length1,
                                 const gchar* family_id,
                                 gchar** detection_markers,
                                 gint detection_markers_length1,
                                 const gchar* tool_target_directory,
                                 const gchar* tool_target_family_id,
                                 const gchar* tool_target_id)
{
	return proton_plus_models_launcher_construct (PROTON_PLUS_MODELS_TYPE_LAUNCHER, title, installation_type, icon_path, directories, directories_length1, family_id, detection_markers, detection_markers_length1, tool_target_directory, tool_target_family_id, tool_target_id);
}

gchar*
proton_plus_models_launcher_get_installation_type_title (ProtonPlusModelsLauncher* self)
{
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	switch (self->installation_type) {
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("System");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("Flatpak");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("Snap");
			result = _tmp2_;
			return result;
		}
		default:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("Invalid type");
			result = _tmp3_;
			return result;
		}
	}
}

static gchar*
proton_plus_models_launcher_get_installation_type_id (ProtonPlusModelsLauncherInstallationTypes installation_type)
{
	gchar* result;
	switch (installation_type) {
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("system");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("flatpak");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("snap");
			result = _tmp2_;
			return result;
		}
		default:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("unknown");
			result = _tmp3_;
			return result;
		}
	}
}

static void
proton_plus_models_launcher_real_load_game_library_data_free (gpointer _data)
{
	ProtonPlusModelsLauncherLoadGameLibraryData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusModelsLauncherLoadGameLibraryData, _data_);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
proton_plus_models_launcher_real_load_game_library (ProtonPlusModelsLauncher* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	ProtonPlusModelsLauncherLoadGameLibraryData* _data_;
	ProtonPlusModelsLauncher* _tmp0_;
	_data_ = g_slice_new0 (ProtonPlusModelsLauncherLoadGameLibraryData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_launcher_real_load_game_library_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_models_launcher_real_load_game_library_co (_data_);
}

static gboolean
proton_plus_models_launcher_real_load_game_library_finish (ProtonPlusModelsLauncher* self,
                                                           GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusModelsLauncherLoadGameLibraryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
proton_plus_models_launcher_real_load_game_library_co (ProtonPlusModelsLauncherLoadGameLibraryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = TRUE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
proton_plus_models_launcher_load_game_library (ProtonPlusModelsLauncher* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	ProtonPlusModelsLauncherClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->load_game_library) {
		_klass_->load_game_library (self, _callback_, _user_data_);
	}
}

gboolean
proton_plus_models_launcher_load_game_library_finish (ProtonPlusModelsLauncher* self,
                                                      GAsyncResult* _res_)
{
	ProtonPlusModelsLauncherClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->load_game_library_finish) {
		return _klass_->load_game_library_finish (self, _res_);
	}
	return FALSE;
}

static ProtonPlusModelsSteamRestartTarget*
proton_plus_models_launcher_real_get_steam_restart_target (ProtonPlusModelsLauncher* self)
{
	ProtonPlusModelsSteamRestartTarget* result;
	result = NULL;
	return result;
}

ProtonPlusModelsSteamRestartTarget*
proton_plus_models_launcher_get_steam_restart_target (ProtonPlusModelsLauncher* self)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->get_steam_restart_target) {
		return _klass_->get_steam_restart_target (self);
	}
	return NULL;
}

static void
proton_plus_models_launcher_get_all_data_free (gpointer _data)
{
	ProtonPlusModelsLauncherGetAllData* _data_;
	_data_ = _data;
	g_slice_free (ProtonPlusModelsLauncherGetAllData, _data_);
}

void
proton_plus_models_launcher_get_all (GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	ProtonPlusModelsLauncherGetAllData* _data_;
	_data_ = g_slice_new0 (ProtonPlusModelsLauncherGetAllData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_launcher_get_all_data_free);
	proton_plus_models_launcher_get_all_co (_data_);
}

gboolean
proton_plus_models_launcher_get_all_finish (GAsyncResult* _res_,
                                            GeeLinkedList** launchers)
{
	gboolean result;
	ProtonPlusModelsLauncherGetAllData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (launchers) {
		*launchers = _data_->launchers;
	} else {
		_g_object_unref0 (_data_->launchers);
	}
	_data_->launchers = NULL;
	result = _data_->result;
	return result;
}

static void
proton_plus_models_launcher_get_all_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	ProtonPlusModelsLauncherGetAllData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_launcher_get_all_co (_data_);
}

static gboolean
proton_plus_models_launcher_get_all_co (ProtonPlusModelsLauncherGetAllData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gee_linked_list_new (PROTON_PLUS_MODELS_TYPE_LAUNCHER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data_->_launchers = _data_->_tmp0_;
	_data_->_tmp1_ = proton_plus_models_providers_provider_registry_new (NULL, 0);
	_data_->definitions = _data_->_tmp1_;
	_data_->_tmp2_ = proton_plus_models_launchers_steam_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM, NULL, NULL);
	_data_->_tmp3_ = proton_plus_models_launchers_steam_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK, NULL, NULL);
	_data_->_tmp4_ = proton_plus_models_launchers_steam_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP, NULL, NULL);
	_data_->_tmp5_ = proton_plus_models_launchers_faugus_launcher_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM, NULL, NULL, NULL, NULL, NULL);
	_data_->_tmp6_ = proton_plus_models_launchers_faugus_launcher_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK, NULL, NULL, NULL, NULL, NULL);
	_data_->_tmp7_ = proton_plus_models_launchers_lutris_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM);
	_data_->_tmp8_ = proton_plus_models_launchers_lutris_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK);
	_data_->_tmp9_ = proton_plus_models_launchers_bottles_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM);
	_data_->_tmp10_ = proton_plus_models_launchers_bottles_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK);
	_data_->_tmp11_ = proton_plus_models_launchers_heroic_games_launcher_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM);
	_data_->_tmp12_ = proton_plus_models_launchers_heroic_games_launcher_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK);
	_data_->_tmp13_ = proton_plus_models_launchers_wine_zgui_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM);
	_data_->_tmp14_ = proton_plus_models_launchers_wine_zgui_new (PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK);
	_data_->_tmp15_ = g_new0 (ProtonPlusModelsLauncher*, 13 + 1);
	_data_->_tmp15_[0] = (ProtonPlusModelsLauncher*) _data_->_tmp2_;
	_data_->_tmp15_[1] = (ProtonPlusModelsLauncher*) _data_->_tmp3_;
	_data_->_tmp15_[2] = (ProtonPlusModelsLauncher*) _data_->_tmp4_;
	_data_->_tmp15_[3] = (ProtonPlusModelsLauncher*) _data_->_tmp5_;
	_data_->_tmp15_[4] = (ProtonPlusModelsLauncher*) _data_->_tmp6_;
	_data_->_tmp15_[5] = (ProtonPlusModelsLauncher*) _data_->_tmp7_;
	_data_->_tmp15_[6] = (ProtonPlusModelsLauncher*) _data_->_tmp8_;
	_data_->_tmp15_[7] = (ProtonPlusModelsLauncher*) _data_->_tmp9_;
	_data_->_tmp15_[8] = (ProtonPlusModelsLauncher*) _data_->_tmp10_;
	_data_->_tmp15_[9] = (ProtonPlusModelsLauncher*) _data_->_tmp11_;
	_data_->_tmp15_[10] = (ProtonPlusModelsLauncher*) _data_->_tmp12_;
	_data_->_tmp15_[11] = (ProtonPlusModelsLauncher*) _data_->_tmp13_;
	_data_->_tmp15_[12] = (ProtonPlusModelsLauncher*) _data_->_tmp14_;
	_data_->candidates = _data_->_tmp15_;
	_data_->candidates_length1 = 13;
	_data_->_candidates_size_ = _data_->candidates_length1;
	_data_->_tmp16_ = _data_->candidates;
	_data_->_tmp16__length1 = _data_->candidates_length1;
	{
		_data_->launcher_collection_length1 = 0;
		_data_->_launcher_collection_size_ = 0;
		_data_->launcher_collection = _data_->_tmp16_;
		_data_->launcher_collection_length1 = _data_->_tmp16__length1;
		for (_data_->launcher_it = 0; _data_->launcher_it < _data_->launcher_collection_length1; _data_->launcher_it = _data_->launcher_it + 1) {
			_data_->_tmp17_ = _g_object_ref0 (_data_->launcher_collection[_data_->launcher_it]);
			_data_->launcher = _data_->_tmp17_;
			{
				_data_->_tmp18_ = _data_->launcher;
				if (_data_->_tmp18_->installed) {
					_data_->_tmp19_ = _data_->_launchers;
					_data_->_tmp20_ = _data_->launcher;
					gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp19_, _data_->_tmp20_);
				}
				_g_object_unref0 (_data_->launcher);
			}
		}
	}
	_data_->_tmp21_ = _data_->_launchers;
	_data_->_launchers = NULL;
	_g_object_unref0 (_data_->launchers);
	_data_->launchers = _data_->_tmp21_;
	_data_->_tmp23_ = _data_->launchers;
	if (_data_->_tmp23_ == NULL) {
		_data_->_tmp22_ = TRUE;
	} else {
		_data_->_tmp24_ = _data_->launchers;
		_data_->_tmp25_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp24_);
		_data_->_tmp26_ = _data_->_tmp25_;
		_data_->_tmp22_ = _data_->_tmp26_ == 0;
	}
	if (_data_->_tmp22_) {
		_data_->result = TRUE;
		_data_->candidates = (_vala_array_free (_data_->candidates, _data_->candidates_length1, (GDestroyNotify) g_object_unref), NULL);
		_g_object_unref0 (_data_->definitions);
		_g_object_unref0 (_data_->_launchers);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp27_ = _data_->launchers;
	_data_->_tmp28_ = _data_->definitions;
	_data_->_state_ = 1;
	proton_plus_models_launcher_initialize_launchers (_data_->_tmp27_, _data_->_tmp28_, proton_plus_models_launcher_get_all_ready, _data_);
	return FALSE;
	_state_1:
	_data_->initialized = proton_plus_models_launcher_initialize_launchers_finish (_data_->_res_);
	if (!_data_->initialized) {
		_data_->result = FALSE;
		_data_->candidates = (_vala_array_free (_data_->candidates, _data_->candidates_length1, (GDestroyNotify) g_object_unref), NULL);
		_g_object_unref0 (_data_->definitions);
		_g_object_unref0 (_data_->_launchers);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = TRUE;
	_data_->candidates = (_vala_array_free (_data_->candidates, _data_->candidates_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (_data_->definitions);
	_g_object_unref0 (_data_->_launchers);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_models_launcher_initialize_launchers_data_free (gpointer _data)
{
	ProtonPlusModelsLauncherInitializeLaunchersData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->launchers);
	_g_object_unref0 (_data_->definitions);
	g_slice_free (ProtonPlusModelsLauncherInitializeLaunchersData, _data_);
}

void
proton_plus_models_launcher_initialize_launchers (GeeLinkedList* launchers,
                                                  ProtonPlusModelsProvidersProviderRegistry* definitions,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	ProtonPlusModelsLauncherInitializeLaunchersData* _data_;
	GeeLinkedList* _tmp0_;
	ProtonPlusModelsProvidersProviderRegistry* _tmp1_;
	g_return_if_fail (launchers != NULL);
	g_return_if_fail (definitions != NULL);
	_data_ = g_slice_new0 (ProtonPlusModelsLauncherInitializeLaunchersData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_launcher_initialize_launchers_data_free);
	_tmp0_ = _g_object_ref0 (launchers);
	_g_object_unref0 (_data_->launchers);
	_data_->launchers = _tmp0_;
	_tmp1_ = _g_object_ref0 (definitions);
	_g_object_unref0 (_data_->definitions);
	_data_->definitions = _tmp1_;
	proton_plus_models_launcher_initialize_launchers_co (_data_);
}

gboolean
proton_plus_models_launcher_initialize_launchers_finish (GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusModelsLauncherInitializeLaunchersData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_models_launcher_initialize_launchers_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_)
{
	ProtonPlusModelsLauncherInitializeLaunchersData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_launcher_initialize_launchers_co (_data_);
}

static gboolean
proton_plus_models_launcher_initialize_launchers_co (ProtonPlusModelsLauncherInitializeLaunchersData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_launcher_list = _data_->launchers;
		_data_->_tmp0_ = _data_->_launcher_list;
		_data_->_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp0_);
		_data_->_tmp2_ = _data_->_tmp1_;
		_data_->_launcher_size = _data_->_tmp2_;
		_data_->_launcher_index = -1;
		while (TRUE) {
			_data_->_launcher_index = _data_->_launcher_index + 1;
			_data_->_tmp3_ = _data_->_launcher_index;
			_data_->_tmp4_ = _data_->_launcher_size;
			if (!(_data_->_tmp3_ < _data_->_tmp4_)) {
				break;
			}
			_data_->_tmp5_ = _data_->_launcher_list;
			_data_->_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp5_, _data_->_launcher_index);
			_data_->launcher = (ProtonPlusModelsLauncher*) _data_->_tmp6_;
			_data_->_tmp7_ = _data_->launcher;
			_data_->_tmp8_ = 0;
			_data_->_tmp9_ = proton_plus_models_launcher_get_categories_for_launcher (_data_->_tmp7_, &_data_->_tmp8_);
			_data_->categories = _data_->_tmp9_;
			_data_->categories_length1 = _data_->_tmp8_;
			_data_->_categories_size_ = _data_->categories_length1;
			_data_->_tmp10_ = _data_->categories;
			_data_->_tmp10__length1 = _data_->categories_length1;
			if (_data_->_tmp10_ == NULL) {
				_data_->result = FALSE;
				_data_->categories = (g_free (_data_->categories), NULL);
				_g_object_unref0 (_data_->launcher);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_data_->_tmp11_ = gee_array_list_new (PROTON_PLUS_MODELS_TYPE_GROUP, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
			_data_->launcher_groups = _data_->_tmp11_;
			_data_->_tmp12_ = _data_->categories;
			_data_->_tmp12__length1 = _data_->categories_length1;
			{
				_data_->category_collection_length1 = 0;
				_data_->_category_collection_size_ = 0;
				_data_->category_collection = _data_->_tmp12_;
				_data_->category_collection_length1 = _data_->_tmp12__length1;
				for (_data_->category_it = 0; _data_->category_it < _data_->category_collection_length1; _data_->category_it = _data_->category_it + 1) {
					_data_->category = _data_->category_collection[_data_->category_it];
					{
						_data_->_tmp13_ = proton_plus_models_launcher_get_group_title (_data_->category);
						_data_->group_title = _data_->_tmp13_;
						_data_->_tmp14_ = proton_plus_models_launcher_get_group_description (_data_->category);
						_data_->group_description = _data_->_tmp14_;
						_data_->_tmp15_ = _data_->launcher;
						_data_->_tmp16_ = proton_plus_models_launcher_get_group_directory (_data_->_tmp15_, _data_->category);
						_data_->group_directory = _data_->_tmp16_;
						_data_->_tmp17_ = _data_->group_directory;
						if (_data_->_tmp17_ == NULL) {
							_data_->result = FALSE;
							_g_free0 (_data_->group_directory);
							_g_free0 (_data_->group_description);
							_g_free0 (_data_->group_title);
							_g_object_unref0 (_data_->launcher_groups);
							_data_->categories = (g_free (_data_->categories), NULL);
							_g_object_unref0 (_data_->launcher);
							g_task_return_pointer (_data_->_async_result, _data_, NULL);
							if (_data_->_state_ != 0) {
								while (!g_task_get_completed (_data_->_async_result)) {
									g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
								}
							}
							g_object_unref (_data_->_async_result);
							return FALSE;
						}
						_data_->_tmp18_ = _data_->launcher;
						_data_->_tmp19_ = _data_->group_directory;
						_data_->_state_ = 1;
						proton_plus_models_launcher_ensure_group_directory (_data_->_tmp18_, _data_->_tmp19_, proton_plus_models_launcher_initialize_launchers_ready, _data_);
						return FALSE;
						_state_1:
						if (!proton_plus_models_launcher_ensure_group_directory_finish (_data_->_tmp18_, _data_->_res_)) {
							_data_->_tmp20_ = _data_->launcher;
							_data_->_tmp21_ = _data_->_tmp20_->priv->_instance_id;
							_data_->_tmp22_ = _data_->launcher;
							_data_->_tmp23_ = _data_->_tmp22_->directory;
							_data_->_tmp24_ = _data_->group_directory;
							_data_->_tmp25_ = g_strconcat (_data_->_tmp23_, _data_->_tmp24_, NULL);
							_data_->_tmp26_ = _data_->_tmp25_;
							g_warning ("launcher.vala:180: Could not prepare group directory for launcher '%s'" \
": %s", _data_->_tmp21_, _data_->_tmp26_);
							_g_free0 (_data_->_tmp26_);
						}
						_data_->_tmp27_ = _data_->group_title;
						_data_->_tmp28_ = _data_->group_description;
						_data_->_tmp29_ = proton_plus_utils_safe_translate (_data_->_tmp28_);
						_data_->_tmp30_ = _data_->_tmp29_;
						_data_->_tmp31_ = _data_->group_directory;
						_data_->_tmp32_ = _data_->launcher;
						_data_->_tmp33_ = proton_plus_models_launcher_get_group_id (_data_->category);
						_data_->_tmp34_ = _data_->_tmp33_;
						_data_->_tmp35_ = proton_plus_models_group_new (_data_->_tmp27_, _data_->_tmp30_, _data_->_tmp31_, _data_->_tmp32_, _data_->_tmp34_);
						_data_->_tmp36_ = _data_->_tmp35_;
						_g_free0 (_data_->_tmp34_);
						_g_free0 (_data_->_tmp30_);
						_data_->app_group = _data_->_tmp36_;
						_data_->_tmp37_ = _data_->app_group;
						_data_->_tmp38_ = gee_linked_list_new (PROTON_PLUS_MODELS_TYPE_TOOL, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
						_data_->_tmp39_ = _data_->_tmp38_;
						proton_plus_models_group_set_tools (_data_->_tmp37_, _data_->_tmp39_);
						_g_object_unref0 (_data_->_tmp39_);
						_data_->_tmp40_ = 0;
						_data_->_tmp41_ = proton_plus_models_providers_provider_registry_get (_data_->definitions, _data_->category, &_data_->_tmp40_);
						{
							_data_->definition_collection_length1 = 0;
							_data_->_definition_collection_size_ = 0;
							_data_->definition_collection = _data_->_tmp41_;
							_data_->definition_collection_length1 = _data_->_tmp40_;
							for (_data_->definition_it = 0; _data_->definition_it < _data_->definition_collection_length1; _data_->definition_it = _data_->definition_it + 1) {
								_data_->_tmp42_ = _g_object_ref0 (_data_->definition_collection[_data_->definition_it]);
								_data_->definition = _data_->_tmp42_;
								{
									_data_->_tmp43_ = _data_->launcher;
									_data_->_tmp44_ = _data_->definition;
									if (!proton_plus_models_launcher_supports_provider_definition (_data_->_tmp43_, _data_->_tmp44_)) {
										_g_object_unref0 (_data_->definition);
										continue;
									}
									_data_->_tmp45_ = _data_->definition;
									_data_->_tmp46_ = _data_->app_group;
									_data_->_tmp47_ = proton_plus_models_providers_provider_catalog_create_tool (_data_->_tmp45_, _data_->_tmp46_);
									_data_->tool = _data_->_tmp47_;
									_data_->_tmp48_ = _data_->tool;
									if (_data_->_tmp48_ != NULL) {
										_data_->_tmp49_ = _data_->app_group;
										_data_->_tmp50_ = proton_plus_models_group_get_tools (_data_->_tmp49_);
										_data_->_tmp51_ = _data_->_tmp50_;
										_data_->_tmp52_ = _data_->tool;
										gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp51_, (ProtonPlusModelsTool*) _data_->_tmp52_);
									}
									_g_object_unref0 (_data_->tool);
									_g_object_unref0 (_data_->definition);
								}
							}
							_data_->definition_collection = (_vala_array_free (_data_->definition_collection, _data_->definition_collection_length1, (GDestroyNotify) g_object_unref), NULL);
						}
						_data_->_tmp54_ = _data_->launcher;
						if (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_data_->_tmp54_)) {
							_data_->_tmp53_ = _data_->category == PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON;
						} else {
							_data_->_tmp53_ = FALSE;
						}
						if (_data_->_tmp53_) {
							_data_->_tmp55_ = _data_->app_group;
							_data_->_tmp56_ = proton_plus_models_group_get_tools (_data_->_tmp55_);
							_data_->_tmp57_ = _data_->_tmp56_;
							_data_->_tmp58_ = _data_->app_group;
							_data_->_tmp59_ = proton_plus_models_tools_steam_tinker_launch_new (_data_->_tmp58_);
							_data_->_tmp60_ = _data_->_tmp59_;
							gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp57_, (ProtonPlusModelsTool*) _data_->_tmp60_);
							_g_object_unref0 (_data_->_tmp60_);
						}
						_data_->_tmp61_ = _data_->launcher_groups;
						_data_->_tmp62_ = _data_->app_group;
						gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp61_, _data_->_tmp62_);
						_g_object_unref0 (_data_->app_group);
						_g_free0 (_data_->group_directory);
						_g_free0 (_data_->group_description);
						_g_free0 (_data_->group_title);
					}
				}
			}
			_data_->_tmp63_ = _data_->launcher;
			_data_->_tmp64_ = _data_->launcher_groups;
			_data_->_tmp65_ = 0;
			_data_->_tmp66_ = gee_collection_to_array ((GeeCollection*) _data_->_tmp64_, &_data_->_tmp65_);
			_data_->_tmp63_->groups = (_vala_array_free (_data_->_tmp63_->groups, _data_->_tmp63_->groups_length1, (GDestroyNotify) g_object_unref), NULL);
			_data_->_tmp63_->groups = _data_->_tmp66_;
			_data_->_tmp63_->groups_length1 = _data_->_tmp65_;
			_data_->_tmp67_ = _data_->launcher;
			if (_data_->_tmp67_->installed) {
				_data_->_tmp68_ = _data_->launcher;
				_data_->_state_ = 2;
				proton_plus_models_launcher_setup_profile_library_for_test (_data_->_tmp68_, proton_plus_models_launcher_initialize_launchers_ready, _data_);
				return FALSE;
				_state_2:
				proton_plus_models_launcher_setup_profile_library_for_test_finish (_data_->_tmp68_, _data_->_res_);
			}
			_g_object_unref0 (_data_->launcher_groups);
			_data_->categories = (g_free (_data_->categories), NULL);
			_g_object_unref0 (_data_->launcher);
		}
	}
	_data_->result = TRUE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static ProtonPlusModelsProvidersCategory*
proton_plus_models_launcher_get_categories_for_launcher (ProtonPlusModelsLauncher* launcher,
                                                         gint* result_length1)
{
	gboolean _tmp0_ = FALSE;
	ProtonPlusModelsProvidersCategory* _tmp11_;
	gint _tmp11__length1;
	ProtonPlusModelsProvidersCategory* result;
	g_return_val_if_fail (launcher != NULL, NULL);
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (launcher)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = PROTON_PLUS_MODELS_LAUNCHERS_IS_FAUGUS_LAUNCHER (launcher);
	}
	if (_tmp0_) {
		ProtonPlusModelsProvidersCategory* _tmp1_;
		ProtonPlusModelsProvidersCategory* _tmp2_;
		gint _tmp2__length1;
		_tmp1_ = g_new0 (ProtonPlusModelsProvidersCategory, 1);
		_tmp1_[0] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON;
		_tmp2_ = _tmp1_;
		_tmp2__length1 = 1;
		if (result_length1) {
			*result_length1 = _tmp2__length1;
		}
		result = _tmp2_;
		return result;
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_LUTRIS (launcher)) {
		ProtonPlusModelsProvidersCategory* _tmp3_;
		ProtonPlusModelsProvidersCategory* _tmp4_;
		gint _tmp4__length1;
		_tmp3_ = g_new0 (ProtonPlusModelsProvidersCategory, 4);
		_tmp3_[0] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON;
		_tmp3_[1] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE;
		_tmp3_[2] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK;
		_tmp3_[3] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_VKD3D;
		_tmp4_ = _tmp3_;
		_tmp4__length1 = 4;
		if (result_length1) {
			*result_length1 = _tmp4__length1;
		}
		result = _tmp4_;
		return result;
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_HEROIC_GAMES_LAUNCHER (launcher)) {
		ProtonPlusModelsProvidersCategory* _tmp5_;
		ProtonPlusModelsProvidersCategory* _tmp6_;
		gint _tmp6__length1;
		_tmp5_ = g_new0 (ProtonPlusModelsProvidersCategory, 2);
		_tmp5_[0] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON;
		_tmp5_[1] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE;
		_tmp6_ = _tmp5_;
		_tmp6__length1 = 2;
		if (result_length1) {
			*result_length1 = _tmp6__length1;
		}
		result = _tmp6_;
		return result;
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_BOTTLES (launcher)) {
		ProtonPlusModelsProvidersCategory* _tmp7_;
		ProtonPlusModelsProvidersCategory* _tmp8_;
		gint _tmp8__length1;
		_tmp7_ = g_new0 (ProtonPlusModelsProvidersCategory, 3);
		_tmp7_[0] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON;
		_tmp7_[1] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE;
		_tmp7_[2] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK;
		_tmp8_ = _tmp7_;
		_tmp8__length1 = 3;
		if (result_length1) {
			*result_length1 = _tmp8__length1;
		}
		result = _tmp8_;
		return result;
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_WINE_ZGUI (launcher)) {
		ProtonPlusModelsProvidersCategory* _tmp9_;
		ProtonPlusModelsProvidersCategory* _tmp10_;
		gint _tmp10__length1;
		_tmp9_ = g_new0 (ProtonPlusModelsProvidersCategory, 1);
		_tmp9_[0] = PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE;
		_tmp10_ = _tmp9_;
		_tmp10__length1 = 1;
		if (result_length1) {
			*result_length1 = _tmp10__length1;
		}
		result = _tmp10_;
		return result;
	}
	_tmp11_ = NULL;
	_tmp11__length1 = 0;
	if (result_length1) {
		*result_length1 = _tmp11__length1;
	}
	result = _tmp11_;
	return result;
}

static gchar*
proton_plus_models_launcher_get_group_title (ProtonPlusModelsProvidersCategory category)
{
	gchar* _tmp4_;
	gchar* result;
	switch (category) {
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("DXVK");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_VKD3D:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("VKD3D");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("Proton");
			result = _tmp2_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("Wine");
			result = _tmp3_;
			return result;
		}
		default:
		break;
	}
	_tmp4_ = g_strdup ("");
	result = _tmp4_;
	return result;
}

static gchar*
proton_plus_models_launcher_get_group_id (ProtonPlusModelsProvidersCategory category)
{
	gchar* _tmp4_;
	gchar* result;
	switch (category) {
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("dxvk");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_VKD3D:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("vkd3d");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("proton");
			result = _tmp2_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("wine");
			result = _tmp3_;
			return result;
		}
		default:
		break;
	}
	_tmp4_ = g_strdup ("unknown");
	result = _tmp4_;
	return result;
}

static gchar*
proton_plus_models_launcher_get_group_description (ProtonPlusModelsProvidersCategory category)
{
	gchar* _tmp4_;
	gchar* result;
	switch (category) {
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup (N_ ("Vulkan-based implementation of Direct3D 8, 9, 10 and 11 for Linux/Wine" \
"."));
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_VKD3D:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup (N_ ("Variant of Wine's VKD3D which aims to implement the full Direct3D 12 A" \
"PI on top of Vulkan."));
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup (N_ ("Compatibility tools by Valve for running Windows software on Linux."));
			result = _tmp2_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup (N_ ("Compatibility tools for running Windows software on Linux."));
			result = _tmp3_;
			return result;
		}
		default:
		break;
	}
	_tmp4_ = g_strdup ("");
	result = _tmp4_;
	return result;
}

static gchar*
proton_plus_models_launcher_get_group_directory (ProtonPlusModelsLauncher* launcher,
                                                 ProtonPlusModelsProvidersCategory category)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gchar* result;
	g_return_val_if_fail (launcher != NULL, NULL);
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (launcher)) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = PROTON_PLUS_MODELS_LAUNCHERS_IS_FAUGUS_LAUNCHER (launcher);
	}
	if (_tmp1_) {
		_tmp0_ = category == PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("/compatibilitytools.d");
		result = _tmp2_;
		return result;
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_LUTRIS (launcher)) {
		switch (category) {
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON:
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE:
			{
				gchar* _tmp3_;
				_tmp3_ = g_strdup ("/runners/wine");
				result = _tmp3_;
				return result;
			}
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK:
			{
				gchar* _tmp4_;
				_tmp4_ = g_strdup ("/runtime/dxvk");
				result = _tmp4_;
				return result;
			}
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_VKD3D:
			{
				gchar* _tmp5_;
				_tmp5_ = g_strdup ("/runtime/vkd3d");
				result = _tmp5_;
				return result;
			}
			default:
			break;
		}
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_HEROIC_GAMES_LAUNCHER (launcher)) {
		switch (category) {
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON:
			{
				gchar* _tmp6_;
				_tmp6_ = g_strdup ("/tools/proton");
				result = _tmp6_;
				return result;
			}
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup ("/tools/wine");
				result = _tmp7_;
				return result;
			}
			default:
			{
				result = NULL;
				return result;
			}
		}
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_BOTTLES (launcher)) {
		switch (category) {
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_PROTON:
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup ("/runners");
				result = _tmp8_;
				return result;
			}
			case PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_DXVK:
			{
				gchar* _tmp9_;
				_tmp9_ = g_strdup ("/dxvk");
				result = _tmp9_;
				return result;
			}
			default:
			{
				result = NULL;
				return result;
			}
		}
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_WINE_ZGUI (launcher)) {
		_tmp10_ = category == PROTON_PLUS_MODELS_PROVIDERS_CATEGORY_WINE;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		gchar* _tmp11_;
		_tmp11_ = g_strdup ("/Runners");
		result = _tmp11_;
		return result;
	}
	result = NULL;
	return result;
}

static void
proton_plus_models_launcher_real_setup_profile_library_for_test_data_free (gpointer _data)
{
	ProtonPlusModelsLauncherSetupProfileLibraryForTestData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusModelsLauncherSetupProfileLibraryForTestData, _data_);
}

static void
proton_plus_models_launcher_real_setup_profile_library_for_test (ProtonPlusModelsLauncher* self,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_)
{
	ProtonPlusModelsLauncherSetupProfileLibraryForTestData* _data_;
	ProtonPlusModelsLauncher* _tmp0_;
	_data_ = g_slice_new0 (ProtonPlusModelsLauncherSetupProfileLibraryForTestData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_launcher_real_setup_profile_library_for_test_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_models_launcher_real_setup_profile_library_for_test_co (_data_);
}

static gboolean
proton_plus_models_launcher_real_setup_profile_library_for_test_finish (ProtonPlusModelsLauncher* self,
                                                                        GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusModelsLauncherSetupProfileLibraryForTestData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_models_launcher_setup_profile_library_for_test_ready (GObject* source_object,
                                                                  GAsyncResult* _res_,
                                                                  gpointer _user_data_)
{
	ProtonPlusModelsLauncherSetupProfileLibraryForTestData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_launcher_real_setup_profile_library_for_test_co (_data_);
}

static gboolean
proton_plus_models_launcher_real_setup_profile_library_for_test_co (ProtonPlusModelsLauncherSetupProfileLibraryForTestData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	proton_plus_models_launcher_set_game_library_available (_data_->self, FALSE);
	_data_->_state_ = 1;
	proton_plus_models_launcher_load_game_library (_data_->self, proton_plus_models_launcher_setup_profile_library_for_test_ready, _data_);
	return FALSE;
	_state_1:
	_data_->games_loaded = proton_plus_models_launcher_load_game_library_finish (_data_->self, _data_->_res_);
	if (!_data_->games_loaded) {
		_data_->result = FALSE;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_data_->self)) {
		_data_->_tmp0_ = _g_object_ref0 (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_data_->self) ? ((ProtonPlusModelsLaunchersSteam*) _data_->self) : NULL);
		_data_->steam_launcher = _data_->_tmp0_;
		_data_->_tmp1_ = _data_->steam_launcher;
		_data_->_tmp2_ = proton_plus_models_steam_profile_get_profiles (_data_->_tmp1_);
		_data_->discovered_profiles = _data_->_tmp2_;
		_data_->_tmp3_ = _data_->steam_launcher;
		(_data_->_tmp3_->profiles == NULL) ? NULL : (_data_->_tmp3_->profiles = (_g_list_free__g_object_unref0_ (_data_->_tmp3_->profiles), NULL));
		_data_->_tmp3_->profiles = NULL;
		_data_->_tmp4_ = _data_->discovered_profiles;
		{
			_data_->profile_collection = _data_->_tmp4_;
			for (_data_->profile_it = _data_->profile_collection; _data_->profile_it != NULL; _data_->profile_it = _data_->profile_it->next) {
				_data_->_tmp5_ = _g_object_ref0 ((ProtonPlusModelsSteamProfile*) _data_->profile_it->data);
				_data_->profile = _data_->_tmp5_;
				{
					_data_->_tmp6_ = _data_->profile;
					_data_->_state_ = 2;
					proton_plus_models_steam_profile_load_extra_data (_data_->_tmp6_, proton_plus_models_launcher_setup_profile_library_for_test_ready, _data_);
					return FALSE;
					_state_2:
					if (proton_plus_models_steam_profile_load_extra_data_finish (_data_->_tmp6_, _data_->_res_)) {
						_data_->_tmp7_ = _data_->steam_launcher;
						_data_->_tmp8_ = _data_->profile;
						_data_->_tmp9_ = _g_object_ref0 (_data_->_tmp8_);
						_data_->_tmp7_->profiles = g_list_append (_data_->_tmp7_->profiles, _data_->_tmp9_);
					}
					_g_object_unref0 (_data_->profile);
				}
			}
		}
		_data_->_tmp10_ = _data_->steam_launcher;
		_data_->_tmp11_ = _data_->_tmp10_->profiles;
		if (g_list_length (_data_->_tmp11_) == ((guint) 0)) {
			_data_->result = FALSE;
			(_data_->discovered_profiles == NULL) ? NULL : (_data_->discovered_profiles = (_g_list_free__g_object_unref0_ (_data_->discovered_profiles), NULL));
			_g_object_unref0 (_data_->steam_launcher);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp13_ = proton_plus_globals_SETTINGS;
		if (_data_->_tmp13_ != NULL) {
			_data_->_tmp14_ = proton_plus_globals_SETTINGS;
			_data_->_tmp15_ = g_settings_get_string (_data_->_tmp14_, "steam-selected-profile-id");
			_g_free0 (_data_->_tmp12_);
			_data_->_tmp12_ = _data_->_tmp15_;
		} else {
			_data_->_tmp16_ = g_strdup ("");
			_g_free0 (_data_->_tmp12_);
			_data_->_tmp12_ = _data_->_tmp16_;
		}
		_data_->_tmp17_ = _data_->_tmp12_;
		_data_->_tmp12_ = NULL;
		_data_->selected_profile_id = _data_->_tmp17_;
		_data_->_tmp18_ = _data_->steam_launcher;
		_data_->_tmp19_ = _data_->selected_profile_id;
		_data_->_tmp20_ = proton_plus_models_launchers_steam_get_steam_profile_by_id (_data_->_tmp18_, _data_->_tmp19_);
		_data_->selected_profile = _data_->_tmp20_;
		_data_->_tmp22_ = _data_->selected_profile;
		if (_data_->_tmp22_ != NULL) {
			_data_->_tmp23_ = _data_->selected_profile;
			_data_->_tmp21_ = _data_->_tmp23_;
		} else {
			_data_->_tmp24_ = _data_->steam_launcher;
			_data_->_tmp25_ = _data_->_tmp24_->profiles;
			_data_->_tmp26_ = g_list_nth_data (_data_->_tmp25_, (guint) 0);
			_data_->_tmp21_ = (ProtonPlusModelsSteamProfile*) _data_->_tmp26_;
		}
		_data_->_tmp27_ = _data_->steam_launcher;
		_data_->_state_ = 3;
		proton_plus_models_launchers_steam_switch_profile (_data_->_tmp27_, _data_->_tmp21_, proton_plus_models_launcher_setup_profile_library_for_test_ready, _data_);
		return FALSE;
		_state_3:
		proton_plus_models_launchers_steam_switch_profile_finish (_data_->_tmp27_, _data_->_res_);
		_g_object_unref0 (_data_->selected_profile);
		_g_free0 (_data_->selected_profile_id);
		_g_free0 (_data_->_tmp12_);
		(_data_->discovered_profiles == NULL) ? NULL : (_data_->discovered_profiles = (_g_list_free__g_object_unref0_ (_data_->discovered_profiles), NULL));
		_g_object_unref0 (_data_->steam_launcher);
	}
	proton_plus_models_launcher_set_game_library_available (_data_->self, TRUE);
	_data_->result = TRUE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
proton_plus_models_launcher_setup_profile_library_for_test (ProtonPlusModelsLauncher* self,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	ProtonPlusModelsLauncherClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->setup_profile_library_for_test) {
		_klass_->setup_profile_library_for_test (self, _callback_, _user_data_);
	}
}

gboolean
proton_plus_models_launcher_setup_profile_library_for_test_finish (ProtonPlusModelsLauncher* self,
                                                                   GAsyncResult* _res_)
{
	ProtonPlusModelsLauncherClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->setup_profile_library_for_test_finish) {
		return _klass_->setup_profile_library_for_test_finish (self, _res_);
	}
	return FALSE;
}

static GList*
proton_plus_models_launcher_real_get_managed_tool_directories (ProtonPlusModelsLauncher* self,
                                                               ProtonPlusModelsGroup* group)
{
	GList* directories = NULL;
	gchar* _tmp0_;
	GList* result;
	g_return_val_if_fail (group != NULL, NULL);
	directories = NULL;
	_tmp0_ = proton_plus_models_launcher_get_primary_managed_tool_directory (self, group);
	directories = g_list_append (directories, _tmp0_);
	result = directories;
	return result;
}

GList*
proton_plus_models_launcher_get_managed_tool_directories (ProtonPlusModelsLauncher* self,
                                                          ProtonPlusModelsGroup* group)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->get_managed_tool_directories) {
		return _klass_->get_managed_tool_directories (self, group);
	}
	return NULL;
}

static gchar*
proton_plus_models_launcher_real_get_primary_managed_tool_directory (ProtonPlusModelsLauncher* self,
                                                                     ProtonPlusModelsGroup* group)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (group != NULL, NULL);
	_tmp0_ = self->directory;
	_tmp1_ = proton_plus_models_group_get_directory (group);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strconcat (_tmp0_, _tmp2_, NULL);
	result = _tmp3_;
	return result;
}

gchar*
proton_plus_models_launcher_get_primary_managed_tool_directory (ProtonPlusModelsLauncher* self,
                                                                ProtonPlusModelsGroup* group)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->get_primary_managed_tool_directory) {
		return _klass_->get_primary_managed_tool_directory (self, group);
	}
	return NULL;
}

static void
proton_plus_models_launcher_real_ensure_group_directory_data_free (gpointer _data)
{
	ProtonPlusModelsLauncherEnsureGroupDirectoryData* _data_;
	_data_ = _data;
	_g_free0 (_data_->group_directory);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusModelsLauncherEnsureGroupDirectoryData, _data_);
}

static void
proton_plus_models_launcher_real_ensure_group_directory (ProtonPlusModelsLauncher* self,
                                                         const gchar* group_directory,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	ProtonPlusModelsLauncherEnsureGroupDirectoryData* _data_;
	ProtonPlusModelsLauncher* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (group_directory != NULL);
	_data_ = g_slice_new0 (ProtonPlusModelsLauncherEnsureGroupDirectoryData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_launcher_real_ensure_group_directory_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (group_directory);
	_g_free0 (_data_->group_directory);
	_data_->group_directory = _tmp1_;
	proton_plus_models_launcher_real_ensure_group_directory_co (_data_);
}

static gboolean
proton_plus_models_launcher_real_ensure_group_directory_finish (ProtonPlusModelsLauncher* self,
                                                                GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusModelsLauncherEnsureGroupDirectoryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_models_launcher_ensure_group_directory_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	ProtonPlusModelsLauncherEnsureGroupDirectoryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_launcher_real_ensure_group_directory_co (_data_);
}

static gboolean
proton_plus_models_launcher_real_ensure_group_directory_co (ProtonPlusModelsLauncherEnsureGroupDirectoryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->directory;
	_data_->_tmp1_ = g_strconcat (_data_->_tmp0_, _data_->group_directory, NULL);
	_data_->target_directory = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->target_directory;
	if (g_file_test (_data_->_tmp2_, G_FILE_TEST_IS_DIR)) {
		_data_->result = TRUE;
		_g_free0 (_data_->target_directory);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->target_directory;
	_data_->_state_ = 1;
	proton_plus_utils_filesystem_create_directory_async (_data_->_tmp3_, proton_plus_models_launcher_ensure_group_directory_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_utils_filesystem_create_directory_finish (_data_->_res_);
	_g_free0 (_data_->target_directory);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
proton_plus_models_launcher_ensure_group_directory (ProtonPlusModelsLauncher* self,
                                                    const gchar* group_directory,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	ProtonPlusModelsLauncherClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->ensure_group_directory) {
		_klass_->ensure_group_directory (self, group_directory, _callback_, _user_data_);
	}
}

gboolean
proton_plus_models_launcher_ensure_group_directory_finish (ProtonPlusModelsLauncher* self,
                                                           GAsyncResult* _res_)
{
	ProtonPlusModelsLauncherClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->ensure_group_directory_finish) {
		return _klass_->ensure_group_directory_finish (self, _res_);
	}
	return FALSE;
}

static gchar*
proton_plus_models_launcher_real_get_install_target_error (ProtonPlusModelsLauncher* self,
                                                           const gchar* target_directory)
{
	gchar* result;
	g_return_val_if_fail (target_directory != NULL, NULL);
	result = NULL;
	return result;
}

gchar*
proton_plus_models_launcher_get_install_target_error (ProtonPlusModelsLauncher* self,
                                                      const gchar* target_directory)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->get_install_target_error) {
		return _klass_->get_install_target_error (self, target_directory);
	}
	return NULL;
}

static gboolean
proton_plus_models_launcher_real_supports_provider_definition (ProtonPlusModelsLauncher* self,
                                                               ProtonPlusModelsProvidersProviderDefinition* definition)
{
	gboolean result;
	g_return_val_if_fail (definition != NULL, FALSE);
	result = TRUE;
	return result;
}

gboolean
proton_plus_models_launcher_supports_provider_definition (ProtonPlusModelsLauncher* self,
                                                          ProtonPlusModelsProvidersProviderDefinition* definition)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->supports_provider_definition) {
		return _klass_->supports_provider_definition (self, definition);
	}
	return FALSE;
}

static gint
proton_plus_models_launcher_real_get_compatibility_tool_usage_count (ProtonPlusModelsLauncher* self,
                                                                     const gchar* compatibility_tool_name)
{
	gint result;
	g_return_val_if_fail (compatibility_tool_name != NULL, -1);
	result = 0;
	return result;
}

gint
proton_plus_models_launcher_get_compatibility_tool_usage_count (ProtonPlusModelsLauncher* self,
                                                                const gchar* compatibility_tool_name)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_val_if_fail (self != NULL, -1);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->get_compatibility_tool_usage_count) {
		return _klass_->get_compatibility_tool_usage_count (self, compatibility_tool_name);
	}
	return -1;
}

static void
proton_plus_models_launcher_real_register_compatibility_tool_from_path (ProtonPlusModelsLauncher* self,
                                                                        const gchar* tool_path)
{
	g_return_if_fail (tool_path != NULL);
}

void
proton_plus_models_launcher_register_compatibility_tool_from_path (ProtonPlusModelsLauncher* self,
                                                                   const gchar* tool_path)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->register_compatibility_tool_from_path) {
		_klass_->register_compatibility_tool_from_path (self, tool_path);
	}
}

static void
proton_plus_models_launcher_real_unregister_compatibility_tool_by_path (ProtonPlusModelsLauncher* self,
                                                                        const gchar* tool_path)
{
	g_return_if_fail (tool_path != NULL);
}

void
proton_plus_models_launcher_unregister_compatibility_tool_by_path (ProtonPlusModelsLauncher* self,
                                                                   const gchar* tool_path)
{
	ProtonPlusModelsLauncherClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS (self);
	if (_klass_->unregister_compatibility_tool_by_path) {
		_klass_->unregister_compatibility_tool_by_path (self, tool_path);
	}
}

const gchar*
proton_plus_models_launcher_get_family_id (ProtonPlusModelsLauncher* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_family_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_launcher_set_family_id (ProtonPlusModelsLauncher* self,
                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_launcher_get_family_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_family_id);
		self->priv->_family_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_FAMILY_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_launcher_get_instance_id (ProtonPlusModelsLauncher* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_instance_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_launcher_set_instance_id (ProtonPlusModelsLauncher* self,
                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_launcher_get_instance_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_instance_id);
		self->priv->_instance_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_INSTANCE_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_launcher_get_tool_target_family_id (ProtonPlusModelsLauncher* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tool_target_family_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_launcher_set_tool_target_family_id (ProtonPlusModelsLauncher* self,
                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_launcher_get_tool_target_family_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_tool_target_family_id);
		self->priv->_tool_target_family_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_FAMILY_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_launcher_get_tool_target_id (ProtonPlusModelsLauncher* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tool_target_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_launcher_set_tool_target_id (ProtonPlusModelsLauncher* self,
                                                const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_launcher_get_tool_target_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_tool_target_id);
		self->priv->_tool_target_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_ID_PROPERTY]);
	}
}

gboolean
proton_plus_models_launcher_get_game_library_available (ProtonPlusModelsLauncher* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_game_library_available;
	return result;
}

static void
proton_plus_models_launcher_set_game_library_available (ProtonPlusModelsLauncher* self,
                                                        gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_launcher_get_game_library_available (self);
	if (old_value != value) {
		self->priv->_game_library_available = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_GAME_LIBRARY_AVAILABLE_PROPERTY]);
	}
}

static void
proton_plus_models_launcher_class_init (ProtonPlusModelsLauncherClass * klass,
                                        gpointer klass_data)
{
	proton_plus_models_launcher_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsLauncher_private_offset);
	((ProtonPlusModelsLauncherClass *) klass)->load_game_library = (void (*) (ProtonPlusModelsLauncher*, GAsyncReadyCallback, gpointer)) proton_plus_models_launcher_real_load_game_library;
	((ProtonPlusModelsLauncherClass *) klass)->load_game_library_finish = (gboolean (*) (ProtonPlusModelsLauncher*, GAsyncResult*)) proton_plus_models_launcher_real_load_game_library_finish;
	((ProtonPlusModelsLauncherClass *) klass)->get_steam_restart_target = (ProtonPlusModelsSteamRestartTarget* (*) (ProtonPlusModelsLauncher*)) proton_plus_models_launcher_real_get_steam_restart_target;
	((ProtonPlusModelsLauncherClass *) klass)->setup_profile_library_for_test = (void (*) (ProtonPlusModelsLauncher*, GAsyncReadyCallback, gpointer)) proton_plus_models_launcher_real_setup_profile_library_for_test;
	((ProtonPlusModelsLauncherClass *) klass)->setup_profile_library_for_test_finish = (gboolean (*) (ProtonPlusModelsLauncher*, GAsyncResult*)) proton_plus_models_launcher_real_setup_profile_library_for_test_finish;
	((ProtonPlusModelsLauncherClass *) klass)->get_managed_tool_directories = (GList* (*) (ProtonPlusModelsLauncher*, ProtonPlusModelsGroup*)) proton_plus_models_launcher_real_get_managed_tool_directories;
	((ProtonPlusModelsLauncherClass *) klass)->get_primary_managed_tool_directory = (gchar* (*) (ProtonPlusModelsLauncher*, ProtonPlusModelsGroup*)) proton_plus_models_launcher_real_get_primary_managed_tool_directory;
	((ProtonPlusModelsLauncherClass *) klass)->ensure_group_directory = (void (*) (ProtonPlusModelsLauncher*, const gchar*, GAsyncReadyCallback, gpointer)) proton_plus_models_launcher_real_ensure_group_directory;
	((ProtonPlusModelsLauncherClass *) klass)->ensure_group_directory_finish = (gboolean (*) (ProtonPlusModelsLauncher*, GAsyncResult*)) proton_plus_models_launcher_real_ensure_group_directory_finish;
	((ProtonPlusModelsLauncherClass *) klass)->get_install_target_error = (gchar* (*) (ProtonPlusModelsLauncher*, const gchar*)) proton_plus_models_launcher_real_get_install_target_error;
	((ProtonPlusModelsLauncherClass *) klass)->supports_provider_definition = (gboolean (*) (ProtonPlusModelsLauncher*, ProtonPlusModelsProvidersProviderDefinition*)) proton_plus_models_launcher_real_supports_provider_definition;
	((ProtonPlusModelsLauncherClass *) klass)->get_compatibility_tool_usage_count = (gint (*) (ProtonPlusModelsLauncher*, const gchar*)) proton_plus_models_launcher_real_get_compatibility_tool_usage_count;
	((ProtonPlusModelsLauncherClass *) klass)->register_compatibility_tool_from_path = (void (*) (ProtonPlusModelsLauncher*, const gchar*)) proton_plus_models_launcher_real_register_compatibility_tool_from_path;
	((ProtonPlusModelsLauncherClass *) klass)->unregister_compatibility_tool_by_path = (void (*) (ProtonPlusModelsLauncher*, const gchar*)) proton_plus_models_launcher_real_unregister_compatibility_tool_by_path;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_launcher_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_launcher_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_launcher_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_LAUNCHER_FAMILY_ID_PROPERTY, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_FAMILY_ID_PROPERTY] = g_param_spec_string ("family-id", "family-id", "family-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_LAUNCHER_INSTANCE_ID_PROPERTY, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_INSTANCE_ID_PROPERTY] = g_param_spec_string ("instance-id", "instance-id", "instance-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_FAMILY_ID_PROPERTY, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_FAMILY_ID_PROPERTY] = g_param_spec_string ("tool-target-family-id", "tool-target-family-id", "tool-target-family-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_ID_PROPERTY, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_ID_PROPERTY] = g_param_spec_string ("tool-target-id", "tool-target-id", "tool-target-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_LAUNCHER_GAME_LIBRARY_AVAILABLE_PROPERTY, proton_plus_models_launcher_properties[PROTON_PLUS_MODELS_LAUNCHER_GAME_LIBRARY_AVAILABLE_PROPERTY] = g_param_spec_boolean ("game-library-available", "game-library-available", "game-library-available", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_launcher_instance_init (ProtonPlusModelsLauncher * self,
                                           gpointer klass)
{
	self->priv = proton_plus_models_launcher_get_instance_private (self);
	self->priv->_game_library_available = FALSE;
}

static void
proton_plus_models_launcher_finalize (GObject * obj)
{
	ProtonPlusModelsLauncher * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncher);
	_g_free0 (self->priv->_family_id);
	_g_free0 (self->priv->_instance_id);
	_g_free0 (self->priv->_tool_target_family_id);
	_g_free0 (self->priv->_tool_target_id);
	_g_free0 (self->title);
	_g_free0 (self->icon_path);
	_g_free0 (self->directory);
	(self->games == NULL) ? NULL : (self->games = (_g_list_free__g_object_unref0_ (self->games), NULL));
	_g_object_unref0 (self->compatibility_tools);
	self->groups = (_vala_array_free (self->groups, self->groups_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (proton_plus_models_launcher_parent_class)->finalize (obj);
}

static GType
proton_plus_models_launcher_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsLauncherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_launcher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsLauncher), 0, (GInstanceInitFunc) proton_plus_models_launcher_instance_init, NULL };
	GType proton_plus_models_launcher_type_id;
	proton_plus_models_launcher_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsLauncher", &g_define_type_info, 0);
	ProtonPlusModelsLauncher_private_offset = g_type_add_instance_private (proton_plus_models_launcher_type_id, sizeof (ProtonPlusModelsLauncherPrivate));
	return proton_plus_models_launcher_type_id;
}

GType
proton_plus_models_launcher_get_type (void)
{
	static volatile gsize proton_plus_models_launcher_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_launcher_type_id__once)) {
		GType proton_plus_models_launcher_type_id;
		proton_plus_models_launcher_type_id = proton_plus_models_launcher_get_type_once ();
		g_once_init_leave (&proton_plus_models_launcher_type_id__once, proton_plus_models_launcher_type_id);
	}
	return proton_plus_models_launcher_type_id__once;
}

static void
_vala_proton_plus_models_launcher_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	ProtonPlusModelsLauncher * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncher);
	switch (property_id) {
		case PROTON_PLUS_MODELS_LAUNCHER_FAMILY_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_launcher_get_family_id (self));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_INSTANCE_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_launcher_get_instance_id (self));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_FAMILY_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_launcher_get_tool_target_family_id (self));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_launcher_get_tool_target_id (self));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_GAME_LIBRARY_AVAILABLE_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_launcher_get_game_library_available (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_launcher_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	ProtonPlusModelsLauncher * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncher);
	switch (property_id) {
		case PROTON_PLUS_MODELS_LAUNCHER_FAMILY_ID_PROPERTY:
		proton_plus_models_launcher_set_family_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_INSTANCE_ID_PROPERTY:
		proton_plus_models_launcher_set_instance_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_FAMILY_ID_PROPERTY:
		proton_plus_models_launcher_set_tool_target_family_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_TOOL_TARGET_ID_PROPERTY:
		proton_plus_models_launcher_set_tool_target_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_LAUNCHER_GAME_LIBRARY_AVAILABLE_PROPERTY:
		proton_plus_models_launcher_set_game_library_available (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

