OSDN Git Service

SDK:
[mikumikustudio/MikuMikuStudio.git] / sdk / jme3-documentation / src / com / jme3 / gde / docs / sdk / development / setup.html
1
2 <h1><a>Creating a jMonkeyEngine SDK plugin</a></h1>
3 <div>
4
5 <p>
6 Note that the creation of a Module Suite is only necessary if you want to upload your plugin to the contribution update center.
7
8 </p>
9
10 </div>
11 <!-- EDIT1 SECTION "Creating a jMonkeyEngine SDK plugin" [1-178] -->
12 <h3><a>Using jMonkeyEngine SDK for development</a></h3>
13 <div>
14 <ul>
15 <li><div> Install the &quot;Netbeans Plugin Development&quot; and &quot;NetBeans <acronym title="Application Programming Interface">API</acronym> Documentation&quot; plugins via Tools???Plugins</div>
16 </li>
17 <li><div> Create a new &quot;Module Suite&quot; project (can be any name, this will be your local &quot;collection&quot; of plugins that you create)</div>
18 </li>
19 <li><div> If no platform is listed, add one by selecting the <acronym title="Software Development Kit">SDK</acronym> application folder</div>
20 <ul>
21 <li><div> Mac users have to right-click the jmonkeyplatform application and select &quot;show contents&quot; and then select the jmonkeyplatform folder under Contents/Resources/</div>
22 </li>
23 </ul>
24 </li>
25 <li><div> Open the suite, right-click the &quot;Modules&quot; folder and select &quot;Add new..&quot;</div>
26 </li>
27 <li><div> For &quot;Project Name&quot; enter an all-lowercase name without spaces like <code>my-library</code></div>
28 </li>
29 <li><div> Make sure the &quot;Project Location&quot; is inside the module suite folder and press &quot;Next&quot;</div>
30 </li>
31 <li><div> Enter the base java package for your plugin in &quot;Code Name Base&quot; like <code>com.mycompany.plugins.mylibrary</code></div>
32 </li>
33 <li><div> Enter a &quot;Module Display Name&quot; for your plugin like &quot;My Library&quot;</div>
34 </li>
35 <li><div> Press Finish</div>
36 </li>
37 <li><div> To use core <acronym title="Software Development Kit">SDK</acronym> or jME3 functions, add &quot;<acronym title="Software Development Kit">SDK</acronym> Core&quot; and &quot;<acronym title="Software Development Kit">SDK</acronym> Engine&quot; via &quot;Module Properties???Library???Add Dependency&quot;</div>
38 </li>
39 <li><div> Write your plugin (e.g. <a href="/com/jme3/gde/docs/sdk/development.html">create a new editor</a> or <a href="/com/jme3/gde/docs/sdk/development/extension_library.html">wrap a jar library</a>)</div>
40 </li>
41 </ul>
42
43 </div>
44 <!-- EDIT2 SECTION "Using jMonkeyEngine SDK for development" [179-1392] -->
45 <h3><a>jMonkeyEngine SDK Contributions Update Center</a></h3>
46 <div>
47
48 <p>
49 If you want your plugin to appear in the &quot;jMonkeyEngine <acronym title="Software Development Kit">SDK</acronym> Contributions Update Center&quot; so users can download, install and update it easily via the plugin manager, you can host your plugin in the contributions update center svn repository. The contributions update center is based on a googlecode project for contributed plugins which will be automatically compiled, version-labeled and added to the contributions update center like the core jMonkeyEngine <acronym title="Software Development Kit">SDK</acronym> plugins.
50 </p>
51
52 <p>
53 Effectively its one large module suite with multiple modules which each represent one plugin, extension library.
54 </p>
55
56 </div>
57
58 <h4><a>Adding your plugin to the repository</a></h4>
59 <div>
60
61 <p>
62 To add your plugin to the repository, do the following:
63 </p>
64 <ul>
65 <li><div> Make sure the plugin is part of a &quot;Module Suite&quot; and that its located in the folder of the suite (this saves you from problems with the svn and local version not being configured the same)</div>
66 </li>
67 <li><div> In &quot;Module Properties???Sources&quot;</div>
68 <ul>
69 <li><div> Set the &quot;Source Level&quot; to 1.5 if possible (jMonkeyEngine <acronym title="Software Development Kit">SDK</acronym> is compatible to Java 1.5)</div>
70 </li>
71 </ul>
72 </li>
73 <li><div> In &quot;Module Properties???<acronym title="Application Programming Interface">API</acronym> Versioning&quot;</div>
74 <ul>
75 <li><div> Set a specification version for your plugin (like 0.8.1)</div>
76 </li>
77 <li><div> Set the &quot;implementation version&quot; to &quot;0&quot; and select &quot;append implementation versions automatically&quot;</div>
78 </li>
79 </ul>
80 </li>
81 <li><div> In &quot;Module Properties???Display&quot;</div>
82 <ul>
83 <li><div> Enter a purposeful description of your plugin and one of the following categories:</div>
84 <ul>
85 <li><div> For a library plugin: &quot;jME3 - Library&quot;</div>
86 </li>
87 <li><div> For a <acronym title="Software Development Kit">SDK</acronym> plugin: &quot;jME3 - <acronym title="Software Development Kit">SDK</acronym> Plugin&quot;</div>
88 </li>
89 <li><div> For a model loader plugin: &quot;jME3 - Loader&quot;</div>
90 </li>
91 </ul>
92 </li>
93 </ul>
94 </li>
95 <li><div> In &quot;Module Properties???Build???Packaging&quot;</div>
96 <ul>
97 <li><div> Add your name</div>
98 </li>
99 <li><div> Add a link to your forum post / home page relating to the plugin</div>
100 </li>
101 <li><div> Add a license, you can use <code>../license-jme.txt</code> to insert the default jME BSD license or use a text file you store in the project folder</div>
102 </li>
103 </ul>
104 </li>
105 <li><div> Ask the managers or developers for access to the gc project</div>
106 </li>
107 <li><div> Commit <strong>only the module project</strong> to trunk:</div>
108 <ul>
109 <li><div> Right click the Module Project and select &quot;Versioning ??? Import into Subversion Repository&quot;</div>
110 </li>
111 <li><div> Enter <code><object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="https://jmonkeyplatform-contributions.googlecode.com/svn/trunk"><param name="text" value="<html><u>https://jmonkeyplatform-contributions.googlecode.com/svn/trunk</u></html>"><param name="textColor" value="blue"></object></code> in the <acronym title="Uniform Resource Locator">URL</acronym> field</div>
112 </li>
113 <li><div> Enter your googlecode username and commit password (different than login pass, you can find your password <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="https://code.google.com/hosting/settings"><param name="text" value="<html><u>here</u></html>"><param name="textColor" value="blue"></object>!) and press &quot;Next&quot;</div>
114 </li>
115 <li><div> Check that the &quot;Repository Folder&quot; is <code>trunk/mypluginfolder</code> and enter an import message</div>
116 </li>
117 <li><div> Press &quot;Finish&quot;</div>
118 </li>
119 </ul>
120 </li>
121 </ul>
122
123 <p>
124
125 And thats it, from now on each time you commit changes to your module it will be built and added to the contributions center automatically and the version number will be extended by the svn revision number (e.g. 0.8.1.1234)
126 </p>
127
128 </div>
129
130 <h4><a>Building wrapped library jar files on the server</a></h4>
131 <div>
132
133 <p>
134 You can just build your library locally and update and commit the jar file and javadoc/sources zip files to the <code>release/libs</code> folder of your plugin in the contrib repo. The users plugins will automatically be updated with the new jar files. You can however also build the library project on the server.
135 </p>
136
137 <p>
138 As normally only the module project is being built on the server, any projects that create the actual jar files for library plugins (&quot;normal&quot; projects from the <acronym title="Software Development Kit">SDK</acronym>/NetBeans) have to be built from the module build file. To do that simply add the following ant targets to the module build file (adapt to your project file and folder names):
139
140 </p>
141 <pre><span>&lt;target name=&quot;init&quot; depends=&quot;basic-init,files-init,build-init,-javac-init,-build-subproject&quot;/&gt;</span>
142 <span>&lt;target name=&quot;-build-subproject&quot;&gt;</span>
143     <span>&lt;ant dir=&quot;./AI&quot; inheritall=&quot;false&quot; inheritrefs=&quot;false&quot; target=&quot;clean&quot;/&gt;</span>
144     <span>&lt;ant dir=&quot;./AI&quot; inheritall=&quot;false&quot; inheritrefs=&quot;false&quot; target=&quot;jar&quot;/&gt;</span>
145     <span>&lt;ant dir=&quot;./AI&quot; inheritall=&quot;false&quot; inheritrefs=&quot;false&quot; target=&quot;javadoc&quot;/&gt;</span>
146     <span>&lt;zip basedir=&quot;./AI/dist/javadoc&quot; file=&quot;release/libs/jME3-ai-javadoc.zip&quot;/&gt;</span>
147     <span>&lt;zip basedir=&quot;./AI/src&quot; file=&quot;release/libs/jME3-ai-sources.zip&quot;/&gt;</span>
148     <span>&lt;copy file=&quot;./AI/dist/jME3-ai.jar&quot; todir=&quot;release/libs&quot;/&gt;</span>
149 <span><span>&lt;/target&gt;</span></span></pre>
150
151 <p>
152
153 <strong>Note that for the module version number to increase automatically on a commit to the library project, the library project has to be a subfolder of the main module project.</strong>
154
155 </p>
156
157 </div>
158 <!-- EDIT3 SECTION "jMonkeyEngine SDK Contributions Update Center" [1393-] -->
159 <p><em><a href="http://hub.jmonkeyengine.org/wiki/doku.php/sdk:development:setup?do=export_xhtmlbody">view online version</a></em></p>