[rkward/work/frameworks-Mac] /: add required ECM modules

R.J.V. Bertin null at kde.org
Wed May 17 19:42:55 UTC 2017


Git commit 1683b6e5905e37ad876fbd5d0fbf9d4933b07592 by R.J.V. Bertin.
Committed on 17/05/2017 at 19:41.
Pushed by rjvbb into branch 'work/frameworks-Mac'.

add required ECM modules

(and a combined patch to help during merge conflits)

M  +2    -0    CMakeLists.txt
A  +460  -0    fwMac-patches/patch-combined-for-mac.diff

https://commits.kde.org/rkward/1683b6e5905e37ad876fbd5d0fbf9d4933b07592

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3379ba3..05b36a23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,8 @@ INCLUDE(KDEInstallDirs)
 INCLUDE(KDECMakeSettings)
 INCLUDE(KDECompilerSettings)
 INCLUDE(ECMInstallIcons)
+INCLUDE(ECMAddAppIcon)
+INCLUDE(ECMMarkNonGuiExecutable)
 INCLUDE(FeatureSummary)
 
 FIND_PACKAGE(Qt5 5.2 CONFIG REQUIRED COMPONENTS Widgets Core Xml Network WebKit Script PrintSupport)
diff --git a/fwMac-patches/patch-combined-for-mac.diff b/fwMac-patches/patch-combined-for-mac.diff
new file mode 100644
index 00000000..01f53a5b
--- /dev/null
+++ b/fwMac-patches/patch-combined-for-mac.diff
@@ -0,0 +1,460 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b3379ba..05b36a2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -17,6 +17,8 @@ INCLUDE(KDEInstallDirs)
+ INCLUDE(KDECMakeSettings)
+ INCLUDE(KDECompilerSettings)
+ INCLUDE(ECMInstallIcons)
++INCLUDE(ECMAddAppIcon)
++INCLUDE(ECMMarkNonGuiExecutable)
+ INCLUDE(FeatureSummary)
+ 
+ FIND_PACKAGE(Qt5 5.2 CONFIG REQUIRED COMPONENTS Widgets Core Xml Network WebKit Script PrintSupport)
+diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
+index f6f78dd..03a0b1b 100755
+--- a/rkward/CMakeLists.txt
++++ b/rkward/CMakeLists.txt
+@@ -4,11 +4,15 @@ ENDIF(NOT ${PROJECT_NAME} STREQUAL "rkward")
+ 
+ INCLUDE(SetVersionNumber.cmake)
+ 
+-IF(Q_WS_MAC)
+-	SET(CPACK_BUNDLE_ICON rkward.icns)
+-	SET(CPACK_BUNDLE_NAME RKWard)
+-	SET(CPACK_BUNDLE_STARTUP_COMMAND rkward)
+-ENDIF(Q_WS_MAC)
++IF(APPLE)
++    SET(CPACK_BUNDLE_ICON rkward.icns)
++    SET(CPACK_BUNDLE_NAME RKWard)
++    SET(CPACK_BUNDLE_STARTUP_COMMAND rkward)
++ENDIF()
++SET(RKWARD_FRONTEND_LOCATION ${KDE_INSTALL_LIBEXECDIR})
++# once tested and working this could become the default on Mac:
++OPTION(APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Mac" OFF)
++ADD_FEATURE_INFO("App Bundle" APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Mac. Do not use for now.")
+ 
+ ADD_SUBDIRECTORY( dataeditor )
+ ADD_SUBDIRECTORY( settings )
+@@ -38,11 +42,20 @@ GET_DIRECTORY_PROPERTY(R_EXECUTABLE DIRECTORY rbackend DEFINITION R_EXECUTABLE)
+ GET_DIRECTORY_PROPERTY(R_SHAREDLIBDIR DIRECTORY rbackend LINK_DIRECTORIES)
+ LINK_DIRECTORIES(${R_SHAREDLIBDIR})
+ 
+-ADD_CUSTOM_COMMAND (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/rkward.ico"
++IF(APPLE)
++    # create the application icon from the available sources. This should work on MS Windows
++    # too but I don't want to start modifying things I cannot test.
++    FILE(GLOB ICON_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/app-icon/*-apps-rkward.png") 
++    # recent ECM versions will prefer the scalable version: prepend it to the icon source list:
++    ECM_ADD_APP_ICON(RKWard_Sources ICONS ${CMAKE_CURRENT_SOURCE_DIR}/icons/app-icon/sc-apps-rkward.svgz ${ICON_SRCS})
++    ADD_EXECUTABLE(rkward ${RKWard_Sources})
++ELSE()
++    ADD_CUSTOM_COMMAND (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/rkward.ico"
+ 			COMMAND cmake -E copy "${CMAKE_CURRENT_SOURCE_DIR}/icons/app-icon/rkward.ico"
+ 			"${CMAKE_CURRENT_BINARY_DIR}/rkward.ico")
++    ADD_EXECUTABLE(rkward ${RKWard_Sources} rkward_windows_icon.rc rkward.ico)
++ENDIF()
+ 
+-ADD_EXECUTABLE(rkward ${RKWard_Sources} rkward_windows_icon.rc rkward.ico)
+ # NOTE: These definitions are needed for the startup procedure (main.cpp), only.
+ # We should switch with to target_compile_definitions once we require CMAKE 2.6+
+ ADD_DEFINITIONS(-DR_EXECUTABLE="${R_EXECUTABLE}")
+@@ -51,14 +64,14 @@ ADD_DEFINITIONS(-DR_LIBS="${R_LIBDIR}")
+ SET_TARGET_PROPERTIES(rkward PROPERTIES
+         MACOSX_BUNDLE_BUNDLE_NAME "RKWard")
+ 
+-IF(Q_WS_MAC)
++IF(APPLE)
+ 	SET(RKWARD_INFOPLIST_TEMPLATE Info.plist.in)
+ 	SET(RKWARD_INFOPLIST_FILE ${CMAKE_SOURCE_DIR}/rkward/Info.plist)
+ 	CONFIGURE_FILE(
+ 		${RKWARD_INFOPLIST_TEMPLATE}
+ 		${RKWARD_INFOPLIST_FILE}
+ 		@ONLY)
+-ENDIF(Q_WS_MAC)
++ENDIF(APPLE)
+ 
+ TARGET_LINK_LIBRARIES(rkward windows ${RKWARD_ADDLIBS} agents dialogs plugin settings dataeditor core scriptbackends rbackend misc KF5::WindowSystem Qt5::Widgets KF5::XmlGui ${LibIntl_LIBRARIES})
+ IF(KF5Crash_FOUND)
+@@ -73,12 +86,29 @@ INSTALL(DIRECTORY plugins/ pages DESTINATION ${DATA_INSTALL_DIR}/rkward
+ 
+ INSTALL(FILES rkwardui.rc rkconsolepart.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/rkward)
+ INSTALL(FILES resource.ver DESTINATION ${DATA_INSTALL_DIR}/rkward)
+-INSTALL(TARGETS rkward DESTINATION ${BIN_INSTALL_DIR})
+ 
+-IF(Q_WS_MAC)
+-	INSTALL(FILES ${CMAKE_SOURCE_DIR}/rkward/icons/app-icon/rkward.icns DESTINATION ${BUNDLE_INSTALL_DIR}/${CPACK_BUNDLE_NAME}.app/Contents/Resources)
+-	INSTALL(FILES ${RKWARD_INFOPLIST_FILE} DESTINATION ${BUNDLE_INSTALL_DIR}/${CPACK_BUNDLE_NAME}.app/Contents)
+-ENDIF(Q_WS_MAC)
++IF(APPLE)
++    INSTALL(TARGETS rkward DESTINATION ${BUNDLE_INSTALL_DIR})
++    if(APPLE_STANDALONE_BUNDLE)
++#         INSTALL(FILES ${CMAKE_SOURCE_DIR}/rkward/icons/app-icon/rkward.icns DESTINATION ${BUNDLE_INSTALL_DIR}/${CPACK_BUNDLE_NAME}.app/Contents/Resources)
++#         INSTALL(FILES ${RKWARD_INFOPLIST_FILE} DESTINATION ${BUNDLE_INSTALL_DIR}/${CPACK_BUNDLE_NAME}.app/Contents)
++    ENDIF()
++    # the MacOSX bundle display name property (CFBundleDisplayName) is not currently supported by cmake,
++    # so has to be set for all targets in this cmake file
++    SET(MACOSX_BUNDLE_DISPLAY_NAME RKWard)
++    # We provide our own Info.plist, but for the wrapper only
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${RKWARD_INFOPLIST_FILE})
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.RKWard")
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "RKWard")
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_DISPLAY_NAME "RKWard")
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_INFO_STRING "Frontend to the R statistics language")
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING "RKWard ${RKVERSION_NUMBER}")
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING "${RKVERSION_NUMBER}")
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_BUNDLE_VERSION "${RKVERSION_NUMBER}")
++    set_target_properties(rkward PROPERTIES MACOSX_BUNDLE_COPYRIGHT "RKWard Team")
++ELSE()
++    INSTALL(TARGETS rkward DESTINATION ${BIN_INSTALL_DIR})
++ENDIF()
+ 
+ INSTALL(FILES org.kde.rkward.desktop org.kde.rkward-open.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
+ INSTALL(FILES vnd.rkward.r.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
+diff --git a/rkward/Info.plist b/rkward/Info.plist
+index 1563050..5c94caa 100644
+--- a/rkward/Info.plist
++++ b/rkward/Info.plist
+@@ -2,35 +2,43 @@
+ <!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>rkward</string>
+-        <key>CFBundleGetInfoString</key>
+-        <string></string>
+-        <key>CFBundleIconFile</key>
+-        <string>rkward.icns</string>
+-        <key>CFBundleIdentifier</key>
+-        <string></string>
+-        <key>CFBundleInfoDictionaryVersion</key>
+-        <string>6.0</string>
+-        <key>CFBundleLongVersionString</key>
+-        <string></string>
+-        <key>CFBundleName</key>
+-        <string></string>
+-        <key>CFBundlePackageType</key>
+-        <string>APPL</string>
+-        <key>CFBundleShortVersionString</key>
+-        <string></string>
+-        <key>CFBundleSignature</key>
+-        <string>????</string>
+-        <key>CFBundleVersion</key>
+-        <string></string>
+-        <key>CSResourcesFileMapped</key>
+-        <true/>
+-        <key>LSRequiresCarbon</key>
+-        <true/>
+-        <key>NSHumanReadableCopyright</key>
+-        <string></string>
++	<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>CFBundleDisplayName</key>
++	<string>${MACOSX_BUNDLE_DISPLAY_NAME}</string>
++	<key>CFBundlePackageType</key>
++	<string>APPL</string>
++	<key>CFBundleShortVersionString</key>
++	<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
++	<key>CFBundleVersion</key>
++	<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
++	<key>CSResourcesFileMapped</key>
++	<true/>
++	<key>LSRequiresCarbon</key>
++	<true/>
++	<key>NSAppSleepDisabled</key>
++	<true/>
++	<key>NSSupportsAutomaticTermination</key>
++	<false/>
++	<key>NSPrincipalClass</key>
++	<string>NSApplication</string>
++	<key>NSHighResolutionCapable</key>
++	<string>True</string>
++	<key>NSHumanReadableCopyright</key>
++	<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
+ </dict>
+ </plist>
+diff --git a/rkward/Info.plist.in b/rkward/Info.plist.in
+index 2e356ae..5c94caa 100644
+--- a/rkward/Info.plist.in
++++ b/rkward/Info.plist.in
+@@ -2,37 +2,43 @@
+ <!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>LSUIElement</key>
+-        <string>1</string>
+-        <key>CFBundleDevelopmentRegion</key>
+-        <string>English</string>
+-        <key>CFBundleExecutable</key>
+-        <string>rkward</string>
+-        <key>CFBundleGetInfoString</key>
+-        <string>KDE frontend to the R statistics language</string>
+-        <key>CFBundleIconFile</key>
+-        <string>rkward.icns</string>
+-        <key>CFBundleIdentifier</key>
+-        <string></string>
+-        <key>CFBundleInfoDictionaryVersion</key>
+-        <string>6.0</string>
+-        <key>CFBundleLongVersionString</key>
+-        <string>@RKVERSION_NUMBER@</string>
+-        <key>CFBundleName</key>
+-        <string>RKWard</string>
+-        <key>CFBundlePackageType</key>
+-        <string>APPL</string>
+-        <key>CFBundleShortVersionString</key>
+-        <string>@RKVERSION_NUMBER@</string>
+-        <key>CFBundleSignature</key>
+-        <string>????</string>
+-        <key>CFBundleVersion</key>
+-        <string></string>
+-        <key>CSResourcesFileMapped</key>
+-        <true/>
+-        <key>LSRequiresCarbon</key>
+-        <true/>
+-        <key>NSHumanReadableCopyright</key>
+-        <string></string>
++	<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>CFBundleDisplayName</key>
++	<string>${MACOSX_BUNDLE_DISPLAY_NAME}</string>
++	<key>CFBundlePackageType</key>
++	<string>APPL</string>
++	<key>CFBundleShortVersionString</key>
++	<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
++	<key>CFBundleVersion</key>
++	<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
++	<key>CSResourcesFileMapped</key>
++	<true/>
++	<key>LSRequiresCarbon</key>
++	<true/>
++	<key>NSAppSleepDisabled</key>
++	<true/>
++	<key>NSSupportsAutomaticTermination</key>
++	<false/>
++	<key>NSPrincipalClass</key>
++	<string>NSApplication</string>
++	<key>NSHighResolutionCapable</key>
++	<string>True</string>
++	<key>NSHumanReadableCopyright</key>
++	<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
+ </dict>
+ </plist>
+diff --git a/rkward/main.cpp b/rkward/main.cpp
+index 1a6a0d0..4fd5d89 100644
+--- a/rkward/main.cpp
++++ b/rkward/main.cpp
+@@ -225,16 +225,17 @@ int main (int argc, char *argv[]) {
+ 	RKGlobals::startup_options["backend-debugger"] = parser.value ("backend-debugger");
+ 
+ 	// MacOS may need some path adjustments, first
+-#ifdef Q_OS_MAC
++#ifdef Q_OS_MACOS
+ 	QString oldpath = qgetenv ("PATH");
+ 	if (!oldpath.contains (INSTALL_PATH)) {
+ 		//ensure that PATH is set to include what we deliver with the bundle
+ 		qputenv ("PATH", QString ("%1/bin:%1/sbin:%2").arg (INSTALL_PATH).arg (oldpath).toLocal8Bit ());
+-		if (debug_level > 3) qDebug ("Adjusting system path to %s", qPrintable (qgetenv ("PATH")));
++		if (RK_Debug_Level > 3) qDebug ("Adjusting system path to %s", qPrintable (qgetenv ("PATH")));
+ 	}
+ 	// ensure that RKWard finds its own packages
+ 	qputenv ("R_LIBS", R_LIBS);
+-	QProcess::execute ("launchctl", QStringList () << "load" << "-w" << INSTALL_PATH "/Library/LaunchAgents/org.freedesktop.dbus-session.plist");
++    // do not auto(re)launch the session DBus (or at least not with the -w option!!)
++// 	QProcess::execute ("launchctl", QStringList () << "load" << INSTALL_PATH "/Library/LaunchAgents/org.freedesktop.dbus-session.plist");
+ #endif
+ 
+ 	// Handle --reuse option, by placing a dbus-call to existing RKWard process (if any) and exiting
+diff --git a/rkward/rbackend/CMakeLists.txt b/rkward/rbackend/CMakeLists.txt
+index e411669..9fb90a6 100644
+--- a/rkward/rbackend/CMakeLists.txt
++++ b/rkward/rbackend/CMakeLists.txt
+@@ -54,9 +54,10 @@ SET (
+ 	rktransmitter.cpp
+ )
+ ADD_DEFINITIONS (-DRKWARD_SPLIT_PROCESS)
+-ADD_DEFINITIONS (-DRKWARD_BACKEND_PATH="${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}")
++ADD_DEFINITIONS (-DRKWARD_BACKEND_PATH="${KDE_INSTALL_LIBEXECDIR}")
+ LINK_DIRECTORIES(${R_SHAREDLIBDIR})
+ ADD_EXECUTABLE(rkward.rbackend ${rbackend_BACKEND_SRCS})
++ECM_MARK_NONGUI_EXECUTABLE(rkward.rbackend)
+ TARGET_LINK_LIBRARIES(rkward.rbackend rkgraphicsdevice.backend ${R_USED_LIBS} ${CMAKE_THREAD_LIBS_INIT} Qt5::Network Qt5::Core ${LibIntl_LIBRARIES})
+ 
+ IF(WIN32)
+diff --git a/rkward/rbackend/rkfrontendtransmitter.cpp b/rkward/rbackend/rkfrontendtransmitter.cpp
+index a55c8f6..3581441 100644
+--- a/rkward/rbackend/rkfrontendtransmitter.cpp
++++ b/rkward/rbackend/rkfrontendtransmitter.cpp
+@@ -102,13 +102,13 @@ void RKFrontendTransmitter::run () {
+ 	args.append ("--locale-dir=" + localeDir ().toUtf8 ().toPercentEncoding ());
+ 	connect (backend, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &RKFrontendTransmitter::backendExit);
+ 	QString backend_executable = findBackendAtPath (QCoreApplication::applicationDirPath ());
+-#ifdef Q_OS_MAC
+-	if (backend_executable.isNull ()) backend_executable = findBackendAtPath (QCoreApplication::applicationDirPath () + "/rkward.frontend.app/Contents/MacOS"); 	// this is for running directly from a build tree
++#ifdef Q_OS_MACOS
++	if (backend_executable.isNull ()) backend_executable = findBackendAtPath (QCoreApplication::applicationDirPath () + "../Resources"); // an appropriate location in a standalone app-bundle
+ #endif
+ 	if (backend_executable.isEmpty ()) backend_executable = findBackendAtPath (RKWARD_BACKEND_PATH);
+ 	if (backend_executable.isNull ()) backend_executable = findBackendAtPath (QCoreApplication::applicationDirPath () + "../lib/libexec");
+ 	if (backend_executable.isEmpty ()) backend_executable = findBackendAtPath (QCoreApplication::applicationDirPath () + "/rbackend");	// for running directly from the build-dir
+-#ifdef Q_OS_MAC
++#ifdef Q_OS_MACOS
+         if (backend_executable.isEmpty ()) backend_executable = findBackendAtPath (QCoreApplication::applicationDirPath () + "/../../../rbackend");
+ #endif
+ 	if (backend_executable.isEmpty ()) handleTransmissionError (i18n ("The backend executable could not be found. This is likely to be a problem with your installation."));
+diff --git a/rkward/rbackend/rklocalesupport.cpp b/rkward/rbackend/rklocalesupport.cpp
+index 49a6d26..7e26277 100644
+--- a/rkward/rbackend/rklocalesupport.cpp
++++ b/rkward/rbackend/rklocalesupport.cpp
+@@ -152,7 +152,7 @@ QTextCodec *RKGetCurrentLocaleCodec () {
+     localeMapper = QTextCodec::codecForName( "System" );
+ #else
+ 
+-#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) && !defined(Q_OS_MAC)
++#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) && !defined(Q_OS_MACOS)
+     char *charset = nl_langinfo (CODESET);
+     if ( charset )
+         localeMapper = QTextCodec::codecForName( charset );
+diff --git a/rkward/rbackend/rksessionvars.cpp b/rkward/rbackend/rksessionvars.cpp
+index e64eb10..507e413 100644
+--- a/rkward/rbackend/rksessionvars.cpp
++++ b/rkward/rbackend/rksessionvars.cpp
+@@ -127,7 +127,7 @@ QStringList RKSessionVars::frontendSessionInfo () {
+ 	lines.append (QString ("Qt version (runtime): ") + qVersion ());
+ #if defined Q_OS_WIN
+ 	lines.append ("Windows runtime version (refer to QSysInfo documentation to translate code into human readable form): 0x" + QString::number (QSysInfo::windowsVersion (), 16));
+-#elif defined Q_OS_MAC
++#elif defined Q_OS_MACOS
+ 	lines.append ("MacOS runtime version (refer to QSysInfo documentation to translate code into human readable form): 0x" + QString::number (QSysInfo::MacintoshVersion, 16));
+ #endif
+ 	lines.append ("Local config directory: " + QStandardPaths::writableLocation (QStandardPaths::GenericConfigLocation));
+diff --git a/rkward/rkconsole.cpp b/rkward/rkconsole.cpp
+index 17d3de6..5d0d6b7 100644
+--- a/rkward/rkconsole.cpp
++++ b/rkward/rkconsole.cpp
+@@ -957,7 +957,7 @@ void RKConsole::currentHelpContext (QString* symbol, QString* package) {
+ 
+ void RKConsole::initializeActions (KActionCollection *ac) {
+ 	RK_TRACE (APP);
+-#ifdef Q_OS_MAC
++#ifdef Q_OS_MACOS
+ #	define REAL_CTRL_KEY Qt::MetaModifier
+ #	define REAL_CMD_KEY Qt::ControlModifier
+ #else
+diff --git a/rkward/settings/rksettingsmodulegraphics.cpp b/rkward/settings/rksettingsmodulegraphics.cpp
+index cacee0d..ef50777 100644
+--- a/rkward/settings/rksettingsmodulegraphics.cpp
++++ b/rkward/settings/rksettingsmodulegraphics.cpp
+@@ -90,7 +90,7 @@ RKSettingsModuleGraphics::RKSettingsModuleGraphics (RKSettings *gui, QWidget *pa
+ 	button = new QRadioButton (i18n ("Embed original device"), group);
+ 	replace_standard_devices_group->addButton (button, (int) EmbedDevice);
+ 	group_layout->addWidget (button);
+-#ifndef Q_OS_MAC
++#ifndef Q_OS_MACOS
+ 	button->setEnabled (false);
+ #endif
+ 	button = new QRadioButton (i18n ("No device integration"), group);
+@@ -253,7 +253,7 @@ QStringList RKSettingsModuleGraphics::makeRRunTimeOptionCommands () {
+ 	else {
+ #if defined Q_OS_WIN
+ 	command.append ("\"windows\"");
+-#elif defined Q_OS_MAC
++#elif defined Q_OS_MACOS
+ 	command.append ("ifelse (capabilities(\"quartz\"), \"quartz\", \"X11\")");
+ #else
+ 	command.append ("\"X11\"");
+diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
+index cb81949..a4bb993 100644
+--- a/rkward/settings/rksettingsmoduler.cpp
++++ b/rkward/settings/rksettingsmoduler.cpp
+@@ -392,7 +392,7 @@ RKSettingsModuleRPackages::RKSettingsModuleRPackages (RKSettings *gui, QWidget *
+ 	connect (archive_packages_box, &QCheckBox::stateChanged, this, &RKSettingsModuleRPackages::settingChanged);
+ 	main_vbox->addWidget (archive_packages_box);
+ 
+-#if defined Q_OS_WIN || defined Q_OS_MAC
++#if defined Q_OS_WIN || defined Q_OS_MACOS
+ 	source_packages_box = new QCheckBox (i18n ("Build packages from source"), this);
+ 	source_packages_box->setChecked (source_packages);
+ #else
+@@ -512,7 +512,7 @@ QString RKSettingsModuleRPackages::libLocsCommand () {
+ //static
+ QString RKSettingsModuleRPackages::pkgTypeOption () {
+ 	QString ret;
+-#if defined Q_OS_WIN || defined Q_OS_MAC
++#if defined Q_OS_WIN || defined Q_OS_MACOS
+ 	ret.append ("options (pkgType=\"");
+ 	if (source_packages) ret.append ("source");
+ 	else if (RKSessionVars::compareRVersion ("3.1.3") <= 0) ret.append ("binary");   // "automatically select appropriate binary", unfortunately it's only available from R 3.1.3. onwards.
+@@ -543,7 +543,7 @@ QStringList RKSettingsModuleRPackages::makeRRunTimeOptionCommands () {
+ 	}
+ 	list.append (command + "))\n");
+ 
+-#if defined Q_OS_WIN || defined Q_OS_MAC
++#if defined Q_OS_WIN || defined Q_OS_MACOS
+ 	list.append (pkgTypeOption ());
+ #endif
+ 
+@@ -606,7 +606,7 @@ void RKSettingsModuleRPackages::loadSettings (KConfig *config) {
+ 
+ 	liblocs = cg.readEntry ("LibraryLocations", QStringList ());
+ 	archive_packages = cg.readEntry ("archive packages", false);
+-#if defined Q_OS_WIN || defined Q_OS_MAC
++#if defined Q_OS_WIN || defined Q_OS_MACOS
+ #	if defined USE_BINARY_PACKAGES
+ #		define USE_SOURCE_PACKAGES false
+ #	else
+diff --git a/rkward/windows/rktoolwindowlist.cpp b/rkward/windows/rktoolwindowlist.cpp
+index 23a9bf3..8945e7c 100644
+--- a/rkward/windows/rktoolwindowlist.cpp
++++ b/rkward/windows/rktoolwindowlist.cpp
+@@ -35,7 +35,7 @@ void RKToolWindowList::registerToolWindow (RKMDIWindow *window, const QString &i
+ 	tr.window = window;
+ 	tr.id = id;
+ 	tr.default_placement = default_placement;
+-#ifdef Q_OS_MAC
++#ifdef Q_OS_MACOS
+ 	// HACK: Workaround for shortcut conflict issue: https://mail.kde.org/pipermail/rkward-devel/2011-December/003153.html
+ 	if (default_shortcut & Qt::AltModifier) default_shortcut |= Qt::ControlModifier;
+ #endif
+diff --git a/rkward/windows/rkwindowcatcher.cpp b/rkward/windows/rkwindowcatcher.cpp
+index 293c4d9..9920016 100644
+--- a/rkward/windows/rkwindowcatcher.cpp
++++ b/rkward/windows/rkwindowcatcher.cpp
+@@ -129,7 +129,7 @@ void RKWindowCatcher::stop (int new_cur_device) {
+ 			QWindow *window = QWindow::fromWinId (created_window);
+ 			RKWorkplace::mainWorkplace ()->newX11Window (window, new_cur_device);
+ 		} else {
+-#if defined Q_OS_MAC
++#if defined Q_OS_MACOS
+ 			KMessageBox::information (0, i18n ("You have tried to embed a new R graphics device window in RKWard. However, this is not currently supported in this build of RKWard on Mac OS X. See http://rkward.kde.org/mac for more information."), i18n ("Could not embed R X11 window"), "embed_x11_device_not_supported");
+ #else
+ 			RKErrorDialog::reportableErrorMessage (0, i18n ("You have tried to embed a new R graphics device window in RKWard. However, either no window was created, or RKWard failed to detect the new window. If you think RKWard should have done better, consider reporting this as a bug. Alternatively, you may want to adjust Settings->Configure RKWard->Onscreen Graphics."), QString (), i18n ("Could not embed R X11 window"), "failure_to_detect_x11_device");



More information about the rkward-tracker mailing list