Forum Discussion
[MSIX] - Packaging GIMP
- Sep 20, 2019
pandaysumitroy Indeed, just tried it now and it doesn't work. Apparently this only suppresses the load failure of the plugins.
Apparently the GIMP community is also https://gitlab.gnome.org/GNOME/gimp/issues/1145/ (also somebody else already tried to put the plugins in System32 and System64 with the same exact results).
However, i did notice something, which i am not sure why is happening like this for the moment. While you capture GIMP, if you install it in other folder than the default one (C:\Test or C:\Gimp or any other folder), when you install the MSIX you won't receive the plugin failures anymore (so no need to copy the dlls in System32 and System64).
From my opinion this has something to do with how GIMP gets the paths and the whole logic of finding/loading plugins.
Still searching for a work around to make it work, will let you know if i have any further progress with this.
TheStingPilotFound a workarround for this. If we check with procmon what is happening, after gimp is loaded, the plugins are searching for some DLLS in BIN. While the psf redirection works and the plugins then search in the correct directory, for whatever reason gimp.exe fails to start. When it calls to dlls it returns only buffer overflows.
However, if we look closely in procmon, we can see that each and every plugin is searching for the DLL files in 3 directories:
1. The BIN folder
2. The plugin directory (each plugin searches in its own directory)
3. System64 (C:\Windows\System32) - For 64bit plugins
4. System32 (C:\Windows\Syswow64) - For 32bit plugins
I have made a capture of Gimp with Advanced Installer, and, without any redirections, i copied all the DLLs from the BIN folder in System64. After the installation almost everything seems to work (99%), except twain.exe.
To fix twain.exe to throw an error, you must also copy all the DLL files from 32\BIN to System32.
After that everything works correctly and applications starts/loads plugins.
Hope this helps,
Kind regards.
- Mar 01, 2024
WesleeJKN0487 I have that build into TMEditX to automate the fixup, but there is a free cmdline utility you can google called PeInfo that will answer the question of bitness for a particular exe or dll.
- ToastgunJul 13, 2020Copper Contributor
WesleeJKN0487 There is a "simpler" way getting this done. You may want to add the following code to your manifest (under the package element):
<Extensions> <uap6:Extension Category="windows.loaderSearchPathOverride"> <uap6:LoaderSearchPathOverride> <uap6:LoaderSearchPathEntry FolderPath="bin"/> </uap6:LoaderSearchPathOverride> </uap6:Extension> </Extensions>
This way GIMP is also checking the bin directory to load dlls and other binaries.
alexmarin89 @At this point thank you for your great blog and the free Advanced Installer Express version... you guys may want to add the loaderSearchPartOverride to your feature list 🙂