It is currently 19 Apr 2024, 19:32
   
Text Size

MAGE: Do it yourself procedure for latest version

by BetaSteward

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

MAGE: Do it yourself procedure for latest version

Postby jeffwadsworth » 29 Jul 2011, 16:29

Disclaimer: I am a newbie. The technique used here is probably overkill, but it works for me. Oh and this is a rough draft. Please copy your "Plugins\Images" folder out of your current MAGE installation so that you don't have to download them again.

1. Download latest JDK and install. Note that this is different from a generic JRE installation.
http://www.oracle.com/technetwork/java/ ... 32154.html
2. Set the JAVA_HOME and PATH environmental variables correctly! You should be able to execute "java" or "javac" from any folder.
3. Download latest Maven and install.
http://maven.apache.org/download.html
4. Set the M2 and M2_HOME environmental variables correctly! You should be able to execute "mvn" from any folder.
5. Download an IDE. I will use Eclipse for this example.
http://www.eclipse.org/downloads/packag ... 37/indigor
6. MAGE uses Mercurial. In Eclipse, select the Help menu and choose "Install new software...". In the "Work with:" field, paste this link:
http://cbes.javaforge.com/update
When you refresh the field, you should see "Mercurial Eclipse" in the window below. Select it and install...restart Eclipse.
7. Install Maven for Eclipse. Using the procedure above, put this link in the field instead:
http://download.eclipse.org/technology/m2e/releases/
8. Make sure you have the Eclipse JRE configuration set up correctly. Select the Windows menu and select Preferences. Select Java and Installed JRE's. Make sure the default is pointing to your JDK folder, not the JRE folder. You will get a tools.jar missing error if not.
9. Select the File menu and Choose "Import...". You should see a "Mercurial" folder. Expand it and choose "Clone an Existing Mercurial Repository". Paste the following in the "Repository Location" field:
https://code.google.com/p/mage/
and select next. The cloning process will take a long time, so just let it roll. Eventually, you will see a screen that lists the different working directory revisions. Select the "default" one and select next. After a bit of time you will see an "Import Projects" screen with our project already checked. Select Finish.
You should now see the MAGE project in the left-hand pane. Expand it. Note the "pom.xml" file at the bottom of the project. Right-click it and select "Run As" and select "Maven Install". If everything is configured correctly, the project will be built successfully after several minutes.
10. Open a terminal prompt/command prompt.
11. Go to the folder "mage-client" Here is my path:
c:\users\noob\workspace\magetest\mage-client
12. Enter the command "mvn clean assembly:assembly" without the quotes.
This will generate a zip file of the client application within the "target" folder. Again, my path:
c:\users\noob\workspace\magetest\mage-client\target
13. Do step 11 within the "mage-server" folder.
14. Copy the mage-client.zip and mage-server.zip to whatever location you wish to run MAGE. Extract them into their respective folders.
15. Execute the server application first followed by the client via their respective batch files.
jeffwadsworth
Super Tester Elite
 
Posts: 1171
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 69 times

Re: MAGE: Do it yourself procedure for latest version

Postby nantuko84 » 29 Jul 2011, 19:07

Good instructions! I'll copy them to our Wiki if you don't mind.

Btw, about copying images to Plugins\images folder - since version 0.7.4 you may point to images folder in Preferences dialog, and this path will be used in all future versions as well, so no need to copy or download images every time new version is released anymore.
Mage\MagicWars blog: http://mwars.blogspot.com/
nantuko84
DEVELOPER
 
Posts: 266
Joined: 08 Feb 2009, 21:14
Has thanked: 2 times
Been thanked: 9 times

Re: MAGE: Do it yourself procedure for latest version

Postby jeffwadsworth » 29 Jul 2011, 19:13

nantuko84 wrote:Good instructions! I'll copy them to our Wiki if you don't mind.

Btw, about copying images to Plugins\images folder - since version 0.7.4 you may point to images folder in Preferences dialog, and this path will be used in all future versions as well, so no need to copy or download images every time new version is released anymore.
Please do that. Thanks.
jeffwadsworth
Super Tester Elite
 
Posts: 1171
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 69 times

Re: MAGE: Do it yourself procedure for latest version

Postby goonjamin » 15 Oct 2011, 21:23

I just followed these directions to compile Revision 310736d7b6 but I am receiving the following error when I try to run the server. All compiling ended with success and no failures that I could see. Did I do something wrong?

Error:
Code: Select all
INFO  [2011-10-15 17:15 [37:369]] Main[main]: Starting MAGE server version 0.7.6

