diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,14 @@ include(GenerateExportHeader) include( MarbleMacros ) +# Generate a standalone app bundle when building on Apple's OS X +# unset this to build a more unix-traditional layout that uses and provides +# shared libraries and other resources (e.g. for MacPorts, Fink, HomeBrew etc.) +if(APPLE) + option(APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Apple's OS X" ON) + add_feature_info("App Bundle" APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Apple's OS X.") +endif(APPLE) + #################################################### # Generate the tiles with the tilecreator at compile time # if this option is set, srtm.jpg will not be installed but the generated tiles instead @@ -59,7 +67,7 @@ #################################################### # Build a D-Bus interface for the Marble widget # This is disabled by default for all win32, apple and Android -if(WIN32 OR APPLE OR CMAKE_SYSTEM_NAME STREQUAL Android) +if(WIN32 OR APPLE_STANDALONE_BUNDLE OR CMAKE_SYSTEM_NAME STREQUAL Android) option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" OFF) else() option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" ON) @@ -174,15 +182,22 @@ FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices ) MARK_AS_ADVANCED (APP_SERVICES_LIBRARY) SET(MAC_EXTRA_LIBS ${APP_SERVICES_LIBRARY}) - # for Mac OS X, everything is put inside an application bundle - SET (CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/) - # path for library references - SET (CMAKE_INSTALL_NAME_DIR @executable_path/lib) - # install the Info.plist file - install(FILES src/mac/Info.plist DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents) - #SET (lib_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) - SET (data_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/data) - SET (plugin_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/plugins) + if(APPLE_STANDALONE_BUNDLE) + ADD_DEFINITIONS(-DAPPLE_STANDALONE_BUNDLE) + # for Mac OS X, everything is put inside an application bundle + SET (CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/) + # path for library references + SET (CMAKE_INSTALL_NAME_DIR @executable_path/lib) + # install the Info.plist file + install(FILES src/mac/Info.plist DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents) + #SET (lib_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) + SET (data_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/Resources) + SET (plugin_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/Resources/plugins) + else(APPLE_STANDALONE_BUNDLE) + set(data_dir ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/data) + set(plugin_dir ${CMAKE_INSTALL_FULL_LIBDIR}/marble/plugins) + set(CMAKE_MODULES_INSTALL_PATH ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/cmake) + endif(APPLE_STANDALONE_BUNDLE) elseif(CMAKE_SYSTEM_NAME STREQUAL Android) set(plugin_dir "${CMAKE_INSTALL_PREFIX}/assets/plugins") set(data_dir "${CMAKE_INSTALL_PREFIX}/assets/data") diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -256,14 +256,14 @@ install (FILES placemarks/cityplacemarks.cache DESTINATION ${MARBLE_DATA_INSTALL_PATH}/placemarks) endif(MOBILE) -if(NOT APPLE AND NOT WIN32) +if(NOT APPLE_STANDALONE_BUNDLE AND NOT WIN32) install (FILES icons/128-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/128x128/apps/ RENAME marble.png) install (FILES icons/64-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/64x64/apps/ RENAME marble.png) install (FILES icons/48-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps/ RENAME marble.png) install (FILES icons/32-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/32x32/apps/ RENAME marble.png) install (FILES icons/22-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/22x22/apps/ RENAME marble.png) install (FILES icons/16-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/16x16/apps/ RENAME marble.png) -endif(NOT APPLE AND NOT WIN32 ) +endif(NOT APPLE_STANDALONE_BUNDLE AND NOT WIN32 ) FILE (GLOB AUDIO_FILES audio/*.ogg) install (FILES diff --git a/examples/cpp/marble-game/GameMainWindow.cpp b/examples/cpp/marble-game/GameMainWindow.cpp --- a/examples/cpp/marble-game/GameMainWindow.cpp +++ b/examples/cpp/marble-game/GameMainWindow.cpp @@ -83,6 +83,9 @@ QString Private::readMarbleDataPath() const { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif return QSettings().value("MarbleWidget/marbleDataPath", "").toString(); } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,9 +71,9 @@ ${CMAKE_CURRENT_BINARY_DIR}/config-marble.h ) -if(APPLE) +if(APPLE_STANDALONE_BUNDLE) add_subdirectory( mac ) -endif(APPLE) +endif(APPLE_STANDALONE_BUNDLE) add_subdirectory( plasmarunner ) add_subdirectory( thumbnailer ) diff --git a/src/apps/marble-kde/CMakeLists.txt b/src/apps/marble-kde/CMakeLists.txt --- a/src/apps/marble-kde/CMakeLists.txt +++ b/src/apps/marble-kde/CMakeLists.txt @@ -10,6 +10,7 @@ set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR}) include(KDECMakeSettings) include(ECMInstallIcons) +include(ECMAddAppIcon) macro_optional_find_package(KF5 ${REQUIRED_KF5_VERSION} QUIET COMPONENTS Crash NewStuff Parts CoreAddons I18n) @@ -53,6 +54,9 @@ "${CMAKE_SOURCE_DIR}/data/icons/48-apps-marble.png" "${CMAKE_SOURCE_DIR}/data/icons/64-apps-marble.png" DESTINATION ${KDE_INSTALL_ICONDIR}) +file(GLOB ICONS_SRCS + "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/*-apps-marble.png") +ecm_add_app_icon(marble_kde_SRCS ICONS ${ICONS_SRCS}) add_executable (marble ${marble_kde_SRCS}) target_link_libraries ( diff --git a/src/apps/marble-kde/marble_part.cpp b/src/apps/marble-kde/marble_part.cpp --- a/src/apps/marble-kde/marble_part.cpp +++ b/src/apps/marble-kde/marble_part.cpp @@ -1422,7 +1422,7 @@ #ifdef Q_WS_X11 nativeString = i18n( "Native (X11)" ); #endif - #ifdef Q_OS_MAC + #ifdef Q_OS_OSX nativeString = i18n( "Native (Mac OS X Core Graphics)" ); #endif diff --git a/src/apps/marble-mobile/MobileMainWindow.cpp b/src/apps/marble-mobile/MobileMainWindow.cpp --- a/src/apps/marble-mobile/MobileMainWindow.cpp +++ b/src/apps/marble-mobile/MobileMainWindow.cpp @@ -292,6 +292,9 @@ QString MainWindow::readMarbleDataPath() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup( "MarbleWidget" ); @@ -307,6 +310,9 @@ // Load bookmark file. If it does not exist, a default one will be used. m_marbleWidget->model()->bookmarkManager()->loadFile( "bookmarks/bookmarks.kml" ); +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup( "MainWindow" ); @@ -480,6 +486,9 @@ void MainWindow::writeSettings() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup( "MainWindow" ); diff --git a/src/apps/marble-mobile/main.cpp b/src/apps/marble-mobile/main.cpp --- a/src/apps/marble-mobile/main.cpp +++ b/src/apps/marble-mobile/main.cpp @@ -33,7 +33,7 @@ Q_IMPORT_PLUGIN(qsvg) #endif -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX //for getting app bundle path #include #endif @@ -77,7 +77,7 @@ QApplication::addLibraryPath( QApplication::applicationDirPath() + QDir::separator() + "plugins" ); #endif -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus); qDebug("Adding qt image plugins to plugin search path..."); CFURLRef myBundleRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); @@ -92,7 +92,7 @@ // lets try to set the qt plugin search path... if (myPath.contains(".app")) { - myPath += "/Contents/plugins"; + myPath += "/Contents/Resources/plugins"; QApplication::addLibraryPath( myPath ); qDebug( "Added %s to plugin search path", qPrintable( myPath ) ); } diff --git a/src/apps/marble-qt/CMakeLists.txt b/src/apps/marble-qt/CMakeLists.txt --- a/src/apps/marble-qt/CMakeLists.txt +++ b/src/apps/marble-qt/CMakeLists.txt @@ -14,13 +14,13 @@ set_target_properties(marble-qt PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"") endif() else (WIN32) - if (APPLE) + if (APPLE_STANDALONE_BUNDLE) add_executable (marble-qt ${marble_SRCS}) # For Mac OS X, the executable must be at the root of the bundle's executable folder INSTALL(TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS) - else (APPLE) + else (APPLE_STANDALONE_BUNDLE) add_executable (marble-qt ${marble_SRCS}) - endif (APPLE) + endif (APPLE_STANDALONE_BUNDLE) endif (WIN32) target_link_libraries ( @@ -50,11 +50,11 @@ if(WIN32) install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) else(WIN32) -if (APPLE) +if (APPLE_STANDALONE_BUNDLE) # No need for this when installing to a bundle -else (APPLE) +else (APPLE_STANDALONE_BUNDLE) install (TARGETS marble-qt RUNTIME DESTINATION bin ) -endif (APPLE) +endif (APPLE_STANDALONE_BUNDLE) endif(WIN32) if(APPS_INSTALL_DIR) install(PROGRAMS marble-qt.desktop DESTINATION ${APPS_INSTALL_DIR}) diff --git a/src/apps/marble-qt/QtMainWindow.cpp b/src/apps/marble-qt/QtMainWindow.cpp --- a/src/apps/marble-qt/QtMainWindow.cpp +++ b/src/apps/marble-qt/QtMainWindow.cpp @@ -1133,6 +1133,9 @@ QString MainWindow::readMarbleDataPath() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup("MarbleWidget"); @@ -1145,6 +1148,9 @@ void MainWindow::readSettings(const QVariantMap& overrideSettings) { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup("MainWindow"); @@ -1354,6 +1360,9 @@ void MainWindow::writeSettings() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup( "MainWindow" ); @@ -1622,6 +1631,9 @@ void MainWindow::showMapWizard() { QPointer mapWizard = new MapWizard(); +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup( "MapWizard" ); diff --git a/src/apps/marble-qt/qtmain.cpp b/src/apps/marble-qt/qtmain.cpp --- a/src/apps/marble-qt/qtmain.cpp +++ b/src/apps/marble-qt/qtmain.cpp @@ -32,7 +32,7 @@ Q_IMPORT_PLUGIN(qsvg) #endif -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX //for getting app bundle path #include #endif @@ -104,7 +104,7 @@ QApplication::addLibraryPath( QApplication::applicationDirPath() + QDir::separator() + "plugins" ); #endif -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus); qDebug("Adding qt image plugins to plugin search path..."); CFURLRef myBundleRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); @@ -119,7 +119,7 @@ // lets try to set the qt plugin search path... if (myPath.contains(".app")) { - myPath += "/Contents/plugins"; + myPath += "/Contents/Resources/plugins"; QApplication::addLibraryPath( myPath ); qDebug( "Added %s to plugin search path", qPrintable( myPath ) ); } diff --git a/src/lib/astro/CMakeLists.txt b/src/lib/astro/CMakeLists.txt --- a/src/lib/astro/CMakeLists.txt +++ b/src/lib/astro/CMakeLists.txt @@ -57,7 +57,7 @@ # choose the correct target install library path if(WIN32) INSTALL(TARGETS astro RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) -elseif(APPLE) +elseif(APPLE_STANDALONE_BUNDLE) INSTALL(TARGETS astro LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) else() install(TARGETS astro @@ -68,7 +68,7 @@ ########### install headers & cmake config files ############### -if (WIN32 OR APPLE) +if (WIN32 OR APPLE_STANDALONE_BUNDLE) # TODO: find how to install & deploy library, headers and config files as bundle for development return() endif() diff --git a/src/lib/marble/AbstractFloatItem.cpp b/src/lib/marble/AbstractFloatItem.cpp --- a/src/lib/marble/AbstractFloatItem.cpp +++ b/src/lib/marble/AbstractFloatItem.cpp @@ -47,7 +47,7 @@ }; QPen AbstractFloatItemPrivate::s_pen = QPen( Qt::black ); -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX QFont AbstractFloatItemPrivate::s_font = QFont( QStringLiteral("Sans Serif"), 10 ); #else QFont AbstractFloatItemPrivate::s_font = QFont( QStringLiteral("Sans Serif"), 8 ); diff --git a/src/lib/marble/CMakeLists.txt b/src/lib/marble/CMakeLists.txt --- a/src/lib/marble/CMakeLists.txt +++ b/src/lib/marble/CMakeLists.txt @@ -442,7 +442,7 @@ # choose the correct target install library path if(WIN32) install(TARGETS marblewidget RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) -elseif(APPLE) +elseif(APPLE_STANDALONE_BUNDLE) install(TARGETS marblewidget LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) else() install(TARGETS marblewidget @@ -453,7 +453,7 @@ ########### install headers & cmake config files ############### -if (WIN32 OR APPLE) +if (WIN32 OR APPLE_STANDALONE_BUNDLE) # TODO: find how to install & deploy library, headers and config files as bundle for development return() endif() diff --git a/src/lib/marble/MapThemeSortFilterProxyModel.cpp b/src/lib/marble/MapThemeSortFilterProxyModel.cpp --- a/src/lib/marble/MapThemeSortFilterProxyModel.cpp +++ b/src/lib/marble/MapThemeSortFilterProxyModel.cpp @@ -52,6 +52,9 @@ const QAbstractItemModel *model = index.model(); QModelIndex columnIndex = model->index( index.row(), 0, QModelIndex() ); QString const key = "Favorites/" + model->data( columnIndex ).toString(); +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif return QSettings().contains( key ); } @@ -60,6 +63,9 @@ const QAbstractItemModel *model = index.model(); QModelIndex columnIndex = model->index( index.row(), 0, QModelIndex() ); QString const key = "Favorites/" + model->data( columnIndex ).toString(); +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif return QSettings().value( key ).toDateTime(); } diff --git a/src/lib/marble/MapViewItemDelegate.cpp b/src/lib/marble/MapViewItemDelegate.cpp --- a/src/lib/marble/MapViewItemDelegate.cpp +++ b/src/lib/marble/MapViewItemDelegate.cpp @@ -61,6 +61,9 @@ int const padding = 5; QString const name = index.data().toString(); +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif const bool isFavorite = QSettings().contains( "Favorites/" + name ); QSize const bookmarkSize( 16, 16 ); QRect bookmarkRect( iconRect.bottomRight(), bookmarkSize ); diff --git a/src/lib/marble/MapViewWidget.cpp b/src/lib/marble/MapViewWidget.cpp --- a/src/lib/marble/MapViewWidget.cpp +++ b/src/lib/marble/MapViewWidget.cpp @@ -71,6 +71,9 @@ { m_mapSortProxy.setDynamicSortFilter( true ); m_celestialListProxy.setDynamicSortFilter( true ); +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif } void applyExtendedLayout() diff --git a/src/lib/marble/MarbleDirs.cpp b/src/lib/marble/MarbleDirs.cpp --- a/src/lib/marble/MarbleDirs.cpp +++ b/src/lib/marble/MarbleDirs.cpp @@ -30,7 +30,7 @@ #include #endif -#ifdef Q_OS_MACX +#ifdef APPLE_STANDALONE_BUNDLE //for getting app bundle path #include #endif @@ -130,7 +130,7 @@ return QCoreApplication::applicationDirPath() + QDir::separator() + "data"; #endif -#ifdef Q_OS_MACX +#ifdef APPLE_STANDALONE_BUNDLE // // On OSX lets try to find any file first in the bundle // before branching out to home and sys dirs @@ -145,7 +145,7 @@ //marble was not built as a bundle if (myPath.contains(".app")) //its a bundle! { - systempath = myPath + "/Contents/Resources/data"; + systempath = myPath + "/Contents/Resources"; } if ( QFile::exists( systempath ) ){ @@ -184,7 +184,7 @@ QString systempath; -#ifdef Q_OS_MACX +#ifdef APPLE_STANDALONE_BUNDLE // // On OSX lets try to find any file first in the bundle // before branching out to home and sys dirs diff --git a/src/lib/marble/QtMarbleConfigDialog.cpp b/src/lib/marble/QtMarbleConfigDialog.cpp --- a/src/lib/marble/QtMarbleConfigDialog.cpp +++ b/src/lib/marble/QtMarbleConfigDialog.cpp @@ -63,6 +63,9 @@ m_cloudSyncManager(cloudSyncManager), m_pluginModel() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif } Ui::MarbleViewSettingsWidget ui_viewSettings; diff --git a/src/lib/marble/declarative/MarbleQuickItem.cpp b/src/lib/marble/declarative/MarbleQuickItem.cpp --- a/src/lib/marble/declarative/MarbleQuickItem.cpp +++ b/src/lib/marble/declarative/MarbleQuickItem.cpp @@ -884,6 +884,9 @@ void MarbleQuickItem::loadSettings() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup("MarbleQuickItem"); double lon = settings.value("centerLon", QVariant(0.0)).toDouble(); @@ -899,6 +902,9 @@ void MarbleQuickItem::writeSettings() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup("MarbleQuickItem"); settings.setValue("centerLon", QVariant(d->m_map.centerLongitude())); diff --git a/src/lib/marble/declarative/Settings.cpp b/src/lib/marble/declarative/Settings.cpp --- a/src/lib/marble/declarative/Settings.cpp +++ b/src/lib/marble/declarative/Settings.cpp @@ -42,6 +42,9 @@ QVariant Settings::value( const QString &group, const QString &key, const QVariant &value ) const { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings( m_organizationName, m_applicationName ); settings.beginGroup( group ); return settings.value( key, value ); @@ -49,6 +52,9 @@ void Settings::setValue( const QString &group, const QString &key, const QVariant &value ) { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings( m_organizationName, m_applicationName ); settings.beginGroup( group ); settings.setValue( key, value ); diff --git a/src/lib/marble/geodata/data/GeoDataFeature.cpp b/src/lib/marble/geodata/data/GeoDataFeature.cpp --- a/src/lib/marble/geodata/data/GeoDataFeature.cpp +++ b/src/lib/marble/geodata/data/GeoDataFeature.cpp @@ -176,7 +176,7 @@ QString defaultFamily = s_defaultFont.family(); -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX int defaultSize = 10; #else int defaultSize = 8; diff --git a/src/lib/marble/geodata/data/GeoDataLabelStyle.cpp b/src/lib/marble/geodata/data/GeoDataLabelStyle.cpp --- a/src/lib/marble/geodata/data/GeoDataLabelStyle.cpp +++ b/src/lib/marble/geodata/data/GeoDataLabelStyle.cpp @@ -19,7 +19,7 @@ namespace Marble { -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX static const int defaultSize = 10; #else static const int defaultSize = 8; diff --git a/src/plugins/render/foursquare/FoursquarePlugin.cpp b/src/plugins/render/foursquare/FoursquarePlugin.cpp --- a/src/plugins/render/foursquare/FoursquarePlugin.cpp +++ b/src/plugins/render/foursquare/FoursquarePlugin.cpp @@ -79,8 +79,11 @@ bool FoursquarePlugin::isAuthenticated() { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; - + return !settings.value( "access_token" ).isNull(); } @@ -88,6 +91,9 @@ { QString expected = "http://edu.kde.org/marble/dummy#access_token="; if( tokenUrl.startsWith( expected ) ) { +#ifndef APPLE_STANDALONE_BUNDLE + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; QString url = tokenUrl; settings.setValue( "access_token", url.remove( expected ) ); diff --git a/src/plugins/render/graticule/GraticulePlugin.cpp b/src/plugins/render/graticule/GraticulePlugin.cpp --- a/src/plugins/render/graticule/GraticulePlugin.cpp +++ b/src/plugins/render/graticule/GraticulePlugin.cpp @@ -269,7 +269,7 @@ } // Setting the label font for the coordinate lines. -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX int defaultFontSize = 10; #else int defaultFontSize = 8; diff --git a/src/plugins/render/measure/MeasureToolPlugin.cpp b/src/plugins/render/measure/MeasureToolPlugin.cpp --- a/src/plugins/render/measure/MeasureToolPlugin.cpp +++ b/src/plugins/render/measure/MeasureToolPlugin.cpp @@ -37,7 +37,7 @@ : RenderPlugin( marbleModel ), m_measureLineString( GeoDataLineString( Tessellate ) ), m_mark( ":/mark.png" ), -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX m_font_regular( QFont( QStringLiteral( "Sans Serif" ), 10, 50, false ) ), #else m_font_regular( QFont( QStringLiteral( "Sans Serif" ), 8, 50, false ) ), diff --git a/src/plugins/render/weather/WeatherItem.cpp b/src/plugins/render/weather/WeatherItem.cpp --- a/src/plugins/render/weather/WeatherItem.cpp +++ b/src/plugins/render/weather/WeatherItem.cpp @@ -312,7 +312,7 @@ }; // FIXME: Fonts to be defined globally -#ifdef Q_OS_MACX +#ifdef Q_OS_OSX QFont WeatherItemPrivate::s_font = QFont( QStringLiteral( "Sans Serif" ), 10 ); #else QFont WeatherItemPrivate::s_font = QFont( QStringLiteral( "Sans Serif" ), 8 ); diff --git a/src/plugins/runner/json/CMakeLists.txt b/src/plugins/runner/json/CMakeLists.txt --- a/src/plugins/runner/json/CMakeLists.txt +++ b/src/plugins/runner/json/CMakeLists.txt @@ -32,7 +32,7 @@ # register thumbnail plugin as handler install(FILES marble_thumbnail_geojson.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE_STANDALONE_BUNDLE) # register marble app as handler install(FILES marble_geojson.desktop DESTINATION ${KDE_INSTALL_APPDIR}) endif() diff --git a/src/plugins/runner/kml/CMakeLists.txt b/src/plugins/runner/kml/CMakeLists.txt --- a/src/plugins/runner/kml/CMakeLists.txt +++ b/src/plugins/runner/kml/CMakeLists.txt @@ -34,7 +34,7 @@ install(FILES marble_thumbnail_kml.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) install(FILES marble_thumbnail_kmz.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE_STANDALONE_BUNDLE) # register marble app as handler install(FILES marble_kml.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES marble_kmz.desktop DESTINATION ${KDE_INSTALL_APPDIR}) diff --git a/src/plugins/runner/osm/CMakeLists.txt b/src/plugins/runner/osm/CMakeLists.txt --- a/src/plugins/runner/osm/CMakeLists.txt +++ b/src/plugins/runner/osm/CMakeLists.txt @@ -34,7 +34,7 @@ marble_add_plugin( OsmPlugin ${osm_SRCS} ${osm_writers_SRCS} ${osm_translators_SRCS} ) -if(WIN32 OR APPLE) +if(WIN32 OR APPLE_STANDALONE_BUNDLE) # nothing to do else() install(FILES marble_osm.desktop DESTINATION ${APPS_INSTALL_DIR}) diff --git a/src/plugins/runner/shp/CMakeLists.txt b/src/plugins/runner/shp/CMakeLists.txt --- a/src/plugins/runner/shp/CMakeLists.txt +++ b/src/plugins/runner/shp/CMakeLists.txt @@ -34,7 +34,7 @@ # register thumbnail plugin as handler install(FILES marble_thumbnail_shp.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE_STANDALONE_BUNDLE) # register marble app as handler install(FILES marble_shp.desktop DESTINATION ${KDE_INSTALL_APPDIR}) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,10 +14,10 @@ # Since the tests are not actually installed, but rather # run directly from the build/src/tests dir we need to # ensure the marble libs can be found. -IF (APPLE) +IF (APPLE_STANDALONE_BUNDLE) # For Mac OS X, the executable must be at the root of the bundle's executable folder SET (CMAKE_INSTALL_NAME_DIR @executable_path/../lib) -ENDIF (APPLE) +ENDIF (APPLE_STANDALONE_BUNDLE) set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )