Modified:
trunk/BUILD.win
trunk/cmake/FindMySQL.cmake
trunk/driver/CMakeLists.txt
trunk/driver/utility.c
trunk/scripts/myodbc3.spec.sh
Log:
Let the debug version of the Windows driver be named "myodbc3d.dll".
Set MYODBC_DBG for the debug build.
Started align the Windows build documentation to the new CMake build.
When installing the "setup" RPM, deregister and reregister the driver,
the "edit" of a driver entry is not supported by "myodbc3i".
Modified: trunk/BUILD.win
===================================================================
--- trunk/BUILD.win 2007-07-18 19:43:47 UTC (rev 594)
+++ trunk/BUILD.win 2007-07-18 22:09:49 UTC (rev 595)
@@ -23,6 +23,10 @@
We regularly build using either MS Visual C/C++ v6 or MS
Visual C/C++ v7 (.NET). Other compilers may work as well.
+ You also need CMake 2.4,
+
+ http://www.cmake.org
+
Source Code
The source code is the main thing. You can get it from the
@@ -62,8 +66,8 @@
and installs a shortcut into the Start menu to open a command prompt
with these variables set.
-You need to set MYSQL_DIR to point to where the MySQL server is installed,
-using the short-style filenames:
+You need to set MYSQL_DIR to point to where the MySQL server is
+installed, using the short-style filenames:
set MYSQL_DIR=C:\PROGRA~1\MySQL\MYSQLS~1.0
@@ -71,27 +75,34 @@
set QTDIR=C:\path\to\qt
-and QMAKESPEC:
+and QMAKESPEC (pick the one that fits your build environment):
- set QMAKESPEC=%QTDIR%\mkspecs\win32-msvc2005
+ set QMAKESPEC=win32-msvc2005
and you will need to have the binaries for Qt in your path, such as:
set PATH=%PATH%;%QTDIR%\bin
-Build Connector/ODBC using the Qt qmake command-line tool by doing
-the following from the source root directory (in a command prompt
-window);
+Build Connector/ODBC using the CMake "cmake" command-line tool by
+doing the following from the source root directory (in a command
+prompt window);
-1. review the *pro and *pri files in the root dir
-2. execute Build.bat from the source root dir
+ cmake -G 'Visual Studio 7 .NET 2003'
-Upon completion; you will find the executables in the bin sub-dir
-and the libraries in the lib sub-dir.
+or for a debug enabled "myodbc3d.dll"
-NOTE: At some point in the future we may create a configure.bat which
- will automagically create qmake pri files.
-
+ cmake -G 'Visual Studio 7 .NET 2003' -DCMAKE_BUILD_TYPE=Debug
+
+This produces Visual Studio project, you can use the Visual Studio
+IDE or from the command line one of
+
+ devenv.com MySQL_Connector_ODBC.sln /build Release
+ devenv.com MySQL_Connector_ODBC.sln /build DebWithDbgInfo
+ devenv.com MySQL_Connector_ODBC.sln /build Debug
+
+Upon completion; you will find the executables in the target sub
+directories under the "bin" and "lib" directories.
+
INSTALL
---------------------------------------------------------------
Modified: trunk/cmake/FindMySQL.cmake
===================================================================
--- trunk/cmake/FindMySQL.cmake 2007-07-18 19:43:47 UTC (rev 594)
+++ trunk/cmake/FindMySQL.cmake 2007-07-18 22:09:49 UTC (rev 595)
@@ -43,9 +43,13 @@
IF (CMAKE_BUILD_TYPE STREQUAL Debug)
SET(libsuffixDist debug)
SET(libsuffixBuild Debug)
+ SET(DRIVER_NAME myodbc3d)
+ ADD_DEFINITIONS(-DMYODBC_DBG)
ELSE (CMAKE_BUILD_TYPE STREQUAL Debug)
SET(libsuffixDist opt)
SET(libsuffixBuild Release)
+ SET(DRIVER_NAME myodbc3)
+ ADD_DEFINITIONS(-DDBUG_OFF)
ENDIF (CMAKE_BUILD_TYPE STREQUAL Debug)
FIND_LIBRARY(MYSQL_LIB NAMES mysqlclient
@@ -55,6 +59,7 @@
$ENV{ProgramFiles}/MySQL/*/lib/${libsuffixDist}
$ENV{SystemDrive}/MySQL/*/lib/${libsuffixDist})
ELSE (WIN32)
+ SET(DRIVER_NAME myodbc3)
FIND_LIBRARY(MYSQL_LIB NAMES mysqlclient_r
PATHS
$ENV{MYSQL_DIR}/libmysql_r/.libs
Modified: trunk/driver/CMakeLists.txt
===================================================================
--- trunk/driver/CMakeLists.txt 2007-07-18 19:43:47 UTC (rev 594)
+++ trunk/driver/CMakeLists.txt 2007-07-18 22:09:49 UTC (rev 595)
@@ -28,29 +28,29 @@
SET(DRIVER_SRCS ${DRIVER_SRCS} myodbc3.def myodbc3.rc)
ENDIF(WIN32)
-ADD_LIBRARY(myodbc3 SHARED ${DRIVER_SRCS})
+ADD_LIBRARY(${DRIVER_NAME} SHARED ${DRIVER_SRCS})
-INSTALL(TARGETS myodbc3 DESTINATION lib)
+INSTALL(TARGETS ${DRIVER_NAME} DESTINATION lib)
IF(WIN32)
- TARGET_LINK_LIBRARIES(myodbc3 user32 advapi32 wsock32 ws2_32 myodbc3u
+ TARGET_LINK_LIBRARIES(${DRIVER_NAME} user32 advapi32 wsock32 ws2_32 myodbc3u
mysqlclient ${ODBCLIB} ${ODBCINSTLIB})
FIND_LIBRARY(MYSQL_ZLIB zlib)
FIND_LIBRARY(MYSQL_YASSL yassl)
FIND_LIBRARY(MYSQL_TAOCRYPT taocrypt)
IF (MYSQL_ZLIB)
- TARGET_LINK_LIBRARIES(myodbc3 zlib)
+ TARGET_LINK_LIBRARIES(${DRIVER_NAME} zlib)
ENDIF (MYSQL_ZLIB)
IF (MYSQL_YASSL)
- TARGET_LINK_LIBRARIES(myodbc3 yassl)
+ TARGET_LINK_LIBRARIES(${DRIVER_NAME} yassl)
ENDIF (MYSQL_YASSL)
IF (MYSQL_TAOCRYPT)
- TARGET_LINK_LIBRARIES(myodbc3 taocrypt)
+ TARGET_LINK_LIBRARIES(${DRIVER_NAME} taocrypt)
ENDIF (MYSQL_TAOCRYPT)
ELSE(WIN32)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ODBC_LINK_FLAGS}")
- TARGET_LINK_LIBRARIES(myodbc3 ltdl mysqlclient_r)
- TARGET_LINK_LIBRARIES(myodbc3 myodbc3u)
+ TARGET_LINK_LIBRARIES(${DRIVER_NAME} ltdl mysqlclient_r)
+ TARGET_LINK_LIBRARIES(${DRIVER_NAME} myodbc3u)
ENDIF(WIN32)
Modified: trunk/driver/utility.c
===================================================================
--- trunk/driver/utility.c 2007-07-18 19:43:47 UTC (rev 594)
+++ trunk/driver/utility.c 2007-07-18 22:09:49 UTC (rev 595)
@@ -1179,7 +1179,7 @@
void query_print(char *query __attribute__((unused)))
{
}
-#endif /* !DBUG_OFF */
+#endif /* !MYODBC_DBG */
my_bool is_minimum_version(const char *server_version,const char *version,
Modified: trunk/scripts/myodbc3.spec.sh
===================================================================
--- trunk/scripts/myodbc3.spec.sh 2007-07-18 19:43:47 UTC (rev 594)
+++ trunk/scripts/myodbc3.spec.sh 2007-07-18 22:09:49 UTC (rev 595)
@@ -127,13 +127,16 @@
# ----------------------------------------------------------------------
# REGISTER DRIVER
+# Note that "-e" is not working for drivers currently, so we have to
+# deinstall before reinstall to change anything
# ----------------------------------------------------------------------
%post
myodbc3i -a -d -t"MySQL ODBC 3.51 Driver;DRIVER=%{_libdir}/libmyodbc3.so"
%post setup
-myodbc3i -a -e -t"MySQL ODBC 3.51
Driver;DRIVER=%{_libdir}/libmyodbc3.so;SETUP=%{_libdir}/libmyodbc3S.so"
+myodbc3i -r -d -n"MySQL ODBC 3.51 Driver"
+myodbc3i -a -d -t"MySQL ODBC 3.51
Driver;DRIVER=%{_libdir}/libmyodbc3.so;SETUP=%{_libdir}/libmyodbc3S.so"
# ----------------------------------------------------------------------
# DEREGISTER DRIVER
@@ -145,6 +148,7 @@
# Removing the setup RPM, downgrade the registration
%preun setup
+myodbc3i -r -d -n"MySQL ODBC 3.51 Driver"
myodbc3i -a -d -t"MySQL ODBC 3.51 Driver;DRIVER=%{_libdir}/libmyodbc3.so"
##############################################################################
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r595 - in trunk: . cmake driver scripts | kboortz | 19 Jul |