diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index 45f1c01a205e..6e7b738c91f4 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -792,6 +792,29 @@ jobs: $dll = Join-Path $bin "arrow_flight_sql_odbc.dll" if (Test-Path $dll) { Write-Host "Found ODBC DLL: $dll" + + # Verify ODBC driver registration values + $key = "HKLM:\SOFTWARE\ODBC\ODBCINST.INI\Apache Arrow Flight SQL ODBC Driver" + if (-not (Test-Path $key)) { + Write-Error "ODBC driver registry key not found: $key" + exit 1 + } + $props = Get-ItemProperty $key + foreach ($name in "Driver", "Setup") { + Write-Host "$name = '$($props.$name)'" + if ($props.$name -ne $dll) { + Write-Error "Registry value '$name' should be '$dll'" + exit 1 + } + } + if ($props.DriverODBCVer -ne "03.00") { + Write-Error "Registry value 'DriverODBCVer' should be '03.00', got '$($props.DriverODBCVer)'" + exit 1 + } + if ($props.UsageCount -ne 1) { + Write-Error "Registry value 'UsageCount' should be 1, got '$($props.UsageCount)'" + exit 1 + } exit 0 } } diff --git a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt index 178d144bac32..a280eb6260fd 100644 --- a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt +++ b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt @@ -255,6 +255,9 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER) # Load CPack after all CPACK* variables are set include(CPack) + # The component name is part of the CPack file ID referenced in + # install/windows/arrow-flight-sql-odbc.wxs (CM_FP_ArrowFlightSQLODBC.*). + # Update the .wxs if it is renamed. cpack_add_component(ArrowFlightSQLODBC DISPLAY_NAME "ODBC library" DESCRIPTION "Apache Arrow Flight SQL ODBC library bin, required to install" diff --git a/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs b/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs index faf009b1ceff..067be179b6b6 100644 --- a/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs +++ b/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs @@ -25,10 +25,13 @@ - + - - + +