1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Main Page

From sf3jswing

Jump to: navigation, search

Contents

FREE FORM PROJECT (with sf3jswing-JIGAXTENDED-4.3)

HOW TO BUILD A COMPLETE NATIVE INSTALLER AND JXA EXTENDED PROJECT (HOWTO)

download and extract jigaxtended and jxakernel

  1. download the sf3jswing-jigaxtended release 4.3.0 or higher
  2. download the latest sf3jswing-jxakernel release 1.1.2+
  3. choose a folder where you have all read&write permissions
    1. extract sf3jswing packages there
    2. you should have in the same folder :
  • - sf3jswing-jigaxtended-4.3.0/
    • build.xml among other files
  • - sf3jswing-jxakernel-1.1.2/
    • build.xml among other files

compile the kernel library with the ant default task (DO-lib)

  • browse to kernel folder

cd sf3jswing-jxakernel-1.1.2

  • run the ant task DO-lib
  • if you want to have a fresh build, do it so
ant clean DO-lib
if you cannot find the ant command, maybe Ant is not installed (especially on Linux systems). On Windows, it is packed with the IDE (Netbeans.org).
  • generally this is enough, with DO-lib as the default task
ant
  • it should log a bit of java ant builder messages
  • you should see at the bottom end before to get back the input control

DO-lib:
    [mkdir] Created dir: /sf3jswing-jxakernel-1.1.2/dist/Mac/unsigned/lib
      [jar] Building jar: /sf3jswing-jxakernel-1.1.2/dist/Mac/unsigned/lib/lib-sf3jswing-jxakernel-Mac-ppc.jar

BUILD SUCCESSFUL
Total time: 30 seconds

copy and paste sf3jswing-jxakernel/dist/YOUROS/unsigned/lib/lib-sf3jswing-jxakernel-YOUROS-YOURARCH.jar to lib/YOUROS/YOURARCH/. in sf3jswing-jigaxtended project

  • copy lib

cd sf3jswing-jigaxtended-4.3.0
cp ../sf3jswing-jxakernel-1.1.2/dist/Mac/unsigned/lib/lib-sf3jswing-jxakernel-Mac-ppc.jar lib/Mac/ppc/.

