Fixes #13 by introducing vibration where available

This commit is contained in:
Marc Wäckerlin
2015-08-16 15:07:17 +00:00
parent fcd44e79d5
commit 32acb4e442
8 changed files with 293 additions and 59 deletions

View File

@@ -25,6 +25,7 @@ target="$(pwd)/${1}/Contents/MacOS"
mkdir -p ${1}/Contents/{Resources,MacOS}
! test -d ${3}/bin || \
find ${3}/bin -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \;
executablefile=$(ls -1 ${1}/Contents/MacOS/ | head -1)
! test -d ${3}/lib || \
find ${3}/lib -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \;
! test -d ${3}/share/${2} || \
@@ -49,6 +50,7 @@ done
# Step 3: resolve all library dependencies
found=1
oldpath="$(pwd)"
while [ $found -ne 0 ]; do
found=0
cd "${target}"
@@ -69,6 +71,7 @@ while [ $found -ne 0 ]; do
done
done
done
cd ${oldpath}
# Step 4: if necessary, install qt_menu.nib
if test -n "${QTDIR}"; then
@@ -79,3 +82,22 @@ if test -n "${QTDIR}"; then
test -d ${1}/Contents/Resources/qt_menu.nib
fi
fi
# Step 5: copy or create info.plist
infoplist=$(find ${1}/Contents/Resources -name Info.plist)
if test -f "${infoplist}"; then
mv "${infoplist}" ${1}/Contents/Info.plist
else
cat > ${1}/Contents/Info.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>${2}</string>
<key>CFBundleExecutable</key>
<string>${executablefile##/}</string>
</dict>
</plist>
EOF
fi