Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sign a Mac OS X application in Linux?

For OS X, I distribute my Java application inside a DMG. Since Mountain Lion's release, opening the app gives the following error message:

[app name] is damaged and couldn't be opened. You should eject the disk image.

Apparently the fix is to sign the .app file so I read the Code Signing Guide. Everything seems to be straightforward apart from the important question of how to integrate this into my one-click build process.

Building my product on all platforms happens on my Linux development machine. I run an Ant script and the Windows installer, starter EXE, Linux installer, OS X application and DMG are all built. So I'd like to integrate code signing into this process.

Is there an equivalent of 'codesign' for Linux?

like image 964
Dan Gravell Avatar asked Jul 31 '12 08:07

Dan Gravell


People also ask

Can you install macOS apps on Linux?

The most reliable way to run Mac apps on Linux is through a virtual machine. With a free, open-source hypervisor application like VirtualBox, you can run macOS on a virtual device on your Linux machine. A properly-installed virtualized macOS environment will run all macOS apps without issue.

Does macOS X run on Linux?

Mac OS is based on a BSD code base, while Linux is an independent development of a unix-like system. This means that these systems are similar, but not binary compatible. Furthermore, Mac OS has lots of applications that are not open source and are build on libraries that are not open source.


1 Answers

There is no documented way of code signing a Mac OS X application in Linux.

The only way I've found to do this so far is to SSH into a Mac and use that.

On the other hand, according to @Steve McLeod (https://stackoverflow.com/a/55906962/28190) the installer package install4j does offer this:

Integrated code signing on Windows and Mac OS X . In the “General Settings” section, install4j now has a “Code signing” tab where you can configure code signing certificates for Windows and Mac OS X. Code signing will be applied to all launchers and installer applications in the corresponding media files. The implementations for code signing are cross-platform, so you can sign Windows and Mac OS X media files from a Linux build server, for example.

So it must be technically possible.

like image 132
Dan Gravell Avatar answered Sep 22 '22 23:09

Dan Gravell