How to get RPTools source via Eclipse and subversion

Progress reports and musings from the developers on the current gaming tools.

Moderators: dorpond, trevor, Azhrei

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: How to get RPTools source via Eclipse and subversion

Post by jfrazierjr »

Blakey wrote:I can't seem to find the Repository for any of the code. Not sure what I'm doing wrong. Can anyone help?

I have Elcipse (Galileo) installed and its working for other projects.
When I try to add the RPTools repository I do the following steps:

1. Help->Install New Software.
2. Enter "Work with: " https://rptools.svn.sourceforge.net/svnroot/rptools/
3. Click Add.

It comes back with "No repository found at https://rptools.svn.sourceforge.net/svnroot/rptools.

Any clues?

Cheers
Blakey
Ummm.. no.. You have install the SVN software THEN create a new SVN project... from the new SVN project, that is where you put in the rptools information.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: How to get RPTools source via Eclipse and subversion

Post by jfrazierjr »

jfrazierjr wrote:
Blakey wrote:I can't seem to find the Repository for any of the code. Not sure what I'm doing wrong. Can anyone help?

I have Elcipse (Galileo) installed and its working for other projects.
When I try to add the RPTools repository I do the following steps:

1. Help->Install New Software.
2. Enter "Work with: " https://rptools.svn.sourceforge.net/svnroot/rptools/
3. Click Add.

It comes back with "No repository found at https://rptools.svn.sourceforge.net/svnroot/rptools.

Any clues?

Cheers
Blakey
Ummm.. no.. You have install the SVN software THEN create a new SVN project... from the new SVN project, that is where you put in the rptools information.
Let me clarify that. The process used above is only for installing new software FOR eclipse(such as the SVN components like Subversion). Once you have the SVN components installed, you would go to New->Other and scroll down to SVN and select Checkout projects from SVN. Follow the prompts letting it install where it wants, and make sure you check out the trunk folder from each of the required projects(ie, the folders that will come up on the screen after you enter the svn URI). If I remember correctlly you will need to check out parser, rplib, and maptool to get Maptool to work (Az can verify).
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
Blakey
Dragon
Posts: 778
Joined: Fri Mar 23, 2007 11:27 am
Location: Sussex, UK.

Re: How to get RPTools source via Eclipse and subversion

Post by Blakey »

jfrazierjr wrote: Ummm.. no.. You have install the SVN software THEN create a new SVN project... from the new SVN project, that is where you put in the rptools information.
Okay, I'll keep digging, thanks.
The guy in the green hat.

User avatar
Blakey
Dragon
Posts: 778
Joined: Fri Mar 23, 2007 11:27 am
Location: Sussex, UK.

Re: How to get RPTools source via Eclipse and subversion

Post by Blakey »

Okay, brilliant - I got confused with Subclipse for a bit there. Have now checked out the TokenTool trunk and it auto built and runs fine.

Thanks for the help. :D
The guy in the green hat.

MetaGamer
Kobold
Posts: 15
Joined: Sat Jun 26, 2010 3:39 am

Unbound classpath variable: ANTLR_HOME

Post by MetaGamer »

Problem:
Unbound classpath variable: 'ANTLR_HOME/antlr.jar' in project 'parser' (Build Path Problem)
My setup:
  • Win XP 32bit
    Eclipse Java EE IDE Version: 1.3.0.20100617-0521
    Java JDK 1.6.0_20
    Subclipse 1.6.12 (via Eclipse Marketplace)
    ANTLR IDE by Edgar Espina (via Eclipse Marketplace)
Projects / revision
  • parser / trunk
    maptool / tags/MapTool-1.3b70
I can build the parser.jar file by r-clicking on parser/build.xml ->Run As->Ant Build. No problem.

If I remove the following line from parser/.classpath, everything works fine:

Code: Select all

<classpathentry exported="true" kind="var" path="ANTLR_HOME/antlr.jar" sourcepath="ANTLR_HOME/antlrsrc.zip"/>
So I conclude/guess the following:
  • * ANTLR_HOME is supposed to be an environment variable (?).
    * I have no idea how to set ANTLR_HOME.
    * I don't know what to set it to, since the file "antlrsrc.zip" appears nowhere in my Java SDK or Eclipse installations.
    * It doesn't seem to be needed (?)
    * This line was added in the most recent version of parser (5301). It doesn't exist in revision 5265.
I guess I don't have a question (yet), but maybe this can save others some time. Also, if I'm wrong about anything above, it would be good to know.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: How to get RPTools source via Eclipse and subversion

