3 Replies Latest reply on Jan 25, 2011 3:50 PM by areohbee

    Plugin Installation Enhancement

    areohbee Level 5

      As it stands, plugin authors are faced with two choices:

       

      1. Write separate Mac and Windows installers for each plugin.
      2. Explain to potential plugin users how to use the plugin manager.

       

      I suggest some improvements:

       

      • Double-click lrplugin folder to install - cross-platform.
      • Addition of two supported files in lrplugin folder:
        • Readme.txt
        • License.txt

       

      Notes:

       

      - Installer should detect if  plugin is already installed, and if so, version number of installed  plugin vs. version number of incoming.

      - Installer should prompt  the user whether he/she wants to overwrite a previous installation,  maintain the existing installation, or remove the previous installation.

      - If removing previous installation, option to scrub preferences and catalog metadata.

      -  Installer should copy the plugin to the internal modules directory (if  not already in it), so user can delete the downloaded one from his/her  "desktop or downloads" folder with impunity.

      - installer and plugin manager can display readme and license, not unlike standard mac installers.

      - Lightroom to detect new lrplugin folders in modules directory and open plugin manager with new plugins highlighted upon startup.

       

      More Notes:

       

      -  I've had people add a plugin with the plugin manager, then delete it  and wonder why it does not work - that problem would be eliminated.

      -  No longer would we have the split between install methods: "real"  installers could still install by copying to modules folder, but  lrplugin double-click installation would essentially just copy the  lrplugin folder to the lr-modules folder - Lightroom would do the rest,  or something like that. In any case, all installed plugins would reside  in a single folder...

       

      Bottom-line:

       

      lrplugin folder acts  like an installer, but installer is built into Lightroom, so plugin  authors dont have to author platform-specific installers, and  instructions for how to install plugin are reduced to: "double-click  lrplugin folder to install..." All the author has to do is pop a readme and/or license file in there, and voila!

       

      Doncha think?

       

      R

        • 1. Re: Plugin Installation Enhancement
          johnrellis Most Valuable Participant

          I second those ideas -- having a standard method of installation would certainly make it easier for both users and developers.

          • 2. Re: Plugin Installation Enhancement
            Vladimir Vinogradsky Level 1

            Most certainly. I've dealt with my share of installation problems. An interesting observation though, not a single installation-related issue has ever been reported by Windows users. Mac users on the other hand keep having the same issue over and over again. When you download the zip file on a Mac computer, the Archive Utility unpacks the contents to the desktop. If you have previouly downloaded the plug-in, the utility won't overwrite the existing folder - it simply creates a new "unique" name for the extracted content by adding a numeric suffix to the folder's name, which many users fail to notice. MyAwesomePlugin.lrdevplugin becomes MyAwesomePlugin.lrdevplugin 1, and Lightroom refuses to load it without giving a clear indication of what went wrong. I would say that is my biggest gripe with the way folder names are treated by Lightroom, and by the Mac's Archive Utility. This issue alone causes major pain and suffering among the unsuspecting Mac OS users and myself.

             

            I was wondering if anyone has dealt with this or came up with a solution, other than stuffing the plug-in into an installation package with the Package Manager...

            Thanks!

            • 3. Re: Plugin Installation Enhancement
              areohbee Level 5

              I feel your pain, but have never developed a work-around.

               

              It just occurred to me however, that there may be another answer besides a full blown installer.

               

              And my primary problem with making installers, besides the obvious (it has to be done for each plugin), is that the plugin has to be re-packaged on both platforms each time a silly little bug is fixed, just to re-release. Actually, if there is a Mac packager that runs on Windows, (or a Windows installer maker that runs on Mac) and doesnt cost too much, that might be a great solution - is there?

               

              I'd settle for a little app that could do cross-platform packaging that can be run on either Mac or PC but does not have to be run on both... In other words, although my first thought was to have installation support in Lightroom proper, it could be done on the plugin author side as well. Maybe a button along side 'Reload Plugin' for 'Package Plugin for (cross-platform) release'. I have something similar right now - a plugin that releases plugins, but it still doesn't solve the issue you have raised.

               

              Anyway, maybe what we need is a "universal installer", like maybe a batch file / script that runs and simply copies the lrplugin folder to the Lightroom modules folder and prompts the user to restart Lightroom - would that be possible? So the contents of the zip file is a single folder:

               

              - MyPluginFolder (or MyPluginFolder 2, or MyPluginFolder 3, after unzipping on Mac), and inside that folder is:

               

              - lrplugin folder

              - readme

              - license

              - universal installer script (maybe just a bootstrapper to platform specific scripts).

              - maybe platform specific installer scripts too, maybe in subdir...

               

              Readme file says to run the universal installer..., then delete the downloaded stuff if you want...

               

              I dont have so much Mac experience, but I think this is possible (no?), and would solve our problems immediately without too much fuss.

               

              PS - Now that I think about it, there wouldn't even need to be a single installer script that can run on either platform, maybe just

              two scripts (that dont have to be different for each plugin), one for each OS:

               

              1. InstallOnMac.applescript

              2. InstallOnWindows.vbs

               

              This is starting to sound pretty sensible - I might just go ahead with this approach.

               

              (readme file says "double-click the appropriate install script for your platform...")

               

              Hardest part: making sure the correct directory is the recipient of the lrplugin folder, on both platforms - anybody knows how for sure? - I'll check it and report back if nobody beats me too it...

               

               

               

               

              *** UPDATE @2011-01-25:

               

              I was unable to find any common native scripting language between the two platforms (seems like there's room for improvement there...), other than some common shell commands, which is just not quite good enough in my opinion.

               

              So, I created a windows script to install plugin in modules folder. Its a .wsf file (windows script host), but could just as easily have been .js or .vbs. (Powershell not good for install scripts, since although native, it is disabled by default - better for sys-admin scripts...) Anyway, an applescript script for mac install could do the same thing on Mac.

               

              I'm still not happy though - although conceptually simple, there's a  lot of error checking and user prompting... - two more pieces of code to  maintain, two more ways for things to go wrong... And, I really prefer  the simplicity of just zipping up the lrplugin when done.  Hmmm...

               

              I may never finish the applescript, and I may never post the windows script (its quite finished, but depends on an open source releasor for filling in custom strings... and I'm not planning on using it) but it is available upon request if you'd like - e.g. PM me.

               

              And, there is some additional complexity. - Users who previously installed the plugin the old way can end up with two of the same installed if they dont read instructions which they dont... plus, you have to restart Lightroom for new plugins to take effect.

               

              All in all I hope Adobe takes the initiative to remedy...

               

               

               

              R