Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  SvgExe: Tool for Creating Standalone Self-Extracting Jars  (Read 2043 times)
0 Members and 1 Guest are viewing this topic.
Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Posted 2014-03-25 17:55:57 »

The problem:
  • Your game requires external files that have to be outside the jar
  • Your game requires native libraries
  • Your game requires OS-specific code
  • Your game requires command line arguments
  • You still want to deploy as a single jar file

The solution: SvgExe!



SvgExe is a tool that helps you create standalone, self-extracting jar files that automatically deploy external files and native libraries for the correct system. It has a step-by-step GUI for developers and cleans up after itself automatically, so your users never have to worry about more than one file.

I created this mostly to be used by Processing developers after Processing stopped supporting exporting applications for multiple systems, but I figured some Java developers might find a use for it as well, especially with the Java 7u51 "security fix" for applets and webstarts. I have an example tutorial that uses SvgExe to deploy a LWJGL game here.

SvgExe is also open-source on GitHub, and it might make a perfect jumping-on point for people who want to get into open-source development on a smaller project.

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline Drenius
« Reply #1 - Posted 2014-03-25 19:32:57 »

What is the difference to e.g. JarSplice?
Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #2 - Posted 2014-03-25 19:40:23 »

It's similar to JarSplice, except it allows more customization and supports external files.

In fact, I came up with this specifically because JarSplice didn't support external files (which Processing relies on), then I just kept adding features to support every corner case I could think of.

It's also open source and actively developed, which I'm not sure is true of JarSplice?

Static Void Games - Play indie games, learn game programming, upload your own games!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2014-03-25 23:05:54 »

Please add an example with JOGL. Then, we'll put some links to your tool in our deployment guide in our wiki.

JarSplice is still proprietary. Its creator claimed it would open source it (under BSD) but it has never been done Sad

Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #4 - Posted 2014-03-25 23:10:30 »

Doesn't JOGL handle its natives automatically?

But if you really want a JOGL example, that would be really easy to put together!

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline gouessej
« Reply #5 - Posted 2014-03-26 09:51:52 »

JogAmp is able to detect the architecture, extract the native libraries from its JAR and load them even when everything is in the same JAR if and only if you respect a naming rule for the subdirectories containing those libraries so that GlueGen knows where to pick them, this is explained (by Xerxes) here:
http://forum.jogamp.org/Packaging-JOGL-projects-to-be-cross-platform-tp4031261p4031286.html

Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #6 - Posted 2014-03-26 12:30:13 »

JogAmp is able to detect the architecture, extract the native libraries from its JAR and load them even when everything is in the same JAR if and only if you respect a naming rule for the subdirectories containing those libraries so that GlueGen knows where to pick them, this is explained (by Xerxes) here:
http://forum.jogamp.org/Packaging-JOGL-projects-to-be-cross-platform-tp4031261p4031286.html

Hehe, that was me asking that question! I was trying to figure out the best way to package up a Processing application (which uses JOGL), and SvgExe is what I eventually came up with. The way JOGL does it was one of my inspirations for the tool!

Putting together a JOGL example should be really similar to the LWJGL example that already exists, so it should be pretty easy. I just have to find a little example JOGL project first...

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline gouessej
« Reply #7 - Posted 2014-03-26 15:17:06 »

Hehe, that was me asking that question! I was trying to figure out the best way to package up a Processing application (which uses JOGL), and SvgExe is what I eventually came up with. The way JOGL does it was one of my inspirations for the tool!

Putting together a JOGL example should be really similar to the LWJGL example that already exists, so it should be pretty easy. I just have to find a little example JOGL project first...
Then you have one more reason to make it work Smiley Let us know whether you need some help.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 744
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #8 - Posted 2014-03-26 19:40:10 »

The name 'SvgExe' is a tad unfortunate, given that SVG commonly stands for 'Scalable Vector Graphics' .

For that reason I ignored this thread (I never work with SVG files), and only discovered what it was about when you plugged it in another thread.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #9 - Posted 2014-03-26 19:45:02 »

Yeah, I'm terrible at coming up with names. I used SVG because I originally created it for people uploading games to Static Void Games (Static Void Games = SVG, executable jar for SVG = SvgExe, told you I was terrible with names), but it's becoming more general for non-SVG use. I wonder if it's too late to change the name...

Static Void Games - Play indie games, learn game programming, upload your own games!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 744
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #10 - Posted 2014-03-26 19:50:52 »

You released it yesterday... how can it be too late? Smiley

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline gouessej
« Reply #11 - Posted 2014-03-26 20:02:28 »

I agree with Riven, it's not too late to find a less confusing name.

Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #12 - Posted 2014-03-26 21:02:37 »

This isn't the first place I released it. But I'll think about it.

Planning on getting a JOGL example up tonight!

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #13 - Posted 2014-03-27 03:04:57 »

Okay, I put together a JOGL example available here: http://staticvoidgames.com/tutorials/deployment/JoglExample.jsp

I'm not a JOGL expert, so let me know if anything isn't clear or should be reworded!

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #14 - Posted 2014-03-27 03:30:39 »

As far as names go, SVG confuses with the graphics, and EXE smells of Windows-only.

