Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#10 closed defect (fixed)

SVG support on windows (or lack thereof)

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 1.1
Component: Client Keywords: win32
Cc:

Description

Some apps only supply an SVG icon (ie: wine notepad).
Either we convert those on the fly to another format (how?) and cache this on disk.
Or we get Windows/gtk to play nice and load the svg pixbuf loader...

Change History (10)

comment:1 Changed 15 years ago by Antoine Martin

Tried newer gtk and got this:

Unable to load image-loading module: c:/devel/target/24657c578dad0b54d4855b1780ade31a/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.dll: The specified module could not be found.

Doesn't look like something we should try to fix here, the problem is upstream.

comment:2 Changed 15 years ago by Antoine Martin

With the current version of gtk we ship, this is what happens when we try to load an SVG on MS Windows:

GError: Unable to load image-loading module: D:\Windows-Shifter/lib/gtk-2.0/2.10.0/loaders/svg_loader.dll: The specified module could not be found.

There is some sample code for rendering SVGs on win32 using ctypes:
http://www.cairographics.org/cookbook/librsvgpython/

Problem is that we get into DLL-hell: we need to bring an unknown amount of dependencies with it, see:
http://www.nabble.com/wxSVG---an-SVG-solution--td19097413.html
,
http://www.mail-archive.com/[email protected]/msg11736.html
and
http://www.nabble.com/Nmap-4.85b1->>-zenmap.exe-:-librsvg-2-2.dll-not-found!-td21691797.html

comment:3 Changed 15 years ago by Antoine Martin

In the meantime, we could just send the SVG icons to the clients that support it. Not hard, but tedious as we would need to carry a flag with the icon data to avoid sending it to the win32 clients.

comment:4 Changed 15 years ago by Antoine Martin

Owner: changed from Antoine Martin to Antoine Martin
Status: newaccepted

comment:5 Changed 15 years ago by Antoine Martin

Warning dialog fixed by upgrading the build environment to the latest GTK release.

See r1505 and r1506

Still need to check that the rsvg dll does its job, but at least it stopped moaning!

Last edited 13 years ago by Antoine Martin (previous) (diff)

comment:6 Changed 15 years ago by Antoine Martin

SVG loader added to gdk-pixbuf.loaders

using instructions found here

Why is it so bloody hard???

Used relative path (by hand) after generating the file, as it will be loaded from the py2exe created dir.
Removed DLLs from svn: r1529

Last edited 13 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 15 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

Tested on brand new install of XP (with MSVCR90.DLL but that's another matter... see #68)

Last edited 13 years ago by Antoine Martin (previous) (diff)

comment:8 Changed 15 years ago by Antoine Martin

For reference, here is the list of DLLs used:

freetype6.dll
intl.dll
libatk-1.0-0.dll
libcairo-2.dll
libcroco-0.6-3.dll
libexpat-1.dll
libfontconfig-1.dll
libgailutil-18.dll
libgdk-win32-2.0-0.dll
libgdk_pixbuf-2.0-0.dll
libgio-2.0-0.dll
libglib-2.0-0.dll
libgmodule-2.0-0.dll
libgobject-2.0-0.dll
libgsf-1-114.dll
libgsf-gnome-1-114.dll
libgsf-win32-1-114.dll
libgthread-2.0-0.dll
libgtk-win32-2.0-0.dll
libjpeg-7.dll
libjpeg-7_1.dll
libpango-1.0-0.dll
libpangocairo-1.0-0.dll
libpangoft2-1.0-0.dll
libpangowin32-1.0-0.dll
libpng12-0.dll
librsvg-2-2.dll
libtiff-3.dll
libtiffxx-3.dll
libxml2-2.dll
zlib1.dll
libbz2.dll.a
zdll.exp
zdll.lib
libpixmap.dll
libsvg.dll
libwimp.dll
svg_loader.dll
libgail.dll

comment:9 Changed 15 years ago by Antoine Martin

And here is the gdk-pixbuf.loaders that got generated (if you don't get SVG in there, it will not work...):

# GdkPixbuf Image Loader Modules file
# Automatically generated file, do not edit
# Created by gdk-pixbuf-query-loaders.exe from gtk+-2.18.5
#
# LoaderDir = lib/gtk-2.0/2.10.0/loaders
#
"./lib/gtk-2.0/2.10.0/loaders/svg_loader.dll"
"svg" 2 "gtk20" "Scalable Vector Graphics" "LGPL"
"image/svg+xml" "image/svg" "image/svg-xml" "image/vnd.adobe.svg+xml" "text/xml-svg" "image/svg+xml-compressed" ""
"svg" "svgz" "svg.gz" ""
" <svg" "*    " 100
" <!DOCTYPE svg" "*             " 100

comment:10 Changed 14 years ago by Antoine Martin

Note: this no longer a problem with the latest PyGTK all-in-one installers which include svg support. see win32 dev for details.

Note: See TracTickets for help on using tickets.