2008-04-20 13:02:22 -07:00
|
|
|
|
Steve Wadsworth (lizzardo on RomRaider forum)
|
|
|
|
|
|
|
|
|
|
This file is an attempt to consolidate available information on setting up, building,
|
2008-04-29 03:43:09 -07:00
|
|
|
|
and packaging RomRaider. All instructions assume a Windows environment and the use
|
|
|
|
|
of Eclipse for development. Apologies for the Windows-centricity, but some of the
|
|
|
|
|
tools inherited from the RomRaider project are Windows-based.
|
2008-04-20 13:02:22 -07:00
|
|
|
|
|
|
|
|
|
----------------------------------------------
|
|
|
|
|
Setting up the project (from romraider.com)
|
|
|
|
|
|
2012-05-18 13:20:30 -07:00
|
|
|
|
As an open source project, RomRaider depends on Java developers like you for
|
2008-04-29 03:43:09 -07:00
|
|
|
|
enhancements, bug fixes and general maintenance. This page is meant to be a
|
|
|
|
|
guide to setting up a development environment from scratch. The guide was
|
2012-05-18 13:20:30 -07:00
|
|
|
|
originally written by Tgui and has been adapted and revised for the reflect
|
|
|
|
|
the current source control system.
|
2008-04-20 13:02:22 -07:00
|
|
|
|
|
2012-05-18 13:20:30 -07:00
|
|
|
|
RomRaider<65>s official IDE is Eclipse. You are free to use any Java IDE you
|
2008-04-29 03:43:09 -07:00
|
|
|
|
choose, but due to the extremely simple process of setting up the environment
|
2008-04-20 13:02:22 -07:00
|
|
|
|
and the power of Eclipse, it<69>s probably your best choice.
|
|
|
|
|
|
2012-05-18 13:20:30 -07:00
|
|
|
|
* Installing the Java Development Kit and Eclipse
|
|
|
|
|
o Install the latest version of the 32bit Java SE Development Kit
|
|
|
|
|
(http://java.sun.com/javase/downloads/index.jsp)
|
|
|
|
|
o Get and install <20>Eclipse IDE for Java Developers<72> 32bit
|
|
|
|
|
(http://www.eclipse.org/downloads)
|
|
|
|
|
for your specific platform. The Java EE version will work too but there are
|
|
|
|
|
subtle differences (noted below).
|
|
|
|
|
o Set the JAVA_HOME environment variable for your Operating System to point
|
|
|
|
|
to the JDK installation directory. i.e.: For Windows 32bit,
|
|
|
|
|
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_32
|
|
|
|
|
|
|
|
|
|
* Setting up the RomRaider project
|
|
|
|
|
o If you use the Java EE version you may need to install the Git plugin,
|
|
|
|
|
or you can use the non integrated command line Git tools outside of Eclipse
|
|
|
|
|
(while Eclipse is not running of course).
|
|
|
|
|
o If you have Java EE and wish to install the Git plugin, open:
|
|
|
|
|
Help > Eclipse Marketplace, Search for <20>EGit<69> (name of the plug in),
|
|
|
|
|
select it, Install, and restart Eclipse
|
|
|
|
|
o Open the Git perspective in Eclipse by clicking:
|
|
|
|
|
Window > Open Perspective > Other > Git Repository Exploring
|
|
|
|
|
o Press the Clone Git Repository button
|
|
|
|
|
o In the window the pops up paste in the repository URL:
|
|
|
|
|
(https://github.com/RomRaider/RomRaider.git)
|
|
|
|
|
o Click <20>Next<78>
|
|
|
|
|
o In the branches window click <20>Deselect All<6C>, then scroll to the bottom and
|
|
|
|
|
select <20>master<65>, click <20>Next<78>
|
|
|
|
|
o Enter a directory path on your computer to store the repository in. DO NOT
|
|
|
|
|
save it in the Eclipse workspace directory.
|
|
|
|
|
o Click <20>Finish<73>
|
|
|
|
|
o After the repository has been copied to your system it will appear in the
|
|
|
|
|
left pane of Eclipse, Git Repositories.
|
|
|
|
|
o Right-click on the repository entry and select <20>Import Projects<74>.
|
|
|
|
|
o Click <20>Next<78> and select <20>Finish<73>.
|
|
|
|
|
o To switch to the Java view, open the Java perspective by clicking:
|
|
|
|
|
Window > Open Perspective > Java
|
|
|
|
|
|
|
|
|
|
* Setting the library path
|
|
|
|
|
o You may need to change the path to the Jars within your libs directory
|
|
|
|
|
(ex: Linux). You should read this to set the Build Paths:
|
|
|
|
|
(http://help.eclipse.org/indigo/topic/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm)
|
|
|
|
|
|
|
|
|
|
* Building the Project for the First Time
|
|
|
|
|
o First complete a build using ant. Right-click on build.xml and select:
|
|
|
|
|
Run As -> 2 Ant build (this may appear as item 3 in the Java EE version)
|
|
|
|
|
then select all in the targets tab.
|
|
|
|
|
o When the build is finished (successfully I hope), Right-click on the root
|
|
|
|
|
romraider project and select Refresh. This should clear all the errors and
|
|
|
|
|
warnings decorations you may have seen on some files.
|
|
|
|
|
o The built files are stored in the repository<72>s build directory:
|
|
|
|
|
RomRaider\build\dist
|
|
|
|
|
o Install the build of your choosing and enjoy RomRaider.
|
|
|
|
|
|
|
|
|
|
* Setup EGit
|
|
|
|
|
o Ensure you have configured your user settings in Eclipse under menu:
|
|
|
|
|
Window > Preferences > Team > Git > Configuration > User Settings
|
|
|
|
|
add entries for user.name and user.email
|
|
|
|
|
o Switch to the Repository Settings tab and Add Entry branch.master.rebase
|
|
|
|
|
with a value of true
|
|
|
|
|
o The EGit reference can be found here:
|
|
|
|
|
(http://wiki.eclipse.org/EGit/User_Guide)
|
|
|
|
|
and a Git command x-ref here:
|
|
|
|
|
(http://wiki.eclipse.org/EGit/Mapping_Git_Commands)
|
2008-04-20 13:02:22 -07:00
|
|
|
|
|
|
|
|
|
----------------------------------------------
|
|
|
|
|
|
2012-05-18 13:20:30 -07:00
|
|
|
|
|
2008-04-29 03:43:09 -07:00
|
|
|
|
Notes on the above:
|
2008-04-20 13:02:22 -07:00
|
|
|
|
|
|
|
|
|
1) Make sure the build path for the Java builder is set correctly. On the top menu:
|
|
|
|
|
|
|
|
|
|
Project -> Properties -> Java Build Path
|
|
|
|
|
|
|
|
|
|
On the Source tab, the default output folder should be set to
|
|
|
|
|
|
2008-04-29 03:43:09 -07:00
|
|
|
|
romraider/build/classes
|
2008-04-20 13:02:22 -07:00
|
|
|
|
|
2012-05-18 13:20:30 -07:00
|
|
|
|
2) The jars in the java build path mentioned above should be correct in the
|
|
|
|
|
repository for a Windows environment. These settings are in the .classpath file
|
|
|
|
|
and should all have a relative path to the project root directory.
|
|
|
|
|
|
|
|
|
|
3) The ant build file is in the main directory and uses the default name of
|
2011-09-23 13:35:10 -07:00
|
|
|
|
"build.xml".
|
|
|
|
|
|
|
|
|
|
The Java builder is set as the default. During development it's convenient to have
|
|
|
|
|
the "Problems" pane show warning and errors. The ant build does not send warnings
|
|
|
|
|
or errors there. The ant build is primarily for automation of the complete build
|
|
|
|
|
process for packaging.
|
|
|
|
|
|
|
|
|
|
To build using ant, right-click on the build.xml
|
|
|
|
|
file in the Package Explorer (Java perspective) and select
|
|
|
|
|
|
2012-05-18 13:20:30 -07:00
|
|
|
|
Run As -> 2 Ant build (this could be item 3 in Java EE), then select "all" in
|
|
|
|
|
the targets tab. To get more verbose output from ant set the -v option in the
|
|
|
|
|
arguments field on the Main tab.
|
2011-09-23 13:35:10 -07:00
|
|
|
|
|
|
|
|
|
The "help" target lists available targets with a brief description of each.
|
|
|
|
|
|
2012-05-18 13:20:30 -07:00
|
|
|
|
The "all" target does just that. It rebuilds everything, finishing with the
|
|
|
|
|
installers saving all files in the <repository_path>\RomRaider\build\dist\
|
|
|
|
|
directory under each OS name Windows and Linux.
|