What about linux / mac?
I didn’t know you could convert a bat to an .exe :o ???
That might help, roland.
Thanks, this looks like a better way to go - if theres something similar on mac and linux.
Nice little prog,
here a better download link (directly from the maker and without the cnet crap)
Bat To Exe Converter:
http://www.f2ko.de/programs.php?lang=en&pid=b2e
I always use batch to exe
well on linux you just change the bat to a .sh file, which can be run potentially - put packages on ubuntu and stuff - its all complicated
I asked about Mac and I think it was Eli Delventhal who said, its really easy to do with an app maker or something which is already there
also - since mac is unix stuff also, this batch file, (optionally renamed to .sh, you dont really have to) will work there aswell
of course you gotta always have your private jvm and stuff
On OS X, you really want to create a .app bundle. Most OS X users are not savvy enough to unzip & run a shell script. Like Cero said, .app bundles are discussed on this forum. Here’s the first thread I found, but there may be better ones.
I’d bet big money that most folks running Linux are geeky enough to be cool with running a shell script from the command line, so the lowest common denominator approach of a zip file/.sh script is probably sufficient there. Doing anything more is just icing on the cake.
How do you ship your game with a private JVM?
and all you need to do is rename .bat to .sh? I thought the syntax inside would be different too?
what does the inside of your .bat file look like Cero?
You ship the private JVM by doing just that, bundle the jre folder in your program files.
And no, there is no syntax difference because it’s just 1 command: java + parameters.
Actually there will be differences. Any path separators (e.g. in the relative path to java in your packaged JVM) should be switched to ‘/’ from ‘’. You’ll also want to start your shell script with a shebang:
#!/bin/sh
./jvm/bin/java -jar whatever.jar
Also, your script would ideally come pre-chmodd’d 755, though I’m not sure that the zip file format preserves file permissions across all *nixes.
you just put a jre folder in your game folder strucutre when shipping.
bobear and r4king said it
normally the batch just runs on linux, but if you ship it you should really do a proper shell script, which is nothing more than what bobear wrote.
you put in jvm arguments and game arguments and there you go
in case of autoupdater you have simply 2 calls, one after another
Thanks
EDIT: My jre folder is 87.5 MB…
Is shipping a private JVM the ONLY way?
It’s the only reliable way, yes.
Does double clicking .jar files work on all OS’s? I could just keep update.jar and game.jar seperate, and if there is an update when you run game.jar it could just say “update found, run update.jar”. Then I wouldn’t need bat files or a private JVM.
Well no, that’s why you need a private JVM
ok. Is there any way I can shrink the size down a bit? I guess I can zip the jre6 folder, that gets it to 30mb. Anything else I can do?
ok, thanks.
absolutely not
pc’s who have java installed
pc’s who have the version of java installed that you need
pc’s on which dbl clicking a jar actually works
and pc’s which are owned by people know you can dbl click jars and dont mind java
so no, its very unlikely that it will work any other way
about the size: well depends on your game; our’s will be like 700mb - at that size, a 70mb VM doesnt even matter
I was aiming for 20-30 mb max, guess I will have to rethink a bit :emo: