Hi Michael:
> there are two issues with the script here:
> 1. "echo -e" is not POSIX, so the generated Info.plist might (and indeed
> does!) contain all those "-e"s
Oops - this works on Tiger. You have a later release I guess? Then Apple
*downgraded* echo to a less capable version!
> 2. each make invocation adds another CFBundleDocumentTypes array to
> Info.plist
Yes, that's true. Didn't see that as I always remove the bin folder before
re-building as the build process gets confused if I fix the bundle libs before
a re-build.
Maybe the attached solution is the better one - just let cmake do the dirty
work. To this end, we have to supply a tweaked Info.plist template, which
already contains the file types and the signature. Apart from that, it's the
template from cmake 2.6. Then we can also omit the extra target (which was
misplaced, btw, as it was executed only if translation is enabled.
Best,
Albrecht.
Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt (revision 2967)
+++ src/CMakeLists.txt (working copy)
@@ -554,10 +554,6 @@
COMMAND
${CMAKE_SOURCE_DIR}/MacOSX/mklocversion.sh ${MAC_BUNDLE_PATH}
${qlandkarte_QM_FILES}
)
- add_custom_target(modify-plist.sh ALL
- COMMAND
- ${CMAKE_SOURCE_DIR}/MacOSX/modify-plist.sh
${MAC_BUNDLE_PATH}/Contents/Info.plist
- )
endif (APPLE)
ENDIF(ENABLE_TRANSLATION)
@@ -615,7 +611,14 @@
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
+ set(MACOSX_BUNDLE_COPYRIGHT
+ "Copyright © 2007-2011 Oliver Eichler ([email protected])"
+ )
add_executable(${PROGNAME} MACOSX_BUNDLE ${qlandkarte_ALLINP}
${MAC_EXTRA_RES})
+ set_target_properties(${PROGNAME} PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/MacOSX/Info.plist.in
+ )
+
add_custom_target(mac-deploy macdeployqt "${MAC_BUNDLE_PATH}"
COMMAND ${CMAKE_SOURCE_DIR}/MacOSX/map2gcm-libs.sh "${MAC_BUNDLE_PATH}")
else(APPLE)
Index: MacOSX/Info.plist.in
===================================================================
--- MacOSX/Info.plist.in (revision 0)
+++ MacOSX/Info.plist.in (revision 0)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//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>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+ <key>CFBundleGetInfoString</key>
+ <string>${MACOSX_BUNDLE_INFO_STRING}</string>
+ <key>CFBundleIconFile</key>
+ <string>${MACOSX_BUNDLE_ICON_FILE}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleLongVersionString</key>
+ <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
+ <key>CFBundleName</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
+ <key>CFBundleSignature</key>
+ <string>QLGT</string>
+ <key>CFBundleVersion</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
+ <key>CSResourcesFileMapped</key>
+ <true/>
+ <key>LSRequiresCarbon</key>
+ <true/>
+ <key>NSHumanReadableCopyright</key>
+ <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>gpx</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>GPS exchange data</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-gpx.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>qlb</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>QLandkarte data</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-qlb.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>tcx</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>TrainingsCenterExchange data</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-tcx.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>gdb</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>MapSource data</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-gdb.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>kml</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>Google Earth (Keyhole) data</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-kml.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>loc</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>Geocaching.com - EasyGPS data</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-loc.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>plt</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>OziExplorer track</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-plt.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>rte</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>OziExplorer route</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-rte.icns</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>wpt</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>OziExplorer waypoint</string>
+ <key>CFBundleTypeIconFile</key>
+ <string>qlandkartegt-wpt.icns</string>
+ </dict>
+ </array>
+</dict>
+</plist>
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users