[webkit-gtk] possible solutions for local files on win32
Phil Longstaff
plongstaff at rogers.com
Sun Mar 21 05:45:20 PDT 2010
On Fri, 2010-03-19 at 21:39 +0100, Josip wrote:
> On 19.03.2010 15:08, Phil Longstaff wrote:
> > On Thu, 2010-03-11 at 18:19 -0500, Phil Longstaff wrote:
> >> On Tue, 2009-11-03 at 01:20 +0100, Josip wrote:
> >>> Hi again!
> >>> Found some possible solutions for those who have problems with local
> >>> files on win32 due to mime-share-info misconfiguration or missing
> >>> dependencies etc.
> >>> As g_file_info_get_content_type() returns just file extension (like
> >>> ".html") and win32 use those to determine mime type can we use
> >>> g_content_type_get_mime_type() on them like in attachment.
> >>> It works for me, load html files (with right encoding), images etc...
> >>> Or should we rather check for return type on runtime and use those if
> >>> returned type is file extension (in case some really have full working
> >>> version)?
> >>
> >> OK, I downloaded shared-mime-info and moved update-mime-database.exe and
> >> the share/mime directory to my project. I then ran
> >> update-mime-database. How do I ensure that webkit can find the database
> >> and use it?
> >
> > Is there someone who can help with this?
> >
> > Josip wrote:
> >> Thanks for help!
> >>
> >> I have installed libwebkit-1.0-2.dll and update-mime-database.exe(from
> >> shared-mime-info-0.70) in directory C:\WebKitGTK-1.1.15.3\bin and put
> >> their mime directory in C:\WebKitGTK-1.1.15.3\share
> >>
> >> Created environment variables:
> >> XDG_CONFIG_DIRS=C:\WebKitGTK-1.1.15.3\etc\xdg
> >> XDG_DATA_DIRS=C:\WebKitGTK-1.1.15.3\share
> >>
> >> Run:
> >> update-mime-database.exe C:\WebKitGTK-1.1.15.3\share\mime
> >>
> >> But local files still cant be opened. Did i miss something and what?
> >>
> >
> > I tried this, and am using 1.1.22, but still don't see local files. If I load the same html into firefox, it works fine.
> >
> > Phil
> >
>
> Hi Phil,
> don't know what version you use but those mime stuff looks irrelevant
> for me as windows handle mime types differently.
>
> I build version 1.1.23 now and it works OK.
> Build things from
> http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_11.2/
> which don't works with local files but when rebuilded whit that patch
> local files start working.
>
> You can find binary and libs in:
> http://www.gramps-project.org/wiki/images/d/db/WebKitGTK-1.1.23-win32.zip
> For any missing dependency extract one from rpms in first link.
>
> Do anyone know the owners of that builbot and how to contact them (ask
> them to include those litle patch also)?
Hi Josip,
OK. I created an opensuse 11.2 VM to do the cross-compilation. The
steps now are:
1) Set up the opensuse mingw repository
2) Install all of the opensuse mingw packages
3) Download webkit 1.1.23 source
4) Apply your patch
5) Build
OK - I'll try it. I'll also try it with your binary as well. I tried
it once but ran into dependency issues. I just need basic html
rendering with css and the ability to include local image files. I
don't need audio/video/...
Once I get my application built with 1.1.23, then local files should
work with no playing around with mime?
I found some information about the correct format of file:// URLs on the
web. Firefox seems to accept URLs which are not correct (e.g. embedded
spaces instead of %20, \ instead of / in file paths). Do you know what
webkit accepts?
What buildbot?
Thanks for your help. I'm finding this extremely frustrating.
Phil
More information about the webkit-gtk
mailing list