I've bundled a jar file as a mac application 开发者_JAVA百科using jar bundler. I'm now trying to create an installer for this app so that: 1) The application will be placed in the applications folder 2) The application is added to the list of permissible apps in Mac Application Level Firewall
Also, I have several example files I would like to include with this application - what is the best way to make these available to the user. Someone suggested I have the mpkg file launch a dmg file which would contain these files, but this seems circuitous.
Thanks
Apple's PackageMaker, included with Xcode, can install the files along with your application; but that's usually done for files that need an absolute path. Alternatively, just distribute the application bundle and example files in a .dmg
, and let the user allow or block the connection in System Preferences
. As a convenience, you can include an alias to the /Applications
folder.
I asked the same question here. Signing the .app will prevent all but the first firewall warning. (Same as with major programs like Firefox). Signing the app is a hassle, but there's the benefit. I don't know of any Ant task that can help here.
As for packaging I suggest the JarBundler Ant Task here. I have added it to my build process and it has saved me lots of time. And last, an Ant Task for making the dmg here.
Good luck.
I'm not sure how/if you can change firewall rules, but few people run firewalls on Mac OS X anyway (no, really).
So I would just add instructions to your documentation about what ports to open if the user has enabled the firewall.
You can't circumvent the firewall (for obvious reasons), but the user will be asked on first launch whether to allow incoming connections.
精彩评论