edit build-YOUROS-YOURARCH.xml.

  • Section below
                  EXTENSIONS FILES AND *** NATIVE INSTALLER ***
                  CONFIGURE HERE THE EXTENSIONS INSTALLER (USEFUL ON OPERATING SYSTEM RUNNING THE PLUGIN V. 1
                  (E.G. MAC OS X AND JAVA 5, OR SAFARI ON WINDOWS)
               
  1. you must specify the location on the web where your -might- upload the sf3jswing-jigaxtended-ext-...jar's
  2. you must specify ALL native libraries that you want the kernel to install before to launch your JApplet-or-JFrame app
  3. copy the necessary natives in the resources/properties/YOUROS/YOURARCH/natives/ folder as they will be merged into the file sf3jswing-jigaxtended-YOUROS-YOURARCH-ext-native...jar.

configure template/build-extended-template.xml

EITHER IF YOU WANT A NEW PROJECT

  • Section below

CREATE NEW JXA PROJECT (THAT MAY BE FRAMED APPLICATION OR EXTENDED APPLETS

                   THIS WILL OUTPUT TO THE PARENT FOLDER OF YOUR COPY OF JIGAXTENDED PROJECT
                    <property name="new.project.template.name" value="a-new-project"/>
EDIT HERE (see above) WITH THE NEW PROJECT NAME YOU WANT
  • and use build.xml or build-YOUROS-YOURARCH.xml (no matter if you run another OS or arch) to run DO-new-jxa-project

OR

  • Section below

UPDATE EXTERNAL EXISTING JXA PROJECT(S)

          
                EDIT HERE THE FOREACH LIST TO
                DO AUTOMATICALLY COPY THE EXTENSIONS.JARS
                INTO THE APPROPRIATE FOLDERS LOCATED IN THE LIST
                                
                        <property name="target-path" location=".."/>
                        <target name="update-template" depends="DO-jar-extension" description="Will perform build of the extension and update the targeted template projects">
                            <foreach 
LIST HERE THE PROJECT NAMES YOU ARE UPDATING THEY MUST BE LOCATED AT THE PARENT FOLDER OF YOUR COPY OF JIGAXTENDED PROJECT
                      
                            list="some-projects,separated-by-commas-and,no-space" 
                            target="_update-template-task"
                            param="template-project.name">
                            </foreach>
                        </target>
  • and use build.xml or build-YOUROS-YOURARCH.xml (no matter if you run another OS or arch) to run update-template

open a new "free-form project" (e.g. in Netbeans)

you might edit the src/all/jxa/ package to begin

configure project

it may be useful to configure the editor project classpath to look into resources/YOUROS/YOURARCH/*ext-kernel_signed.jar and ext_signed.jar files

SEE README

README and install text files for more information about build.xml's in JXA Free-form Projects

JXA Free-Form projects "built-in" ant tasks

build.xml or build-osfamily-arch.xml

If you're familiar with ant, then you can skip to the list of tasks available to jxa free-form projects.

When a JXA Free-form project is made by DO-new-jxa-project, the ant builder makes a project file structure that entirely relies on a set of XML files. Those XML files are the ANT build configuration files. As in any other configuration files, there are properties set to values and targets defining tasks that the ant tool can execute.

On the command line, ant is very easy to invoke :

ant jar

or


ant -f myProject/build.xml DO-clean-root

for more infos see ant manual; also, there is a extension pack for ant called [ant-contrib.sourceforge.net/|ant-contrib] (it provides easy access to script with ant targets).

With the help of an IDE you can see all tasks available when browsing around any of the build.xml's. See Running ANT targets from NetBeans IDE for instance !

list of built-in targets in JXA Free-Form projects

compile

compiles all source files (src/all + src/osfamily) into binaries (bin/)

jar

packs all binaries (bin/*.class) and resources into .jar zipped packages (dist/osfamily/unsigned) before to sign them (dist/osfamily/applet).

run(*)

runs the .jar with the AntFrame you specified as the -antframe argument in the build-os-arch.xml application.run.params.

run-applet(*)

runs the .jar with the AntApplet in Appletviewer you specified as the -antapplet argument in the build-os-arch.xml applet.run.params. (notice : if you need access to some more Security Permissions, edit the JavaSecurityPolicy file !)

clean

erases all files in dist/osfamily/ and bin/ folders.

DO-clean-root

erases all files in dist/ folder (all os builds)

javadoc

performs a validation of /** documentation in .java files */ and builds the JavaDoc for the current project (dist/doc/)

DO-src-pack

gathers all files excepting dist/ and bin/ folders to compress them into a tarball (dist/tarball) there are also some files added aside the tarball : *.spec *.changes *.dsc debian.*, these files are used by the RPM-DEB package builders (e.g. OpenSuSE.org Build Service).

install

platform specific bundle

  • linux users will have the project unsigned jar's copied into /usr/share/games/nameoftheproject and an executable into /usr/games named as the project name.
NOTICE : the project name MUST BE low-capitalized (debian rules) in order to be used by the linux systems.
  • mac os users will have a nameoftheproject.app application bundle built in the dist/Mac/applet folder.
  • windows users will have a nameoftheproject.exe and nameoftheproject_debug.exe in the dist/Windows/applet folder that MUST STAY IN THE SAME FOLDER AS THE JAR's to run properly (classpath issues).

Test Units

sf3jswing-jxatest-unit

This is a JXA free-form project, that is made to test the whole JXA API engine (Swing UI, I/O processes, multi-threading, Open GL (through LWJGL),...) on targeted systems. It has TestAntFrame and TestAntApplet to make test on both JFrame and JApplet release of Free-Form projects. It has been built with the DO-new-jxa-project sf3jswing-jigaxtended's target. The RenderingScene should run on everw compatible system.


(*) NOTES

JXA Debugging System Properties

For using with run and run-applet applet edit build-jars.xml below target for the corresponding system :

For target run :
<target name="run" ....>
<exec ... os.... >
<arg line="-Dorg.lwjgl.util.Debug=true"/><!-- LWJGL debug //>
            <arg line="-Djxa.debugSys=true"/><!-- jxa kernel //>
            <arg line="-Djxa.debug=true"/><!-- global jxa api debug (casual info)//>
            <arg line="-Djxa.debugRender=true"/><!-- rendering (sprite, models,anims,..) //>
            <arg line="-Djxa.debugSPM=true"/> <!-- cache debug de/serialization //>
            <arg line="-Djxa.debugECL=true"/> <!-- Extensions classloader debug //>
...
</exec>
...</target>
For target run-applet it uses the -J-D options, for AppletViewer is running :
<target name="run-applet" ....>
<exec ... os.... >
<arg line="-J-Dorg.lwjgl.util.Debug=true"/><!-- LWJGL debug //>
            <arg line="-J-Djxa.debugSys=true"/><!-- jxa kernel //>
            <arg line="-J-Djxa.debug=true"/><!-- global jxa api debug (casual info)//>
            <arg line="-J-Djxa.debugRender=true"/><!-- rendering (sprite, models,anims,..) //>
            <arg line="-J-Djxa.debugSPM=true"/> <!-- cache debug de/serialization //>
            <arg line="-J-Djxa.debugECL=true"/> <!-- Extensions classloader debug //>
...
</exec>
...</target>
Applets on the web also read parameters from the yourProjectName.html file :
<APPLET archive="api/@PROJECTOSKERNELJAR@" code="@PROJECTAPPLETMAIN@" width=@PROJECTAPPLETWIDTH@ height=@PROJECTAPPLETHEIGHT@>
            Your browser does not support Java, so nothing is displayed.<!-- VOID DOUBLE RESOURCE LOADING, NOT USED WITH EXTENSION MECHANISM param name="jnlp_href" value="@PROJECTAPPLETJNLPHREF@"/-->

            <param name="jxa.debug" value="true"/>
            <param name="jxa.debugSys" value="true"/>
            <param name="jxa.debugOps" value="true"/>
            <param name="jxa.debugRender" value="true"/>
            <param name="jxa.debugVoid" value="false"/> <!-- some of deleted lines of debugging //>
            <param name="jxa.debugSPM" value="true"/>
            <param name="jxa.debugECL" value="true"/>
            <param name="antapplet" value="@PROJECTAPPLETANTAPPLET@"/> <!-- edit build-yourOS-arch.xml //>
            <param name="applet.classpath" value="@PROJECTAPPLETCLASSPATH@"/> <!-- edit build-yourOS-arch.xml //>
            <param name="antargs" value="@PROJECTAPPLETARGS@"/> <!-- edit build-yourOS-arch.xml //>
            <PARAM name="java_arguments" value="@PROJECTAPPLETARGS@"/> <!-- edit build-yourOS-arch.xml //>
            <param name="separate_jvm" value="true"/>

B23prodtm

Personal tools