Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Compile the Xith3d sources  (Read 2215 times)
0 Members and 1 Guest are viewing this topic.
Offline Preston

Senior Devvie


Medals: 4



« Posted 2003-11-23 12:13:38 »

Hi,

in several different threads of this Xith3d's forum people said they compiled Xith3d from the CVS. Maybe we could merge the steps needed in compiling Xith3d in a new thread?

Unfortunately when I try to compile Xith3d from the current community bundle's source I got tons of errors, probably it's because there is some dependency on LWJGL...?

Is it necessary to compile Xith3d against -source 1.4 ? Doesn't help, though...

I'd be happy if a single line would do the trick, for example like the following does it usually:
1  
dir /b /s *.java | gawk "{system(\"javac -d bin \" $0)}"
Offline Jens

Senior Devvie




Java for games!


« Reply #1 - Posted 2003-11-23 12:46:53 »

Be sure to look at the appropriate section in the Getting Started Guide: Bleeding Edge Source

The following command is enough to compile Xith3D:

1  
ant


The only thing you need is an installation of Apache Ant. Ant looks for a file called "build.xml" in the current directory. build.xml contains all the necessary instructions to create a new build of Xith3D.

Ant is a very powerful tool. It's used for creating the Getting Started Guide, too. In the case of the GSG a single ant call creates the PDF file, the HTML files, zipped files for every section, self-executing jars for every example and more.

Xith3D Getting Started Guide (PDF,HTML,Source)
Offline Jens

Senior Devvie




Java for games!


« Reply #2 - Posted 2003-11-23 12:51:39 »

I read somewhere that you are familiar with C/C++. You probably know the "make" command and Makefiles. Ant is similar, but in my opinion easier to use and designed to be platform independant.

Xith3D Getting Started Guide (PDF,HTML,Source)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Preston

Senior Devvie


Medals: 4



« Reply #3 - Posted 2003-11-23 14:21:13 »

Quote
Be sure to look at the appropriate section in the Getting Started Guide: (..) The only thing you need is an installation of Apache Ant. Ant looks for a file called "build.xml" in the current directory. build.xml contains all the necessary instructions to create a new build of Xith3D.

Yes, thanks Jens. Of course I've already read your nice tutorial. :-)
Still I wonder what ANT would do different compared to my single AWK command line (which really just compiles all .java files of Xith3d) and even more: how does ANT resolve the LWJGL dependency? Several Xith3d source files contain lines like:
1  
2  
3  
import org.lwjgl.*;
import org.lwjgl.opengl.*;
import org.lwjgl.input.*;

So I suppose I can't compile Xith3d currently without these import files? (which I don't have got at the mo)

Quote
I read somewhere that you are familiar with C/C++. You probably know the "make" command and Makefiles. Ant is similar, but in my opinion easier to use and designed to be platform independant.

"Make", yes I know this fossil but are no fan of it (the step from Object Pascal to C/C++ "make" has been rigid).
If possible I'd like to use GNU AWK before installing "yet another tool". :-)
Offline Jens

Senior Devvie




Java for games!


« Reply #4 - Posted 2003-11-23 14:44:56 »

Quote

Yes, thanks Jens. Of course I've already read your nice tutorial. :-)


This tutorial was written by Will, who has contributed a lot to the Getting Started Guide. :-)

Quote
Still I wonder what ANT would do different compared to my single AWK command line (which really just compiles all .java files of Xith3d) and even more: how does ANT resolve the LWJGL dependency?


If you download Xith3D from CVS you'll have all the third-party libraries in one directory. Ant puts them all in the classpath when compiling, so you should not have any problems. Besides this Ant generates xith3d.jar, which is pretty useful. Grin Ant can also be used to generate Javadoc (ant javadoc) or a community build (ant cbuild).

Btw. your script doesn't work for me (dir: *.java: No such file or directory).

Quote
If possible I'd like to use GNU AWK before installing "yet another tool". :-)


I think Ant is used by a lot of projects, is integrated in Eclipse and has won several awards. It's really worth downloading. :-)

However if you don't want Ant you can still put lwjgl.jar in your classpath when compiling Xith3D. This does the trick, too.


Xith3D Getting Started Guide (PDF,HTML,Source)
Offline Preston

Senior Devvie


Medals: 4



« Reply #5 - Posted 2003-11-23 17:02:56 »

Quote
This tutorial was written by Will, who has contributed a lot to the Getting Started Guide. :-)

I see! So it's Will's nice tutorial. You produced the PDF? ;-)

