-
- /* Get platform factory */
- fact = modest_tny_platform_factory_get_instance ();
-
- /* Check modest conf */
- modest_conf = modest_tny_platform_factory_get_conf_instance
- (MODEST_TNY_PLATFORM_FACTORY(fact));
- if (!modest_conf) {
- g_printerr ("modest: failed to initialize config system, exiting\n");
- retval = MODEST_ERR_CONF;
- goto cleanup;
- }
-
- if (!modest_init_local_folders ()) {
- g_printerr ("modest: failed to initialize local folders, exiting\n");
- retval = MODEST_ERR_INIT;
- goto cleanup;
- }
-
- /* Get the account store */
- account_store = tny_platform_factory_new_account_store (fact);
- if (!account_store) {
- g_printerr ("modest: could not initialize a ModestTnyAccountStore instance\n");
- retval = MODEST_ERR_RUN;
- goto cleanup;
- }
-
-
- if (!getenv("DISPLAY"))
- batch = TRUE;