Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build an OS X application #50

Merged
merged 3 commits into from
Apr 20, 2016
Merged

Conversation

toonetown
Copy link
Contributor

This uses the jarbundler plugin (https://github.com/UltraMixer/JarBundler) and universalJavaApplicationStub (https://github.com/tofi86/universalJavaApplicationStub) to generate and build an OS X application. The application handles dropping of files onto it, as well as a more "OS X-like" menu bar, antialiasing, high resolution, etc.

This uses the jarbundler plugin (https://github.com/UltraMixer/JarBundler) and universalJavaApplicationStub (https://github.com/tofi86/universalJavaApplicationStub) to generate and build an OS X application.  The application handles dropping of files onto it, as well as a more "OS X-like" menu bar, antialiasing, high resolution, etc.

The application is zipped up into a single "Luyten-OSX.zip" archive for easier distribution (since OS X .apps are actually directories)
</goals>
<configuration>
<target>
<taskdef name="jarbundler" classname="com.ultramixer.jarbundler.JarBundler" />
Copy link
Owner

@deathmarine deathmarine Apr 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not all entirely familiar in the world of OSX, however how much does https://github.com/federkasten/appbundle-maven-plugin differ from this plugin, would it be better to embed the jvm, same as launch4j.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for embedding the JVM, that is possible (even with the jarbundler plugin) - however, I have avoided doing that so far, because at that point, it would require being built on an OS X system. As it currently is, you should be able to build the OS X packages even from a Windows or Linux system (an OS X app is just a certain directory structure layout).

The main reason that I used the jarbundler task is because of my familiarity with it (I've never used appbundle-maven-plugin). It is also the "recommended" way to bundle an application by the universalJavaApplicationStub developer. Is there a reason you'd prefer to use the appbundle-maven-plugin?

@toonetown
Copy link
Contributor Author

Another question - when I was creating the OS X icon file (.icns), I just used the Luyten.png file that was in the repo. However, the .icns file contains a bundle of images at different resolutions - 512, 256, 128, 32, and 16. I just scaled the image up and down to the correct sizes - but it's pretty blurry at 512. Does there happen to exist a larger copy of the icon to use (or a vector format of it)?

It's not a big deal - but I thought I'd create the icon the "right" way if you have those resources.

@toonetown
Copy link
Contributor Author

If you would prefer me to roll up all these commits into one, I can do so as well. I don't know which you prefer on this project (some projects I have contributed to ask to squash all commits into a single one for PRs, others like to have the commit history).

@deathmarine deathmarine merged commit 8d8e514 into deathmarine:master Apr 20, 2016
@deathmarine
Copy link
Owner

The icon was a public domain freebie that I found while searching. If there are any recommendations for higher resolution version I would be more than happy to accommodate. I'm not picky about the repo setup, thank you for your contributions.
As for the plugin, building on multiple platforms is the idea, so bundling the jvm would only work if we utilized profiles within maven. I don't think it is necessary but for windows its kind of nice to have a bundled executable.

@deathmarine
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants