mirror of
https://github.com/kk7ds/chirp
synced 2026-08-13 17:51:36 -04:00
Fix app launching on OS X #4479
Running chirp .app bundles from ~/Downloads was observed to fail on recent versions of OS X. This is because a OS X security feature called App Translocation is actually executing the .app bundle from a temporary read-only disk image, and the chirp launch script attempts to modify the contents of the app bundle. This patch avoids modifying the .app bundle when App Translocation is active.
This commit is contained in:
parent
23e714b148
commit
9380b833e3
1 changed files with 9 additions and 5 deletions
|
|
@ -2,14 +2,18 @@
|
|||
|
||||
LOCATION=$(dirname "${BASH_SOURCE}")
|
||||
|
||||
PYTHON=/opt/kk7ds//Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
|
||||
PYTHON=/opt/kk7ds/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
|
||||
|
||||
if [ -x $PYTHON ]; then
|
||||
not_translocated () {
|
||||
security translocate-status-check "${LOCATION}" 2>&1 | grep -q -e NOT -e unknown -e "not found"
|
||||
}
|
||||
|
||||
if [ ! -x $PYTHON ]; then
|
||||
PYTHON=/opt/kk7ds/bin/python2.7
|
||||
elif not_translocated; then
|
||||
ln -s $PYTHON "${LOCATION}/../CHIRP"
|
||||
PYTHON=${LOCATION}/../CHIRP
|
||||
export PYTHONPATH="/opt/kk7ds//Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/"
|
||||
else
|
||||
PYTHON=/opt/kk7ds/bin/python2.7
|
||||
export PYTHONPATH=/opt/kk7ds/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
|
||||
fi
|
||||
|
||||
exec "$PYTHON" "${LOCATION}/../Resources/chirp/chirpw"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue