My plugin spawns a background process, which needs to be shutdown when Lightroom is exited or the plugin is disabled.
SDK manual states that in Info.lua, I can specify a function using LrShutdownPlugin key. I am a bit confused with this - Info.lua does not allow require/import, so I can't really do anything useful with this? Ideally, I'd like to be able to make a HTTP request when Lightroom is exiting.
Same goes for LrEnablePlugin/LrDisablePlugin functions, I don't even know how to print a line into log so I don't know if these actually were called or not...
Today, while working on totally other features of my plugin, I noticed that the shutdown logging message was actually getting outputted when reloading the plugin! I have currently specified it as a script name in Info.lua
I don't know what caused it, but I am still unable to get it to work on simpler example, such as Hello World plugin in SDK. Additionally, it is not called when Lightroom exits, only when plugin is reloaded or unloaded, so it is not suitable for shutting down my server process.
I'm trying to get my plugin released next week, so I'm now just adding a idle timeout which will eventually kill the server process.
Thanks for the update. So for the shutdown, you specify a lua file (like for LrInitPlugin), not a function (like it says in the sdk3 guide document) - right? If so, I think a bug-report against the document is in order.
I'm looking forward to the release of your plugin...
PS - Have you tried my latest (DevAdjust)?
Europe, Middle East and Africa