Updated patch available here:
http://people.iola.dk/anders/tracker-patches/win-changes.patch

The new patch cleans up the changes quite a bit and moves win specific
code to a new file: tracker-os-dependant-win.c and unix specific code
to a new file tracker-os-dependant-unix.c. There's still a small
amount of ifdef's left but I don't think it's that much. There is some
code duplication between tracker-extract.c and trackerd/ files. It's
fixed cleanly in trackerd but I just ifdef'd it in tracker-extract.c.
Removing the duplication will fix this.

To compile cleanly on windows the following 3 patches are needed:

datadir.patch
ioprio.patch (updated, earlier patch was buggy)
shutdown.patch

all available from: http://people.iola.dk/anders/tracker-patches/

On 3/11/07, Anders Rune Jensen <[EMAIL PROTECTED]> wrote:
> On 3/10/07, jamie <[EMAIL PROTECTED]> wrote:
> > On Fri, 2007-03-09 at 18:41 +0100, Anders Rune Jensen wrote:
> > > link specific code (windows doesn't support links):
> > > +#ifdef OS_WIN32
> > > +                       is_link = FALSE;
> > > +#else
> > >                        is_link = S_ISLNK (finfo.st_mode);
> > > +#endif
> >
> >
> > wont S_ISLNK always return FALSE on windows?
>
> S_ISLNK is not defined on windows.
>
> > >
> > > external application startup:
> > >
> > > would just take a argv[4] and do the right thing.
> > >
> > > +#ifdef OS_WIN32
> > > +               argv[0] = "cmd.exe";
> > > +               argv[1] = "/c";
> > > +               argv[2] = g_strdup (text_filter_file);
> > > +               argv[3] = g_filename_from_utf8 (uri, -1, NULL, NULL, 
> > > NULL);
> > > +               argv[4] = g_strdup (temp_file_name);
> > > +               argv[5] = NULL;
> > > +#else
> > >                argv[0] = g_strdup (text_filter_file);
> > >                argv[1] = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
> > >                argv[2] = g_strdup (temp_file_name);
> > >                argv[3] = NULL;
> > > +#endif
> >
> > eek - we have lots of these.
> >
> > however we should be using tracker_spawn so maybe you can confine change
> > to that?
>
> Ok. I'll do that as a seperate patch. It would be nice to have it as a
> series of patches which doesn't change anything in tracker but makes
> it easier to make it work on windows without those ugly ifdefs.
>
> Thanks for the input.

-- 
Anders Rune Jensen
http://people.iola.dk/anders/
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to