endolf
|
 |
«
Posted
2003-11-28 20:50:41 » |
|
Hi Updated jinput to finally work with webstart, thanksgo to kevglass and jeff for input into this. To see it running go here, all the files can be viewed here. Don't steal the jars from this site, they probably won't work, and I don't plan on ever updating them, its just to show it working and the needed jnlp entries. Cheers Endolf P.S. Greg, if you could post an updated mac osx jinput plugin i'll update the jnlp. I had to use the build on the file sharing section, which dates right back to august, so it's prolly well out of date 
|
|
|
|
Jeff
|
 |
«
Reply #1 - Posted
2003-11-29 02:53:26 » |
|
Failed on OSX JDK1.4.2_001 Failure Message: An error occurred while launching/running the application. Title: JInput webstart demo Vendor: New Dawn Software Category: Download Error Unable to load resource: http://www.newdawnsoftware.com/jinput/HIDWrapper.jarException: NLPException[category: Download Error : Exception: java.io.IOException : LaunchDesc: null ] at com.sun.javaws.cache.DownloadProtocol.doDownload(DownloadProtocol.java:605) at com.sun.javaws.cache.DownloadProtocol.getResource(DownloadProtocol.java:753) at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:621) at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:544) at com.sun.javaws.Launcher.downloadResources(Launcher.java:742) at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:298) at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199) at com.sun.javaws.Launcher.run(Launcher.java:167) at java.lang.Thread.run(Thread.java:552)
|
|
|
|
endolf
|
 |
«
Reply #2 - Posted
2003-11-29 06:08:57 » |
|
Hi Ooops, forgot to set the file permissions on the mac libraries, should work now.
Cheers
Endolf
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Jeff
|
 |
«
Reply #3 - Posted
2003-11-29 18:34:28 » |
|
Hurray! It works!
So now someone needs to write a little article on doing JInput with Web Start. Do you want to Endolf or should I look into doing it?
JK
|
|
|
|
swpalmer
|
 |
«
Reply #4 - Posted
2003-11-29 22:16:40 » |
|
Doh!! Figures it works for Jeff, it doesn't work for me.. I get a blank window that says Controller Read Test.
|
|
|
|
Jeff
|
 |
«
Reply #5 - Posted
2003-11-30 04:29:13 » |
|
That soudns like it failed to find any devices.
What devices do you have plugged into your Mac?
On my g4 Tibook it found my trackpad and mouse button. (Although now that I think of it, it failed to find KB which is odd and should probably be looked into.)
|
|
|
|
endolf
|
 |
«
Reply #6 - Posted
2003-11-30 11:39:14 » |
|
Hurray! It works! excellent So now someone needs to write a little article on doing JInput with Web Start. Do you want to Endolf or should I look into doing it?
JK It's pretty simple, you follow kevs guid on webstart here and just add the properties that are in the jnlp file for each platfrom, and as long as you are using a cvs build or a nightly after the 28th it should just work  Endolf
|
|
|
|
endolf
|
 |
«
Reply #7 - Posted
2003-11-30 11:41:19 » |
|
Doh!! Figures it works for Jeff, it doesn't work for me.. I get a blank window that says Controller Read Test. Agree with jeff, sounds like it's found no devices at all, it's a very old build so its highly possible. Jeff said that the build server was doing something funny, if there are newer builds tonight when I get home that have the binaries in them then i'll upload some fresh ones and post back. Endolf
|
|
|
|
kevglass
|
 |
«
Reply #8 - Posted
2003-11-30 11:47:46 » |
|
It's pretty simple, you follow kevs guid on webstart here and just add the properties that are in the jnlp file for each platfrom, and as long as you are using a cvs build or a nightly after the 28th it should just work
I can add a "special considerations" section at the bottom if you want. Not sure if anything other than JInput has any worries tho  Kev
|
|
|
|
swpalmer
|
 |
