Skip to content

Commit

Permalink
[AD-620] Change driver name in windows installer, development scripts…
Browse files Browse the repository at this point in the history
…, dsn dialog and enabled tests (#32)
  • Loading branch information
andiemontoyeah authored Feb 25, 2022
1 parent bb54540 commit 144884b
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 34 deletions.
4 changes: 2 additions & 2 deletions scripts/register_driver_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ then
exit 1
fi

echo "[Apache Ignite]" > "$ODBC_LIB_PATH/ignite-odbc-install.ini"
echo "Description=Apache Ignite" >> "$ODBC_LIB_PATH/ignite-odbc-install.ini"
echo "[Amazon DocumentDB]" > "$ODBC_LIB_PATH/ignite-odbc-install.ini"
echo "Description=Amazon DocumentDB" >> "$ODBC_LIB_PATH/ignite-odbc-install.ini"
echo "Driver=$ODBC_LIB_FILENAME" >> "$ODBC_LIB_PATH/ignite-odbc-install.ini"
echo "Setup=$ODBC_LIB_FILENAME" >> "$ODBC_LIB_PATH/ignite-odbc-install.ini"
echo "DriverODBCVer=03.00" >> "$ODBC_LIB_PATH/ignite-odbc-install.ini"
Expand Down
4 changes: 2 additions & 2 deletions src/odbc-test/src/connection_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(TestConnectionRestoreMiscOptionsSet) {

BOOST_AUTO_TEST_CASE(TestConnectionIncompleteBasicProperties) {
std::string connectionString =
"DRIVER={Apache Ignite};"
"DRIVER={Amazon DocumentDB};"
"HOSTNAME=localhost;"
"USER=user;"
"PASSWORD=password;";
Expand All @@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE(TestConnectionIncompleteBasicProperties) {

BOOST_AUTO_TEST_CASE(TestConnectionIncompleteSSHTunnelProperties) {
std::string connectionString =
"DRIVER={Apache Ignite};"
"DRIVER={Amazon DocumentDB};"
"HOSTNAME=host.com;"
"DATABASE=test;"
"USER=user;"
Expand Down
2 changes: 1 addition & 1 deletion src/odbc-test/src/odbc_test_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ void OdbcTestSuite::CreateDsnConnectionString(
}

connectionString =
"DRIVER={Apache Ignite};"
"DRIVER={Amazon DocumentDB};"
"HOSTNAME=" + host + ":" + port + ";"
"DATABASE=test;"
"USER=" + user + ";"
Expand Down
8 changes: 4 additions & 4 deletions src/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ if (WIN32 AND ${WITH_ODBC_MSI})

set(WIX_ODBC_LIBRARY_PATH ".\\ignite.odbc.dll")

set(WIX_PROJECT_NAME "Apache Ignite")
set(WIX_MANUFACTURER "The Apache Software Foundation")
set(WIX_PROJECT_NAME "Amazon DocumentDB")
set(WIX_MANUFACTURER "Amazon Web Services")
set(WIX_COPYRIGHT_COMMENT "Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are trademarks of The Apache Software Foundation.")

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand All @@ -170,7 +170,7 @@ if (WIN32 AND ${WITH_ODBC_MSI})
set(WIX_PROGRAM_FILES_FOLDER_ID "ProgramFiles64Folder")
set(WIX_COMPONENT_IS_WIN64 "yes")
set(WIX_PACKAGE_PLATFORM "x64")
set(WIX_INSTALLER_PREFIX ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/ignite-odbc-amd64)
set(WIX_INSTALLER_PREFIX ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/documentdb-odbc-amd64)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(WIX_BIT_SUFFIX "32-bit")
set(WIX_PRODUCT_ID "D39CBABA-1E21-4701-AA5C-91EDA07B383B")
Expand All @@ -179,7 +179,7 @@ if (WIN32 AND ${WITH_ODBC_MSI})
set(WIX_PROGRAM_FILES_FOLDER_ID "ProgramFilesFolder")
set(WIX_COMPONENT_IS_WIN64 "no")
set(WIX_PACKAGE_PLATFORM "x86")
set(WIX_INSTALLER_PREFIX ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/ignite-odbc-x86)
set(WIX_INSTALLER_PREFIX ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/documentdb-odbc-x86)
endif()

set(WIX_PRODUCT_NAME "${WIX_PROJECT_NAME} ODBC ${WIX_BIT_SUFFIX} Driver")
Expand Down
4 changes: 2 additions & 2 deletions src/odbc/install/ignite-odbc-install.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Apache Ignite]
Description=Apache Ignite
[Amazon DocumentDB]
Description=Amazon DocumentDB
Driver=/usr/local/lib/libignite-odbc.so
Setup=/usr/local/lib/libignite-odbc.so
DriverODBCVer=03.00
Expand Down
6 changes: 3 additions & 3 deletions src/odbc/install/ignite-odbc.wxs.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@

<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='@WIX_PROGRAM_FILES_FOLDER_ID@' Name='ProgramFiles'>
<Directory Id='ApacheIgnite' Name='Apache Ignite'>
<Directory Id='AmazonDocumentDB' Name='Amazon DocumentDB'>
<Directory Id='INSTALLDIR' Name='ODBC Driver'>
<Component Id='Driver' Guid='@WIX_COMPONENT_ID@' Win64='@WIX_COMPONENT_IS_WIN64@'>
<File Id='IgniteOdbcDll' Name='ignite.odbc.dll' DiskId='1' Source='@WIX_ODBC_LIBRARY_PATH@' KeyPath='yes'/>

<RegistryValue Root='HKLM' Key='Software\ODBC\ODBCINST.INI\ODBC Drivers' Name='Apache Ignite' Type='string' Value='Installed'/>
<RegistryValue Root='HKLM' Key='Software\ODBC\ODBCINST.INI\ODBC Drivers' Name='Amazon DocumentDB' Type='string' Value='Installed'/>

<RegistryKey Id='OdbcDriverRegInfo' Root='HKLM' Key='Software\ODBC\ODBCINST.INI\Apache Ignite' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
<RegistryKey Id='OdbcDriverRegInfo' Root='HKLM' Key='Software\ODBC\ODBCINST.INI\Amazon DocumentDB' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
<RegistryValue Type='string' Name='DriverODBCVer' Value='03.00'/>
<RegistryValue Type='string' Name='Driver' Value='[#IgniteOdbcDll]'/>
<RegistryValue Type='string' Name='Setup' Value='[#IgniteOdbcDll]'/>
Expand Down
20 changes: 10 additions & 10 deletions src/odbc/install/install_amd64.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ if exist %ODBC_AMD64% (
echo warning: The path you have specified seems to be a directory. Note that you have to specify path to driver file itself instead.
)
echo Installing 64-bit driver: %ODBC_AMD64%
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v DriverODBCVer /t REG_SZ /d "03.80" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v UsageCount /t REG_DWORD /d 00000001 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v Driver /t REG_SZ /d %ODBC_AMD64% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v Setup /t REG_SZ /d %ODBC_AMD64% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" /v "Apache Ignite" /t REG_SZ /d "Installed" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v DriverODBCVer /t REG_SZ /d "03.80" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v UsageCount /t REG_DWORD /d 00000001 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v Driver /t REG_SZ /d %ODBC_AMD64% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v Setup /t REG_SZ /d %ODBC_AMD64% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" /v "Amazon DocumentDB" /t REG_SZ /d "Installed" /f
) else (
echo 64-bit driver can not be found: %ODBC_AMD64%
echo Call format: install_amd64 abs_path_to_64_bit_driver [abs_path_to_32_bit_driver]
Expand All @@ -37,11 +37,11 @@ if exist %ODBC_X86% (
echo warning: The path you have specified seems to be a directory. Note that you have to specify path to driver file itself instead.
)
echo Installing 32-bit driver: %ODBC_X86%
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Apache Ignite" /v DriverODBCVer /t REG_SZ /d "03.80" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Apache Ignite" /v UsageCount /t REG_DWORD /d 00000001 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Apache Ignite" /v Driver /t REG_SZ /d %ODBC_X86% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Apache Ignite" /v Setup /t REG_SZ /d %ODBC_X86% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers" /v "Apache Ignite" /t REG_SZ /d "Installed" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Amazon DocumentDB" /v DriverODBCVer /t REG_SZ /d "03.80" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Amazon DocumentDB" /v UsageCount /t REG_DWORD /d 00000001 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Amazon DocumentDB" /v Driver /t REG_SZ /d %ODBC_X86% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\Amazon DocumentDB" /v Setup /t REG_SZ /d %ODBC_X86% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI\ODBC Drivers" /v "Amazon DocumentDB" /t REG_SZ /d "Installed" /f
) else (
echo warning: 32-bit driver can not be found: %ODBC_X86%
exit /b 1
Expand Down
10 changes: 5 additions & 5 deletions src/odbc/install/install_x86.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ if exist %ODBC% (
echo warning: The path you have specified seems to be a directory. Note that you have to specify path to driver file itself instead.
)
echo Installing driver: %ODBC%
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v DriverODBCVer /t REG_SZ /d "03.80" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v UsageCount /t REG_DWORD /d 00000001 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v Driver /t REG_SZ /d %ODBC% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Apache Ignite" /v Setup /t REG_SZ /d %ODBC% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" /v "Apache Ignite" /t REG_SZ /d "Installed" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v DriverODBCVer /t REG_SZ /d "03.80" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v UsageCount /t REG_DWORD /d 00000001 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v Driver /t REG_SZ /d %ODBC% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Amazon DocumentDB" /v Setup /t REG_SZ /d %ODBC% /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" /v "Amazon DocumentDB" /t REG_SZ /d "Installed" /f
) else (
echo Driver can not be found: %ODBC%
echo Call format: install_x86 abs_path_to_driver
Expand Down
3 changes: 1 addition & 2 deletions src/odbc/src/config/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ namespace odbc {
namespace config {
// Connection Settings
const std::string Configuration::DefaultValue::dsn = "DocumentDB DSN";
const std::string Configuration::DefaultValue::driver =
"Amazon DocumentDB ODBC Driver";
const std::string Configuration::DefaultValue::driver = "Amazon DocumentDB";
const std::string Configuration::DefaultValue::database = "";
const std::string Configuration::DefaultValue::hostname = "";
const uint16_t Configuration::DefaultValue::port = 27017;
Expand Down
6 changes: 3 additions & 3 deletions src/odbc/src/config/connection_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,10 @@ ConnectionInfo::ConnectionInfo(const Configuration& config)

// Driver name.
#ifdef SQL_DRIVER_NAME
strParams[SQL_DRIVER_NAME] = "Apache Ignite";
strParams[SQL_DRIVER_NAME] = "Amazon DocumentDB";
#endif // SQL_DRIVER_NAME
#ifdef SQL_DBMS_NAME
strParams[SQL_DBMS_NAME] = "Apache Ignite";
strParams[SQL_DBMS_NAME] = "Amazon DocumentDB";
#endif // SQL_DBMS_NAME

// ODBC version.
Expand Down Expand Up @@ -832,7 +832,7 @@ ConnectionInfo::ConnectionInfo(const Configuration& config)
// A character string with the actual data source-specific server name; useful
// when a data source name is used during SQLConnect, SQLDriverConnect, and
// SQLBrowseConnect.
strParams[SQL_SERVER_NAME] = "Apache Ignite";
strParams[SQL_SERVER_NAME] = "Amazon DocumentDB";
#endif // SQL_SERVER_NAME

#ifdef SQL_USER_NAME
Expand Down

0 comments on commit 144884b

Please sign in to comment.