Inkscape relies on GTK, GTK a mostly widely used library. There is a system wide GTK Runtime available on Windows (if installed). Many application built upon GTK, does not check for this GTK Runtime. One of the main consequence among others (like useless redundancy) is that it prevent these applications to honor GTK sytem wide preferences.
I tried to write a tiny Batch script which list DLLs in the installed GTK Runtime and remove the duplicated DLL from GTK based applications. I tried it with Inkscape, it works nice, except for one thing : the Document Propery dialog does not work and Inskscape crash, and I cannot figure why.
I was wondering if
1) This is a bug or not.
2) There could be provision for an Inkscape aware of already installed GTK runtime.
I guess an Inkscape shiped with all the GTK Runtime in a bundle is nice for many user, but GTK is also so much widely used that this is not like a specific library, and so the option of an already installed GTK Runtime on the system may be worth.
I will not recommand this simple script for now as it seems Inskscape does not work properly (the incriminated dialog is an important one), however, anyway, here is this simple script :
Note : I tried to apply the same on GIMP, here as well, it works fine, except for one thing : Script-FU complains about a missing libglib. Both Inkscape and GIMP seems to be based on GTK 2.16, while the last GTK Runtime available on Windows is GTK 2.22. So I tried to revert to GTK 2.16, but this was even worst : none of GIMP and Inkscape was starting up at all. Very surprising.
The script :
Code: Select all
@echo off
rem Q: What is this ?
rem A: First step to remove GTK Runtime duplication from Windows applications
rem relying on GTK.
rem
rem Q: What is this useful to ?
rem A: This is useful to save space, help manage sytem configuration (only
rem one GTK runtime instead of multiple occurences) and will allow you
rem to manage GTK preferences globally (system wide or user wide).
rem
rem Q: How it works ?
rem A: It will generate a list of all your GTK runtime DLLs and a file named
rem Step2.bat, whose purpose is to create a backup of the duplicated DLLs
rem and then remove these.
rem
rem Q: Is it dangerous ?
rem A: No, as it do a backup of your DLLs and does not definitelly removed
rem these.
rem
rem Q: OK, so how do use I this ?
rem A: Open a console (CMD.exe) from withing your GTK runtime binary
rem directory (the one where all GTK+ DLLs reside). Then rune Step1.bat.
rem A Step2.bat will be generated. Move this one to the your GIMP or Inkscape
rem binary directory (where the *.exe files reside, this directory may not be
rem named “bin”), or whatever application using a duplicated GTK runtime.
rem Run Step2.bat. You should see a directory named “DLLs_Backup” was
rem created and some DLLs was removed.
rem
rem Last step: launch GIMP or Inkscape (anyway, the application you applied
rem the process to), and check if it works nice. If it does not, then
rem move back all the DLLs from DLLs_Backup to the application directory.
rem If the application works nice (after some time sorking with it), you
rem may safely remove the DLLs_Backup directory.
rem
rem Questions and comments: [email protected]
echo.
echo ** Please, ensure you've read instructions given in this file **
echo.
echo Step1.
echo Generating Step2.bat ...
echo.>Step2.bat
echo @echo off>>Step2.bat
echo echo.>>Step2.bat
echo echo Step2.>>Step2.bat
echo if not exist DLLs_Backup md DLLs_Backup>>Step2.bat
echo del /Q DLLs_Backup\*.*>>Step2.bat
echo echo Backing up relevant DLLs...>>Step2.bat
for %%f in (*.dll) do echo if exist %%f copy %%f DLLs_Backup>>Step2.bat
echo echo Removing duplicated DLLs...>>Step2.bat
for %%f in (*.dll) do echo if exist %%f del %%f>>Step2.bat
echo echo Done.>>Step2.bat
echo echo.>>Step2.bat
echo echo You may now test if your application works nice.>>Step2.bat
echo Done.
echo You may now proceed to Step2.