Page 3 of 4

Re: Masticore

PostPosted: 15 Feb 2010, 18:12
by Chris H.
zen wrote:The only thing left that I can think of in Eclipse is:
Eclipse>Preferences>Team>SVN
Configuration location = ~./profile

but I can't even set the text box to that value since it's a hidden file!!
`
From the standard open file dialog you can display the hidden files so that they can be opened. To show the hidden files in the open file dialog type:

command shift period


Not sure if this will help, it may or may not get you one step closer to resolving your situation. Good luck. :)

Re: Masticore

PostPosted: 16 Feb 2010, 12:12
by Chris H.
I found a SVN client for the Mac on Versiontracker. Current version is 6.5.4 and will work on 10.5 Intel and PPC based machines.

SmartSVN - 6.5.4 Subversion (SVN) client

The product description states:

SmartSVN is a platform-independent Subversion (SVN) client. Although it contains very powerful features, it is very easy to use, especially for users of SmartCVS who switched to Subversion. SmartSVN is self-contained, no need to install seperate applications like Subversion command line client or file compare tools.

SmartSVN is available in two versions, the commercial Professional version and the feature-reduced free Foundation version.
`
This may allow you to access the Forge SVN while avoiding the incompatible Subversion client that was installed on your machine. It may be worth consideration.

Re: Masticore

PostPosted: 16 Feb 2010, 14:37
by zen
Hi all,
thanks for all of the ideas and support. In the end I've given up on subclipse.
svn checkout http://cardforge.googlecode.com/svn
seemed to do grab the current code.

after importing into a new project in eclipse. I immediately get the following error:
"SwingWorker cannot be resolved to a type."

the error is located in CopyFiles.java
Code: Select all
 import javax.swing.SwingWorker;
did anyone else have this error?

I downloaded a new SwingWorker.jar from https://swingworker.dev.java.net/servlets/ProjectDocumentList
and added it to the build path. but for some reason eclipse still finds an error on the line
Code: Select all
 import javax.swing.SwingWorker;

Re: Masticore

PostPosted: 16 Feb 2010, 16:15
by DennisBergkamp
Hmm, I think SwingWorker is part of Java 1.5.
Do you have 1.5 installed?

Another thing that might have happened is that the .classpath file got transferred when you grabbed the source from SVN. You should probably delete this .classpath file and have Eclipse generate your own.

Re: Masticore

PostPosted: 16 Feb 2010, 21:24
by zen
Halleluia!
So it's finally compiling!!! Special thanks to Chris H. and Dennis for all of your help :)
It turned out I was importing from the wrong directory. Apparently the repository I downloaded from http://cardforge.googlecode.com/svn contains the mtgforge source in three different locations:
1. /src/src , /src/res
2. /trunk/MTGForgeNew
3. /trunk/workspace/CardForge

