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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri May 22 11:45:00 UTC 2009


Revision: 2499
          http://rkward.svn.sourceforge.net/rkward/?rev=2499&view=rev
Author:   tfry
Date:     2009-05-22 11:44:56 +0000 (Fri, 22 May 2009)

Log Message:
-----------
Remove what-to-expect-dialog.
Add check for existence and correct version of resource files.

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/makedist.sh
    trunk/rkward/rkward/CMakeLists.txt
    trunk/rkward/rkward/main.cpp
    trunk/rkward/rkward/misc/rkcommonfunctions.cpp
    trunk/rkward/rkward/rkward.cpp

Added Paths:
-----------
    trunk/rkward/rkward/resource.ver
    trunk/rkward/rkward/version.h

Removed Paths:
-------------
    trunk/rkward/version.h

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2009-05-22 10:25:49 UTC (rev 2498)
+++ trunk/rkward/ChangeLog	2009-05-22 11:44:56 UTC (rev 2499)
@@ -1,3 +1,5 @@
+- Add basic check for a correct installation of the RKWard resource files
+- Remove "What to expect" dialog at startup
 - Make keyboard shorcuts configurable
 - Add option to add only single line commands from script editor to the console history
 - Add action to change working directory to that of the current script file

Modified: trunk/rkward/makedist.sh
===================================================================
--- trunk/rkward/makedist.sh	2009-05-22 10:25:49 UTC (rev 2498)
+++ trunk/rkward/makedist.sh	2009-05-22 11:44:56 UTC (rev 2499)
@@ -8,8 +8,10 @@
 mkdir $DISTDIR
 
 #prepare version.h
-echo "/* Version number of package */" > $DISTDIR/version.h
-echo "#define VERSION \"$VERSION\"" >> $DISTDIR/version.h
+echo "/* Version number of package */" > $BASEDIR/rkward/version.h
+echo "#define VERSION \"$VERSION\"" >> $BASEDIR/rkward/version.h
+#prepare resource.ver
+echo "$VERSION" > $BASEDIR/rkward/resource.ver
 
 cp -a AUTHORS CMakeLists.txt COPYING ChangeLog TODO INSTALL NOTES README configure $DISTDIR
 mkdir $DISTDIR/doc

Modified: trunk/rkward/rkward/CMakeLists.txt
===================================================================
--- trunk/rkward/rkward/CMakeLists.txt	2009-05-22 10:25:49 UTC (rev 2498)
+++ trunk/rkward/rkward/CMakeLists.txt	2009-05-22 11:44:56 UTC (rev 2499)
@@ -48,7 +48,7 @@
 INSTALL(DIRECTORY plugins/ pages DESTINATION ${DATA_INSTALL_DIR}/rkward
 	PATTERN .svn EXCLUDE)
 
-INSTALL(FILES   rkwardui.rc rkconsolepart.rc DESTINATION ${DATA_INSTALL_DIR}/rkward )
+INSTALL(FILES   resource.ver rkwardui.rc rkconsolepart.rc DESTINATION ${DATA_INSTALL_DIR}/rkward )
 INSTALL(TARGETS rkward.bin DESTINATION ${BIN_INSTALL_DIR})
 INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/rkward DESTINATION ${BIN_INSTALL_DIR})
 

Modified: trunk/rkward/rkward/main.cpp
===================================================================
--- trunk/rkward/rkward/main.cpp	2009-05-22 10:25:49 UTC (rev 2498)
+++ trunk/rkward/rkward/main.cpp	2009-05-22 11:44:56 UTC (rev 2499)
@@ -61,7 +61,7 @@
 
 #include "debug.h"
 
-#include "../version.h"
+#include "version.h"
 
 int RK_Debug_Level = 0;
 int RK_Debug_Flags = ALL;