«
Reply #9 - Posted
2003-11-30 22:20:47 » |
|
Hard to imagine it wouldn't find any devices out of the track pad & keyboard that are built-in, the external USB mouse, or the macally iShock II gamepad.
I will have a look to see if i have old jinput code in my ~/Library/Java/Extensions folder that could be causing problems...
I know that the last time I checked a month ago that most of the devices were found.
** EDIT ** That was it. When will I learn... seems to be working now.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
swpalmer
|
 |
«
Reply #10 - Posted
2003-11-30 22:27:06 » |
|
Unfortunately because of apparent Apple bugs, the single button trackpad shows up with both a left and right button...sigh. Even games that do the right thing and try to detect what buttons are available will get screwed. Argh.
|
|
|
|
swpalmer
|
 |
«
Reply #11 - Posted
2003-11-30 23:12:43 » |
|
The OS X bug is still there where no qualifier keys are detected.. e.g. pressing shift, ctrl, option(alt), command,.. don't trigger any changes on the keyboard window.
This is of course a major pain because many games like to use those keys for fire, jump etc.
I thought that problem was going to be fixed with Panther.. apparently not.
I suggest some colour is added to the test program for binary switches (buttons, keys, direction pads) so that when a key is pressed not only does it change the text from OFF to ON but it also changes the background colour to green or something. It would make it so much easier to see key presses in that sea of keys.
|
|
|
|
Jeff
|
 |
«
Reply #12 - Posted
2003-12-01 05:22:01 » |
|
I was thinking the same thing, bold and red for ON 
|
|
|
|
endolf
|
 |
«
Reply #13 - Posted
2003-12-01 07:07:53 » |
|
Hi Thanks for trying it, I take it that means that it works as well (or as badly) from jws as it does from command line?, this was just a test of web starting jinput, rather than a test of jinput itself.
Cheers
Endolf
|
|
|
|
swpalmer
|
 |
«
Reply #14 - Posted
2003-12-02 03:21:00 » |
|
Yes.. the Web Start aspect is working fine.
|
|
|
|
Jeff
|
 |
«
Reply #15 - Posted
2004-02-24 21:58:56 » |
|
Hmm Jinput webstart blowing up on my mac  OSX 10.3.2
|
|
|
|
gregorypierce
|
 |
«
Reply #16 - Posted
2004-02-24 22:58:15 » |
|
P.S. Greg, if you could post an updated mac osx jinput plugin i'll update the jnlp. I had to use the build on the file sharing section, which dates right back to august, so it's prolly well out of date  Nah, that sounds about right. I haven't touched it in months because I haven't had a reason to. Its not #1 on my priority list. JOGL needs the most attention because its in horrible shape, performs poorly, have pixel format issues, and does some nasty things with renderings that I haven't been able to track down. The JOGL rendering mechanism is rather obfuscated and makes it difficult to track down issues.
|
http://www.gregorypierce.comShe builds, she builds oh man When she links, she links I go crazy Cause she looks like good code but she's really a hack I think I'll run upstairs and grab a snack!
|
|
|
gregorypierce
|
 |
«
Reply #17 - Posted
2004-02-24 22:59:02 » |
|
Hmm Jinput webstart blowing up on my mac  OSX 10.3.2 Can't confirm. It was running fine a few days ago when swpalmer sent me a link to a JInput demo. If its blowing up, a stack trace is necessary for me to do anything about it.
|
http://www.gregorypierce.comShe builds, she builds oh man When she links, she links I go crazy Cause she looks like good code but she's really a hack I think I'll run upstairs and grab a snack!
|
|
|
Jeff
|
 |
«
Reply #18 - Posted
2004-02-24 23:24:38 » |
|
Maybe im using the wrong link. Can you point me at the one you used?
|
|
|
|
swpalmer
|
 |
«
Reply #19 - Posted
2004-02-25 14:04:25 » |
|
|
|
|
|
Jeff
|
 |
«
Reply #20 - Posted
2004-02-25 20:28:20 » |
|
Okay that link fails for me(never opens any frames.) I'm going to do the docs over the next few days as Im traveling. (Going to see a major publisher I can't name, sorry.) If i get a chance Ill also DL the latest tree to my OSX box and try to debug more Here is the output in the console if it means anything to you: Java Web Start 1.4.2_03 Console, started Wed Feb 25 14:22:58 PST 2004 Java 2 Runtime Environment: Version 1.4.2_03 by Apple Computer, Inc. net.java.games.input.OSXEnvironmentPlugin instance created Creating HID engine Enumerating devices Found keyboard [Keyboard] device address [3907552] Adding key [224] Adding key [225] Adding key [226] Adding key [227] Adding key [228] Adding key [229] Adding key [230] Adding key [231] Adding key [-1] Adding key [-1] Adding key [-1] Adding key [-1] Adding key [-1] Adding key [-1] Adding key [-1] Adding key Adding key [1] Adding key [2] Adding key [3] Adding key [4] Adding key [5] Adding key [6] Adding key [7] Adding key [8] Adding key [9] Adding key [10] Adding key [11] Adding key [12] Adding key [13] Adding key [14] Adding key [15] Adding key [16] Adding key [17] Adding key [18] Adding key [19] Adding key [20] Adding key [21] Adding key [22] Adding key [23] Adding key [24] Adding key [25] Adding key [26] Adding key [27] Adding key [28] Adding key [29] Adding key [30] Adding key [31] Adding key [32] Adding key [33] Adding key [34] Adding key [35] Adding key [36] Adding key [37] Adding key [38] Adding key [39] Adding key [40] Adding key [41] Adding key [42] Adding key [43] Adding key [44] Adding key [45] Adding key [46] Adding key [47] Adding key [48] Adding key [49] Adding key [50] Adding key [51] Adding key [52] Adding key [53] Adding key [54] Adding key [55] Adding key [56] Adding key [57] Adding key [58] Adding key [59] Adding key [60] Adding key [61] Adding key [62] Adding key [63] Adding key [64] Adding key [65] Adding key [66] Adding key [67] Adding key [68] Adding key [69] Adding key [70] Adding key [71] Adding key [72] Adding key [73] Adding key [74] Adding key [75] Adding key [76] Adding key [77] Adding key [78] Adding key [79] Adding key [80] Adding key [81] Adding key [82] Adding key [83] Adding key [84] Adding key [85] Adding key [86] Adding key [87] Adding key [88] Adding key [89] Adding key [90] Adding key [91] Adding key [92] Adding key [93] Adding key [94] Adding key [95] Adding key [96] Adding key [97] Adding key [98] Adding key [99] Adding key [100] Adding key [101] Adding key [102] Adding key [103] Adding key [104] Adding key [105] Adding key [106] Adding key [107] Adding key [108] Adding key [109] Adding key [110] Adding key [111] Adding key [112] Adding key [113] Adding key [114] Adding key [115] Adding key [116] Adding key [117]
|
|
|
|
Jeff
|
 |
«
Reply #21 - Posted
2004-02-25 20:34:14 » |
|
Good news, was a bad JWS cache. I celared it and nwo it runs.
I see the Mac KB problem. It brings up an interesting issue. Should we either:
(a) Require that well known key names be returned and make the plug-in translate where necessary
OR
(b) Add a function or two to the plugin to convert kb button numbers to/from well known key names.
I'm tempted to say (b) and leave what is returned the raw return values from the OS but I'm not sodl on one or the other. I do agreee that there needs to be a way to find out that a given button is the "w" key on any given platform.
|
|
|
|
swpalmer
|
 |
«
Reply #22 - Posted
2004-02-25 22:32:05 » |
|
Given that we agree that getting the real key name is a requirement, I don't see why we don't go with (a). I just makes things more consitent for the app programmers. If the API *sometimes* returns valid key names people may not ever call the function in (b). Specially people that don't have a Mac to test on.
|
|
|
|
Jeff
|
 |
