DanK
Junior Devvie  
Javver games rock yawel!
|
 |
«
Posted
2004-05-02 03:44:15 » |
|
Can anyone recommend a good way to distribute a game written in java, I am using JoGL and JRE 1.5 (though 1.5 is primarily because of the built in high res timer). I'd like to use java web start, but there are some issues with it (most of the files for the game can change other than the actual class files). I think I can use java web start with a signed certificate despite the use of JoGL and the need to have regular file access. Is there some other method of installing that people here would recommend or am I probably better off to go with java web start.
I'm preparing to put out a product for the general public as opposed to custom built software for a business/server side stuff, and I've never actually dealt with installing things on unknown machines (at least not since the common practice was to write your own installer back before java had caught on at all). It could just be I need to spend more time examining java web start and experimenting with it more.
|
|
|
|
DrBizzar0
|
 |
«
Reply #1 - Posted
2004-05-02 05:07:30 » |
|
InstallAnywhere was quite nice the last time I tried it out, but I noticed that it handles installations of any program now, not only java programs, so maybe it has become a big fat bloated monster http://www.zerog.com/
|
|
|
|
blahblahblahh
|
 |
«
Reply #2 - Posted
2004-05-02 08:05:02 » |
|
I'd like to use java web start, but there are some issues with it (most of the files for the game can change other than the actual class files).
What's the problem with that?
|
malloc will be first against the wall when the revolution comes...
|
|
|
Games published by our own members! Check 'em out!
|
|
princec
|
 |
«
Reply #3 - Posted
2004-05-02 13:39:37 » |
|
Webstart will do everything you need, painlessly. Failing that use Nullsoft's NSIS installer. Cas 
|
|
|
|
William Denniss
|
 |
«
Reply #4 - Posted
2004-05-02 22:05:42 » |
|
I agree, webstart and NSIS are the way to go. With Java 1.5 JWS becomes a while lot better too  Will.
|
|
|
|
sma
|
 |
«
Reply #5 - Posted
2004-05-04 16:24:29 » |
|
For Windows, I love NSIS. NSIS is more like a compiler for a special-purpose scripting language. With HM Edit you can get an editor/IDE for NSIS.
|
.: Truth Until Paradox!
|
|
|
DanK
Junior Devvie  
Javver games rock yawel!
|
 |
«
Reply #6 - Posted
2004-05-04 18:23:29 » |
|
When using webstart, what's the best way to deal with frequently updated files, is it to pick a location on the hard drive and save the information there, if so is there a standard way of doing this (so the files are stored in whatever heirarchy the OS uses... like windows 95/98 put things in program files or my documents, and windows xp puts things in another folder (something like /documents/all users/username). Is there a really thorough site on making use of webstart, I've found a few that deal with mostly handling the resources within the jar, which isn't something I expect to do much of. The webstart tutorials I've found mostly seem to assume you won't be doing any file manipulation and don't cover much of setting up trusted applications.
|
|
|
|
Orangy Tang
|
 |
«
Reply #7 - Posted
2004-05-04 19:36:58 » |
|
When using webstart, what's the best way to deal with frequently updated files, is it to pick a location on the hard drive and save the information there, if so is there a standard way of doing this (so the files are stored in whatever heirarchy the OS uses... like windows 95/98 put things in program files or my documents, and windows xp puts things in another folder (something like /documents/all users/username). 1
| String userHome = System.getProperty("user.home"); |
Will give you that info. FileIO is identical to a regular java app (although god knows where the current directory will be pointing to on start up). And Kev's tutorial (in the Wiki) covers signing your jars to make a trusted application.
|
|
|
|
DanK
Junior Devvie  
Javver games rock yawel!
|
 |
«
Reply #8 - Posted
2004-05-04 22:41:24 » |
|
String userHome = System.getProperty("user.home"); covers what I was worried about, I'll check the wiki, hopefully it'll cover what I need to know.
|
|
|
|
Jens
|
 |
«
Reply #9 - Posted
2004-05-05 04:33:56 » |
|
And it's a good idea to make this directory configurable, in case the user isn't happy with the default directory.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
DanK
Junior Devvie  
Javver games rock yawel!
|
 |
«
Reply #10 - Posted
2004-05-05 05:45:24 » |
|
On windows 98 the directory returned is C:\WINDOWS, I was hoping it'd return the my documents directory. What directories are returned on windows xp and linux machines typically? (I'm assuming that since linux is a dedicated multi-user system it'll be the actual home directory for the current user and that windows xp would return similar).
|
|
|
|
elias
|
 |
«
Reply #11 - Posted
2004-05-05 06:50:52 » |
|
On linux, user.home is the home directory root (/home/<user>).
- elias
|
|
|
|
swpalmer
|
 |
«
Reply #12 - Posted
2004-05-05 19:24:15 » |
|
On windows this will not return the My Documents directory.. it is actually one level up from that in the "Documents and Settings/username" folder, which is the correct place really. I thought there was a way to get at the typical place for user documents in a platform independent way though... just can't think of it now.. maybe it was a webstart thing.
|
|
|
|
DanK
Junior Devvie  
Javver games rock yawel!
|
 |
«
Reply #13 - Posted
2004-05-07 14:13:00 » |
|
I've been told I'm one of the few people still using windows 98 so it's not a huge problem, any mac users know where user.home points? I'm not at all familiar with the file structure of macs, I'm not too worried about it but if user.home returns the mac desktop folder then it'd prob tick people off installing my game into a sub folder (I feel at the very least I need to drop a file in that directory to point to where the user chooses to install the game).
|
|
|
|
swpalmer
|
 |
«
Reply #14 - Posted
2004-05-08 01:40:33 » |
|
On OS X user.home is /Users/username
However you shouldn't be using an "installer" at all on the Mac. You should make a Mac Application Bundle and the use will simply drag that to where they want it.
Typically you distribute Mac software with a disk image file. Teh users double click it to mount the disk and then they can run the program form that mounted image or drag it to somewhere on their hard drive.
There are articles on java.sun.com or java.net about making Application Bundles for the Mac. It is fairly easy, and all you need is the java launcher stub program that you can get from a Mac, then you can build a zip archive of the app bundle. I don't think you can make a disk image without a Mac.
|
|
|
|
DanK
Junior Devvie  
Javver games rock yawel!
|
 |
«
Reply #15 - Posted
2004-05-12 01:24:13 » |
|
How well does webstart work on the mac? I'm assuming that it works pretty much the same as for windows machines (and I'll just need to include the mac version of the jogl native lib).
|
|
|
|
swpalmer
|
 |
«
Reply #16 - Posted
2004-05-14 00:34:30 » |
|
It works well, and being pre-installed on OS X makes it easy. The only bad thing is that there is no support for the auto download of the required JRE. But they are easy to get from a standard Mac "Software Update".
|
|
|
|
CaptainJester
|
 |
«
Reply #17 - Posted
2004-05-21 15:14:45 » |
|
Don't forget http://www.izforge.com/izpack/. It is a full, free installer, written entirely in Java. It uses XML descriptors and allows OS specific scripts. If you want to see it operate, download and install Sqirrel SQL from SourceForge.
|
|
|
|
|