most basic question
ryandesign at macports.org
Tue Oct 27 11:51:40 PDT 2015
On Oct 27, 2015, at 12:28 PM, Dennis Couzin wrote:
> Dear users-list,
> Sorry to have to ask the most basic question of all.
> A certain application -- GSmartControl -- is listed on a MacPorts page.
> I wish to use GSmartControl in my Mac.
> So can I find a ready-to-install .dmg or .app for GSmartControl at
> macports.org -- does it already publically exist?
MacPorts doesn't provide that sort of thing.
> Or must I first install the MacPorts program (which entails installing
> Xcode, which requires some space)
> and then compile GSmartControl myself for my Mac?
Not necessarily. You must type "sudo port install gsmartcontrol" which will install gsmartcontrol and all of its dependencies. For each package, it will either download a precompiled binary from our server, if one exists, or otherwise compile it from source.
> Will this produce a portable .dmg or .app for GSmartControl that I
> can install on friends' Macs?
No. This is a fairly advanced topic, so the fact that you titled this thread "most basic question" makes me think the below will be much more than you want to get into.
First of all, understand that the gsmartcontrol port does not provide an OS X application; it provides an executable that you launch from a terminal.
To make a distributable dmg of gsmartcontrol and all of its dependencies you would run the command "sudo port mdmg gsmartcontrol". On modern systems you can instead use "sudo port mpkg gsmartcontrol" to create an installer package that is not wrapped in a disk image. See:
However, if you were to distribute either of these installers to another user, it would install files into the same place that MacPorts normally does. This means that if that other user was already using MacPorts, your installer might overwrite files in that user's MacPorts installation, which would likely break things, which that user might then file a ticket in our issue tracker about, which wastes our time as we have to explain to them that they broke their MacPorts installation and now have to uninstall and reinstall it.
If you want to create a distributable installer, you must first install a new copy of MacPorts into a prefix different from the standard MacPorts prefix, dedicated to that piece of software. The default MacPorts prefix is /opt/local, so if you were going to create a distributable package of gsmartcontrol, you might install a new copy of MacPorts in /opt/gsmartcontrol, then install the port there. Installing into a nonstandard prefix is only possible when building MacPorts from source.
For all of the above, note also that the installer you distribute will be specific to your version of OS X (as MacPorts always is). If you create the installer on OS X 10.11 El Capitan, for example, it will not be usable by anyone running OS X 10.10 Yosemite or earlier. There are ways around this, starting with specifying a different value for macosx_deployment_target in macports.conf, but again this is an advanced topic and that might not be all you need to do. If you wanted to support users of 32-bit Macs, you would also need to compile everything universal. If you wanted to support users of PowerPC Macs, you would also have to adjust universal_archs and build everything on OS X 10.6 or earlier.
More information about the macports-users