Difference between revisions of "Talk:Add-ons (Develop)"

From Freeplane - free mind mapping and knowledge management software
m (Add-ons updates (draft))
m (Text replacement - "freeplane.sourceforge.net" to "www.freeplane.org")
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
 
[[User:Seb4stien|Seb4stien]] ([[User talk:Seb4stien|talk]]) 11:34, 13 August 2013 (UTC)
 
[[User:Seb4stien|Seb4stien]] ([[User talk:Seb4stien|talk]]) 11:34, 13 August 2013 (UTC)
  
== Add-ons updates (draft) ==
+
Add-ons updates (draft)
 +
--[[User:Boercher|Volker Börchers]] ([[User talk:Boercher|talk]]) 22:10, 21 October 2013 (UTC)
 +
Integrated Add-ons updates information on new page (moved it there) [[How_to_publish_add-ons]]
  
Note : this feature is currently under development and is not available yet
 
 
freeplane periodically checks for add-ons updates.
 
 
Two ways are available to notice users that a new version of your add-on is available :
 
# create a "version.txt" file under your homepage, e.g. http://my.addon.com/version.txt
 
# add an "updateUrl" attribute to the root node of your add-on, either a ".txt" file or a ".properties" file
 
#* http://my.addon.com/path/to/version.txt
 
#* http://my.addon.com/path/to/version.properties
 
 
'''.txt file format'''
 
 
This is the native freeplane versionning format (the '======' lines are mandatory) :
 
=========
 
x.y.z
 
=========
 
your changelog here
 
 
Where x, y and z are your version numbers.
 
 
If the version number in this file is higher than the version installed by the user, he will be prompted to go to your homepage if he wants to download the latest release.
 
 
'''.properties file format'''
 
 
Informations are stored as key=value:
 
version=x.y.z
 
downloadUrl=http://direct.link.to/download
 
changelogUrl=http://link.to/your/changelog
 
 
The ''version'' property is mandatory.
 
 
If the version number in this file is higher than the version installed by the user, he will be prompted to go to the ''downloadUrl'' (or the add-on homepage by default) if he wants to download the latest release.
 
 
----
 
 
'''Jokro-2011-11-20'''
 
'''Jokro-2011-11-20'''
 
A new user is helped by more structure to understand what he is doing and why he is doing it. The present description misses this. I therefore propose to replace the current text with the text below. It also might help to add the text and table which is displayed when you install the developer tools.
 
A new user is helped by more structure to understand what he is doing and why he is doing it. The present description misses this. I therefore propose to replace the current text with the text below. It also might help to add the text and table which is displayed when you install the developer tools.
Line 45: Line 13:
 
You will need a recent version of Freeplane and a number of developer tools which are themselves supplied as an add-on:
 
You will need a recent version of Freeplane and a number of developer tools which are themselves supplied as an add-on:
 
# Update to the most recent Freeplane version
 
# Update to the most recent Freeplane version
# Download and install the [http://freeplane.sourceforge.net/wiki/index.php/Add-ons#Add-on_Insert_Inline_Image Developer Tools] from the [[Add-ons]] page (follow the installation instructions there). The add-on functions provided will be available in: ''Tools > Developer tools''
+
# Download and install the [http://www.freeplane.org/wiki/index.php/Add-ons#Add-on_Insert_Inline_Image Developer Tools] from the [[Add-ons]] page (follow the installation instructions there). The add-on functions provided will be available in: ''Tools > Developer tools''
  
  

Latest revision as of 18:57, 18 November 2018


Seb4stien (talk) 11:34, 13 August 2013 (UTC)

Add-ons updates (draft) --Volker Börchers (talk) 22:10, 21 October 2013 (UTC) Integrated Add-ons updates information on new page (moved it there) How_to_publish_add-ons

Jokro-2011-11-20 A new user is helped by more structure to understand what he is doing and why he is doing it. The present description misses this. I therefore propose to replace the current text with the text below. It also might help to add the text and table which is displayed when you install the developer tools.

Preparation: Install developer tools

You will need a recent version of Freeplane and a number of developer tools which are themselves supplied as an add-on:

  1. Update to the most recent Freeplane version
  2. Download and install the Developer Tools from the Add-ons page (follow the installation instructions there). The add-on functions provided will be available in: Tools > Developer tools


Example add-on

The following is an example how to make your add-on. The name of the add-on is chosen to be myAddOn. The add-on will put:

  1. a hypothetical script myCoolScript.groovy in <freeplaneuserdir>/script/myCoolScript.groovy; and
  2. a hypothetical icon mycoolicon.png in <freeplaneuserdir>/icons/mycoolicon.png.


Steps to follow for creating the example add-on

First prepare a directory called myAddOn with the following structure:

  • myAddOn/scripts
  • myAddOn/zips/icons


Second put the above files in this structure:

  1. Copy myCoolScript.groovy to myAddOn/scripts/myCoolScript.groovy.
  2. Copy mycoolicon.png to zips/icons/mycoolicon.png.


Third create and save the map myAddOn:

  1. Create a new mind map
  2. Select Tools->Developer Tools->Build add-on to generate the template. First a dialog for the name of the add-on displays. Fill in the name myAddOn. Next a dialog displays a log of the actions which generate the template nodes.
  3. The root node automatically gets the name myAddOn and a number of attributes. The first attribute is name with value myAddOn. This is the so-called technical name of the add-on.
  4. Now the other attributes of the root node should be filled; only the last is optional. Version number should start wit v, e.g. v0.1. The freeplane number should have the form x.y.z, e.g. 1.2.10; no subversion with underscore is allowed.
  5. Add a child node of node description, in which you describe the use of the add-on.
  6. The map myAddOn has a template node scripts. Create a child node with name myCoolScript.groovy.
  7. The map myAddOn has a template node zips. Create a child node with name icons. And create a child of icons with the name mycoolicon.png.
  8. Save the map.
  9. Select (again) Tools->Developer Tools->Build add-on. This will add the required attributes of the script node and proposes proper deinstall rules (just accept them when you are asked for it).
  10. Select Tools > Developer Tools > Package add-on for publication. This will create the file myAddOn-v0.1.mm


Fourth, install and test:

  • Select Tools->Scripts->Install Add-on (or via Tools->Add-ons).

****End Jokro-2011-11-20