Post by Azhrei »

See my thread (either in this forum or under Java Development) that discusses how to setup Eclipse. There's a note in there about installing the ANTLR plugin. (Took me forever to figure this one out too, even with the README file that's in the parser project. Which reminds me: I should add the thread URL to that README to make it easier for others to find...)

MetaGamer
Kobold
Posts: 15
Joined: Sat Jun 26, 2010 3:39 am

Re: How to get RPTools source via Eclipse and subversion

Post by MetaGamer »

See my thread (either in this forum or under Java Development) that discusses how to setup Eclipse. There's a note in there about installing the ANTLR plugin. (Took me forever to figure this one out too, even with the README file that's in the parser project. Which reminds me: I should add the thread URL to that README to make it easier for others to find...)
Ahh... but I did install ANTLR. See 'my setup'... maybe I have the wrong version, or a did it wrong? Again, not a big deal, since I can compile and everything seems to work fine. Once I verify my notes, I'll post a step-by-step clean-install tutorial for Windows. (Which I wouldn't have been able to do at all without your notes- thanks!)

User avatar
Notsonoble
Dragon
Posts: 387
Joined: Fri Sep 05, 2008 6:01 pm

Re: How to get RPTools source via Eclipse and subversion

Post by Notsonoble »

Okay, I'm trying to get subversion working on helios... I downloaded Eclipse, then downloaded the Subversive-incubation-0.7.9.I20, extracted that into the Eclipse folder, and loaded Eclipse... it asked me to pick a SVN connector... but none of them install correctly...
My D&D/Roleplaying Blog Making a new effort to update every two weeks!
Notsonoble's Samsung Galaxy S

MetaGamer
Kobold
Posts: 15
Joined: Sat Jun 26, 2010 3:39 am

Re: How to get RPTools source via Eclipse and subversion

Post by MetaGamer »

Here is a step-by-step walk-through from my recent experience on Windows NT. YMMV on other systems.

How to develop for RPTools
26 June 2010

Install Java
Why? This is the programming language and source code to the common libraries.
How? Search for "JAVA SDK" and install it.
Which version? Version 5 or later. The most recent (non-beta) is usually the best.
example: http://java.sun.com/javase/downloads/widget/jdk6.jsp

Install Eclipse
Why? This is the IDE (integrated development environment) used by the core developers.
How? Go to eclipse.org and install the version for your operating system.
Which version? Eclipse IDE for Java EE Developers (about 200 MB)
example: http://eclipse.org/downloads/
On a Win32 system, the installation consists of:
  • 1. create a folder in your preferred location
    2. unzip the contents you downloaded into the chosen folder
    3. run eclipse.exe to test that it works.

Install Subclipse

Why? This lets Eclipse work with Subversion (SVN) file repositories.
How? This is an extension to Eclipse. The method for installing them may vary from one version to the next. For the Eclipse 1.3.0 Win32 version go to Help->Eclipse Marketplace. Type "subversion" into the "Find" field, and select "Subclipse" to install. (There may be other options, but this is the one we use.) You'll get a checkbox list of features. Install all of them.

Install ANTLR IDE
Why? This is a build tool that maptool uses.
How? Don't use the Marketplace- you can find a version of ANTLR there, but it's not the same version used for maptools! Instead, you have to use the slightly more circuitous procedure: Help->Install New Software. In the "Work with" dialog, type "http://antlreclipse.sourceforge.net/updates/". Wait for it to find this. Then, select ANTLR UI. Next a couple times, accept the license, confirm the unsigned certificate, and restart Eclipse. Tada!
More docs here: http://antlreclipse.sourceforge.net/

Do the tutorials
Why? This will get you up to speed with the basics of Eclipse, and ensure the Java SDK is installed correctly.

Checkout the Maptool files
Why? This is why you're here! You'll get a local copy to play around with.
How?
  • Select File->Import.
    Select "Other->Checkout projects from SVN". Next.
    Select "Create new Repository location". This is really just storing an address for Eclipse to find files.
    Paste "https://rptools.svn.sourceforge.net/svnroot/rptools" into the URL and proceed.
