Review Request 127649: [OS X] build in a more "traditional" way (for distribution systems like MacPorts, Fink etc)

René J.V. Bertin rjvbertin at gmail.com
Tue Sep 6 20:20:12 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127649/
-----------------------------------------------------------

(Updated Sept. 6, 2016, 10:20 p.m.)


Review request for KDE Software on Mac OS X and Marble.


Changes
-------

Updated for git/master.

There has been consensus on the mailing lists that QSettings should be using the IniFormat for this kind of build type. Given the amount of calls to the QSettings API it would be most appropriate to do that with a single call to `QSettings::setDefaultFormat()` in some central initialisation block that is called before any other use of the QSettings API, by the Marble apps but also the widgets library used by 3rd party apps. If there's such a code block I didn't find it, so I calling `setDefaultFormat()` from every location where QSettings will be used. Overkill, but it seems to work.


Repository: marble


Description (updated)
-------

Marble currently aims to build 1 or 2 more or less standalone app bundles when being built on Mac OS X. There is nothing wrong with that, but it presents a problem for distribution systems like MacPorts or Fink or HomeBrew that aim to share libraries among packages and to remain as close as possible to the runtime context for which packages were designed (i.e. XDG/Freedesktop). Evidently the goal is not to replace the OS X desktop with a Plasma shell; rather, the idea is that the feature set will be most complete and maintenance will be easiest when differences like where resources are to be found are as small as possible. Think of it as running KDE applications installed with their dependencies in some separate prefix, under e.g. a Gnome, XFCE or even a "bare-bones X11" desktop environment.

The patch achieves this by disabling all APPLE-specific things in the CMake files except for the required frameworks (Apple's, not KF5), currently by replacing APPLE with the unknown APPEL token.
The result is that there is still an app bundle that is created, for the KF5-based marble (but not for marble-qt though that ought to be possible too). A few additional lines create and install an application icon for marble.app . Everything else is installed in its usual location under the prefix.

This way of building is more or less a prerequisite to build 3rd party apps like digiKam which can use libMarble . It would be a lot less evident to do this if that library is hidden in a relocatable app bundle.

The basic approach followed here is the introduction of an `option(APPLE_STANDALONE_BUNDLE,"build app bundle(s)" YES)` when building on OS X; the `APPLE_STANDALONE_BUNDLE` token replaces the `APPLE` token in all cmake code that determines installation locations or features related to building as a standalone app bundle. Platform-specific blocks that are relevant to both build types retain the use of the `APPLE` token.


Diffs (updated)
-----

  CMakeLists.txt 5bec679 
  data/CMakeLists.txt 705770e 
  examples/cpp/marble-game/GameMainWindow.cpp 0549ea4 
  src/CMakeLists.txt af0a716 
  src/apps/marble-kde/CMakeLists.txt 3fe5187 
  src/apps/marble-mobile/MobileMainWindow.cpp d17dde4 
  src/apps/marble-mobile/main.cpp e612b4f 
  src/apps/marble-qt/CMakeLists.txt d28e3aa 
  src/apps/marble-qt/QtMainWindow.cpp 9813766 
  src/apps/marble-qt/qtmain.cpp 46c791c 
  src/lib/astro/CMakeLists.txt 3dbe455 
  src/lib/marble/AbstractFloatItem.cpp afe3f63 
  src/lib/marble/CMakeLists.txt 475513b 
  src/lib/marble/MapThemeSortFilterProxyModel.cpp 8babb74 
  src/lib/marble/MapViewItemDelegate.cpp cae5e69 
  src/lib/marble/MapViewWidget.cpp f54ab03 
  src/lib/marble/MarbleDirs.cpp 76ed565 
  src/lib/marble/QtMarbleConfigDialog.cpp 3b40f9c 
  src/lib/marble/declarative/MarbleQuickItem.cpp 18806a0 
  src/lib/marble/geodata/data/GeoDataLabelStyle.cpp 8544d34 
  src/plugins/render/foursquare/FoursquarePlugin.cpp 981691b 
  src/plugins/render/graticule/GraticulePlugin.cpp 3131f9c 
  src/plugins/render/measure/MeasureToolPlugin.cpp 64e09e2 
  src/plugins/render/weather/WeatherItem.cpp eafd1a0 
  src/plugins/runner/gpx/CMakeLists.txt 62e1e10 
  src/plugins/runner/json/CMakeLists.txt e034784 
  src/plugins/runner/kml/CMakeLists.txt a31ce98 
  src/plugins/runner/shp/CMakeLists.txt 7e08089 
  tests/CMakeLists.txt d0db4d6 

Diff: https://git.reviewboard.kde.org/r/127649/diff/


Testing (updated)
-------

On OS X 10.9.5 as well as Linux, with Qt 5.6 and FWs 5.20.0 - 5.24.0, installed under /opt/local


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20160906/38351b1c/attachment-0001.html>


More information about the Marble-devel mailing list