Page 2 of 3

Re: Folder Structure for Macros?

Posted: Fri May 13, 2022 4:35 pm
by onekk
probably it will suffice that macro folder could be made viewed as a "tree", i.e I will specify a macro folder and then if there are subdfolders in this folder macro are searched also in subfolders.

In Linux and other OS subfolders could be "symlinks" so the real locations could be across an entire disk or even on a network (if the OS could link net mounted dir and make them appear as sub folders).

For WB it isi working, as on Linux I have a multiple places and some symlinks in "/Mod/" and they are working across different FC versions at least 0.19.3 and 0.20 dev (miniconda install).


Regards

Carlo D.

Re: Folder Structure for Macros?

Posted: Fri May 13, 2022 10:58 pm
by chrisb
chennes wrote: Thu May 12, 2022 3:06 pm I want to be able to find macros in each installed mod's directory, rather than having to copy them all to a central directory.
if i understand it correctly then I don't like it very much, because it would mean that the macros vanish as soon as I replace my current version or a new version added in parallel would not have the macros.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 12:42 am
by edwilliams16
I'd just like to be able to drill down into subdirectories in the current Macro directories.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 4:24 am
by johnwang
chennes wrote: Fri May 13, 2022 1:17 pm finding macros in multiple locations.
I just use Gui::FileDialog::getOpenFileName to find a py file and run it. Throw out Macro.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 3:05 pm
by chennes
chrisb wrote: Fri May 13, 2022 10:58 pm if i understand it correctly then I don't like it very much, because it would mean that the macros vanish as soon as I replace my current version or a new version added in parallel would not have the macros.
I don’t follow — why would a macro vanish? What I am describing isn’t all that different a storage strategy from what we currently have, except macros don’t have to be copied out of their mod directory to be run, and we don’t run the risk of name collisions during that copy. You will still have your normal user macro directory, plus possibly any number of other directories you want to have.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 3:07 pm
by chennes
edwilliams16 wrote: Sat May 14, 2022 12:42 am I'd just like to be able to drill down into subdirectories in the current Macro directories.
You will be able to: the key change I am proposing is to stop hardcoding a single location for macros, and instead allow any arbitrary directories to be visible in the macro manager.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 3:12 pm
by onekk
Good also if when I specify a directory in the list even his subdir where searched for Macro.

To avoid possible conflicts a full path name could be used, or the name and a tooltip showing "full path".

It won't be difficult to implement as from what I remember about QListWidget it is possible to set some properties for items.

Regards

Carlo D.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 5:33 pm
by chrisb
chennes wrote: Sat May 14, 2022 3:05 pm I don’t follow — why would a macro vanish?
I'm afraid I misunderstand something:
In the installation package there is among others the Mod directory. If macros are stored below that directory they will be lost if I change the installation and remove the old one.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 11:20 pm
by chennes
Oh, I see, sorry to not be clear: I mean the directory where the add on manager installs user mods. Really, I mean the individual subdirectories where those Addons are installed. Not in the Mod directory that is part of the core installation.

Re: Folder Structure for Macros?

Posted: Sat May 14, 2022 11:28 pm
by chrisb
chennes wrote: Sat May 14, 2022 11:20 pm I mean the directory where the add on manager installs user mods.
Aah; sorry for not having seen this. That's something different.

Thinking about my projects I had several times certain macros for that very project. During the development it would be nice if I could just add the path to the project directory, which is usually outside the Mod directory.
If there would be a parameter controlling in/exclusion of subdirectories would be of further help.