Marauroa on NetBeans: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>SimonSmall Added Category NetBeans |
imported>SimonSmall Small tidy-up |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 31: | Line 31: | ||
=== Released Source code === |
=== Released Source code === |
||
Download the source code from the Arianne website and build it yourself. You will be able to view the source code (if, for example, you want a deeper understanding of how it works), run a debug session into the Marauroa source code, and create the |
Download the source code from the Arianne website and build it yourself. You will be able to view the source code (if, for example, you want a deeper understanding of how it works), run a debug session into the Marauroa source code, and create the Javadoc help information. See the rest of this page for this method. |
||
=== Code from the Repository === |
=== Code from the Repository === |
||
Marauroa source code is held in a Git repository, and you can connect NetBeans to that repository and download the very latest code. This can be compiled, as with the released source code, but may not be as stable (it should be, though). You can find and fix bugs or make modifications, and submit patches back to the Marauroa project. Getting the code from the repository is |
Marauroa source code is held in a Git repository, and you can connect NetBeans to that repository and download the very latest code. This can be compiled, as with the released source code, but may not be as stable (it should be, though). You can find and fix bugs or make modifications, and submit patches back to the Marauroa project. Getting the code from the repository is covered in the [[Marauroa_Git_on_NetBeans|NetBeans and Git]] page. |
||
== Directory structures == |
== Directory structures == |
||
| Line 41: | Line 41: | ||
The following directory structure is one suggestion and is used in the instructions. Choose a different one if you wish. |
The following directory structure is one suggestion and is used in the instructions. Choose a different one if you wish. |
||
You will need a location where you can save the files needed for development. The top level location is referred to as DEVPATH. Replace this with whatever you have chosen as that location. Do not create any sub-directories yet. |
You will need a location where you can save the files needed for development. The top level location is referred to as '''DEVPATH'''. Replace this with whatever you have chosen as that location. Do not create any sub-directories yet. |
||
= Start NetBeans = |
= Start NetBeans = |
||
| Line 47: | Line 47: | ||
Start the NetBeans IDE. Close any open projects if they are not those covered here. |
Start the NetBeans IDE. Close any open projects if they are not those covered here. |
||
Click New Project, choose Java and Java Class Library. Click Next, then give the Project Name as marauroa. Change the Project Location to the top level location (DEVPATH, see above); the Project Folder is shown as DEVPATH\marauroa with DEVPATH being your chosen location. Directory DEVPATH\marauroa must be empty (or not exist). |
Click '''New Project''', choose '''Java''' and '''Java Class Library'''. Click '''Next''', then give the '''Project Name''' as '''marauroa'''. Change the '''Project Location''' to the top level location (DEVPATH, see above); the '''Project Folder''' is shown as '''DEVPATH\marauroa''' with DEVPATH being your chosen location. Directory DEVPATH\marauroa must be empty (or not exist). |
||
The empty Project is created in NetBeans. Under the Files tab you will see the directory structure it has also generated; check this using your file explorer. |
The empty Project is created in NetBeans. Under the Files tab you will see the directory structure it has also generated; check this using your file explorer. |
||
Expand the Marauroa source file you have downloaded. Create a new directory named libs (i.e. DEVPATH\marauroa\libs). Copy the files |
Expand the Marauroa source file you have downloaded. Create a new directory named '''libs''' (i.e. '''DEVPATH\marauroa\libs'''). Copy the files '''log4j.jar''', '''jnlp.jar''' and '''jython.jar''' from the source file '''libs''' directory to this new directory. Copy the whole of the source file '''src''' directory to the '''src''' directory created by NetBeans. |
||
Return to the NetBeans IDE (Projects tab). It should have rescanned the files and read them into the project. If not, select Source, Scan for External Changes from the menu. A red exclamation mark warning icon shows the location of several errors. Right click the Libraries branch of the |
Return to the NetBeans IDE ('''Projects''' tab). It should have rescanned the files and read them into the project. If not, select '''Source''', '''Scan for External Changes''' from the menu. A red exclamation mark warning icon shows the location of several errors. Right click the '''Libraries''' branch of the project tree, and select '''Add Jar/Folder'''. Browse to the the '''libs''' directory for this project and select the '''log4j.jar''' file. Wait until the scanning process has finished, then repeat for each of the jar files copied from the source file libs directory (or use Ctrl-click to select multiple jar files). All red warning icons should disappear. |
||
== Build Marauroa == |
== Build Marauroa == |
||
If there are no errors in the package, select Run, |
If there are no errors in the package, select '''Run''', '''Build Project''' from the NetBeans menu bar. This will create '''marauroa.jar''' in the '''dist''' directory. |
||
Select Run, Generate Javadoc from the NetBeans menu bar. This will create the Javadoc documentation files in the dist\javadoc directory, and open the index.html file from that directory in your web browser. The javadoc files contain the Marauroa documentation extracted from the source files. Read them or ignore them, it is your choice; you do not have to create them. They will be useful when you are trying to understand the structure of the Marauroa engine. To read them later, open the index.html in your web browser. |
Select '''Run''', '''Generate Javadoc''' from the NetBeans menu bar. This will create the Javadoc documentation files in the '''dist\javadoc''' directory, and open the '''index.html''' file from that directory in your web browser. The javadoc files contain the Marauroa documentation extracted from the source files. Read them or ignore them, it is your choice; you do not have to create them. They will be useful when you are trying to understand the structure of the Marauroa engine. To read them later, open the index.html in your web browser. |
||
== Completion == |
== Completion == |
||
The |
The '''marauroa.jar''' file is in the '''dist''' directory. This is what you will need for your game. This step has only created the marauroa library, not a game. |
||
Note that there are licence and acknowledgement files in the source you downloaded. You need to consider these when you have completed your game. |
|||
[[Category:NetBeans]] |
[[Category:NetBeans]] |
||