I think RobloxStudio::plugins_path should respect Studio.PluginsDir. Several dependents of roblox-install use RobloxStudio:plugins_path with the assumption that any model files placed there will be ran as plugins by Roblox Studio (off the top of my head, run-in-roblox, rbx-reflector, and now Rojo wants to at rojo-rbx/rojo#735). A user changing Studio.PluginsDir totally breaks that assumption.
From my point of view, it won't be that difficult to start respecting this setting. On Windows, Roblox Studio stores its settings in %LOCALAPPDATA%\Roblox\GlobalSettings_13.xml. On macOS, it's ~/Library/Roblox/GlobalSettings_13.xml. This file contains Roblox XML (it's really just an rbxmx) and may be parsed by rbx_xml. Because Studio.PluginsDir is of type QDir, there would have to be support added like in rojo-rbx/rbx-dom#182, but I think that's well within reach.
Then on initialization of RobloxStudio, roblox-install can do something like:
Does GlobalSettings_13.xml exist? (it may be missing on fresh installs or if settings were reset)?
If YES, try to parse the file with rbx_xml. Did it succeed?
If YES, try to locate a Studio.PluginsDir property that's of type QDir. Did it succeed?
If YES, initialize RobloxStudio.plugins to the value of Studio.PluginsDir.
If NO, fall back to current behavior.
If NO, fall back to current behavior.
If NO, fall back to current behavior.
It would be awesome if RobloxStudio::plugins_pathactually did what it says, but I understand if it's too much complexity. I'd be fine with just mentioning Studio.PluginsDir in the documentation, being explicit about the fact that the returned path will not necessarily be where the current Roblox Studio install locates plugins.
It's possible for users of Roblox Studio to change the directory where Studio will look for local plugins using a setting called
Studio.PluginsDir
. With this in mind, the documentation forRobloxStudio::plugins_path
leaves something to be desired: https://github.com/Kampfkarren/roblox-install/blob/80bd5d20dabbbc9e6c19b80cedc735279d57ad38/src/lib.rs#L234-L238It doesn't quite return a path to the user's plugin directory - it returns hard coded paths instead: https://github.com/Kampfkarren/roblox-install/blob/80bd5d20dabbbc9e6c19b80cedc735279d57ad38/src/lib.rs#L168-L183 https://github.com/Kampfkarren/roblox-install/blob/80bd5d20dabbbc9e6c19b80cedc735279d57ad38/src/lib.rs#L97-L104
I think
RobloxStudio::plugins_path
should respectStudio.PluginsDir
. Several dependents of roblox-install useRobloxStudio:plugins_path
with the assumption that any model files placed there will be ran as plugins by Roblox Studio (off the top of my head, run-in-roblox, rbx-reflector, and now Rojo wants to at rojo-rbx/rojo#735). A user changingStudio.PluginsDir
totally breaks that assumption.From my point of view, it won't be that difficult to start respecting this setting. On Windows, Roblox Studio stores its settings in
%LOCALAPPDATA%\Roblox\GlobalSettings_13.xml
. On macOS, it's~/Library/Roblox/GlobalSettings_13.xml
. This file contains Roblox XML (it's really just an rbxmx) and may be parsed by rbx_xml. BecauseStudio.PluginsDir
is of typeQDir
, there would have to be support added like in rojo-rbx/rbx-dom#182, but I think that's well within reach.Then on initialization of
RobloxStudio
, roblox-install can do something like:GlobalSettings_13.xml
exist? (it may be missing on fresh installs or if settings were reset)?Studio.PluginsDir
property that's of typeQDir
. Did it succeed?RobloxStudio.plugins
to the value ofStudio.PluginsDir
.It would be awesome if
RobloxStudio::plugins_path
actually did what it says, but I understand if it's too much complexity. I'd be fine with just mentioningStudio.PluginsDir
in the documentation, being explicit about the fact that the returned path will not necessarily be where the current Roblox Studio install locates plugins.