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

Mac OSX Native Build Other Resources #301

Open
nartz opened this issue Aug 8, 2017 · 7 comments
Open

Mac OSX Native Build Other Resources #301

nartz opened this issue Aug 8, 2017 · 7 comments

Comments

@nartz
Copy link

nartz commented Aug 8, 2017

Currently a mac native build will produce:

target/jfx/app
target/jfx/native/(dmg, pkg, app)

The binary for the app is located at: target/jfx/native/MyProject.app/Contents/MacOs/MyProject

Is there a way to copy files in the same folder as the binary? Specifically, before the DMG is created (since i assume, the building of the DMG somehow uses the .app folder?

Thanks.

@FibreFoX
Copy link
Member

FibreFoX commented Aug 9, 2017

You can try to use additionalAppResources for this, just recreate the needed subfolder-structure inside that provided folder.

@nartz
Copy link
Author

nartz commented Aug 9, 2017

My understanding is that using additionalAppResources will be placed inside of target/jfx/native/MyProject.app/Contents/Java, whereas we would like them placed in
target/jfx/native/MyProject.app/Contents/Resources or /Contents/MacOS

@FibreFoX
Copy link
Member

Oh yes, you are right. I'm no Mac-user, sorry, so I forgot about the specialities from the Mac-Bundler.
Can you check if it works for you when you create the Contents-folder inside src/main/deploy/mac.app/? I added a special bundler, which was required as the official API didn't provide any of the requested feature.

@FibreFoX
Copy link
Member

@nartz Did the src/main/deploy/mac.app-location work? Still an technical issue?

@nartz
Copy link
Author

nartz commented Aug 15, 2017

Hmmmm - is that a default path that it looks at or do i have to specify src/main/deploy/mac.app somewhere?

To test what you mentioned, i did the following:

  1. mkdir src/main/deploy/mac.app/Contents
  2. touch src/main/deploy/mac.app/Contents/foo.txt
  3. mvn package

Unfortunately, I did not see foo.txt anywhere in the .app folder.

As a hacky workaround, i am just using the maven resources plugin to copy the necessary files into the .app folder after the .app is created - specifically, i use the 'install' phase to do the file copies, even though its not what its for =D. Of course this is non-ideal but maybe sufficient for a few months =D

The issue of course is that its hard to create a DMG or PKG with the necessary resources.

@FibreFoX
Copy link
Member

FibreFoX commented Feb 6, 2018

Just to add some comment: I had to drop the workaround for supporting this, due to compatibility issues with JDK 9. No idea if I can get anything like this working again :( the "new" bundlers are encapsulated inside the new module-system, where I can't reach them ... in general this is not provided by the javapackager 😢

@nartz
Copy link
Author

nartz commented Feb 21, 2018

Alrighty - I guess i can have workarounds/scripts that stuff the data in as needed.

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

2 participants