I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 4c76a93a authored by kytv's avatar kytv
Browse files

Add CPU type check for OSX

I removed Tanuki's broken CPU "bitness" check for OSX in
3db46be1ede7d858b6c319905cf310d99227eb29. With this commit I add one that
works. Note that at this point we don't use the "bitness" checking because we
ship a quad-fat wrapper for OSX. Unfortunately, one can only manipulate the osx
binaries with "lipo" which is only available in OSX. In the future we may want
to use the "bitness" logic.

In any case, the old check set the bits to 64 for Leopard and above, but just
because a Mac is running Leopard or Snow Leopard doesn't mean it's 64bit
capable. This addition of mine will actually check the flags using sysctl. I'm
not using uname because OSX < Lion starts in 32bit mode by default (but can
still run 64bit binaries).
parent ce0e0b20
No related branches found
No related tags found
No related merge requests found
...@@ -357,7 +357,11 @@ if [ "$DIST_OS" = "macosx" ] ...@@ -357,7 +357,11 @@ if [ "$DIST_OS" = "macosx" ]
then then
OS_VER=`sw_vers | grep 'ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*'` OS_VER=`sw_vers | grep 'ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*'`
DIST_ARCH="universal" DIST_ARCH="universal"
DIST_BITS="64" if [ $(sysctl -n hw.cpu64bit_capable) -eq 1 ]; then
DIST_BITS="64"
else
DIST_BITS="32"
fi
APP_PLIST_BASE=${PLIST_DOMAIN}.${APP_NAME} APP_PLIST_BASE=${PLIST_DOMAIN}.${APP_NAME}
APP_PLIST=${APP_PLIST_BASE}.plist APP_PLIST=${APP_PLIST_BASE}.plist
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment