How To Install a 3rd Party Plugin In the LiveCode IDE
LiveCode allows you to expand its capabilities with custom plugins. This lesson explains how to set up and install user plugins, such as the revMobile plugin.
Choosing which folder to use
By default, LiveCode expects user plugins to be in a particular location. The location is flexible though, and if you are a previous Rev user with an existing plugins folder, you can use that one instead. Or you may want to choose a different location if you don't want to use the default for some reason. New LiveCode users should generally follow the first part of this lesson to create a default Plugins folder. If you prefer to share your plugins with older versions of Rev, or if you want to create a custom location, skip down to the last section of this lesson titled "Setting up a custom location or sharing an older plugins folder".
Creating the default plugins folder for LiveCode
When it starts up, LiveCode will look in a particular folder for your custom plugins. Their locations vary by operating system:
Windows: My Documents/My LiveCode/Plugins
OS X: ~/Documents/My LiveCode/Plugins
Create a folder called "My LiveCode" at the correct location for your OS (Linux users should name it "my_livecode" instead.) Inside that folder, create a second folder named "Plugins".
Add custom plugin files
Copy or move your user plugins into the new Plugins folder. In this example we have moved "revMobilePlugin.rev" there.
Restart LiveCode to load your plugins
The next time you restart LiveCode, your plugins will appear in the Development/Plugins menu along with the default IDE plugins.
Setting up a custom location or sharing an older plugins folder
If you have a previous version of Rev that already uses a plugins folder, you can share it with LiveCode so that both programs use the same plugin files. This is also how you choose a custom location if you want your plugins stored somewhere besides the default location.
If you don't already have an earlier Rev folder, create a new folder at any convenient location named whatever you like (for example, "LiveCode Extensions") and inside that, create another folder named "Plugins". Place your plugin .rev files inside. LiveCode requires the enclosing folder because that's also where future externals, resources, and other supplementary files will go.
Launch LiveCode, open Preferences and choose "Files & Memory" from the list on the left. At the bottom of the pane you will see "User Extensions:" Click the "..." button and choose the folder that holds the Plugins folder. In our example, that would be the "LiveCode Extensions" folder. In the image above, we have chosen an existing "My Revolution Enterprise" folder from Rev 4.0, because it holds the Plugins folder we want to share.
Make sure you select the folder one level above the Plugins folder. If you choose the Plugins folder itself, they will not load.
Restart LiveCode and your plugins will appear in the Development menu.
Troubleshooting a custom location
In the rare event the above steps don't work, you may need to quit LIveCode and delete its preferences file before setting a custom location. Preferences are located at:
Windows XP: C:/Documents and Settings/username/Application Data/RunRev/Preferences/livecode.rev
Vista/Win7: C:/Documents and Settings/username/AppData/Roaming/RunRev/Preferences/livecode.rev
OS X: ~/Library/Preferences/RunRev/livecode.rev
You can also use your operating system's Search utility to locate the "livecode.rev" file.
After deleting "livecode.rev", restart LiveCode, set its Extensions path to the folder that contains the Plugins folder, and restart LiveCode once more.
Thank you. I am asking for general usage: What exactly is the difference between a "Plugin" folder inside the "My Livecode" folder, and the "Extensions" folder inside the same parent folder?
Another question: I have a Google Drive folder on my machine which synchronizes with Google Drive cloud. I want to share the "My Livecode" folder between various machines I am using. This works for me. But since here the specific OS is mentioned, it could be made good practice if a user uses more than one machine and even at different locations. Before, I had problems keeping the library files in synch on different machines.
The Plugins are stacks that are used to help development in the IDE. The Extensions folder contains widgets and libraries that "extend" the functionality of LiveCode and they can be used in standalone as well.
Hope this helps :)
@Roland I guess you could back up *just* the "Plugins" and the "Extensions" folder, (i.e. not their parent folder too), since these 2 folders have the same name in all 3 desktop platforms.
Panos, thanks a lot. Of course, I know how to back up and handle Plugins and Extensions from years of experience. But new users may not know. So, I asked. But anyway, what is the drawback using a shared folder for several machines instead of having to make sure that all machines always have the same version of a library, for example, which sometimes can become difficult to maintain.
Well, I cannot think of a drawback, other than the fact you have to make sure you have an active internet connection to ensure the current version of the folder is indeed the latest one.