#include <setjmp.h>
#include "ui-gnome.h"
+#ifdef ENABLE_STANDALONE
+#include "standalone-libntfs.h"
+#endif
+
#include <captive/macros.h>
+#include <captive/client.h>
+#include <captive/captivemodid.h>
+
+CaptiveCaptivemodidObject *captivemodid;
int optarg_verbose;
int optarg_dry;
static int optarg_scan_disks;
static int optarg_scan_disks_quick;
static int optarg_text;
-static char *optarg_modid_path=G_STRINGIFY(SYSCONFDIR) "/w32-mod-id.captivemodid.xml";
static GList *optarg_scan_path_list; /* of (char *) */
static void acquire_popt_callback
N_("Disable Gnome UI; --text must be first argument"),NULL),
BUG_ACQUIRE_POPT('v',"verbose" ,POPT_ARG_NONE ,&optarg_verbose,0,N_("Display additional debug information"),NULL),
BUG_ACQUIRE_POPT('n',"dry" ,POPT_ARG_NONE ,&optarg_dry ,0,N_("No modifications, no files written"),NULL),
- BUG_ACQUIRE_POPT(0 ,"modid-path" ,POPT_ARG_STRING|POPT_ARGFLAG_SHOW_DEFAULT,&optarg_modid_path,0,
- N_("Path to .captivemodid.xml database"),N_("path")),
BUG_ACQUIRE_POPT(0 ,"scan-disks" ,POPT_ARG_NONE ,&optarg_scan_disks,0,N_("Scan all files on local disks"),NULL),
BUG_ACQUIRE_POPT(0 ,"scan-disks-quick",POPT_ARG_NONE ,&optarg_scan_disks_quick,0,
N_("Scan MS-Windows directories on local disks"),NULL),
void microsoft_com(void)
{
- g_list_foreach(mod_uri_microsoftcom_list(),(GFunc)mod_uri_load,NULL);
+ g_list_foreach(mod_uri_microsoftcom_list(),(GFunc)mod_uri_load_base_reporting,NULL);
}
static void scan_batch(void)
{
- g_list_foreach(optarg_scan_path_list,(GFunc)mod_uri_load,NULL);
+ g_list_foreach(optarg_scan_path_list,(GFunc)mod_uri_load_base_reporting,NULL);
if (optarg_scan_disks_quick)
scan_disks_quick();
));
#endif
- /* Initialize the i18n stuff */
- setlocale(LC_ALL,"");
- bindtextdomain(PACKAGE,LOCALEDIR);
- textdomain(PACKAGE);
+ captive_standalone_init();
if (!gnome_vfs_init())
g_error(_("GnomeVFS failed to initialize"));
+#ifdef ENABLE_STANDALONE
+ standalone_libntfs_init();
+#endif
+
if (argv[1] && !strcmp(argv[1],"--text"))
optarg_text=1;
GnomeProgram *gnome_program;
guint handler_id;
+ captive_standalone_gnome_init();
gnome_init_atexit_disable=FALSE;
g_atexit(gnome_init_atexit_handler);
gnome_init_g_log_handler_hit=FALSE;
&& ! optarg_microsoft_com);
/* Initialize UI here to catch all GLog errors below. */
- if (1
+ if (is_interactive
&& (no_gnome || !ui_gnome_init())
&& !ui_line_init())
g_error(_("No UI interface could be initialized"));
- if (!captivemodid_load(optarg_modid_path) && !captivemodid_load("./w32-mod-id.captivemodid.xml"))
- g_error(_("Unable to load modid database: %s"),optarg_modid_path);
+ captivemodid=captive_captivemodid_load_default(TRUE);
- mod_uri_load(gnome_vfs_uri_new("file://" G_STRINGIFY(VARLIBCAPTIVEDIR)));
+ mod_uri_load_base_reporting(gnome_vfs_uri_new("file://" G_STRINGIFY(VARLIBCAPTIVEDIR)));
if (!is_interactive)
scan_batch();