UserUnknownFactor / GIMP3-ML

GIMP3 machine learning playground
MIT License
38 stars 5 forks source link

install.cmd fails if 2 versions of gimp are installed #12

Closed 0reo closed 7 months ago

0reo commented 7 months ago

Describe the bug As the title states, if you try to run the install script with more than 1 version of gimp installed, it will fail. Seems to be because of line 26/27 in install.cmd https://github.com/UserUnknownFactor/GIMP3-ML/blob/df66bb11f44ac5c39d7bea63774b8fa7611204a9/install.cmd#L26-L27 $gimpdir will have 2 paths, and so $gimp won't work

To Reproduce Steps to reproduce the behavior:

  1. Have 2 versions of Gimp installed(Say, a stable 2.10 build, and 2.99.16)
  2. run install script
  3. See error
    
    dir : Cannot find path 'C:\Program Files\GIMP 2 C:\Program Files\GIMP 2.99\bin' because it does not exist.
    At line:26 char:10
    + $gimp = (dir  "$($gimpdir)\bin\gimp-console-*.exe").FullName
    +          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Program File...s\GIMP 2.99\bin:String) [Get-ChildItem], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

Could not find GIMP! You will have to add '$($PSScriptRoot)\plugins' to Preferences -> Folders -> Plug-ins manually. At line:28 char:5

Desktop (please complete the following information):

UserUnknownFactor commented 7 months ago

Feel free to create a pull request if you have an idea how to fix it. Maybe expand the search name from GIMP* to GIMP 2.9*...