I kept importing from 1. which never worked for various classpath errors and missing libraries (that should've been there btw). Then I imported from 3. and everything's a go.
The only exception being that the source is seemingly older than that 01-01-forge which I was working with a few days ago. For example,
1. there's only one Card_Factory.java instead of a card factory for each of the basic card types.
2. in cards.txt, there's no abDamageCP, and pumpPT options.
were these taken out of the newer versions of forge for some reason? or do i just have an old version of the source?

Re: Masticore

PostPosted: 16 Feb 2010, 22:31
by Chris H.
zen wrote:Halleluia!
So it's finally compiling!!! Special thanks to Chris H. and Dennis for all of your help :)
It turned out I was importing from the wrong directory. Apparently the repository I downloaded from http://cardforge.googlecode.com/svn contains the mtgforge source in three different locations:
1. /src/src , /src/res
2. /trunk/MTGForgeNew
3. /trunk/workspace/CardForge

I kept importing from 1. which never worked for various classpath errors and missing libraries (that should've been there btw). Then I imported from 3. and everything's a go.
The only exception being that the source is seemingly older than that 01-01-forge which I was working with a few days ago. For example,
1. there's only one Card_Factory.java instead of a card factory for each of the basic card types.
2. in cards.txt, there's no abDamageCP, and pumpPT options.
were these taken out of the newer versions of forge for some reason? or do i just have an old version of the source?
`
I think you are getting closer to having this set up. I believe that we are using:

https://cardforge.googlecode.com/svn/src/

for our most recent builds.

I think that Rares did the original trunk and that Dennis had an original try at setting up at

trunk > MTGForgeNew

With Silly Freak's assistance, we settled on using /svn/src/

I suspect that /src/res/ is giving you just the res files. The /svn/src/ will give you the entire project. You will get the java src, the various res files, and the various settings/properties/classpath, etc support files.

It is confusing at first, but once you have everything set up … you will get busy with the fun stuff and you will try to forget the hassles. As you read through the messages in our developer section you will see that we all have faced a few difficulties here and there.

Send Dennis a pm with your google gmail account. He will set you up as a contributer. You will need to find your google code password. I think that you will find this at

googlecode.com password

Re: Masticore

PostPosted: 16 Feb 2010, 23:10
by DennisBergkamp
Added him already.

Re: Masticore

PostPosted: 16 Feb 2010, 23:35
by zen
import javax.swing.SwingWorker;
error: SwingWorker cannot be resolved to a type.

I think the problem is that I'm running the project in JRE 1.5 . I'm downloading the new 1.6 JRE right now, which I suspect has SwingWorker by default.

Re: Masticore

PostPosted: 17 Feb 2010, 00:37
by zen
currently installing soylatte v1.0.3 , which is the openJDK ported to macs, and is my only shot at installing JDK v1.6 from what I gather.

Re: Masticore

PostPosted: 17 Feb 2010, 02:30
by zen
the good: installing JRE 1.6 did the trick!
the bad: Gui_NewGame.java > run as > java applicaition
error
Code: Select all
 java.io.FileNotFoundException: forge.properties (No such file or directory)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.<init>(FileInputStream.java:106)
   at treeProperties.TreeProperties.<init>(TreeProperties.java:158)
   at treeProperties.TreeProperties.<init>(TreeProperties.java:132)
   at forge.properties.ForgeProps.<clinit>(ForgeProps.java:28)
   at forge.Gui_NewGame.<clinit>(Gui_NewGame.java:87)
Exception in thread "main" java.lang.ExceptionInInitializerError
   at forge.Gui_NewGame.<clinit>(Gui_NewGame.java:87)
Caused by: java.lang.NullPointerException
   at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
   at java.util.regex.Matcher.reset(Matcher.java:291)
   at java.util.regex.Matcher.<init>(Matcher.java:211)
   at java.util.regex.Pattern.matcher(Pattern.java:888)
   at java.util.Formatter.parse(Formatter.java:2457)
   at java.util.Formatter.format(Formatter.java:2413)
   at java.io.PrintWriter.format(PrintWriter.java:861)
   at java.io.PrintWriter.printf(PrintWriter.java:760)
   at forge.error.ErrorViewer.printError(ErrorViewer.java:128)
   at forge.error.ErrorViewer.showError(ErrorViewer.java:66)
   at forge.error.ErrorViewer.showError(ErrorViewer.java:47)
   at forge.properties.ForgeProps.<clinit>(ForgeProps.java:31)
   ... 1 more
how do I find out which file it's missing?

Re: Masticore

PostPosted: 17 Feb 2010, 03:40
by Chris H.
zen wrote:how do I find out which file it's missing?
`
Here is the missing file.

`

Re: Masticore

PostPosted: 17 Feb 2010, 04:04
by DennisBergkamp
Yes, put that in the root directory of your project, that should do the trick :)

Re: Masticore

PostPosted: 17 Feb 2010, 08:31
by silly freak
if SwingWorker is 1.6, we should probably go back away from that. could have been me who used it in the first place, but generally speaking we always tried to be compatible with 1.5, right?

Re: Masticore

PostPosted: 17 Feb 2010, 12:00
by zen
java.lang.Exception: TreeProperties returns null for gui--properties
java.lang.Exception: TreeProperties returns null for gui/Display--file

the weird thing is that the folder
res/gui IS included in the project, and contains both display_layout.xml and gui.properties files.

Re: Masticore

PostPosted: 17 Feb 2010, 12:07
by zen
How do I get these libs?

import com.google.common.base.Function;
import com.google.common.collect.ComputationException;
import com.google.common.collect.MapMaker;

they're coming up as unresolved