#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),
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;
&& !ui_line_init())
g_error(_("No UI interface could be initialized"));
- if (!captive_captivemodid_load(optarg_modid_path) && !captive_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_base_reporting(gnome_vfs_uri_new("file://" G_STRINGIFY(VARLIBCAPTIVEDIR)));