Quote
If you download Xith3D from CVS you'll have all the third-party libraries in one directory.

I've downloaded the community build tar.gz but just used the Xith3d src directory. Now I get the point that I've to include the lwjgl.jar too... That's it. Thanks.
This leads to the question: Why does the Xith3d source need lwjgl? I definitely don't need the lwjgl.jar in order to run all the Xith3d demos. ;-)

Quote
Btw. your script doesn't work for me (dir: *.java: No such file or directory).

Yes, it should read
1  
dir /b /s *.java | gawk "{sub(/^.+src\\/, \"\"); system(\"javac -d bin \" $0)}"
.. and you've to start it from within the "src/" directory (where a "dir" shows the "com/" folder then). These braindead \" are just needed for the sucking Win32 dosbox. On a real console (Unix) it would read:
1  
ls -dontknowswitch *java | gawk '{sub(/^.+src\\/, ""); system("javac -d bin " $0)}'

(A very good reason to switch to Linux in the future :-)

Quote
I think Ant is used by a lot of projects, is integrated in Eclipse and has won several awards. It's really worth downloading. :-)

:-)  For distributing sources this is a good idea. For my home stuff I've added a one line AWK to JBuilder to do Javadocs and JARs. ;-)   (I really love GAWK.)
Offline Jani Laakso

Junior Devvie




Do it with Java!


« Reply #6 - Posted 2003-11-23 17:39:09 »

I am using Eclipse 3.0 on a windows platform.  Here's an example what I did:

I've first created a java project called Xith3d. Then I used the CVS view for checking out the whole Xith3d CVS into existing project (Xith3d). Next I click the project with right mb and select properties. From there I did the following:

1. select tab "Java Build Path".
I remove current build path and add new one by clicking button "Add new folder", now my build path reads "xith3d/src" (right) instead of the default "xith3d" (wrong).

2. select tab "Libraries"  
Click button "Add JARs..."
Add the following libraries to your classpath
third-party/misc/junit.jar
third-party/misc/log4j.jar
third-party/misc/vorbis.jar
third-party/vecmath/vecmath.jar
third-party/xith/xith_utilities.jar
third-party/lwjgl/examples.jar
third-party/lwjgl/lwjgl.jar
third-party/joal/windows/joal.jar
third-party/jogl/jogl-win32/jogl.jar

3. Select tab "Order and export" (not mandatory for Xith examples)
Check every library that you wish to use on a project that depends on Xith3d, e.g. your own Xith3d related test project.


One thing, when you run e.g. Xith3d tests, tell JVM from where to find native libraries. You can do it by selecting run from the menus and then selecting "Arguments" tab and then adding the following (fix pathes) to VM arguments: box:
-Djava.library.path="D:\eclipse\workspace\xith3d\third-party\jogl\jogl-win32;"
This makes sure that you use always the same jogl that Xith3d revision is meant to be using. Add lwjgl libraries also there if you need them.

Information for linux users,
Currently Xith does not contain linux native libraries of lwjgl for some reason, I assume you can download them from here:
http://sourceforge.net/project/showfiles.php?group_id=58488
Download lwjgl-0.8-glibc2.3-linux.zip

Ant is a great tool, but not required (at least not currently) for building Xith3d, Eclipse handles everything nicely.
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #7 - Posted 2003-11-23 18:08:42 »

Hi
 Install ant Smiley, it's easy, really, and it's not a *huge* download, and like Jens said, it does everything for you Smiley, I use it for my ac3d loader, and when the time comes, the distributions for my game will be compiled and packaged using it. It's worth it, and far quicker than trying to debug your own make or gawk or whatever command Smiley

Endolf

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #8 - Posted 2003-11-23 20:45:36 »


Ant is so much better suited to Java applications than 'make' or just shell commands IMHO - especially since most Windows boxes don't have unix tools installed.  Considering it's only a meg and a half to download and is the only build tool supported by the Xith3D developers I'd say that's your best at least for this project.

I don't use Eclipse - but wouldn't it have some sort of Ant integration/plugin/whatever?

Will.

Offline Jens

Senior Devvie




Java for games!


« Reply #9 - Posted 2003-11-24 06:25:37 »

Quote
I don't use Eclipse - but wouldn't it have some sort of Ant integration/plugin/whatever?


Yes, Eclipse has an Ant plugin.

Xith3D Getting Started Guide (PDF,HTML,Source)
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (73 views)
2014-11-26 15:22:04

toopeicgaming1999 (62 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!