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.
alexmarin89 Thank you for the workaround, above workaround resolves the startup error however "Plug-In Broswer" is not working.
You can access Plugin Browser from Help > Plugin Browser, it details list of plugin installed.
i doubt whether plugin are being loaded correctly.
PLUGIN BROWSERERROR
- alexmarin89Sep 20, 2019Iron Contributor
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.
- Mar 04, 2024
@pandaysumitroyalexmarin89 Oh, and I forgot that the free PsfTooling app also has a GUI program called Test_PeInfo that you can use to look at exes and dlls for this purpose.
- Mar 01, 2024
alexmarin89 Further research has shown that Gimp is using a windows API out of ucrtbase to load DLLs, and this API bypasses any of the PSF fixups, essentially bypassing the PSF for those calls. This is why copying the dlls to the SystemXXX folders helps on that loading.
Otherwise, Gimp developers have a habit of opening a file and then querying the handle to find that file's location, extract the directory, and use that to open different nearby file. This behavior frustrates and confuses ILV when a redirection was done. So ILV shouldn't be used on this app.
This app remains on my "can't do" list with additional issues preventing launch. -Tim
- atplsxMar 01, 2024Brass Contributor
You don't need these anymore, you can use this
<Extensions> <uap10:Extension Category="windows.installedLocationVirtualization"> <uap10:InstalledLocationVirtualization> <uap10:UpdateActions AddedItems="keep" DeletedItems="reset" ModifiedItems="keep" /> </uap10:InstalledLocationVirtualization> </uap10:Extension> <uap6:Extension Category="windows.loaderSearchPathOverride"> <uap6:LoaderSearchPathOverride> <uap6:LoaderSearchPathEntry FolderPath="VFS\ProgramFilesX64\GIMP 2\bin" /> <uap6:LoaderSearchPathEntry FolderPath="VFS\ProgramFilesX64\GIMP 2\lib" /> <uap6:LoaderSearchPathEntry FolderPath="VFS\ProgramFilesX64\GIMP 2\32" /> <uap6:LoaderSearchPathEntry FolderPath="VFS\ProgramFilesX64\GIMP 2\share" /> <uap6:LoaderSearchPathEntry FolderPath="VFS\ProgramFilesX64\GIMP 2" /> </uap6:LoaderSearchPathOverride> </uap6:Extension> </Extensions>