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

Support Mac OS X app bundle #253

Closed
choffmeister opened this issue May 16, 2014 · 19 comments
Closed

Support Mac OS X app bundle #253

choffmeister opened this issue May 16, 2014 · 19 comments

Comments

@choffmeister
Copy link

Are there any efforts to support app bundles for Mac OS X like https://github.com/sbt/sbt-appbundle does? Sadly the sbt-appbundle package lacks maintainence...

@muuki88
Copy link
Contributor

muuki88 commented May 16, 2014

Our next stop is looking to be windows. However feel free to provide a pull request. If you need any help, feel free to ask.

You can take a look at #236 for some guidance of how to implement a new feature from scratch.

@jsuereth
Copy link
Member

So, we DO support creating DMG files. However, Mac OSX app bundles are self-admittedly a moving target (unstable). The likelihood of anyone keeping up-to-date is low. The "best practice" currently is to use the GUI to make a template bundle and then just copy-modify that.

We may support this use case in the future, but It's not something we'd dive into immediately. I've done the research for how to generate app-bundles, and implemented the sane bits (creating a DMG).

@choffmeister
Copy link
Author

There are indeed a moving target, but the basic features are stable. The sbt-appbundle package is 2 years old and apart from updating the Scala and SBT version nothing has been done since then. But still, it generates working xxx.app bundles today.

I will try to kick off a PR for a side branch with the basic .app generation this weekend.

On 16 May 2014, at 15:10, Josh Suereth [email protected] wrote:

So, we DO support creating DMG files. However, Mac OSX app bundles are self-admittedly a moving target (unstable). The likelihood of anyone keeping up-to-date is low. The "best practice" currently is to use the GUI to make a template bundle and then just copy-modify that.

We may support this use case in the future, but It's not something we'd dive into immediately. I've done the research for how to generate app-bundles, and implemented the sane bits (creating a DMG).


Reply to this email directly or view it on GitHub.

@jsuereth
Copy link
Member

@choffmeister That'd be great. You probably want to create a new osx configuration for this, as well as hook from JavaApp archetype to the OSX configuration. Hopefully the DMG stuff I added is helpful :)

For testing, please run scripted osx/* and add tests as needed. Looking forward to seeing what you come up with!

@choffmeister
Copy link
Author

I'm still on it but at the moment I am occupied with other things. Have send some PRs to the original sbt-appbundle plugin and hope to bring the ideas and improvents anytime soon into this plugin.

@muuki88
Copy link
Contributor

muuki88 commented May 25, 2014

Awesome! Thanks for the update

@mariussoutier
Copy link

👍 Looking forward to this!

@muuki88
Copy link
Contributor

muuki88 commented Sep 25, 2014

@choffmeister , any updates on this?

@metasim
Copy link
Member

metasim commented Jun 1, 2015

@choffmeister , @muuki88 With the JDKPackager plugin, this is (arguably) covered. What do we need to do to close this issue?

@muuki88
Copy link
Contributor

muuki88 commented Jun 1, 2015

@metasim you're right. I think there is a dmg-doc section. We should reference the jdkPackager there.

@akauppi
Copy link

akauppi commented Jun 2, 2015

Seconding this. Can help to test.

@muuki88
Copy link
Contributor

muuki88 commented Jun 2, 2015

@akauppi That would be awesome. The current version 1.0.2 should have everything you need to do so. The default jdkPackagerType is installer, so on MacOS X this should generate dmg and app files. However you can set various types in your build.sbt

enablePlugins(JDKPackagerPlugin)

// simple dmg
jdkPackagerType := "dmg"

// macos app
jdkPackagerType := "mac.appStore"

and then run

sbt jdkPackager:packageBin

@metasim correct me if anything should be incorrect.

@mariussoutier
Copy link

Will this include an entire JRE?

@muuki88
Copy link
Contributor

muuki88 commented Jun 3, 2015

AFAIK this is configurable

@metasim
Copy link
Member

metasim commented Jun 3, 2015

@muuki88 As far as I know, that should work, except I've never tried the mac.appStore type myself.
These are the currently valid options: all, deb, dmg, exe, image, installer, mac.appStore, msi, none, pkg, rpm. Wondering if I should have made a set of case objects instead of using a string here.

On MacOS, if you select installer, it creates both .dmg and .pkg packages (the latter being more like the traditional windows installer).

@mariussoutier I does indeed include the JRE. I'm not sure if you can configure it to deploy without it. You'd have to check the JavaFX Ant Task documentation. Know that a build.xml file is generated in then target/jdkpackager directory, which you can inspect/tweak to try things out via running Ant directly. If you find something you want but isn't currently supported in the plugin, then you can intercept the task that writes that file to apply additional XML transforms on it if you had to, then file a feature request or PR to add it to the plugin. One thing I haven't figured out how to do is have the installer include other resources (e.g. from the mappings setting) that aren't inside the .app bundle, but co-located in the .dmg. Not even sure if it's possible with the Oracle tools.

@mariussoutier
Copy link

Thanks for the info. Including the JRE is a sensible default to avoid the "You have to install Java" dialog.

@metasim
Copy link
Member

metasim commented Jun 3, 2015

I agree... huge simplification. But I actually think the reason they originally did it was because Apple wouldn't allow anything in the app store that required additional downloads :-/

@muuki88 muuki88 closed this as completed Jun 12, 2015
@Christewart
Copy link

Is there any updates on this?

@muuki88
Copy link
Contributor

muuki88 commented May 11, 2021

Not really. If some one is willing to make a pull request implementing this, I'm happy to merge 😊

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

No branches or pull requests

7 participants