Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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  
  [MAC OSX] JarBundle - A simple jar bundling application  (Read 1691 times)
0 Members and 1 Guest are viewing this topic.
Offline orange451

Senior Member


Medals: 7
Projects: 1
Exp: 4 years


Your face. Your ass. What's the difference?


« Posted 2014-07-24 10:17:02 »

I was looking for a simple way to package my jar file into a mac Application Bundle a few hours ago. It appears that you can no longer get the bundling application through xcode, or at least, I couldn't find it... So, I made this Smiley



Download it here.

Features:
  • load jar file
  • load icon (uses any PNG file)
(I know that's quite a hefty list).

This will not work on any os besides mac OSX, as I used two shell commands that are OS specific. (One for converting the icon preview image to a .icns file, and the other to execute the "launcher" file).

--
This might be the messiest application I have written in awhile; I started writing this at 4:00 AM.

Working on a nice FPS in lwjgl Smiley http://i.imgur.com/q4uFqBS.png
Feel free to message me if you're interested!
Offline SHC
« Reply #1 - Posted 2014-07-24 12:54:40 »

I've made a similar one before (using shell scripts). Also works with linux.

<a href="http://www.youtube.com/v/Unl8dgqFv6o?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/Unl8dgqFv6o?version=3&amp;hl=en_US&amp;start=</a>

All you require is to edit the launcher script and give it executable permissions.

Offline orange451

Senior Member


Medals: 7
Projects: 1
Exp: 4 years


Your face. Your ass. What's the difference?


« Reply #2 - Posted 2014-07-24 16:51:31 »

Ah you were the one that posted that!
I used this as a reference when I made the application Smiley

Working on a nice FPS in lwjgl Smiley http://i.imgur.com/q4uFqBS.png
Feel free to message me if you're interested!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SHC
« Reply #3 - Posted 2014-07-24 17:07:00 »

I've thought of making a GUI version, but didn't had OSX installed right now. Why not add more options? Allow native libs? and custom VM args?

Offline orange451

Senior Member


Medals: 7
Projects: 1
Exp: 4 years


Your face. Your ass. What's the difference?


« Reply #4 - Posted 2014-07-24 17:14:22 »

I've thought of making a GUI version, but didn't had OSX installed right now. Why not add more options? Allow native libs? and custom VM args?
I might do that Smiley

Working on a nice FPS in lwjgl Smiley http://i.imgur.com/q4uFqBS.png
Feel free to message me if you're interested!
Offline BurntPizza
« Reply #5 - Posted 2014-07-24 17:21:03 »

There's also Packr
Might be handy if you haven't seen it.
Offline SHC
« Reply #6 - Posted 2014-07-24 17:26:46 »

@BurntPizza

I've seen that, but I wanted my app to be used with Swing apps in general. Though I haven't used it, it looks pretty nice.

Offline BurntPizza
« Reply #7 - Posted 2014-07-24 17:32:33 »

@BurntPizza

I've seen that, but I wanted my app to be used with Swing apps in general. Though I haven't used it, it looks pretty nice.

Packr can bundle swing apps last I checked.
Offline gouessej
« Reply #8 - Posted 2014-07-24 18:22:17 »

Hi

Why haven't you used existing projects like those ones?
https://java.net/downloads/appbundler/appbundler.html
https://sourceforge.net/projects/jarbundler/

I haven't still tested the APP file I generated with PackR...

Offline orange451

Senior Member


Medals: 7
Projects: 1
Exp: 4 years


Your face. Your ass. What's the difference?


« Reply #9 - Posted 2014-07-24 18:24:00 »

Because I like to have a gui display Smiley

Working on a nice FPS in lwjgl Smiley http://i.imgur.com/q4uFqBS.png
Feel free to message me if you're interested!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SHC
« Reply #10 - Posted 2014-07-24 18:25:13 »

@gouessej

I've seen that AppBundler task before, but haven't worked with ant before (Just used Eclipse to build). Haven't seen that JarBundler. Moreover, I already knew the app bundle structure on Mac OS, so I implemented mine with shell scripts (which I'm better at)

Offline gouessej
« Reply #11 - Posted 2014-07-24 18:36:24 »

@orange451 It is possible to build a GUI above an existing library.

@SHC Does your stuff support very recent versions of Mac OS X?

Offline SHC
« Reply #12 - Posted 2014-07-25 01:28:46 »

@gouessej

Yes. I've tested it with Mountain Lion and Mavericks too. Only thing is that you have to kill the finder and open it again to recognise it as application in mavericks 10.9.3

Offline gouessej
« Reply #13 - Posted 2014-07-25 08:53:33 »

@orange451 Do you use hdiutil (to make a DMG file)? It's possible to make an icns file in Java:
http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java?view=markup
Look at the method writeImage(final BufferedImage src, final OutputStream os, Map<String, Object> params).

I don't know whether you are interested in making your tool work with other operating systems. Personally, I hate being forced to use a Mac to create a Mac application bundle for a Java application.

Moreover, Packr puts a JVM (OpenJDK) into the bundle, it's really great because fewer Mac users have Java installed and it allows to work around the bugs caused by crappy or obsolete Java libraries installed as extensions. Implementing this option isn't very difficult, you just have to download an OpenJDK build, unzip it in the right subdirectory and modify your launcher in order to use it instead of the system JVM.

Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (40 views)
2014-09-24 16:13:29

Pippogeek (31 views)
2014-09-24 16:12:22

Pippogeek (21 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (29 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (44 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06

BurntPizza (55 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!