You will see lots of projects. WARNING! Don't get the root directory of any project. This will take a LONG time, since it includes many old versions. Also, the make files won't work, since the paths are not setup for this.
So, if you don't get "maptool", what do you get? Navigate down to "maptool/tags/MapTool-1.3b70" (or some other version you like). This will ensure you get a known working build. Alternatively, you could Select "maptool/trunk". That is the most recent version of each file in the project, but there is a better chance that there are unknown bugs. Either way, select "Next". You might get a pop-up "Getting remote project info". When it's ready, you may have some options. Choose "Check out as a project in the workspace." The project name is probably pre-populated for you. Make sure that it contains the (root) name of the project you are getting, for example "maptool" or "common.build". Use the default workspace location (unless you know what you're doing.)
Now the SVN directory (e.g.)"https://rptools.svn.sourceforge.net/svn ... ool/trunk/" is copied to your local path (e.g.) "C:\Documents and Settings\joebob\eclipse-workspace\tokentool". Notice you've lost a relative path segment "trunk". This is important for the build files to work. You will need to repeat this import operation several times, once for each project you need. The second and subsequent times, you don't need to enter the URL, you can select "Use existing repository location". Remember, don't get the root directory! Always drill down and get /trunk or one of the /tags builds.

You will need all of the following projects:
  • rplib /trunk or /tags version
    common.build /trunk or /tags version
    parser /trunk or /tags version
    You will probably want one of the following projects:
    maptool /trunk or /tags version
    tokentool /trunk or /tags version
Right-Click on the "parser" project. Select "Toggle ANTLR Project Nature". You should have a pair of moose antlers on the parser project now. (If you don't get that options, but you do have the option "Configure->Convert to ANTLR Project", you have installed the ANTLR version from the marketplace. Uninstall that, and do it the right way above! Actually, you can make that version work just fine by deleting the line that causes the error, but its probably better to sync your dev environment with what the main devs use.)


Test Run
In the eclipse navigator, RClick the file "maptool/MapToolClient(Std).launch". Select "Run As"-> MapToolCient(Std) and viola!

Now you're on your own. Good luck!

Edit1: When you want to update your project(s) against the SourceForge repository, right-click on the project and choose Team > Update. Then sit back and wait for a few seconds while Eclipse contacts the SVN repository and grabs any updates.

Edit2: If you are going to be submitting patches, please read the other thread on MapTool programming guidelines before submitting any changes.
Last edited by Azhrei on Wed Nov 17, 2010 2:57 pm, edited 2 times in total.
Reason: Added notes about doing an update, and a link to the style guidelines

User avatar
Notsonoble
Dragon
Posts: 387
Joined: Fri Sep 05, 2008 6:01 pm

Re: How to get RPTools source via Eclipse and subversion

Post by Notsonoble »

Thanks for that, Subclipse worked far better than the subversive suggestion on the page back when Trevor started this thread
My D&D/Roleplaying Blog Making a new effort to update every two weeks!
Notsonoble's Samsung Galaxy S

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: How to get RPTools source via Eclipse and subversion

Post by Azhrei »

Also note that ANTLR isn't needed unless you plan to produce a JAR-based build, probably for distributing to others to try.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: How to get RPTools source via Eclipse and subversion

Post by Jagged »

Just thought I'd mention that I worked through MetaGamer's steps at the weekend on a new Windows 7 box and Helios.
All went swimmingly ta!

sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Re: How to get RPTools source via Eclipse and subversion

Post by sozin »

Note if you're using Windows 64 bit you'll need a 64 bit JavaHL install. http://subclipse.tigris.org/wiki/JavaHL and http://www.sliksvn.com/en/download worked fine for me.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: How to get RPTools source via Eclipse and subversion

Post by Azhrei »

JavaHL is a native SVN implementation, right?

That would certainly work, but I recommend a pure Java solution if possible. If there were speed or performance issues then I might go native, but your SVN plugin is not going to be the limiting factor when checking out code from a repo. ;)

User avatar
aku
Dragon
Posts: 856
Joined: Wed Nov 15, 2006 9:03 am
Contact:

Re: How to get RPTools source via Eclipse and subversion

Post by aku »

So, i'm not sure if it is ever brought up since trevor wrote this initially. But in his original post, he links to another page regarding setting up SVN: it says that the link you need to get the "latest" SVN plugin, is http://subclipse.tigris.org/update_1.0.x .... unfortunately, its not, and if you do follow that, you will have a bitchin time making updates BECAUSE... that version doesnt have relative pathing in it (so everything remains absolute to your workspace (sounding like a familiar issue joe and Az? lol)) you need atleast 1.4.x for that to work, and as i was skimming this thread for a new link, i did see someone mention they had svn 1.6, which does seem to be the latest...

Post Reply

Return to “Developer Notes”