mirror of https://github.com/FreeCol/freecol.git
Add user-contributed information on how to use Eclipse and Netbeans.
This commit is contained in:
parent
606811e2c0
commit
2ef9e9adcb
|
@ -62,7 +62,7 @@ Major changes to the code should be discussed on the
|
|||
developer's mailing list before they are implemented. This is to
|
||||
ensure that your work will not be in vain if somebody else knows
|
||||
a better way of doing it. It is also a good idea to discuss changes
|
||||
that is not directly related to the next release on our
|
||||
that is not directly related to the next release on our
|
||||
\href{http://www.freecol.org/index.php?section=18}{roadmap}.
|
||||
|
||||
|
||||
|
@ -140,7 +140,7 @@ For example: You can use the "Fixed: Use SVN" after you have fixed a bug.
|
|||
Our primary means of communication is the developers mailing list:
|
||||
freecol-developers@lists.sourceforge.net
|
||||
|
||||
You can (and should) subscribe to this list
|
||||
You can (and should) subscribe to this list
|
||||
\href{http://lists.sourceforge.net/lists/listinfo/freecol-developers}{here}.
|
||||
|
||||
|
||||
|
@ -176,6 +176,121 @@ generated, and you can start the game simply by writing:
|
|||
\verb+java -Xmx128M -jar FreeCol.jar+
|
||||
|
||||
|
||||
\hypertarget{Using an IDE}{\section{Using an IDE}}
|
||||
|
||||
Most FreeCol developers don't seem to use an IDE, so there is no
|
||||
``official'' setup available. However, in the config folder, you can
|
||||
find contributed configuration files for both Netbeans and Eclipse.
|
||||
The following information has also been contributed by players that do
|
||||
use an IDE.
|
||||
|
||||
\hypertarget{Using Eclipse}{\subsection{Using Eclipse (thanks to ``nobody'')}}
|
||||
|
||||
Since I'm quite a fan of the Eclipse IDE, I thought I would share my
|
||||
experience with building FreeCol in Eclipse on the Windows platform.
|
||||
|
||||
I assume that you have installed JDK, Eclipse and SVN (both Eclipse
|
||||
plug-in and stand alone client). Make sure that your path environment
|
||||
variable contains both the JDK and SVN client directories.
|
||||
|
||||
First, add a new repository location in Eclipse in the SVN
|
||||
Repositories view, for the
|
||||
\href{https://svn.freecol.org/svnroot/freecol/freecol/}{FreeCol
|
||||
repository}. Leave all the other settings unchanged and click
|
||||
Finish.
|
||||
|
||||
Select either 'trunk' or the branch you want to build, right-click on
|
||||
it and select 'Find/Check out as...'
|
||||
|
||||
In the Check Out dialog, make sure the option 'Check out as a project
|
||||
configured using the New Project Wizard' is selected, and click
|
||||
Finish.
|
||||
|
||||
Select 'Java Project' in the 'Java' category, and click Next. Name
|
||||
your project (FreeCol is an obvious choice). Leave all the other
|
||||
options as is, and click Finish.
|
||||
|
||||
Eclipse starts to copy all the files from the repository. Depending on
|
||||
the server and your connection, this may take from 1-10 minutes. Get a
|
||||
cup of coffee or a glass of cold milk while you wait.
|
||||
|
||||
After downloading has finished, you should see your new project in the
|
||||
Project Explorer. Right-click on the project and select 'Configure
|
||||
Build Path...' from the 'Build Path' sub-menu.
|
||||
|
||||
First off, let's make sure that Eclipse has detected the source file
|
||||
folder 'src'. Select the 'Source' tab, and make sure there is an entry
|
||||
with the name [project name]/src. If not, add it. Don't close the
|
||||
window, as we need to make other changes here.
|
||||
|
||||
Next, we have to add the external jar files to the project, so Eclipse
|
||||
can properly verify the code. Select the 'Libraries' tab, and click
|
||||
the 'Add JARs...' button. Browse to the 'jars' subfolder in the
|
||||
FreeCol project, and select all the jar-files by holding down the
|
||||
CTRL-key. Click OK, and OK again.
|
||||
|
||||
Eclipse should now be able to properly build the project without any
|
||||
errors. If not, fix it. However, we don't actually want Eclipse to do
|
||||
this, since we instead want to use the Ant build file from the
|
||||
repository.
|
||||
|
||||
Right-click on the project, and select 'Properties...' all the way at
|
||||
the bottom of the menu. Select 'Builders' in the menu to the left. You
|
||||
should now see one entry in the list, named 'Java Builder'. This is
|
||||
the default, built-in java builder in Eclipse. Click 'New...' to
|
||||
create our Ant builder instead. Select 'Ant Builder' from the list and
|
||||
click OK.
|
||||
|
||||
In the configuration dialog, click the 'Browse Workspace...' button
|
||||
the 'Buildfile' section. Click on the FreeCol project, and select
|
||||
'build.xml' from the list on the right. Click OK. Click OK again, and
|
||||
the Ant builder is created. You can keep both builders active at the
|
||||
same time, but if you want to save processing power, you can uncheck
|
||||
the 'Java Builder'. Eclipse will warn you about doing this, but don't
|
||||
be alarmed, you can always turn it on again.
|
||||
|
||||
Click OK. If you have activated Automatic building in Eclipse, Ant
|
||||
should start building the project right away. Possible errors could
|
||||
be, that Ant cannot access either the java compiler or a stand-alone
|
||||
svn client. In either of these cases, make sure you added the right
|
||||
directories to your path environment variable.
|
||||
|
||||
If the build went succesfull; congratulations. Open the project folder
|
||||
in the file system, and you will see 'FreeCol.jar' in the root
|
||||
folder. Since this is an executable jar file, you can double click it
|
||||
and launch the game right away. Enjoy.
|
||||
|
||||
|
||||
\hypertarget{Using Netbeans}{\subsection{Using Netbeans (thanks to ``xsainnz'')}}
|
||||
|
||||
\begin{itemize}
|
||||
\item In Netbeans, Select File > New Project
|
||||
\item New Project Window
|
||||
\begin{itemize}
|
||||
\item Select Java Category, Java Free-Form Project
|
||||
\end{itemize}
|
||||
\item Name and Location Panel
|
||||
\begin{itemize}
|
||||
\item In the Location box, browse to where ever you put the source (.../freecol/)
|
||||
\item It should auto detect the build file location, project name and folder
|
||||
\end{itemize}
|
||||
\item Build and Run Actions Panel
|
||||
\begin{itemize}
|
||||
\item Leave the settings as they are
|
||||
\end{itemize}
|
||||
\item Source Package Folders Panel
|
||||
\begin{itemize}
|
||||
\item Add the 'src' folder as Source packages and 'tests' as Test packages
|
||||
\end{itemize}
|
||||
\item Java Sources Panel
|
||||
\begin{itemize}
|
||||
\item Click 'Add JAR/Folder,
|
||||
\item browse into the jars folder
|
||||
\item select all of the jars
|
||||
\item click open.
|
||||
\end{itemize}
|
||||
\item Click Finish
|
||||
\end{itemize}
|
||||
|
||||
\hypertarget{Code documentation}{\section{Code documentation}}
|
||||
|
||||
|
@ -185,7 +300,7 @@ typing \verb+ant javadoc+. The directory "javadoc" will then be
|
|||
created and you can start watching the documentation by opening
|
||||
"index.html" from that directory.
|
||||
|
||||
There is also some additional documentation
|
||||
There is also some additional documentation
|
||||
\href{http://www.freecol.org/index.php?section=3}{here}.
|
||||
|
||||
|
||||
|
@ -304,12 +419,12 @@ FILE
|
|||
Include information on savegame compatibility with previous versions
|
||||
on all messages. Beware that you may have to be subscribed to some
|
||||
lists to be able to post.
|
||||
|
||||
|
||||
\item Post a release message to the FreeCol forum. Include information
|
||||
on savegame compatibility with previous versions, as well as
|
||||
information on how to post bug reports regarding the release in the
|
||||
bug tracker.
|
||||
|
||||
|
||||
\end{itemize}
|
||||
|
||||
The following items can be omitted for unstable releases:
|
||||
|
|
Loading…
Reference in New Issue