fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 133 forks source link

fix hdiutil image creation on aarch64 #186

Closed AstroPixelProcessor closed 2 years ago

AstroPixelProcessor commented 2 years ago

Please add this fix to make DMG image creation work on aarch64 using APFL filesystem instead of older HFS+ filesystem

fvarrui commented 2 years ago

Thanks so much! Your changes will be released in v1.6.7

AstroPixelProcessor commented 2 years ago

Thanks @fvarrui !

fvarrui commented 2 years ago

Hi @AstroPixelProcessor! I need your support. Did you manage to package your app for MacOS with success?

AstroPixelProcessor commented 2 years ago

Hi @fvarrui, thanks for asking.

Well not really, I have a commercial application and I really need to properly sign and notarize my application as you can understand.

I now can create a working DMG and PKG installers with your JavaPackager, but my application is more or less broken because of the use of the UniversalJavaApplicationStub which I really don't need I think, since I always include my own JRE of choice in the package.

My application uses the JFileChooser and all solutions offered on https://github.com/tofi86/universalJavaApplicationStub don't work if you sign and notarize with hardened runtime enabled and the right signing entitlements like enabling sandboxing.

Using a compiled version of universalJavaApplicationStub with the right signing entitlements is just not working in a Apple M1 mac mini with arm hardware. But on universalJavaApplicationStub they say it works.. If I sandbox, the application can't even start no matter what entitlements I include. So I suspect that they don't consider sandboxing and signing and notarizing?

Is there a way that you know can provide with javapackager to create a DMG without using the universalJavaApplicationStub ? If so, that would really help me a lot at the moment ;-)

Oh, my issue for Linux DEB packaging is not in 1.6.6 yet I think? Also scheduled for 1.6.7 ?

Thanks a lot Francisco, Mabula

AstroPixelProcessor commented 2 years ago

@fvarrui i have opened an issue at: https://github.com/tofi86/universalJavaApplicationStub/issues/121 to check with them if it should work or if they would know why it does not work...

I am also investigating removing the JFileChooser from my project and implement the File DIalog which should not have the issue that I am facing.

AstroPixelProcessor commented 2 years ago

@fvarrui I have good news, I have completely solved my issue with the stub by further modifying your macpackager I will make an issue and a pull request again ;-) Ik can now hardcode sign with the right entitlements, and get JFileChooser to work using a binary universalJavaApplicationStub. It passes notarization and the notarized DMG works now completely.

fvarrui commented 2 years ago

Great! 👏 👏 👏 ... your PR will be welcomed