LWJGL Forum

Programming => LWJGL Documentation => Topic started by: lobsterman on June 23, 2008, 14:15:53

Title: how are native libs for different platforms handled in a webstart game?
Post by: lobsterman on June 23, 2008, 14:15:53
i have gotten quite a bit beyond where i was a few weeks back. however there is the issue of the native libs that i am seriously struggling with.

i know how to have the native libs for my mac accessible when i run it on my mac - i either place them into Library/Java/Extensions or i add a path to them via -Djava. but how are native libs handled when a user runs the webstart app of the game on their machine, which may be something other than a mac.

any insight would be greatly appreciated,
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: Matzon on June 23, 2008, 14:23:30
<resources os="Linux" arch="i386">
  <j2se version="1.4+"/>
  <nativelib href="lwjgl_linux.jar"/>
</resources>

for instance
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: lobsterman on June 24, 2008, 08:10:12
thanks,

so the resources block goes into the jnlp file - i assume. the lwjgl download comes with native libs but they are not jars. for instance the linux native libs are 5 *.so files. how do i get my grubby hands on the jars?

- do i make my own jar out of these files and sign them?
- are they available for download somewhere on the lwjgl server?
- or do i just use the native libs the way they are?

would this work?
  <resources>
    <j2se version="1.4+"/>
    <jar href="Game_signed.jar"/>
  </resources>
  <resources os="Mac OS X">
    <nativelib href="libjinput-osx.jnilib"/>
    <nativelib href="liblwjgl.jnilib"/>
    <nativelib href="openal.dylib"/>
  </resources>


thanks,
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: Matzon on June 24, 2008, 10:33:23
depends on whether you want to sign your own files or rely on the lwjgl certificate - notice the extension tag. It usesd the latest version 2.0rc1


<!-- JNLP File for LWJGL Demos -->
<jnlp
  spec="1.0+"
  codebase="http://lwjgl.org/jnlp/"
  href="lwjgl-demo.php/examples.spaceinvaders.Game">
  <information>
    <title>LWJGL Demo [examples.spaceinvaders.Game]</title>
    <vendor>LWJGL</vendor>
    <homepage href="http://lwjgl.org/"/>
    <description>Demonstration of LWJGL</description>
    <description kind="short">Technology Preview</description>
    <icon kind="splash" href="logo.png" />
    <offline-allowed/>
  </information>
  <resources>
    <j2se version="1.4+"/>
<jar href="lwjgl_test.jar"/>
    <jar href="media.jar"/>
    <extension name="lwjgl" href="http://lwjgl.org/jnlp/extension.php" />
  </resources>
  <application-desc main-class="org.lwjgl.examples.spaceinvaders.Game">
    </application-desc>
</jnlp>
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: lobsterman on June 24, 2008, 14:35:09
major thanks,

so the tag

    <extension name="lwjgl" href="http://lwjgl.org/jnlp/extension.php" />


does all the magic. works like a gem in my jnlp file.

pretty wild, thanks again ...
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: Jerome Blouin on November 17, 2008, 18:01:28
Can I specify a version/release to the extension? I'd like to target a stable release. If yes, is there a list of versions?

Thanks
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: Matzon on November 17, 2008, 18:28:53
there is only the latest release so to speak - I keep wanting to do something to support old releases - but haven't done so far ...
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: Jerome Blouin on November 17, 2008, 18:32:20
Does this mean that the latest release could be a non-final release like beta, RC?
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: Matzon on November 17, 2008, 18:53:03
yes, but it would be relatively stable. That said, until I have some versioning in order, I do not recommend using it for commercial deployment (where I would also advise to sign it yourself)
Title: Re: how are native libs for different platforms handled in a webstart game?
Post by: Jerome Blouin on November 17, 2008, 18:54:39
OK thanks!