User Tools

Site Tools


plugins:01_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugins:01_files [2018/07/06 15:43] – [Plugin API: File Structure] James Sentmanplugins:01_files [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-=====Plugin API: File Structure===== 
  
-====Folder Name==== 
-An Xtension plugin is a folder or a bundle. The name must end with the “.isf” suffix so that XTension will recognize the folder or bundle as a plugin. The name should be unique and follow something like a bundle naming convention. So don’t just name your plugin “insteon.isf” as thats the built in XTension plugin naming convention. XTension reserves all non-bundle naming plugin names. While the exact layout of the names is up to you you should use a path that contains your name or company name and then the plugin type so that the file can be easily recognized as to what it is by a user and also that it will always be unique. “james_insteon.isf” or “james.insteon.isf” are all acceptable. 
- 
- 
-====Plugin Installation==== 
-As of version 9.3.1 there is not a hook for installing or managing plugins in XTension itself. That will come in a future update but for the moment plugins must be installed manually. 
-===Plugin Search Path=== 
-There are 2 places where plugins can be installed. The recommended placement is inside the users XTension database. The XTension database is a bundle folder. Inside the bundle is a folder named “Pitchers” (historically named Pitchers as the helper apps within “Pitch” the common interchange formatted data packets up to XTension) In a future release this will be changed to be called “Plugins”. \\ 
-\\ 
-If you place the plugin folder inside that Pitchers folder within the database then the plugin files will be backed up along with the XTension database nightly as well as moving with the XTension install to any new machines or updates that the user might perform.\\ 
-\\ 
-If for some reason you don’t wish to install the plugin inside the Database it can be installed in the XTension Support folder in the users Application Support folder. You will find a folder there also currently called “Pitchers” which will soon be renamed “Plugins” this is not the preferred install location for a plugin as it will then be separate from the user data and may need to be re-installed if the user moves to a new machine and does not preserve the application support folder but only their database.\\ 
-\\ 
-Since accessing either of those folders is a complicated bit extra work for the user there are 2 menu items under the Database menu of XTension: “Reveal Plugins Folder For This User” which shows the Application Support folder, and “Reveal Plugins Folder In This Database” which will reveal the folder in the current active database in the finder. This makes it much easier to describe how to install the plugin until XTension can manage them itself.\\ 
- 
-===XTension Finds New Plugins=== 
-It is not necessary to quit and restart XTension to have it discover new plugins. The plugin search locations are rescanned whenever the New Interface dialog is opened so your new plugin should be available in the list as soon as it’s in one of those locations and the user opens the window to create a new interface. If the New Interface sheet window is being displayed the window must be closed and re-opened to discover new plugins. 
- 
-===Updating Existing Plugins=== 
-Again, it is not necessary to quit and restart XTension when replacing a plugin with a new version. Changes to the info.json data will be available immediately however if the scripts have changed any currently running interface will have to be disabled and re-enabled to reload the scripts. 
- 
-====Standard Python Includes==== 
-In your Python scripts you need to include both the entirety of the XTension module and the XTensionHelpers module. This should be the first line of your main script entry point as well as anywhere else you need to use any of the XTension provided commands. 
- 
-<code> 
-from XTension import * 
-from XTensionHelpers import * 
-</code> 
- 
- 
-Previous:[[:plugins|]]  | NEXT:[[:plugins:02_infojson|]] 
plugins/01_files.1530891787.txt.gz · Last modified: 2023/02/13 14:51 (external edit)