Stendhal on Eclipse: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
Undo revision 20651 by AntumDeluge (talk)
imported>AntumDeluge
Stendhal on Eclipse: Add instructions for Git checkout (testing).
Line 1: Line 1:
{{Navigation for Stendhal Top|Building & Hosting}}
{{Navigation for Stendhal Top|Building & Hosting}}


== New Project from CVS ==
==First Steps==

<ol>
<ol>
<li> First of all open the view called Package Explorer.</li>
<li> First of all open the view called Package Explorer.</li>
Line 7: Line 8:
<li> "CVS" -> "Project from CVS" </li>
<li> "CVS" -> "Project from CVS" </li>
<li> Get stendhal from CVS. (Connection type: pserver, User: anonymous, Password - leave blank, Host:arianne.cvs.sourceforge.net, Repository: /cvsroot/arianne)</li>
<li> Get stendhal from CVS. (Connection type: pserver, User: anonymous, Password - leave blank, Host:arianne.cvs.sourceforge.net, Repository: /cvsroot/arianne)</li>

<pre>
<pre>
file-> new -> project -> project-> from cvs
file-> new -> project -> project-> from cvs
Line 23: Line 25:
click directory: stendhal
click directory: stendhal
click next
click next
</pre>


checkout as a project configured using the new project wizard
<li>Checkout as a project configured using the new project wizard. Click "Next" then "Finish".</li>
</ol>
click next


== New Project from Git ==
click finish


<span style="font-style:italic;"><span style="color:red;">NOTE:</span> There are plans to move Stendhal from CVS to Git. But, there is not yet an official Git repository. For now it is recommended to checkout the source from CVS.</span><br>
select a wizard: java project (do not select a simple "general" project!)
<span style="font-style:italic;"><span style="color:red;">NOTE:</span> Eclipse does not come installed with a Git plugin. You will need to install EGit.</span>
project Name: stendhal ( or whatever you like to call it )
<ol>
make sure in jre a java version 1.5 or higher is selected
<li>Open the Eclipse Marketplace (Help -> Eclipse Marketplace).</li>
click finish
<li>Find and install EGit.</li>
<li>Restart Eclipse.</li>
<li>Open package explorer view.</li>
<li>Select "File -> Import -> Git -> Projects from Git" and click "Next".</li>
<li>Select "Clone URI" and click "Next".</li>
<li>Fill in the following information:</li>

<pre>
NOTE: These Git URIs are for testing and not the official Stendhal repository.
They may not contain updated source code. When an official repository
has been established it will be shown here.

For anonymous checkout:
URI: git://git.code.sf.net/p/delugebuilds/stendhal-git
For privileged checkout:
URI: ssh://username@git.code.sf.net/p/delugebuilds/stendhal-git

Host: git.code.sf.net
Repository path: /p/delugebuilds/stendhal-git
Protocol: "git" (for anonymous) or "ssh" (for privileged).
Port: Can be left blank.
Username: Only required for privileged checkout.
Password: Will be prompted for if left blank on privileged checkout.
</pre>
</pre>

<li> Right click on your project folder and select "Properties" in the context menu.</li>
<li>Click "Next".</li>
<li> Then select "Java Build Path" on the left side of the dialog box.</li>
<li>Check "master" and click "Next".</li>
<li> Now remove all existing folders from source path and add the two source folders 'src' and 'tests' by clicking on the "Add Folder..." button</li>
<li>Under "Destination" choose the directory where you want to download the source code and select "Next". The other options can be left at their defaults.
<li>After cloning has finished select "Use the New Project wizard" and click "Finish".</li>
</ol>

== Configure Project ==

<ol>
<li>In the New Project wizard select Java -> Java Project (do not select a simple "general" project!) and click "Next".</li>
<li>Project name: stendhal ( or whatever you like to call it ). If you are importing from Git you need to use the name of the folder where the source code is located ( the rest of the options will be automatically selected ).</li>
<li>Under the section named "JRE" make sure a Java version 1.5 or higher is selected and click "Finish".</li>
<li>Right click on your project folder and select "Properties" in the context menu.</li>
<li>Then select "Java Build Path" on the left side of the dialog box.</li>
<li>Now remove all existing folders from source path and add the two source folders 'src' and 'tests' by clicking on the "Add Folder..." button</li>

<pre>
<pre>
source folder #1:
source folder #1: