OSX package: Check for 64-bit Intel CPU before installing.
This commit is contained in:
parent
5fe63436c8
commit
0d095be64f
3 changed files with 19 additions and 0 deletions
|
@ -4,6 +4,7 @@ DIST=osx_package
|
|||
VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
|
||||
RESOURCES=$DIST/Resources
|
||||
ROOT=$DIST/pandoc
|
||||
SCRIPTS=osx-resources
|
||||
BASE=pandoc-$VERSION
|
||||
ME=jgm
|
||||
|
||||
|
@ -36,6 +37,7 @@ $PACKAGEMAKER \
|
|||
--resources $RESOURCES \
|
||||
--version $VERSION \
|
||||
--no-relocate \
|
||||
--scripts $SCRIPTS \
|
||||
--out $BASE.pkg
|
||||
|
||||
echo Creating disk image...
|
||||
|
|
14
osx-resources/InstallationCheck
Executable file
14
osx-resources/InstallationCheck
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
cputype=`sysctl -n hw.cputype`
|
||||
sixtyfourbit=`sysctl -n hw.cpu64bit_capable`
|
||||
|
||||
if [ "x$cputype" != "x7" ] # x86
|
||||
then
|
||||
exit 112
|
||||
fi
|
||||
|
||||
if [ "x$sixtyfourbit" != "x1" ] # 64 bit
|
||||
then
|
||||
exit 113
|
||||
fi
|
||||
|
3
osx-resources/InstallationCheck.strings
Normal file
3
osx-resources/InstallationCheck.strings
Normal file
|
@ -0,0 +1,3 @@
|
|||
"16" = "This installer works only on Intel Macs.";
|
||||
"17" = "This installer requires a 64-bit processor.";
|
||||
|
Loading…
Add table
Reference in a new issue