[Liblas-commits] hg: 3 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Oct 27 11:48:24 EDT 2010


changeset 4aeffcc28ed4 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=4aeffcc28ed4
summary: don't throw if we return no data for having an output table

changeset f8b4a00e8458 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f8b4a00e8458
summary: merge

changeset 18dceb43a3dc in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=18dceb43a3dc
summary: merge

diffstat:

 CMakeLists.txt                   |  10 ++++++--
 apps/oci_util.cpp                |  15 ++++++++----
 cmake/modules/BuildOSGeo4W.cmake |  45 ++++++++++++++++++++++++++++++---------
 hobu-config.bat                  |   4 +-
 liblas-osgeo4w-init.bat          |   3 ++
 liblas-osgeo4w-postinstall.bat   |   1 +
 liblas-osgeo4w-start.bat.tmpl    |   5 ++++
 python/liblas/core.py            |   2 +-
 8 files changed, 63 insertions(+), 22 deletions(-)

diffs (200 lines):

diff -r 78c86d242055 -r 18dceb43a3dc CMakeLists.txt
--- a/CMakeLists.txt	Tue Oct 26 21:56:29 2010 -0500
+++ b/CMakeLists.txt	Wed Oct 27 10:48:13 2010 -0500
@@ -300,14 +300,12 @@
   endif()
 endif()
 
-#if (WIN32)
-#    include(BuildOSGeo4W)
-#endif(WIN32)
 
 # Version information
 SET(CPACK_PACKAGE_VERSION_MAJOR "1")
 SET(CPACK_PACKAGE_VERSION_MINOR "6")
 SET(CPACK_PACKAGE_VERSION_PATCH "0b1")
+SET(OSGEO4W_UPSTREAM_RELEASE "1")
 
 SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP;TBZ2")
 SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
@@ -331,6 +329,12 @@
 list(APPEND CPACK_SOURCE_IGNORE_FILES "schemas")
 list(APPEND CPACK_SOURCE_IGNORE_FILES "hobu-config.bat")
 
+list(APPEND CPACK_SOURCE_IGNORE_FILES "liblas-osgeo4w-init.bat")
+list(APPEND CPACK_SOURCE_IGNORE_FILES "liblas-osgeo4w-start.bat.tmpl")
 include(CPack)
 
 add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
+
+#if (WIN32)
+#    include(BuildOSGeo4W)
+#endif(WIN32)
diff -r 78c86d242055 -r 18dceb43a3dc apps/oci_util.cpp
--- a/apps/oci_util.cpp	Tue Oct 26 21:56:29 2010 -0500
+++ b/apps/oci_util.cpp	Wed Oct 27 10:48:13 2010 -0500
@@ -166,11 +166,16 @@
     try {
         statement->Execute();
     } catch (std::runtime_error const& e) {
-        delete statement;
-        std::ostringstream oss;
-        oss << "Failed select if block table "<< tableName << " exists.  Do you have rights to select?"  
-            << std::endl << e.what() << std::endl;
-        throw std::runtime_error(oss.str());
+        // Assume for now that an error returned here is OCI_NODATA, which means 
+        // the table doesn't exist.  If this really isn't the case, we're going 
+        // to get more legit message further down the line.
+
+        return false;
+        // delete statement;
+        // std::ostringstream oss;
+        // oss << "Failed select if block table "<< tableName << " exists.  Do you have rights to select?"  
+        //     << std::endl << e.what() << std::endl;
+        // throw std::runtime_error(oss.str());
     }  
     
     return true;
diff -r 78c86d242055 -r 18dceb43a3dc cmake/modules/BuildOSGeo4W.cmake
--- a/cmake/modules/BuildOSGeo4W.cmake	Tue Oct 26 21:56:29 2010 -0500
+++ b/cmake/modules/BuildOSGeo4W.cmake	Wed Oct 27 10:48:13 2010 -0500
@@ -7,7 +7,11 @@
 MESSAGE(STATUS "Building osgeo4w binaries")
 set(OSGEO4W_DIR osgeo4w)
 set(OSGEO4W_LIB_DIR ${OSGEO4W_DIR}/lib)
+set(OSGEO4W_ETC_DIR ${OSGEO4W_DIR}/etc)
+set(OSGEO4W_ETC_INI_DIR ${OSGEO4W_DIR}/etc/ini)
+set(OSGEO4W_ETC_POSTINSTALL_DIR ${OSGEO4W_DIR}/etc/postinstall)
 set(OSGEO4W_LIB_BIN_DIR ${OSGEO4W_DIR}/lib/bin)
+set(OSGEO4W_BIN_DIR ${OSGEO4W_DIR}/bin)
 set(OSGEO4W_DEVEL_DIR ${OSGEO4W_DIR}/devel)
 set(OSGEO4W_DEVEL_INCLUDE_DIR ${OSGEO4W_DEVEL_DIR}/include)
 set(OSGEO4W_DEVEL_INCLUDE_LIBLAS_DIR ${OSGEO4W_DEVEL_INCLUDE_DIR}/liblas)
@@ -20,6 +24,9 @@
 
 set(OSGEO4W_DIRECTORIES
     ${OSGEO4W_DIR}
+    ${OSGEO4W_ETC_DIR}
+    ${OSGEO4W_ETC_INI_DIR}
+    ${OSGEO4W_ETC_POSTINSTALL_DIR}
     ${OSGEO4W_LIB_DIR}
     ${OSGEO4W_LIB_BIN_DIR}
     ${OSGEO4W_DEVEL_DIR}
@@ -28,7 +35,8 @@
     ${OSGEO4W_DEVEL_LIB_DIR}
     ${OSGEO4W_PYTHON_DIR}
     ${OSGEO4W_DEVEL_BIN_DIR}
-    ${OSGEO4W_PACKAGES})
+    ${OSGEO4W_PACKAGES}
+    ${OSGEO4W_BIN_DIR})
 
 
 
@@ -78,34 +86,49 @@
 endmacro(copy_files)
 
 
+macro(copy_directory SOURCE DESTINATION  )
+    
+    MESSAGE(STATUS "   Copying ${SOURCE} to ${DESTINATION}")
+        add_custom_command(
+            TARGET copy
+            COMMAND ${CMAKE_COMMAND} -E copy_directory ${SOURCE} ${DESTINATION}
+        )
+endmacro(copy_directory)
+
+
 add_custom_target(tar
   COMMAND ${CMAKE_COMMAND} -E echo "Tarring OSGeo4W install")
 add_dependencies( tar copy  )
 
-macro (tar_directories source destination base_path)
+macro (tar_directories source destination base_paths)
 
     MESSAGE(STATUS "   Tarring ${source} to ${destination}")
+    
     add_custom_command(
         TARGET tar
-        COMMAND ${CMAKE_COMMAND} -E chdir ${source} cmake -E tar czf  ${destination} ${base_path}/
+        COMMAND ${CMAKE_COMMAND} -E chdir ${source} cmake -E tar cjf  ${destination} ${base_paths}
     )
 
 
 endmacro(tar_directories)
 
 make_directories()
-copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/las* ${OSGEO4W_DEVEL_BIN_DIR}/  )
-copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/*[.${SO_EXT}] ${OSGEO4W_DEVEL_BIN_DIR}/  )
+copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/*.exe ${OSGEO4W_BIN_DIR}/  )
+copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas_c.dll ${OSGEO4W_BIN_DIR}/  )
+copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-start.bat.tmpl ${OSGEO4W_BIN_DIR}/liblas.bat.tmpl )
+copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-init.bat ${OSGEO4W_ETC_INI_DIR}/liblas.bat )
+copy_files(${libLAS_SOURCE_DIR}/liblas-osgeo4w-postinstall.bat ${OSGEO4W_ETC_POSTINSTALL_DIR}/liblas.bat )
 
-copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/*.lib ${OSGEO4W_DEVEL_LIB_DIR}/  )
-copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/*.a ${OSGEO4W_DEVEL_LIB_DIR}/  )
+copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas.lib ${OSGEO4W_DEVEL_LIB_DIR}/  )
+copy_files(${LIBLAS_BUILD_OUTPUT_DIRECTORY}/liblas_c.lib ${OSGEO4W_DEVEL_LIB_DIR}/  )
 
-copy_files(./include/liblas/* ${OSGEO4W_DEVEL_INCLUDE_LIBLAS_DIR}/  )
+
+copy_directory(./include/liblas/ ${OSGEO4W_DEVEL_INCLUDE_LIBLAS_DIR}/  )
 copy_files(./python/liblas/*.py ${OSGEO4W_PYTHON_DIR}/  )
 
-tar_directories(${OSGEO4W_DEVEL_DIR} ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.tar.gz bin)
-tar_directories(${OSGEO4W_DIR} ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-python-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.tar.gz apps)
-tar_directories(${OSGEO4W_DIR} ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-devel-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.tar.gz devel)
+tar_directories(${OSGEO4W_DIR} ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${OSGEO4W_UPSTREAM_RELEASE}.tar.bz2 "bin/;etc/")
+tar_directories(${OSGEO4W_DIR} ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-python-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${OSGEO4W_UPSTREAM_RELEASE}.tar.bz2 apps)
+tar_directories(${OSGEO4W_DIR}/devel ${libLAS_SOURCE_DIR}/${OSGEO4W_PACKAGES}/liblas-devel-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${OSGEO4W_UPSTREAM_RELEASE}.tar.bz2 "lib/;include")
 
 
 add_custom_target(osgeo4w
diff -r 78c86d242055 -r 18dceb43a3dc hobu-config.bat
--- a/hobu-config.bat	Tue Oct 26 21:56:29 2010 -0500
+++ b/hobu-config.bat	Wed Oct 27 10:48:13 2010 -0500
@@ -6,8 +6,8 @@
 set BOOST=D:\boost\boost_1_44
 set ORACLE_HOME=%OSGEO4W%
 # set BUILD_TYPE=RelWithDebInfo
-set BUILD_TYPE=Debug
-# set BUILD_TYPE=Release
+#set BUILD_TYPE=Debug
+set BUILD_TYPE=Release
 
 set PATH=%OSGEO4W%\apps\gdal-dev\bin;%OSGEO4W%\bin;%PATH%
 
diff -r 78c86d242055 -r 18dceb43a3dc liblas-osgeo4w-init.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/liblas-osgeo4w-init.bat	Wed Oct 27 10:48:13 2010 -0500
@@ -0,0 +1,3 @@
+SET GDAL_DATA=%OSGEO4W_ROOT%\apps\gdal-dev\share\gdal
+SET PYTHONPATH=%OSGEO4W_ROOT%\apps\gdal-dev\pymod;%PYTHONPATH%
+PATH=%OSGEO4W_ROOT%\apps\gdal-dev\bin;%OSGEO4W_ROOT%\bin;%PATH%
diff -r 78c86d242055 -r 18dceb43a3dc liblas-osgeo4w-postinstall.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/liblas-osgeo4w-postinstall.bat	Wed Oct 27 10:48:13 2010 -0500
@@ -0,0 +1,1 @@
+textreplace -std -t bin/liblas.bat
\ No newline at end of file
diff -r 78c86d242055 -r 18dceb43a3dc liblas-osgeo4w-start.bat.tmpl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/liblas-osgeo4w-start.bat.tmpl	Wed Oct 27 10:48:13 2010 -0500
@@ -0,0 +1,5 @@
+ at echo off
+SET OSGEO4W_ROOT=@osgeo4w@
+call "%OSGEO4W_ROOT%\etc\ini\liblas.bat"
+start "libLAS OSGeo4W Shell"
+ at echo on
diff -r 78c86d242055 -r 18dceb43a3dc python/liblas/core.py
--- a/python/liblas/core.py	Tue Oct 26 21:56:29 2010 -0500
+++ b/python/liblas/core.py	Wed Oct 27 10:48:13 2010 -0500
@@ -128,7 +128,7 @@
 if os.name == 'nt':
 # stolen from Shapely
 # http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/shapely/geos.py
-    lib_name = 'liblas1.dll'
+    lib_name = 'liblas_c.dll'
     try:
         local_dlls = os.path.abspath(os.__file__ + "../../../DLLs")
         original_path = os.environ['PATH']


More information about the Liblas-commits mailing list