The Source for Java Technology Collaboration


Home | Changes | Index | Search | Go

Back to Documentation Page

Contributing to the Looking Glass 3D's Incubator (with lg3d-core source realase)
Integrate & distribute your own application in LG3D?.

1.Getting up developer role in lg3d-incubator

Please refer to the Contributing to Project Looking Glass document to learn how to contribute to this project. Also, please see the JavaDesktop Community Governance Guidelines for general guidelines on participating in JavaDesktop? community projects, such as Project Looking Glass.

1.1 Request access to the LG3D? Incubator project

To request access to the LG3D? Incubator project:

  1. If you are not logged into java.net, navigate to http://www.java.net and login by entering your username and password in the fields at the top of the page and pressing the [Login] button.
  2. Navigate to https://lg3d-incubator.dev.java.net and bookmark it for future reference. You'll be coming back often!
  3. Click on the Request project membership/role link.
  4. Select the appropriate role:
    - Select Observer if you just want to build Project Looking Glass Incubator.
    - Select Developer if you plan to develop new code for Project Looking Glass Incubator and want the option to contribute code and application to the project.
  5. After submitting your request, you will receive an e-mail that contains instructions on how to access the project.
    From now on, when you go to the LG3D project web site you will need to login to access the project documents.

2. Download and install the development tools
note: If You use IDE you can jumb to step 3. About NetBeans more instructions You can find here or if You use Eclipse more info is here

Project Looking Glass uses the Apache ANT build tool to manage the build process. If you don't already have ANT installed, download the binary distribution from the apache.org web site: http://ant.apache.org/
Note: The instructions below assume that you download the ANT binary distribution into /tmp.

After downloading ANT, install it as follows:

  1. First become root:
    % su root
    Password:
    enter root password
    #
  2. Install Apache ANT:
    # cd /usr/local
    # tar -xzf /tmp/apache-ant-1.6.1-bin.tar.gz
  3. Exit from the root shell:
    # exit
    %
  4. Several environment variables now need to be set. Here's the syntax for bash(1):
    ANT_HOME=/usr/local/apache-ant-1.6.1
    PATH=$ANT_HOME/bin:$PATH

2.1 Getting LG3D? core,incubator and demo-apps sources (command line tools)

* lg3d-core,

First create a directory for the Project Looking Glass project, for example:

% mkdir -p ~/projects/lg3d
% cd ~/projects/lg3d


App mode note:
if you plan on using this build to run app mode (lg3d-app), be sure to download into a LOCAL disk partition lg3d-x11

Next, log into the cvs.dev.java.net CVS server:


% cvs -d :pserver:username@cvs.dev.java.net:/cvs login
CVS password:
password


Substitute username and password with your java.net account information.
Check out the lg3d-core source files:

% cvs -d :pserver:username@cvs.dev.java.net:/cvs checkout lg3d-core

* lg3d-incubator

Log into the cvs.dev.java.net CVS server if You are not loget :

% cvs -d :pserver:username@cvs.dev.java.net:/cvs login
CVS password:
password


Substitute username and password with your java.net account information.
Check out the
lg3d-incubator source files:

% cvs -d :pserver:username@cvs.dev.java.net:/cvs checkout lg3d-incubator

* lg3d-demo-apps

Log into the cvs.dev.java.net CVS server if You are not loget :

% cvs -d :pserver:username@cvs.dev.java.net:/cvs login
CVS password:
password


Substitute username and password with your java.net account information.
Check out the
lg3d-demo-apps source files:

% cvs -d :pserver:username@cvs.dev.java.net:/cvs checkout lg3d-demo-apps

2.2 You need prepare Your OS for running LG3D?, any instructions is here

3. Quick Tour of the Project Looking Glass incubator sources.

The Project Looking Glass source code is located in the lg3d-incubator/src/classes/org/jadesktop/lg3d/apps. Here is an overview of the various files and folders in the lg3d-incubator source CVS repository.