Modified: trunk/rkward/rkward/misc/rkcommonfunctions.cpp
===================================================================
--- trunk/rkward/rkward/misc/rkcommonfunctions.cpp	2009-05-22 10:25:49 UTC (rev 2498)
+++ trunk/rkward/rkward/misc/rkcommonfunctions.cpp	2009-05-22 11:44:56 UTC (rev 2499)
@@ -133,7 +133,7 @@
 	}
 
 	QString getRKWardDataDir () {
-		return (KGlobal::dirs ()->findResourceDir ("data", "rkward/all.pluginmap") + "rkward/");
+		return (KGlobal::dirs ()->findResourceDir ("data", "rkward/resource.ver") + "rkward/");
 	}
 
 

Added: trunk/rkward/rkward/resource.ver
===================================================================
--- trunk/rkward/rkward/resource.ver	                        (rev 0)
+++ trunk/rkward/rkward/resource.ver	2009-05-22 11:44:56 UTC (rev 2499)
@@ -0,0 +1 @@
+0.5.1-pre1

Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp	2009-05-22 10:25:49 UTC (rev 2498)
+++ trunk/rkward/rkward/rkward.cpp	2009-05-22 11:44:56 UTC (rev 2499)
@@ -60,6 +60,7 @@
 #include "core/robjectlist.h"
 #include "core/renvironmentobject.h"
 #include "misc/rkstandardicons.h"
+#include "misc/rkcommonfunctions.h"
 #include "rkglobals.h"
 #include "robjectbrowser.h"
 #include "dialogs/startupdialog.h"
@@ -78,6 +79,7 @@
 #include "windows/rkfilebrowser.h"
 #include "rkconsole.h"
 #include "debug.h"
+#include "version.h"
 
 
 #include "agents/showedittextfileagent.h"	// TODO: see below: needed purely for linking!
@@ -197,6 +199,12 @@
 void RKWardMainWindow::doPostInit () {
 	RK_TRACE (APP);
 
+	// Check intallation first
+	QFile resource_ver (RKCommonFunctions::getRKWardDataDir () + "resource.ver");
+	if (!(resource_ver.open (QIODevice::ReadOnly) && (resource_ver.read (100).trimmed () == VERSION))) {
+		KMessageBox::error (this, i18n ("<p>RKWard either could not find its resource files at all, or only an old version of those files. The most likely cause is that the last installation failed to place the files in the correct place. This can lead to all sorts of problems, from single missing features to complete failure to function.</p><p><b>You should quit RKWard, now, and fix your installation</b>. For help with that, see <a href=\"http://p.sf.net/rkward/compiling\">http://p.sf.net/rkward/compiling</a>.</p>"), i18n ("Broken installation"), KMessageBox::Notify | KMessageBox::AllowLink);
+	}
+
 	setUpdatesEnabled (false);
 
 	readOptions();
@@ -210,9 +218,6 @@
 	// startup options will be deleted from the R thread (TODO correct this!), so we need to copy the initial_url here, or run into race conditions
 	KUrl open_url = startup_options->initial_url;
 	startR ();
-
-	QString dummy = i18n ("RKWard has made great progress in the past few months and it is already helpful for many tasks, but some features may be lacking. You can help us by filing bug reports, feature requests, or providing feedback in any other form. Please visit http://rkward.sourceforge.net for more information.");
-	KMessageBox::information (this, dummy, i18n("What to expect of RKWard"), "state_of_rkward");
 	
 	initPlugins ();
 

Copied: trunk/rkward/rkward/version.h (from rev 2494, trunk/rkward/version.h)
===================================================================
--- trunk/rkward/rkward/version.h	                        (rev 0)
+++ trunk/rkward/rkward/version.h	2009-05-22 11:44:56 UTC (rev 2499)
@@ -0,0 +1,2 @@
+/* Version number of package */
+#define VERSION "0.5.1-pre1"

Deleted: trunk/rkward/version.h
===================================================================
--- trunk/rkward/version.h	2009-05-22 10:25:49 UTC (rev 2498)
+++ trunk/rkward/version.h	2009-05-22 11:44:56 UTC (rev 2499)
@@ -1,2 +0,0 @@
-/* Version number of package */
-#define VERSION "0.5.0d"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list