Best way to ensure clean/fresh load?
I'm trying to make some changes and I want to know the quickest/best way to reload the app cleanly. I'm currently shutting down the plugin and LR.
I'm trying to make changes to profiles.lua so that if I call a profile in a subfolder with a relative or absolute link set in the options, it then looks for the next profile in that folder instead of the profile folder defined in the settings dialogue. But I'm having no luck.
LR really hangs on to this plugin, so the best way to reload cleanly is to exit LR, then restart it. If the plugin crashes, you might be able to reload it using plugin manager, and you might get the new plugin loaded, but it is not consistently so.
OK, thanks. Any suggestions on how to accomplish what I'm trying to do? It doesn't seem to be controlled by any of the functions in profiles.lua.
The plugin sends a string to the app consisting of the profile's file name, without any path. The message is received in LR_IPC_In.cpp with m_profileManager->switchToProfile(valueString.trim());, which dispatches the string to the switchToProfile method of profilemanager. So the following method in ProfileManager.cpp has to have an appropriate string: void ProfileManager::switchToProfile(const String& profile).
I didn't write that method (Parth did before turning the development over to me) so I haven't tested what happens when you send a string with directory paths in it.
My first suggestion is to try entering a string of the form subdirectory/profilename.xml and see if that works.
Merged into #173