bunzip2 in which versions of MacOSX
Hello all,
I'm releasing a piece of software for MacOSX and would like to use bunzip2 in it. I would like to know if I can rely on these being installed in which versions of MacOS. Can someone tell me specifically if all versions of Leopard and Snow Leopard will have bunzip2 in them? Does anyone know about older versions as well? If bunzip2 isn't/wasn't widely available, I could go with gunzip if anyone knows about its availability. Thanks!
I'm releasing a piece of software for MacOSX and would like to use bunzip2 in it. I would like to know if I can rely on these being installed in which versions of MacOS. Can someone tell me specifically if all versions of Leopard and Snow Leopard will have bunzip2 in them? Does anyone know about older versions as well? If bunzip2 isn't/wasn't widely available, I could go with gunzip if anyone knows about its availability. Thanks!
Comments
Hello all,
I'm releasing a piece of software for MacOSX and would like to use bunzip2 in it. I would like to know if I can rely on these being installed in which versions of MacOS. Can someone tell me specifically if all versions of Leopard and Snow Leopard will have bunzip2 in them?
bzip2 isn't standard on MacOS. your app should be able to run
pkgutil --pkgs | grep bzip2
from the command line and parse the result(s) to see whether bzip2 is installed
bzip2 isn't standard on MacOS. your app should be able to run
pkgutil --pkgs | grep bzip2
from the command line and parse the result(s) to see whether bzip2 is installed
bzip2 is standard on 10.6, and is in my 10.5.8 image as well (nothing but updates there). So, yes, it is standard.
And you have the pkgutil command a bit confused, your example is only going to show the names of packages that you have installed. If "bzip2" was not in the name of the package (it is not), then you would not get any result. The proper commands to use would be:
whereis bzip2
pkgutil --file-info /usr/bin/bzip2
Which will tell you that it is part of the com.apple.pkg.BSD package, as well as having been updated by com.apple.pkg.update.os.10.6.3.patch.