INFO  [2011-10-15 17:15 [37:384]] Main[main]: Logging level: INFO
INFO  [2011-10-15 17:15 [37:805]] Main[main]: Loading game type: mage.game.TwoPl
ayerMatch
INFO  [2011-10-15 17:15 [37:821]] Main[main]: Loading plugin: mage.game.TwoPlaye
rMatch
INFO  [2011-10-15 17:15 [37:821]] Main[main]: Loading game type: mage.game.FreeF
orAllMatch
INFO  [2011-10-15 17:15 [37:837]] Main[main]: Loading plugin: mage.game.FreeForA
llMatch
INFO  [2011-10-15 17:15 [37:837]] Main[main]: Loading tournament type: mage.tour
nament.BoosterDraftEliminationTournament
INFO  [2011-10-15 17:15 [37:837]] Main[main]: Loading plugin: mage.tournament.Bo
osterDraftEliminationTournament
INFO  [2011-10-15 17:15 [37:837]] Main[main]: Loading tournament type: mage.tour
nament.SealedEliminationTournament
INFO  [2011-10-15 17:15 [37:852]] Main[main]: Loading plugin: mage.tournament.Se
aledEliminationTournament
INFO  [2011-10-15 17:15 [37:852]] Main[main]: Loading plugin: mage.player.human.
HumanPlayer
INFO  [2011-10-15 17:15 [37:868]] Main[main]: Loading plugin: mage.player.ai.Com
puterPlayer3
INFO  [2011-10-15 17:15 [37:930]] Main[main]: Loading plugin: mage.player.ai.Com
puterPlayer6
INFO  [2011-10-15 17:15 [37:930]] Main[main]: Loading plugin: mage.deck.Vintage
INFO  [2011-10-15 17:15 [37:930]] Main[main]: Loading plugin: mage.deck.Extended

INFO  [2011-10-15 17:15 [37:930]] Main[main]: Loading plugin: mage.deck.Standard

INFO  [2011-10-15 17:15 [37:946]] Main[main]: Loading plugin: mage.deck.ShardsOf
AlaraBlock
INFO  [2011-10-15 17:15 [37:946]] Main[main]: Loading plugin: mage.deck.Zendikar
Block
INFO  [2011-10-15 17:15 [37:946]] Main[main]: Loading plugin: mage.deck.ScarsOfM
irrodinBlock
INFO  [2011-10-15 17:15 [37:946]] Main[main]: Loading plugin: mage.deck.Limited
INFO  [2011-10-15 17:15 [41:347]] Main[main]: Started MAGE server - listening on
 localhost:17171/?serializationtype=jboss
WARN  [2011-10-15 17:15 [46:323]] ServerMessagesUtil[AWT-EventQueue-0]: Couldn't
 find server.msg.txt using path: server.msg.txt
ERROR [2011-10-15 17:15 [46:323]] ServerMessagesUtil[AWT-EventQueue-0]: java.io.
FileNotFoundException: server.msg.txt (The system cannot find the file specified
)
java.io.FileNotFoundException: server.msg.txt (The system cannot find the file s
pecified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at mage.server.util.ServerMessagesUtil.readFromFile(ServerMessagesUtil.j
ava:135)
        at mage.server.util.ServerMessagesUtil.reloadMessages(ServerMessagesUtil
.java:92)
        at mage.server.util.ServerMessagesUtil.access$000(ServerMessagesUtil.jav
a:51)
        at mage.server.util.ServerMessagesUtil$1.actionPerformed(ServerMessagesU
til.java:168)
        at javax.swing.Timer.fireActionPerformed(Unknown Source)
        at javax.swing.Timer$DoPostEvent.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
WARN  [2011-10-15 17:15 [46:339]] ServerMessagesUtil[AWT-EventQueue-0]: Couldn't
 find server.msg
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at java.util.ArrayList.addAll(Unknown Source)
        at mage.server.util.ServerMessagesUtil.reloadMessages(ServerMessagesUtil
.java:95)
        at mage.server.util.ServerMessagesUtil.access$000(ServerMessagesUtil.jav
a:51)
        at mage.server.util.ServerMessagesUtil$1.actionPerformed(ServerMessagesU
til.java:168)
        at javax.swing.Timer.fireActionPerformed(Unknown Source)
        at javax.swing.Timer$DoPostEvent.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown
Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
goonjamin
 
Posts: 133
Joined: 19 Aug 2010, 19:51
Has thanked: 39 times
Been thanked: 5 times

Re: MAGE: Do it yourself procedure for latest version

Postby nantuko84 » 16 Oct 2011, 06:02

Reproduced and fixed.
But anyway even with this error, you can play using started server - as it is informative message, it doesn't break anything.

Btw, instead of building recent version from trunk by yourself, you have an option to just use already built packages that are renewed every day from here:
http://mtgathering.ru/mage/
Mage\MagicWars blog: http://mwars.blogspot.com/
nantuko84
DEVELOPER
 
Posts: 266
Joined: 08 Feb 2009, 21:14
Has thanked: 2 times
Been thanked: 9 times

Re: MAGE: Do it yourself procedure for latest version

Postby goonjamin » 16 Oct 2011, 11:45

Thanks, I will check out the daily builds.
goonjamin
 
Posts: 133
Joined: 19 Aug 2010, 19:51
Has thanked: 39 times
Been thanked: 5 times

Re: MAGE: Do it yourself procedure for latest version

Postby North » 16 Oct 2011, 19:52

And if you want to build it yourself you can find an easier procedure here: http://code.google.com/p/mage/wiki/GetTrunkVersion
North
DEVELOPER
 
Posts: 93
Joined: 15 May 2011, 08:20
Has thanked: 8 times
Been thanked: 15 times


Return to XMage

Who is online

Users browsing this forum: No registered users and 148 guests


Who is online

In total there are 148 users online :: 0 registered, 0 hidden and 148 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 148 guests

Login Form