Luminem
Senior Newbie 
|
 |
«
Posted
2013-01-04 18:40:03 » |
|
Hey guys, i've finished my little game, now how can i make a "installer" to distribute the game? And a "shortcut" to open it like "minecraft/revenge of the titan"  Thank you
|
Simply Perfect
|
|
|
Jimmt
|
 |
«
Reply #1 - Posted
2013-01-04 18:41:24 » |
|
Uh, .jar? Or convert it to .exe. Unless your game is really big I see no need for an installer.
|
|
|
|
deepthought
|
 |
«
Reply #2 - Posted
2013-01-04 18:45:10 » |
|
Jar file and simple c program or shell script to invoke the jvm.
|
Mad Scientist
|
|
|
Games published by our own members! Check 'em out!
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #3 - Posted
2013-01-04 19:32:29 » |
|
My game is not big but without installer is "too" tatty  So how can i do the "program" or shell script :S? 
|
Simply Perfect
|
|
|
deepthought
|
 |
«
Reply #4 - Posted
2013-01-04 19:40:48 » |
|
Distribute as a zip containing your jar, resources, and script. The script just has to call 1
| java(w) -jar jarname -Djava.library.path. any dependencies |
|
Mad Scientist
|
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #5 - Posted
2013-01-04 22:02:16 » |
|
Excuse me :S, how the script? What kind of script(.sh,.bat)? How can i do for window and linux? I don't know very much about that
|
Simply Perfect
|
|
|
deepthought
|
 |
«
Reply #6 - Posted
2013-01-04 22:05:08 » |
|
on windows just put what i have above in gamename.bat. on linux it goes in a .sh file. on linux you will need to add "#!/bin/sh" without quotes to the file. you may also need to chmod it to be executable.
|
Mad Scientist
|
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #7 - Posted
2013-01-04 22:14:57 » |
|
Thank  and the last question, could you explain to me what's this 1
| -Djava.library.path. any dependencies |
what does it do? Sorry for too question, it's the first time i release a java app :S
|
Simply Perfect
|
|
|
ra4king
|
 |
«
Reply #8 - Posted
2013-01-05 06:06:04 » |
|
Thank  and the last question, could you explain to me what's this 1
| -Djava.library.path. any dependencies |
what does it do? Sorry for too question, it's the first time i release a java app :S That's only if you have natives you want the JVM to load, like for LWJGL for example. If not, then ignore and do not add it 
|
|
|
|
ReBirth
|
 |
«
Reply #9 - Posted
2013-01-05 06:14:49 » |
|
lol no one mention Mac? 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Phased
|
 |
«
Reply #10 - Posted
2013-01-05 06:48:47 » |
|
You could create a launcher, which the user will download.
The launcher will then download the actual .jar and any files (you could pack it into a zip for download, and just save all files exactly in the right position in the zip, probably the easiest way) and put it in the right path. e.g. when you press play, the launcher will check the appropriate file path for the game, if it does not exist, download the files then launch the game.
The launcher then can have a update check in it, compare the current version to a text file and check to see if it needs updating, if it needs updating, download the file. If not, just start the game instantly.
|
|
|
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #12 - Posted
2013-01-05 11:48:11 » |
|
You could create a launcher, which the user will download.
The problem is i don't know how to make it :/
|
Simply Perfect
|
|
|
ReBirth
|
 |
«
Reply #13 - Posted
2013-01-05 12:03:05 » |
|
There is no need of launcher if your game is relatively small/rarely updating.
|
|
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #14 - Posted
2013-01-05 14:16:24 » |
|
:S Okay  then a normal installer without updating
|
Simply Perfect
|
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #15 - Posted
2013-01-06 12:44:15 » |
|
:S GUYS!!  , how can i call the "java jar" with the script... So it's works perfectly but don't know how to load jinput too :S
|
Simply Perfect
|
|
|
SHC
|
 |
«
Reply #16 - Posted
2013-01-06 12:54:40 » |
|
First check the licences of your dependencies so that you can merge them ( No Licence will object you I think ). You can make it an exe for windows platform ( See http://transfer2pc.weebly.com/1/post/2011/10/jar2exe-converter-11-gui.html My jar to exe converter ) For linux, pack it in a zip along with a script (.sh) 1
| java -jar merged_jar.jar |
Or you can package them into deb or rpm packages.
|
|
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #17 - Posted
2013-01-06 13:13:41 » |
|
but how can i "use" my jar with jinput. the error is INFO: Failed to load library: no jinput-linux in java.library.path
|
Simply Perfect
|
|
|
SHC
|
 |
«
Reply #18 - Posted
2013-01-06 13:28:12 » |
|
Did you merge the jar? If so make the code like this 1
| java -jar merged_jar.jar -Djava.library.path=jinput-linux.so |
|
|
|
|
Luminem
Senior Newbie 
|
 |
«
Reply #19 - Posted
2013-01-06 15:36:54 » |
|
how can i merge the jar? how can i activate jinput for win & mac too?
|
Simply Perfect
|
|
|
|