/build built files are stored in this directory
/classes/config/incubator/ Here are stored lg3d application descriptor for lg3d taskaber item. More about *.lgcfg files here. This files (one for each app)
/etc Here are stored etc applications files
/org/jdesktop/lg3d/apps/ Here are applications. Here you simply must create folder for Your application binary build and app resources.
/resources root folder for incubator application resources files
/images/icon Here are stored icons files for application.This files are copied from Your app forder by "ant" build file.
/Backgrounds backgrounds folder for lg3d
/lib Here are stored packed lg3d-incubator jar's
/ext In this folder anybody can put 3-rd party libariaes and You shouldn't forget about license file.
/src/classes/org/jdesktop/lg3d/apps/ Here are applications, you simply must create folder for Your application sources files,resources ... and etc. (gol3d,bgmanager ... etc)
/www web site resources for lg3d-incubator
build.xml This is a ant build file for lg3d-incubator project. This file is called by lg3d-core when it is built

4. Building Project Looking Glass

The buld fole located in lg3d-core directory can build also lg3d-incubator by invoke lg3d-incubator build file. This is neccesery if You modify lg3d-core sources, but if You don;t touch lg3d core code you can invoke build only for incubator like in step 4.2.
Ant builds file also build jar's files for binary realase.

4.1 Bulding lg3d-incubator from lg3d-core build file

There is compile lg3d-core, lg3d-incubator,lg3d-demo-apps and lg3d-x11 if is downloaded. More about lg3d-x11 is here

% cd ~/projects/lg3d/lg3d-core
% ant


4.2 Bulding lg3d-incubator by own build file

Building Project Looking Glass Incubator from source is handled by an ANT build file (build.xml) which is located in your lg3d-incubator directory. Navigate to this directory and run the ant command to build Project Looking Glass Incubator folder:

% cd ~/projects/lg3d/lg3d-incubator
% ant


You should see output similar to the following:

init:

[mkdir] Created dir: /root/workspace/lg3d-incubator/build/classes

compile:

[javac] Compiling 103 source files to /root/workspace/lg3d-incubator/build/classes

[copy] Copying 8 files to /root/workspace/lg3d-incubator/build/classes/config/incubator

luncher-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/etc/lg3d

pingpong-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

jw_aim3d-extras:

[mkdir] Created dir: /root/workspace/lg3d-incubator/build/classes/resources/images/jw_aim3d

[copy] Copying 11 files to /root/workspace/lg3d-incubator/build/classes/resources/images/jw_aim3d

clock-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

ls3d-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

zoetrope-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 16 files to /root/workspace/lg3d-incubator/build/classes/org/jdesktop/lg3d/apps/zoetrope/resources

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes

bg_manager-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/etc/lg3d

[copy] Copying 17 files to /root/workspace/lg3d-incubator/build/classes/org/jdesktop/lg3d/apps/bgmanager/res

[mkdir] Created dir: /root/workspace/lg3d-incubator/build/classes/resources/Backgrounds

[copy] Copying 211 files to /root/workspace/lg3d-incubator/build/classes/resources/Backgrounds

[mkdir] Created dir: /root/workspace/lg3d-incubator/build/lib

[jar] Building jar: /root/workspace/lg3d-incubator/build/lib/lg3d-backgrounds.jar

gol3d-extras:

[copy] Copying 3 files to /root/workspace/lg3d-incubator/build/classes/org/jdesktop/lg3d/apps/gol3d/images

[copy] Copying 5 files to /root/workspace/lg3d-incubator/build/classes/org/jdesktop/lg3d/apps/gol3d/configs

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/org/jdesktop/lg3d/apps/gol3d

blackgoat-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/blackgoat/icon

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/blackgoat/util

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/blackgoat/util

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/blackgoat/util

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/blackgoat/util

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/blackgoat/util

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/blackgoat/util

kwebdemo1-extras:

[copy] Copying 1 file to /root/workspace/lg3d-incubator/build/classes/resources/images/icon

[copy] Copying 36 files to /root/workspace/lg3d-incubator/build/classes/org/jdesktop/lg3d/apps/kwebdemo1/resources

all:

BUILD SUCCESSFUL

Total time: 10 seconds


5. Adding application to lg3d-incubator
Your app must be placed /src/classes/org/jdesktop/lg3d/apps/YOUR_APP folder in lg3d-incubator, also icon file, ad other resources files.

6.Modifing "build.xml" of lg3d-incubator
After placing your application to incubator You must modify build.xml like following.

Note: important code is in red


6.1 Adding to external libaries to lg3d-incubator
You must find on top of build.xml this block

<!-- To add something to the classpath:-->        

<classpath> <pathelement location="../lg3d-core/build/classes"/> <pathelement location="../lg3d-core/ext/jaimlib.jar"/>
<!-- ls3ddependencies--> <pathelement location="ext/activation.jar"/>
<!-- end ls3d dependencies -->
<!-- blackgoat dependencies -->
<pathelement location="ext/mail.jar"/>
<!-- end blackgoat dependencies -->
You should add somthing like that: <!-- YOUR APP dependencies --> <pathelement location="ext/YOUR_LIB.jar"/>
<!-- end YOUR APP dependencies --> </classpath>
6.2 Exclude block

This is for exlude any app (package) from build path (if app doesn't compile) example:

<!-- comment out when port to the new API gets done -->            
<exclude name="org/jdesktop/lg3d/apps/aim3d/**"/>            
<excludename="org/jdesktop/lg3d/apps/browser3d/**"/>
<excludename="org/jdesktop/lg3d/apps/jmf23D/**"/> <exclude name="org/jdesktop/lg3d/apps/luncher/**"/>
<exclude name="org/jdesktop/lg3d/apps/wilkoaim3d/**"/>

If Your app doesn't copile You can add line like this:

<exclude name="org/jdesktop/lg3d/apps/YOUR_APP/**"/>  

or if You want exclude one file

<exclude name="org/jdesktop/lg3d/apps/YOUR_APP/EXCLUDE_FILE.java"/> 

6.3 Extra steps and ant calls block

This is needed only when Your app needs spcial steps.Like copy files to "etc" folder, copy "Icon" image file to /resources/images/icon folder and resources files. Here is example how do this.

<target name="YOUR_APP_EXTRAS" description="Extra steps for YOUR APPLICATION">
<copy todir= "${classes.dir}/resources/images/icon"    
 file= 
"${javasrc.dir}/org/jdesktop/lg3d/apps/YOUR_APP_ICON_PATH/ICON_NAME.png"/> 
<!--HERE OTHER STEPS FOR YOUR APP--> </target>< /FONT>

and You invoke this targaet by add folowing lines;

 <antcalltarget= "YOUR_APP_EXTRAS"/>

7. How write "*.lgcfg"

"lgcfg" can add Your app to lg3d taskbar. This is a serialized object read by XMLDecoder from standard java libaries. It should be named like Your folder in apps folder(but not necessery), but it is good convention.Simply put file in /lg3d-incubator/build/config/incubator and app will be add to taskbar. Here is usage

<?xml version="1.0" encoding="UTF-8"?> 
<java version="1.5.0" class="java.beans.XMLDecoder">
<object class="org.jdesktop.lg3d.scenemanager.config.ApplicationDescription">
<void property="exec">
<string>java org.jdesktop.lg3d.apps.YOUR_APP_MAIN_CLASS</string> main class for application
</void>
<void property= "iconFilename">
<string>resources/images/icon/ICON_NAME.png</string> path to icon image file
</void>
<void property="name">
<string>APP NAME</string> application name
</void>
</object>
</java>
8 Commiting application to Project Looking Glass Incubator CVS

After all You must commit Your app to CVS. Log into the cvs.dev.java.net CVS server if You are not loged :

% cvs -d :pserver:username@cvs.dev.java.net:/cvs login
CVS password:
password


and type in

cvs commit lg3d-incubator

enjoy.

Topic FirstIncubatorapp . { Edit | Ref-By | Printable | Diffs r4 < r3 < r2 < r1 | More }
 XML java.net RSS

Revision r4 - 21 Jun 2005 - 16:08:00 - Main.radeczka
Parents: WebHome > ProjectLookingGlass > DocumentImprovementProjects > DocumentationPage