Maybe JarPkg? (Have a whole game and resources packaged into a jar)

Offline gouessej
« Reply #15 - Posted 2014-03-27 12:06:05 »

Hi

Okay, I put together a JOGL example available here: http://staticvoidgames.com/tutorials/deployment/JoglExample.jsp

I'm not a JOGL expert, so let me know if anything isn't clear or should be reworded!
" and how to compile a your game's code separately from the L***L (LWJGL) library jar" is useless. In my humble opinion, it should be removed or reworded, you could write " and how to compile your game's code with JOGL", couldn't you?

Why have you decided to use a directory layout different of GlueGen one?

I thank you very much for your efforts, I'll add a link to your tutorial soon, it's a nice and very detailed tutorial anyway except that it gives the impression that JogAmp is a second class citizen by reminding that the developer has to be able to compile her/his game without using its main competitor (LWJGL) and the tutorial for JOGL appears in the very last position whereas Processing (Java) uses JOGL and one of your inspiration source is JOGL too. I'm really sorry, I don't want to be harsh, I'm sure that you have absolutely no bad intention and your tool is going to be very helpful in the current context because of the security changes done by Oracle but there is no need of being a JOGL expert to use it.

Finally, HeroesGraveDev's suggestion is fine to me. It says what it does.

Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #16 - Posted 2014-03-27 12:22:56 »

The LWJGL mention was completely accidental, just because I copied and pasted the LWJGL tutorial to create the JOGL tutorial because the process is almost identical. Fixed now!

I went with a directory layout that's slightly different to give the user more freedom- now the architecture part of it is optional, and you can only use the top-level OS directories if you want. This was in response to a user request to be able to ignore the architecture level and only use the OS level, and it seems to work pretty well. I've tried to make the tool as general as possible instead of appealing directly to any one library.

The mention of LWJGL is gone (just a copy paste accident!), and the only reason it's on the bottom is because it's the last one I added! I can rearrange it if it's really a big deal, or heck, I could even give each a 50% chance to be on top every time the page is loaded, hahaha.

Thanks for taking a look at it, I'm pretty excited to be mentioned on the JOGL site!

PS- Should I be calling it JOGL or JogAmp? The tutorial only uses JOGL, but I've seen both...

PPS- I think I'm keeping the name, but I'll be sure to add what it does in parenthesis or something whenever I introduce it, just like I did in the title here. Hopefully that makes it obvious enough. :p  It's already gained some traction on the Processing forum, which I think will be its main use.

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline gouessej
« Reply #17 - Posted 2014-03-27 12:37:13 »

The LWJGL mention was completely accidental, just because I copied and pasted the LWJGL tutorial to create the JOGL tutorial because the process is almost identical. Fixed now!
Thanks.

I went with a directory layout that's slightly different to give the user more freedom- now the architecture part of it is optional, and you can only use the top-level OS directories if you want. This was in response to a user request to be able to ignore the architecture level and only use the OS level, and it seems to work pretty well. I've tried to make the tool as general as possible instead of appealing directly to any one library.
I see what you mean even though I hardly see a case in which you want to ignore the architecture. As long as it's useful for someone, it's cool Smiley

The mention of LWJGL is gone (just a copy paste accident!), and the only reason it's on the bottom is because it's the last one I added! I can rearrange it if it's really a big deal, or heck, I could even give each a 50% chance to be on top every time the page is loaded, hahaha.
As you used GlueGen as a source of inspiration and asked us some help, we deserve more than 50% chance Wink

Thanks for taking a look at it, I'm pretty excited to be mentioned on the JOGL site!
You're going to be mentioned in the Wiki as a first step. Then, the other contributors and I will determine whether we should mention your tool directly in the deployment page and in the user guide.

PS- Should I be calling it JOGL or JogAmp? The tutorial only uses JOGL, but I've seen both...
JogAmp includes JOGL, JOAL, JOCL and GlueGen. Use JogAmp where you can, for example when you mean "JOGL and GlueGen". You can add into your tutorial joal.jar and jocl.jar so that our developers won't forget those JARs as well.

PPS- I think I'm keeping the name, but I'll be sure to add what it does in parenthesis or something whenever I introduce it, just like I did in the title here. Hopefully that makes it obvious enough. :p  It's already gained some traction on the Processing forum, which I think will be its main use.
As you wish... but it's really confusing.

Edit.: I plan to add something about your tool here:
http://jogamp.org/wiki/index.php/JogAmp_JAR_File_Handling

Edit.2: Please can you fix this spelling mistake? "compile a your game's code" -> "compile your game's code"

Offline KevinWorkman

JGO Wizard


Medals: 52
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #18 - Posted 2014-03-27 14:43:03 »

Awesome, thanks!

Edit.2: Please can you fix this spelling mistake? "compile a your game's code" -> "compile your game's code"

Fixed! I need a proofreader like you on every page on the site...  Tongue

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline BoneBiz

Senior Newbie


Projects: 1



« Reply #19 - Posted 2014-06-09 02:25:25 »

I have used this before without knowing that this is where it came from. I have used the version that comes bundled with Processing (www.processing.org).
Pages: [1]
  ignore  |  Print  
 
 

 
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!