Skip to content
Permalink
Browse files
fix #2822
git-svn-id: http://svn.osgeo.org/qgis/trunk@13792 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jun 23, 2010
1 parent c8247ae commit 08439990b2efa49efd4b496897c092d7d39eab98
@@ -234,6 +234,7 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo

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 @@ ELSE (WIN32)
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 @@ ENDIF (WIN32)

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})
@@ -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

@@ -2500,7 +2500,7 @@ void QgisApp::about()
whatsNew += "<h3>" + tr( "API Updates" ) + "</h3>";
whatsNew += "<ul>";
whatsNew += " <li>" + tr( "QgsDataProvider &amp; 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>";
@@ -224,10 +224,12 @@ QgsRasterLayer::QgsRasterLayer( int dummy,
// 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" ) );
@@ -174,6 +174,6 @@ INSTALL (FILES ${GMLS} images/world.png
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
)
@@ -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 @@ void QgsGrassModule::run()
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
@@ -21,6 +21,7 @@
#include "qgsapplication.h"
#include "qtermwidget/qtermwidget.h"
#include "qgsgrass.h"
#include "qgsconfig.h"

#include "qgsgrassshell.h"

@@ -94,7 +95,7 @@ void QgsGrassShell::initTerminal( QTermWidget *terminal )
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";
@@ -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 @@ void QgsGrassTools::runModule( QString name )
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" ) ) );
@@ -106,6 +106,6 @@ INSTALL(TARGETS grassrasterprovider
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
)
@@ -21,6 +21,7 @@
#include "qgsapplication.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsrectangle.h"
#include "qgsconfig.h"

#include <QFileDialog>
#include <QMessageBox>
@@ -1099,7 +1100,7 @@ QString GRASS_EXPORT QgsGrass::getInfo( QString info, QString gisdbase, QString

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() )
@@ -21,6 +21,7 @@
#include "qgslogger.h"
#include "qgsgrass.h"
#include "qgsgrassrasterprovider.h"
#include "qgsconfig.h"

#include <math.h>

@@ -98,7 +99,7 @@ QImage* QgsGrassRasterProvider::draw( QgsRectangle const & viewExtent, int pixe
.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
{

0 comments on commit 0843999

Please sign in to comment.