Skip to content

Commit

Permalink
apply osgeo4w patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 15, 2024
1 parent 660d3a4 commit 421afe6
Show file tree
Hide file tree
Showing 72 changed files with 126 additions and 2,995 deletions.
221 changes: 0 additions & 221 deletions .ci/azure-pipelines/azure-pipelines.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,6 @@ desktop.ini
doc/INSTALL.tex
i18n/*.qm
ms-windows/*.exe*
ms-windows/Installer-Files/postinstall.bat
ms-windows/Installer-Files/preremove.bat
ms-windows/nsis/
ms-windows/osgeo4w/addons/
ms-windows/osgeo4w/binary-*
ms-windows/osgeo4w/build-*
ms-windows/osgeo4w/nsis/
ms-windows/osgeo4w/packages-x86/
ms-windows/osgeo4w/packages-x86_64/
ms-windows/osgeo4w/unpacked/
ms-windows/osgeo4w/untgz/
ms-windows/packages/
ms-windows/progs/
ms-windows/untgz/
python/plugins/grassprovider/description/algorithms.json
python/plugins/grassprovider/tests/testdata/directions.tif.aux.xml
python/plugins/processing/tests/testdata/*.aux.xml
Expand Down
24 changes: 11 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,15 @@ if (USE_OPENCL)
endif()

# Configure CCache if available
if(NOT MSVC)
option(USE_CCACHE "Use ccache" ON)
if (USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
message(STATUS "ccache found")
endif(CCACHE_FOUND)
endif(USE_CCACHE)
endif(NOT MSVC)
option(USE_CCACHE "Use ccache" ON)
if (USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
message(STATUS "ccache found")
endif(CCACHE_FOUND)
endif(USE_CCACHE)

if (IOS)
set (DEFAULT_FORCE_STATIC_LIBS TRUE)
Expand Down Expand Up @@ -638,8 +636,8 @@ if (ENABLE_TESTS)
add_custom_target(check COMMAND xvfb-run --server-args=-screen\ 0\ 1024x768x24 ctest --output-on-failure)

# Define SOURCETREE fixture
add_test(NAME logGitStatus COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh log)
add_test(NAME checkGitStatus COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh check)
add_test(NAME logGitStatus COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh log)
add_test(NAME checkGitStatus COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/scripts/chkgitstatus.sh check)
set_tests_properties(logGitStatus PROPERTIES FIXTURES_SETUP SOURCETREE)
set_property(TEST logGitStatus PROPERTY SKIP_RETURN_CODE 2)
set_tests_properties(checkGitStatus PROPERTIES FIXTURES_CLEANUP SOURCETREE)
Expand Down
2 changes: 1 addition & 1 deletion external/mdal/frmts/mdal_h2i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ bool MDAL::DriverH2i::parseJsonFile( const std::string filePath, MetadataH2i &me
metadata.dirPath = MDAL::dirName( filePath );

}
catch ( Json::exception &e )
catch ( Json::exception & )
{
return false;
}
Expand Down
14 changes: 8 additions & 6 deletions external/mdal/mdal_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include <stdlib.h>

#ifdef _MSC_VER
#ifndef UNICODE
#define UNICODE
#endif
#include <locale>
#include <codecvt>
#include <stringapiset.h>
Expand Down Expand Up @@ -1113,12 +1115,12 @@ std::vector<std::string> MDAL::Library::libraryFilesInDir( const std::string &di
{
std::vector<std::string> filesList;
#ifdef _WIN32
WIN32_FIND_DATA data;
WIN32_FIND_DATAA data;
HANDLE hFind;
std::string pattern = dirPath;
pattern.push_back( '*' );

hFind = FindFirstFile( pattern.c_str(), &data );
hFind = FindFirstFileA( pattern.c_str(), &data );

if ( hFind == INVALID_HANDLE_VALUE )
return filesList;
Expand All @@ -1129,7 +1131,7 @@ std::vector<std::string> MDAL::Library::libraryFilesInDir( const std::string &di
if ( !fileName.empty() && fileExtension( fileName ) == ".dll" )
filesList.push_back( fileName );
}
while ( FindNextFile( hFind, &data ) != 0 );
while ( FindNextFileA( hFind, &data ) != 0 );

FindClose( hFind );
#else
Expand All @@ -1140,8 +1142,8 @@ std::vector<std::string> MDAL::Library::libraryFilesInDir( const std::string &di
std::string fileName( de->d_name );
if ( !fileName.empty() )
{
std::string extentsion = fileExtension( fileName );
if ( extentsion == ".so" || extentsion == ".dylib" )
std::string extension = fileExtension( fileName );
if ( extension == ".so" || extension == ".dylib" )
filesList.push_back( fileName );
}
de = readdir( dir );
Expand All @@ -1160,7 +1162,7 @@ bool MDAL::Library::loadLibrary()
#ifdef _WIN32
UINT uOldErrorMode =
SetErrorMode( SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS );
d->mLibrary = LoadLibrary( d->mLibraryFile.c_str() );
d->mLibrary = LoadLibraryA( d->mLibraryFile.c_str() );
SetErrorMode( uOldErrorMode );
#else
d->mLibrary = dlopen( d->mLibraryFile.c_str(), RTLD_LAZY );
Expand Down
14 changes: 7 additions & 7 deletions external/qspatialite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ add_definitions(-DQT_SHARED)

include_directories(SYSTEM
${SQLITE3_INCLUDE_DIR}
${Qt5Sql_PRIVATE_INCLUDE_DIRS}
${${QT_VERSION_BASE}Sql_PRIVATE_INCLUDE_DIRS}
)

set(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp)
QT5_WRAP_CPP(QSQLSPATIALITE_SRC qsql_spatialite.h smain.h)
set(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp qsql_spatialite.h smain.h)

add_library(qsqlspatialite SHARED ${QSQLSPATIALITE_SRC})

target_link_libraries(qsqlspatialite
${Qt5Core_LIBRARIES}
${Qt5Sql_LIBRARIES}
spatialite::spatialite
qgis_core
${QT_VERSION_BASE}::Core
${QT_VERSION_BASE}::Sql
spatialite::spatialite
qgis_core
)

install(TARGETS qsqlspatialite
Expand Down
2 changes: 1 addition & 1 deletion external/qspatialite/qsql_spatialite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ bool QSpatiaLiteDriver::open( const QString &db, const QString &, const QString
bool openReadOnlyOption = false;
bool openUriOption = false;

const auto opts = conOpts.splitRef( QLatin1Char( ';' ) );
const auto opts = conOpts.split( QLatin1Char( ';' ) );
for ( auto option : opts )
{
option = option.trimmed();
Expand Down
2 changes: 1 addition & 1 deletion external/untwine/api/QgisUntwine_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bool QgisUntwine::start(Options& options)
cmdline += "--" + op.first + " \"" + op.second + "\" ";

PROCESS_INFORMATION processInfo;
STARTUPINFO startupInfo;
STARTUPINFOA startupInfo;

ZeroMemory(&processInfo, sizeof(PROCESS_INFORMATION));
ZeroMemory(&startupInfo, sizeof(STARTUPINFO));
Expand Down
Binary file removed ms-windows/Installer-Files/InstallHeaderImage.bmp
Binary file not shown.
Binary file removed ms-windows/Installer-Files/Install_QGIS.ico
Binary file not shown.
Loading

0 comments on commit 421afe6

Please sign in to comment.