«
Reply #23 - Posted
2004-02-25 22:35:43 » |
|
Alright, then Ill suggest we use the Win32 key names as the "standard" as they seem reasonable.
Everyone else agree?
Edit: as part of my doc job this week I will list the well known key names in the docs.
|
|
|
|
swpalmer
|
 |
«
Reply #24 - Posted
2004-02-25 22:52:46 » |
|
Greg is the one to consult, he has a much better idea of what it will take to get that to work. He also as voiced an objection to "hacking" out the phantom second button (I assume you saw that issue as well?), so I'm going to wait to read what he has to say. He's not online at the moment, otherwise I would poke him with a stick and get his response.
|
|
|
|
Jeff
|
 |
«
Reply #25 - Posted
2004-02-25 22:58:26 » |
|
On the phantom second button issue I can see at elast two reasonable compromises....
(1) Add a property like jinput.osxplugin.nophantombutton to control the hack
or
(2) Do a seperate plug in that returns the more "cooked" versions of values.
Just suggestions guys whatever you decide is fine.
|
|
|
|
swpalmer
|
 |
«
Reply #26 - Posted
2004-02-25 23:12:31 » |
|
I vote for (1).
|
|
|
|
gregorypierce
|
 |
«
Reply #27 - Posted
2004-02-26 02:25:29 » |
|
On the phantom second button issue I can see at elast two reasonable compromises....
(1) Add a property like jinput.osxplugin.nophantombutton to control the hack
or
(2) Do a seperate plug in that returns the more "cooked" versions of values.
You'll have to do something above the API. I have no idea that its a laptop trackpad. I don't even know that its actually a one button mouse. I only know that HID gave me a device that has two buttons. Nothing I can do at the API layer. It would have to be done at the application layer where someone can actually take a look at the device string and say 'ah a laptop trackpad, I will set this up to only have one button' I'll go with B on that other requirement. I don't know key names - the OS doesn't tell me key names and they will vary based on keyboards for more than a few keys. There is no OS function called 'getKeyName( scanCode )' so this would have to be some form of keymap method hardcoded based on the scan codes.
|
http://www.gregorypierce.comShe builds, she builds oh man When she links, she links I go crazy Cause she looks like good code but she's really a hack I think I'll run upstairs and grab a snack!
|
|
|
swpalmer
|
 |
«
Reply #28 - Posted
2004-02-26 02:48:11 » |
|
You'll have to do something above the API. I have no idea that its a laptop trackpad. Hmm.. the device is called "Trackpad" and the controller name is "Trackpad buttons" - this is what ControllerReadTest shows me. Is that not good enough? Regardless, if we remain undecided on this one, I think we can leave this for a post 1.0 'bug' fix. I'll go with B on that other requirement. I don't know key names - the OS doesn't tell me key names and they will vary based on keyboards for more than a few keys. There is no OS function called 'getKeyName( scanCode )' so this would have to be some form of keymap method hardcoded based on the scan codes.
That's what I thought based on the last time we discussed it. It makes things very hard for us to deal with reliably. Jeff, is there someone at Apple that you can get interested in this issue? I can't imagine how their HID APIs are useful in the slightest for keyboard input if this is the case. (How does the rest of Mac OS know what key has been pressed? Is the keyboard hacked into the HID APIs but never actually used through HID? A Logitech USB keyboard that I plugged in has the same problem.. yet I can use it to type - is there an undocumented API that does the translation? Somewhere in the OS is the information we need... it would be a real shame if we can't get at it. If we can get someone at Apple involved I'm sure they could get us what we need.
|
|
|
|
Jeff
|
 |
«
Reply #29 - Posted
2004-02-26 16:14:48 » |
|
Okay, we may have someone at Apple we can ping on these so I'll get on that in the next day or so (on the road today and tomorrow.)
On the KB yeah I was figuring it would require a hard-coded translation table.
JK
|
|
|
|
|