#!/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} prefix=@prefix@ if [ $# -gt 0 ] ; then prefix=$1 fi LAUNCH=${prefix}/bin/${app_name} echo "Creating launcher bundle to ${LAUNCH}" cp pixmaps/${app_name}.icns ${res_dir}/ cat << EOT > ${bin_dir}/${app_name} #!/bin/sh ${LAUNCH} EOT chmod a+x ${bin_dir}/${app_name} cat << EOT > ${contents_dir}/Info.plist CFBundleDevelopmentRegion English CFBundleExecutable gwyddion CFBundleGetInfoString gwyddion CFBundleIconFile gwyddion.icns CFBundleIdentifier net.gwyddion.gwyddion CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL CFBundleShortVersionString @PACKAGE_VERSION@ CFBundleSignature gwyd CFBundleVersion @PACKAGE_VERSION@ NSHumanReadableCopyright GPL LSMinimumSystemVersion 10.4 CFBundleDocumentTypes CFBundleTypeExtensions CFBundleTypeName DocumentType CFBundleTypeOSTypes **** CFBundleTypeRole Editor NSDocumentClass MyDocument EOT