1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
#!/bin/sh
app_name=gwyddion
gwyddion_app_dir=${app_name}.app
contents_dir=${gwyddion_app_dir}/Contents
bin_dir=${contents_dir}/MacOS
res_dir=${contents_dir}/Resources
rm -rf ${gwyddion_app_dir}
mkdir ${gwyddion_app_dir}
mkdir ${contents_dir}
mkdir ${bin_dir}
mkdir ${res_dir}
if [ $# -lt 1 ] ; then
echo "Syntax: $0: prefix\n"
echo "Example:$0 /usr/local/\n"
exit 1
fi
prefix=$1
cp ${prefix}/bin/${app_name} ${bin_dir}/
cp -R ${prefix}/share/${app_name}/* ${res_dir}/
cp pixmaps/${app_name}.icns ${res_dir}/
cp -R ${prefix}/lib/${app_name}/modules ${res_dir}
find ${res_dir}/modules -type f ! -name '*.so' -print0 | xargs -0 rm -f
cat << EOT > ${contents_dir}/Info.plist
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>gwyddion</string>
<key>CFBundleGetInfoString</key>
<string>gwyddion</string>
<key>CFBundleIconFile</key>
<string>gwyddion.icns</string>
<key>CFBundleIdentifier</key>
<string>net.gwyddion.gwyddion</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@PACKAGE_VERSION@</string>
<key>CFBundleSignature</key>
<string>gwyd</string>
<key>CFBundleVersion</key>
<string>@PACKAGE_VERSION@</string>
<key>NSHumanReadableCopyright</key>
<string>GPL</string>
<key>LSMinimumSystemVersion</key>
<string>10.4</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string></string>
</array>
<key>CFBundleTypeName</key>
<string>DocumentType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>NSDocumentClass</key>
<string>MyDocument</string>
</dict>
</array>
</dict>
</plist>
EOT
|