Skip to content
Permalink
Browse files

add globe plugin to osgeo4w package

  • Loading branch information
jef-n committed Jul 10, 2011
1 parent b50402e commit 8e3aca41ee4eb7b420c1adccf3802b66257eb5af
@@ -78,6 +78,7 @@ ENDIF (WITH_BINDINGS)

SET (WITH_GLOBE FALSE CACHE BOOL "Determines whether Globe plugin should be built")
IF (WITH_GLOBE)
SET(QT_USE_QTOPENGL 1)
FIND_PACKAGE(OSGEARTH REQUIRED)
ENDIF (WITH_GLOBE)

@@ -26,6 +26,7 @@ FIND_PATH( ${THIS_OSGEARTH_INCLUDE_DIR} ${THIS_OSGEARTH_INCLUDE_FILE}
$ENV{OSGEARTH_SOURCE_DIR}
$ENV{OSGEARTHDIR}
$ENV{OSGEARTH_DIR}
$ENV{OSGEO4W_ROOT}
/usr/local/
/usr/
/sw/ # Fink
@@ -57,6 +58,7 @@ FIND_LIBRARY(${MYLIBRARY}
$ENV{OSGEARTH_DIR}
$ENV{OSGEARTHDIR}
$ENV{OSGEARTH_ROOT}
$ENV{OSGEO4W_ROOT}
~/Library/Frameworks
/Library/Frameworks
/usr/local
@@ -79,13 +81,13 @@ FIND_LIBRARY(${MYLIBRARY}
ENDMACRO(FIND_OSGEARTH_LIBRARY LIBRARY LIBRARYNAME)

FIND_OSGEARTH_LIBRARY( OSGEARTH_LIBRARY osgEarth )
FIND_OSGEARTH_LIBRARY( OSGEARTH_LIBRARY_DEBUG osgEarthd)
FIND_OSGEARTH_LIBRARY( OSGEARTH_LIBRARY_DEBUG osgEarthd )

FIND_OSGEARTH_LIBRARY( OSGEARTHUTIL_LIBRARY osgEarthUtil )
FIND_OSGEARTH_LIBRARY( OSGEARTHUTIL_LIBRARY_DEBUG osgEarthUtild)
FIND_OSGEARTH_LIBRARY( OSGEARTHUTIL_LIBRARY_DEBUG osgEarthUtild )

FIND_OSGEARTH_LIBRARY( OSGEARTHFEATURES_LIBRARY osgEarthFeatures )
FIND_OSGEARTH_LIBRARY( OSGEARTHFEATURES_LIBRARY_DEBUG osgEarthFeaturesd)
FIND_OSGEARTH_LIBRARY( OSGEARTHFEATURES_LIBRARY_DEBUG osgEarthFeaturesd )

FIND_OSGEARTH_LIBRARY( OSGEARTHSYMBOLOGY_LIBRARY osgEarthSymbology )
FIND_OSGEARTH_LIBRARY( OSGEARTHSYMBOLOGY_LIBRARY_DEBUG osgEarthSymbologyd )
@@ -89,6 +89,7 @@ cmake -G "Visual Studio 9 2008" ^
-D PEDANTIC=TRUE ^
-D WITH_SPATIALITE=TRUE ^
-D WITH_MAPSERVER=TRUE ^
-D WITH_GLOBE=TRUE ^
-D WITH_INTERNAL_SPATIALITE=TRUE ^
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
@@ -157,6 +158,7 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude "apps/%PACKAGENAME%/plugins/grassrasterprovider.dll" ^
--exclude "apps/%PACKAGENAME%/plugins/grassplugin.dll" ^
--exclude "apps/%PACKAGENAME%/plugins/grassprovider.dll" ^
--exclude "apps/%PACKAGENAME%/plugins/globeplugin.dll" ^
apps/%PACKAGENAME% ^
bin/%PACKAGENAME%.bat.tmpl ^
bin/%PACKAGENAME%-browser.bat.tmpl ^
@@ -179,6 +181,12 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-grass-plugin-%VERSION%-%PACKAGE%.tar.bz
>>%LOG% 2>&1
if errorlevel 1 goto error

tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-globe-plugin-%VERSION%-%PACKAGE%.tar.bz2 ^
"apps/%PACKAGENAME%/globe" ^
"apps/%PACKAGENAME%/plugins/globeplugin.dll" ^
>>%LOG% 2>&1
if errorlevel 1 goto error

goto end

:error
@@ -37,7 +37,7 @@ IF (GRASS_FOUND)
ENDIF (GRASS_FOUND)

IF (OSGEARTH_FOUND)
SUBDIRS (globe)
ADD_SUBDIRECTORY(globe)
ENDIF (OSGEARTH_FOUND)

# headers installed in qgis_core target
@@ -1,4 +1,3 @@

# set path to additional CMake modules
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH})

@@ -50,7 +49,7 @@ INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(globeplugin
qgis_core
qgis_gui
QtOpenGL
${QT_QTOPENGL_LIBRARY}
${OSGDB_LIBRARY}
${OSGGA_LIBRARY}
${OSG_LIBRARY}
@@ -57,6 +57,7 @@ FIND_LIBRARY(${MYLIBRARY}
$ENV{OSG_DIR}
$ENV{OSGDIR}
$ENV{OSG_ROOT}
$ENV{OSGEO4W_ROOT}
~/Library/Frameworks
/Library/Frameworks
/usr/local
@@ -76,7 +76,7 @@ ENDIF(NOT OPENTHREADS_INCLUDE_DIR)


FIND_LIBRARY(OPENTHREADS_LIBRARY
NAMES OpenThreads OpenThreadsWin32
NAMES OpenThreads OpenThreadsWin32
PATHS
$ENV{OPENTHREADS_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR}/lib64
@@ -99,7 +99,7 @@ ENDIF(NOT OPENTHREADS_LIBRARY)

IF(NOT OPENTHREADS_LIBRARY)
FIND_LIBRARY(OPENTHREADS_LIBRARY
NAMES OpenThreads OpenThreadsWin32
NAMES OpenThreads OpenThreadsWin32
PATHS
~/Library/Frameworks
/Library/Frameworks
@@ -440,7 +440,7 @@ void GlobePlugin::setupControls()
moveHControls->setFrame( new RoundedFrame() );
moveHControls->getFrame()->setBackColor(1,1,1,0.5);
moveHControls->setMargin( 0 );
moveHControls->setSpacing( 47 );
moveHControls->setChildSpacing( 47 );
moveHControls->setVertAlign( Control::ALIGN_CENTER );
moveHControls->setHorizAlign( Control::ALIGN_CENTER );
moveHControls->setPosition( 5, 30 );
@@ -462,7 +462,7 @@ void GlobePlugin::setupControls()
moveVControls->setFrame( new RoundedFrame() );
moveVControls->getFrame()->setBackColor(1,1,1,0.5);
moveVControls->setMargin( 0 );
moveVControls->setSpacing( 36 );
moveVControls->setChildSpacing( 36 );
moveVControls->setVertAlign( Control::ALIGN_CENTER );
moveVControls->setHorizAlign( Control::ALIGN_CENTER );
moveVControls->setPosition( 35, 5 );
@@ -492,7 +492,7 @@ void GlobePlugin::setupControls()
rotateControls->setFrame( new RoundedFrame() );
rotateControls->getFrame()->setBackColor(1,1,1,0.5);
rotateControls->setMargin( 0 );
rotateControls->setSpacing( 10 );
rotateControls->setChildSpacing( 10 );
rotateControls->setVertAlign( Control::ALIGN_CENTER );
rotateControls->setHorizAlign( Control::ALIGN_CENTER );
rotateControls->setPosition( 5, 113 );
@@ -526,7 +526,7 @@ void GlobePlugin::setupControls()
tiltControls->setFrame( new RoundedFrame() );
tiltControls->getFrame()->setBackColor(1,1,1,0.5);
tiltControls->setMargin( 0 );
tiltControls->setSpacing( 30 );
tiltControls->setChildSpacing( 30 );
tiltControls->setVertAlign( Control::ALIGN_CENTER );
tiltControls->setHorizAlign( Control::ALIGN_CENTER );
tiltControls->setPosition( 35, 90 );
@@ -554,7 +554,7 @@ void GlobePlugin::setupControls()
zoomControls->setFrame( new RoundedFrame() );
zoomControls->getFrame()->setBackColor(1,1,1,0.5);
zoomControls->setMargin( 0 );
zoomControls->setSpacing( 5 );
zoomControls->setChildSpacing( 5 );
zoomControls->setVertAlign( Control::ALIGN_CENTER );
zoomControls->setHorizAlign( Control::ALIGN_CENTER );
zoomControls->setPosition( 35, 170 );
@@ -582,7 +582,7 @@ void GlobePlugin::setupControls()
extraControls->setFrame( new RoundedFrame() );
extraControls->getFrame()->setBackColor(1,1,1,0.5);
extraControls->setMargin( 0 );
extraControls->setSpacing( 10 );
extraControls->setChildSpacing( 10 );
extraControls->setVertAlign( Control::ALIGN_CENTER );
extraControls->setHorizAlign( Control::ALIGN_CENTER );
extraControls->setPosition( 5, 220 );
@@ -631,7 +631,11 @@ void GlobePlugin::setupProxy()
if( !settings.value( "/proxyUser" ).toString().isEmpty() )
{
QString auth = settings.value( "/proxyUser" ).toString() + ":" + settings.value( "/proxyPassword" ).toString();
#ifdef WIN32
putenv( QString( "OSGEARTH_CURL_PROXYAUTH=%1" ).arg( auth ).toAscii() );
#else
setenv( "OSGEARTH_CURL_PROXYAUTH", auth.toStdString().c_str(), 0 );
#endif
}
//TODO: settings.value("/proxyType")
//TODO: URL exlusions
@@ -56,10 +56,6 @@ class GlobePlugin : public QObject, public QgisPlugin
//! show the help document
void help();

//! Called when the main canvas is about to be rendered
void renderStarting();
//! Called when the main canvas has rendered.
void renderComplete( QPainter * );
//! Emitted when a new set of layers has been received
void layersChanged();
//! Called when the extents of the map change

0 comments on commit 8e3aca4

Please sign in to comment.
You can’t perform that action at this time.