Skip to content

Commit

Permalink
add globe plugin to osgeo4w package
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 10, 2011
1 parent b50402e commit 8e3aca4
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 18 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -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)

Expand Down
8 changes: 5 additions & 3 deletions cmake/FindOSGEARTH.cmake
Expand Up @@ -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
Expand Down Expand Up @@ -57,6 +58,7 @@ FIND_LIBRARY(${MYLIBRARY}
$ENV{OSGEARTH_DIR}
$ENV{OSGEARTHDIR}
$ENV{OSGEARTH_ROOT}
$ENV{OSGEO4W_ROOT}
~/Library/Frameworks
/Library/Frameworks
/usr/local
Expand All @@ -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 )
Expand Down
8 changes: 8 additions & 0 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -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% ^
Expand Down Expand Up @@ -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 ^
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/CMakeLists.txt
Expand Up @@ -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
3 changes: 1 addition & 2 deletions src/plugins/globe/CMakeLists.txt
@@ -1,4 +1,3 @@

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

Expand Down Expand Up @@ -50,7 +49,7 @@ INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(globeplugin
qgis_core
qgis_gui
QtOpenGL
${QT_QTOPENGL_LIBRARY}
${OSGDB_LIBRARY}
${OSGGA_LIBRARY}
${OSG_LIBRARY}
Expand Down
1 change: 1 addition & 0 deletions src/plugins/globe/CMakeModules/FindOSG.cmake
Expand Up @@ -57,6 +57,7 @@ FIND_LIBRARY(${MYLIBRARY}
$ENV{OSG_DIR}
$ENV{OSGDIR}
$ENV{OSG_ROOT}
$ENV{OSGEO4W_ROOT}
~/Library/Frameworks
/Library/Frameworks
/usr/local
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/globe/CMakeModules/FindOpenThreads.cmake
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 10 additions & 6 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/globe/globe_plugin.h
Expand Up @@ -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
Expand Down

0 comments on commit 8e3aca4

Please sign in to comment.