Have problem locating plug-ins - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: Have problem locating plug-ins (/Thread-Have-problem-locating-plug-ins) |
Have problem locating plug-ins - ajax - 08-24-2023 I run GIMP (and most all application software) from portable (USB) drives on various Windows computers. If I go to "Edit>Preferences>Folders" and add a folder for Plug-Ins then GIMP is able to find the plug-in (at present I'm wanting to use the GMIC Plugin for GIMP). However, it seems that the drive letter in included is as part of the path. The problem seems to be that Windows might assign different drive letters to USB devices and when this happens GIMP does NOT find the plugin. Interestingly, the predefined folder specifications that GIMP includes in Preferences also include a drive letter. However, when Windows assigns a new drive letter GIMP is able to figure that out for those cases and the newly assigned drive letter is used. I need to be able to do the same thing for folders I add which will always be on the same drive as GIMP. For whatever it might be worth the scripts that I use to start GIMP do update the environment variable named "GIMP2_DIRECTORY". In addition to plugins, I also use a script. GIMP has NO problem finding my script in the sub-folder named "scripts" but when I add the GMIC plug-in to the similar folder named "plug-ins" GIMP does NOT find it. Would appreciate some help figuring out how to overcome this problem. RE: Have problem locating plug-ins - Ofnuts - 08-24-2023 Maybe... The directories that Gimp scans for plug-ins (the ones you normally define in Folders > Plugins) are saved in the gimprc file in your Gimp profile. For instance, mine looks like; (plug-in-path "${gimp_dir}/plug-ins:${gimp_plug_in_dir}/plug-ins:/home/me/Code/Gimp/PathTools/Activated:/home/me/Code/Gimp/Tools/Activated") where :
[attachment=10257]
And lo and behold, Gimp obviously recognizes the beginning of the path, and in the plugin-path variable this is converted to a directory **relative** to the gimp installation directory: {gimp_installation_dir}/../extra. And if I restart Gimp, a plugin I put there is recognized: (plug-in-def "/Gimp-dev/2.10.34/extra/stringReg.py" 1692820811 In this form that very plugin is at a fixed position in the file system (fixed drive for you), but what it costs you is a re-scan of these plugins if they appear at another location/drive. And during my tests I have also seen that same plugin registered with something like (plug-in-def "${gimp_installation_dir}/../extra/stringReg.py" 1692820811 So you could be even luckier, or possibly edit the pluginrc file to add these variables. RE: Have problem locating plug-ins - ajax - 08-25-2023 Looks to me like you are describing GIMP running on a Linux where there are NO drive letters rather than a Windows system. However, your reference to miracle made me look for some magic of my own. Therefore, I simply entered the path without the drive letter and LOW & BEHOLD it works. To be clear in my case the the plugin is located in the same file system (i.e., partition and drive) as the GIMP software. In fact the first couple of directories in the path are the same as the GIMP software. While this does leave me a little confused about how it works the idea that it does work is welcome. Many thanks for the assistance. RE: Have problem locating plug-ins - Ofnuts - 08-25-2023 (08-25-2023, 02:36 AM)ajax Wrote: Looks to me like you are describing GIMP running on a Linux where there are NO drive letters rather than a Windows system. However, your reference to miracle made me look for some magic of my own. Therefore, I simply entered the path without the drive letter and LOW & BEHOLD it works. To be clear in my case the the plugin is located in the same file system (i.e., partition and drive) as the GIMP software. In fact the first couple of directories in the path are the same as the GIMP software. In windows you have a "current drive" and a "current directory" per drive. If you do: Code: # Switch to D: drive So, for you when there is no drive in the spec, Gimp uses the current drive. But this may or may not work depending on how Gimp is launched because its current drive may not be the drive where it is installed. And everything I said applies to Windows. I would just expect the ${gimp_installation_dir} to be something like F:\Apps\Gimp\ or G:\Apps\Gimp\. RE: Have problem locating plug-ins - ajax - 08-25-2023 Yes I do know about the current directory. In fact, the scripts I use for starting the applications that I've setup on a portable drive always set it to something useful. Since I don't know how GIMP might rely on the current directory I set it to the same folder as the file used to invoke GIMP. It looks like GIMP does do something special (i.e., not done by other Windows software) when it comes to identifying the drive where the application was loaded from. This is possible and something that I rely on very heavily to make my executable software function properly. Thanks again for all your help. |