[rkward-cvs] SF.net SVN: rkward-code:[4596] trunk/rkward

tfry at users.sf.net tfry at users.sf.net
Thu Mar 14 16:43:20 UTC 2013


Revision: 4596
          http://sourceforge.net/p/rkward/code/4596
Author:   tfry
Date:     2013-03-14 16:43:20 +0000 (Thu, 14 Mar 2013)
Log Message:
-----------
Revert to building R packages form source on Mac OS X by default (controllable via compile-time option)

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/INSTALL
    trunk/rkward/rkward/settings/CMakeLists.txt
    trunk/rkward/rkward/settings/rksettingsmoduler.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2013-03-14 14:54:29 UTC (rev 4595)
+++ trunk/rkward/ChangeLog	2013-03-14 16:43:20 UTC (rev 4596)
@@ -1,3 +1,4 @@
+- Revert to building R packages form source on Mac OS X by default (controllable via compile-time option)
 - Fixed: lattice plots would not be added to the plot history, correctly, for some versions of lattice
 - Fix crash when trying to print, and neither okular, nor kpdf are available
 - Added support for loaded namespaces that are not attached to a loaded package

Modified: trunk/rkward/INSTALL
===================================================================
--- trunk/rkward/INSTALL	2013-03-14 14:54:29 UTC (rev 4595)
+++ trunk/rkward/INSTALL	2013-03-14 16:43:20 UTC (rev 4596)
@@ -43,6 +43,9 @@
 -DNO_R_XML
 	When packaging RKWard for binary distribution, it may be necessary to exclude the R syntax highlighting defintion "r.xml"
 	from installation, as it may already be provided other packages. In this case, you can use: -DNO_R_XML=1
+-DUSE_BINARY_PACKAGES
+	Currently only interpreted on Mac OS: If RKWard should default to installing binary R packages (if available) use
+	-DUSE_BINARY_PACKAGE=1. Otherwise, RKWard will default to building R packages from source.
 
 Further generic options are listed on http://www.cmake.org/Wiki/CMake_Useful_Variables .
 

Modified: trunk/rkward/rkward/settings/CMakeLists.txt
===================================================================
--- trunk/rkward/rkward/settings/CMakeLists.txt	2013-03-14 14:54:29 UTC (rev 4595)
+++ trunk/rkward/rkward/settings/CMakeLists.txt	2013-03-14 16:43:20 UTC (rev 4596)
@@ -20,4 +20,13 @@
 
 QT4_AUTOMOC(${settings_STAT_SRCS})
 
+IF (WIN32 OR USE_BINARY_PACKAGES)
+	SET_PROPERTY (
+		SOURCE rksettingsmoduler.cpp
+		APPEND
+		PROPERTY COMPILE_DEFINITIONS
+		USE_BINARY_PACKAGES=1
+	)
+ENDIF (WIN32 OR USE_BINARY_PACKAGES)
+
 ADD_LIBRARY(settings STATIC ${settings_STAT_SRCS})

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2013-03-14 14:54:29 UTC (rev 4595)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2013-03-14 16:43:20 UTC (rev 4596)
@@ -2,7 +2,7 @@
                           rksettingsmoduler  -  description
                              -------------------
     begin                : Wed Jul 28 2004
-    copyright            : (C) 2004, 2007, 2009, 2010, 2011, 2012 by Thomas Friedrichsmeier
+    copyright            : (C) 2004-2013 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -378,6 +378,7 @@
 	source_packages_box->setChecked (true);
 	source_packages_box->setEnabled (false);
 #endif
+	RKCommonFunctions::setTips (QString ("<p>%1</p>").arg (i18n ("Installing packages from pre-compiled binaries (if available) is generally faster, and does not require an installation of development tools and libraries. On the other hand, building packages from source provides best compatibility. On Mac OS X and Linux, building packages from source is currently recommended.")), source_packages_box);
 	connect (source_packages_box, SIGNAL (stateChanged (int)), this, SLOT (settingChanged()));
 	main_vbox->addWidget (source_packages_box);
 
@@ -562,7 +563,16 @@
 	liblocs = cg.readEntry ("LibraryLocations", QStringList ());
 	archive_packages = cg.readEntry ("archive packages", false);
 #if defined Q_WS_WIN || defined Q_WS_MAC
-	source_packages = cg.readEntry ("source packages", false);
+#	if defined USE_BINARY_PACKAGES
+#		define USE_SOURCE_PACKAGES false
+#	else
+#		define USE_SOURCE_PACKAGES true
+#endif
+	source_packages = cg.readEntry ("source packages", USE_SOURCE_PACKAGES);
+	if (USE_SOURCE_PACKAGES && (RKSettingsModuleGeneral::storedConfigVersion () < RKSettingsModuleGeneral::RKWardConfig_0_6_1)) {
+		// revert default on MacOSX, even if a previous stored setting exists
+		source_packages = true;
+	}
 #else
 	source_packages = true;
 #endif





More information about the rkward-tracker mailing list