[QGIS Commit] r13792 - in trunk/qgis: . cmake_templates src/app
src/core/raster src/plugins/grass src/providers/grass
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Jun 23 12:33:54 EDT 2010
Author: jef
Date: 2010-06-23 16:33:54 +0000 (Wed, 23 Jun 2010)
New Revision: 13792
Modified:
trunk/qgis/CMakeLists.txt
trunk/qgis/cmake_templates/qgsconfig.h.in
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.cpp
trunk/qgis/src/plugins/grass/CMakeLists.txt
trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
trunk/qgis/src/plugins/grass/qgsgrassshell.cpp
trunk/qgis/src/plugins/grass/qgsgrasstools.cpp
trunk/qgis/src/providers/grass/CMakeLists.txt
trunk/qgis/src/providers/grass/qgsgrass.cpp
trunk/qgis/src/providers/grass/qgsgrassrasterprovider.cpp
Log:
fix #2822
Modified: trunk/qgis/CMakeLists.txt
===================================================================
--- trunk/qgis/CMakeLists.txt 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/CMakeLists.txt 2010-06-23 16:33:54 UTC (rev 13792)
@@ -234,6 +234,7 @@
IF (WIN32)
SET (DEFAULT_LIB_SUBDIR lib)
+ SET (DEFAULT_LIBEXEC_SUBDIR .)
SET (DEFAULT_DATA_SUBDIR .)
SET (DEFAULT_PLUGIN_SUBDIR plugins)
SET (DEFAULT_INCLUDE_SUBDIR include)
@@ -279,7 +280,8 @@
SET (DEFAULT_BIN_SUBDIR bin)
SET (DEFAULT_LIB_SUBDIR lib${LIB_SUFFIX})
SET (DEFAULT_DATA_SUBDIR share/qgis)
- SET (DEFAULT_PLUGIN_SUBDIR lib${LIB_SUFFIX}/qgis)
+ SET (DEFAULT_LIBEXEC_SUBDIR lib${LIB_SUFFIX}/qgis)
+ SET (DEFAULT_PLUGIN_SUBDIR lib${LIB_SUFFIX}/qgis/plugins)
SET (DEFAULT_INCLUDE_SUBDIR include/qgis)
ENDIF (WIN32)
@@ -324,17 +326,19 @@
SET (QGIS_BIN_SUBDIR ${DEFAULT_BIN_SUBDIR} CACHE STRING "Subdirectory where executables will be installed")
SET (QGIS_LIB_SUBDIR ${DEFAULT_LIB_SUBDIR} CACHE STRING "Subdirectory where libraries will be installed")
+SET (QGIS_LIBEXEC_SUBDIR ${DEFAULT_LIBEXEC_SUBDIR} CACHE STRING "Subdirectory where private executables will be installed")
SET (QGIS_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING "Subdirectory where QGIS data will be installed")
SET (QGIS_PLUGIN_SUBDIR ${DEFAULT_PLUGIN_SUBDIR} CACHE STRING "Subdirectory where plugins will be installed")
SET (QGIS_INCLUDE_SUBDIR ${DEFAULT_INCLUDE_SUBDIR} CACHE STRING "Subdirectory where header files will be installed")
# mark *_SUBDIR variables as advanced as this is not something
# that an average user would use
-MARK_AS_ADVANCED (QGIS_BIN_SUBDIR QGIS_LIB_SUBDIR QGIS_DATA_SUBDIR QGIS_PLUGIN_SUBDIR QGIS_INCLUDE_SUBDIR)
+MARK_AS_ADVANCED (QGIS_BIN_SUBDIR QGIS_LIB_SUBDIR QGIS_LIBEXEC_SUBDIR QGIS_DATA_SUBDIR QGIS_PLUGIN_SUBDIR QGIS_INCLUDE_SUBDIR)
# full paths for the installation
SET (QGIS_BIN_DIR ${QGIS_BIN_SUBDIR})
SET (QGIS_LIB_DIR ${QGIS_LIB_SUBDIR})
+SET (QGIS_LIBEXEC_DIR ${QGIS_LIBEXEC_SUBDIR})
SET (QGIS_DATA_DIR ${QGIS_DATA_SUBDIR})
SET (QGIS_PLUGIN_DIR ${QGIS_PLUGIN_SUBDIR})
SET (QGIS_INCLUDE_DIR ${QGIS_INCLUDE_SUBDIR})
Modified: trunk/qgis/cmake_templates/qgsconfig.h.in
===================================================================
--- trunk/qgis/cmake_templates/qgsconfig.h.in 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/cmake_templates/qgsconfig.h.in 2010-06-23 16:33:54 UTC (rev 13792)
@@ -1,33 +1,34 @@
-
-// QGSCONFIG.H
-
-#ifndef QGSCONFIG_H
-#define QGSCONFIG_H
-
-// Version must be specified according to
-// <int>.<int>.<int>-<any text>.
-// or else upgrading old project file will not work
-// reliably.
-#define VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${RELEASE_NAME}"
-
-//used in vim src/core/qgis.cpp
-//The way below should work but it resolves to a number like 0110 which the compiler treats as octal I think
-//because debuggin it out shows the decimal number 72 which results in incorrect version status.
-//As a short term fix I (Tim) am defining the version in top level cmake. It would be good to
-//reinstate this more generic approach below at some point though
-//#define VERSION_INT ${CPACK_PACKAGE_VERSION_MAJOR}${CPACK_PACKAGE_VERSION_MINOR}${CPACK_PACKAGE_VERSION_PATCH}
-#define VERSION_INT ${QGIS_VERSION_INT}
-//used in main.cpp and anywhere else where the release name is needed
-#define RELEASE_NAME "${RELEASE_NAME}"
-
-#define QGIS_PLUGIN_SUBDIR "${QGIS_PLUGIN_SUBDIR}"
-#define QGIS_DATA_SUBDIR "${QGIS_DATA_SUBDIR}"
-
-#cmakedefine HAVE_POSTGRESQL
-
-#cmakedefine HAVE_SPATIALITE
-
-#cmakedefine HAVE_PYTHON
-
-#endif
-
+
+// QGSCONFIG.H
+
+#ifndef QGSCONFIG_H
+#define QGSCONFIG_H
+
+// Version must be specified according to
+// <int>.<int>.<int>-<any text>.
+// or else upgrading old project file will not work
+// reliably.
+#define VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${RELEASE_NAME}"
+
+//used in vim src/core/qgis.cpp
+//The way below should work but it resolves to a number like 0110 which the compiler treats as octal I think
+//because debuggin it out shows the decimal number 72 which results in incorrect version status.
+//As a short term fix I (Tim) am defining the version in top level cmake. It would be good to
+//reinstate this more generic approach below at some point though
+//#define VERSION_INT ${CPACK_PACKAGE_VERSION_MAJOR}${CPACK_PACKAGE_VERSION_MINOR}${CPACK_PACKAGE_VERSION_PATCH}
+#define VERSION_INT ${QGIS_VERSION_INT}
+//used in main.cpp and anywhere else where the release name is needed
+#define RELEASE_NAME "${RELEASE_NAME}"
+
+#define QGIS_PLUGIN_SUBDIR "${QGIS_PLUGIN_SUBDIR}"
+#define QGIS_DATA_SUBDIR "${QGIS_DATA_SUBDIR}"
+#define QGIS_LIBEXEC_SUBDIR "${QGIS_LIBEXEC_SUBDIR}"
+
+#cmakedefine HAVE_POSTGRESQL
+
+#cmakedefine HAVE_SPATIALITE
+
+#cmakedefine HAVE_PYTHON
+
+#endif
+
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/app/qgisapp.cpp 2010-06-23 16:33:54 UTC (rev 13792)
@@ -2500,7 +2500,7 @@
whatsNew += "<h3>" + tr( "API Updates" ) + "</h3>";
whatsNew += "<ul>";
whatsNew += " <li>" + tr( "QgsDataProvider & QgsMapLayer: add dataChanged() signal, so that a provider can signal that the datasource changed" ) + "</li>";
- whatsNew += " <li>" + tr( "Use QNetworkAccessManager instead of QgsHttpTransaction (including caching and dynamic authentification to website and proxies)" ) + "</li>";
+ whatsNew += " <li>" + tr( "Use QNetworkAccessManager instead of QgsHttpTransaction (including caching and dynamic authentication to website and proxies)" ) + "</li>";
whatsNew += " <li>" + tr( "Allow opening layer properties from plugins" ) + "</li>";
whatsNew += " <li>" + tr( "Support for custom plugin layers." ) + "</li>";
whatsNew += " <li>" + tr( "Allow refreshing of plugins programmatically" ) + "</li>";
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2010-06-23 16:33:54 UTC (rev 13792)
@@ -224,10 +224,12 @@
// TODO: Connect signals from the dataprovider to the qgisapp
// Do a passthrough for the status bar text
+#if 0
connect(
mDataProvider, SIGNAL( statusChanged( QString ) ),
this, SLOT( showStatusMessage( QString ) )
);
+#endif
QgsDebugMsg( "(8 arguments) exiting." );
emit statusChanged( tr( "QgsRasterLayer created" ) );
Modified: trunk/qgis/src/plugins/grass/CMakeLists.txt
===================================================================
--- trunk/qgis/src/plugins/grass/CMakeLists.txt 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/plugins/grass/CMakeLists.txt 2010-06-23 16:33:54 UTC (rev 13792)
@@ -174,6 +174,6 @@
DESTINATION ${QGIS_DATA_DIR}/grass)
INSTALL(TARGETS qgis.g.browser
- RUNTIME DESTINATION ${QGIS_DATA_DIR}/grass/bin
+ RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR}/grass/bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2010-06-23 16:33:54 UTC (rev 13792)
@@ -21,6 +21,7 @@
#include "qgsgrassprovider.h"
#include "qgsgrassutils.h"
#include "qgsgrass.h"
+#include "qgsconfig.h"
#include "qgisinterface.h"
#include "qgsapplication.h"
@@ -1302,7 +1303,7 @@
mOutputTextBrowser->append( "<B>" + commandHtml + "</B>" );
QStringList environment = QProcess::systemEnvironment();
- environment.append( "GRASS_HTML_BROWSER=" + QgsApplication::pkgDataPath() + "/grass/bin/qgis.g.browser" );
+ environment.append( "GRASS_HTML_BROWSER=" + QgsApplication::prefixPath() + "/" QGIS_LIBEXEC_SUBDIR "/grass/bin/qgis.g.browser" );
// Warning: it is not useful to write requested region to WIND file and
// reset then to original beacuse it is reset before
Modified: trunk/qgis/src/plugins/grass/qgsgrassshell.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassshell.cpp 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/plugins/grass/qgsgrassshell.cpp 2010-06-23 16:33:54 UTC (rev 13792)
@@ -21,6 +21,7 @@
#include "qgsapplication.h"
#include "qtermwidget/qtermwidget.h"
#include "qgsgrass.h"
+#include "qgsconfig.h"
#include "qgsgrassshell.h"
@@ -94,7 +95,7 @@
env << "TERM=vt100";
env << "GISRC_MODE_MEMORY";
// TODO: we should check if these environment variable were set by user before QGIS was started
- env << "GRASS_HTML_BROWSER=" + QgsApplication::pkgDataPath() + "/grass/bin/qgis.g.browser";
+ env << "GRASS_HTML_BROWSER=" + QgsApplication::prefixPath() + "/" QGIS_LIBEXEC_SUBDIR "/grass/bin/qgis.g.browser";
env << "GRASS_WISH=wish";
env << "GRASS_TCLSH=tclsh";
env << "GRASS_PYTHON=python";
Modified: trunk/qgis/src/plugins/grass/qgsgrasstools.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrasstools.cpp 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/plugins/grass/qgsgrasstools.cpp 2010-06-23 16:33:54 UTC (rev 13792)
@@ -19,6 +19,7 @@
#include "qgsgrassmodule.h"
#include "qgsgrassshell.h"
#include "qgsgrass.h"
+#include "qgsconfig.h"
#include "qgisinterface.h"
#include "qgsapplication.h"
@@ -140,7 +141,7 @@
if ( name == "shell" )
{
#ifdef WIN32
- QgsGrass::putEnv( "GRASS_HTML_BROWSER", QgsApplication::pkgDataPath() + "/grass/bin/qgis.g.browser" );
+ QgsGrass::putEnv( "GRASS_HTML_BROWSER", QgsApplication::prefixPath() + "/" QGIS_LIBEXEC_SUBDIR "/grass/bin/qgis.g.browser" );
if ( !QProcess::startDetached( getenv( "COMSPEC" ) ) )
{
QMessageBox::warning( 0, "Warning", tr( "Cannot start command shell (%1)" ).arg( getenv( "COMSPEC" ) ) );
Modified: trunk/qgis/src/providers/grass/CMakeLists.txt
===================================================================
--- trunk/qgis/src/providers/grass/CMakeLists.txt 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/providers/grass/CMakeLists.txt 2010-06-23 16:33:54 UTC (rev 13792)
@@ -106,6 +106,6 @@
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})
INSTALL(TARGETS qgis.d.rast qgis.g.info
- RUNTIME DESTINATION ${QGIS_DATA_DIR}/grass/modules
+ RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR}/grass/modules
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
Modified: trunk/qgis/src/providers/grass/qgsgrass.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrass.cpp 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/providers/grass/qgsgrass.cpp 2010-06-23 16:33:54 UTC (rev 13792)
@@ -21,6 +21,7 @@
#include "qgsapplication.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsrectangle.h"
+#include "qgsconfig.h"
#include <QFileDialog>
#include <QMessageBox>
@@ -1099,7 +1100,7 @@
QStringList arguments;
- QString cmd = QgsApplication::pkgDataPath() + "/grass/modules/qgis.g.info";
+ QString cmd = QgsApplication::prefixPath() + "/" QGIS_LIBEXEC_SUBDIR "/grass/modules/qgis.g.info";
arguments.append( "info=" + info );
if ( !map.isNull() )
Modified: trunk/qgis/src/providers/grass/qgsgrassrasterprovider.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassrasterprovider.cpp 2010-06-23 16:01:32 UTC (rev 13791)
+++ trunk/qgis/src/providers/grass/qgsgrassrasterprovider.cpp 2010-06-23 16:33:54 UTC (rev 13792)
@@ -21,6 +21,7 @@
#include "qgslogger.h"
#include "qgsgrass.h"
#include "qgsgrassrasterprovider.h"
+#include "qgsconfig.h"
#include <math.h>
@@ -98,7 +99,7 @@
.arg( viewExtent.xMaximum() ).arg( viewExtent.yMaximum() )
.arg( pixelWidth ).arg( pixelHeight ) ) );
QProcess process( this );
- QString cmd = QgsApplication::pkgDataPath() + "/grass/modules/qgis.d.rast";
+ QString cmd = QgsApplication::prefixPath() + "/" QGIS_LIBEXEC_SUBDIR "/grass/modules/qgis.d.rast";
QByteArray data;
try
{
More information about the QGIS-commit
mailing list