Mac OS X questions
TODO: Many of these questions need to be moved to the orbital-transfer project.
Which package format is preferred for distributing a GUI application for non-developers? What's the technical difference between .dmg, .pkg, and .app?
- .dmg is a disk image,
- .pkg is an installer+archive, and
.app is a directory w/ a particular structure that macOS expects applications to have/use
.app is the application itself
- use .dmg if you want to distribute an app and don't need installation scripts
- use .pkg if you need installation scripts
- common pattern: put .app inside .dmg along with a shortcut that can be dragged to Applications
- PostgreSQL distributes as a .dmg for standalone installation and a .zip for inclusion in other projects https://www.postgresql.org/download/macosx/.
- Use
hdiutil
to create .dmg https://apple.stackexchange.com/questions/48414/how-do-i-create-a-dmg-file-from-a-directory. - Or this tool that creates icons https://github.com/andreyvit/create-dmg.
Has anyone here turned homebrew formulae into a package? I'm using timsutton/brew-pkg for .pkg right now and it doesn't appear to work properly in this VM that I have (not all files are in the archive) and doesn't distinguish between build-time and run-time deps.
Do any of those formats work under their own prefix so that they don't get affected by the rest of the system libraries? Or should I relocate the homebrew prefix before installing and install there?
What about if the application is a script with many libraries? This seems like it would help http://sveinbjorn.org/platypus.
This script uses Platypus for Perl https://github.com/miyagawa/perl-app-builder/blob/master/perl-app-builder.pl.
Does it matter which version of macOS I build the package on? Will that effect my ability to distribute it to older versions of macOS? Which macOS version does it make sense to target? N releases behind the latest version?
Is there any remote desktop protocol for a headless VM? I'm using a OS X Vagrant box https://atlas.hashicorp.com/AndrewDryga/boxes/vagrant-box-osx. All my GUI tests work fine, but I can't see the GUI. I need to be able to start it from the terminal --- VNC would be great.
``` osx-guest $ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers -clientopts -setvncpw -vncpw secret -setvnclegacy -vnclegacy yes
then do host $ vagrant ssh -- -L5908:localhost:5900
host $ xvnc4viewer :8 [password: secret] ```
via http://serverfault.com/questions/120559/vnc-viewer-not-connecting-to-mac-from-pc