Added:
branches/guffert/wingui/CMakeLists.txt
branches/guffert/wingui/ConfigDSN.c
branches/guffert/wingui/myodbc5S.def
Modified:
branches/guffert/wingui/odbcdialogparams/main.cpp
Log:
add CMake build for wingui
create .def for exports
create ConfigDSN.c to house common functionality for calling platform GUI
Added: branches/guffert/wingui/CMakeLists.txt
===================================================================
--- branches/guffert/wingui/CMakeLists.txt 2007-10-17 04:36:24 UTC (rev 822)
+++ branches/guffert/wingui/CMakeLists.txt 2007-10-17 04:49:28 UTC (rev 823)
@@ -0,0 +1,53 @@
+# Copyright (C) 1995-2007 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of version 2 of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# There are special exceptions to the terms and conditions of the GPL
+# as it is applied to this software. View the full text of the exception
+# in file LICENSE.exceptions in the top-level directory of this software
+# distribution.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+##########################################################################
+
+ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
+
+ADD_LIBRARY(myodbc5S SHARED
+ dialog/callbacks.cpp
+ dialog/callbacks.h
+ dialog/dialog.cpp
+ dialog/dialog.h
+ dialog/stdafx.cpp
+ dialog/stdafx.h
+ dialog/utils.cpp
+ dialog/utils.h
+ odbcdialogparams/main.cpp
+ odbcdialogparams/myString.cpp
+ odbcdialogparams/myString.h
+ odbcdialogparams/odbcdialogparams.cpp
+ odbcdialogparams/odbcdialogparams.h
+ odbcdialogparams/odbcdialogparams.rc
+ odbcdialogparams/TabCtrl.cpp
+ odbcdialogparams/TabCtrl.h
+ odbcdialogparams/tooltip.cpp
+ odbcdialogparams/connector_odbc_header.bmp
+ ConfigDSN.c
+ myodbc5S.def
+ )
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/util)
+
+TARGET_LINK_LIBRARIES(myodbc5S
+ myodbc3u ${ODBCLIB} ${ODBCINSTLIB} ${MYSQL_CLIENT_LIBS}
+ comctl32 ws2_32)
+
Added: branches/guffert/wingui/ConfigDSN.c
===================================================================
--- branches/guffert/wingui/ConfigDSN.c 2007-10-17 04:36:24 UTC (rev 822)
+++ branches/guffert/wingui/ConfigDSN.c 2007-10-17 04:49:28 UTC (rev 823)
@@ -0,0 +1,58 @@
+/* Copyright (C) 2000-2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ There are special exceptions to the terms and conditions of the GPL as it
+ is applied to this software. View the full text of the exception in file
+ EXCEPTIONS in the directory of this software distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include "installer.h"
+
+/* Add, edit, or remove a Data Source Name (DSN). */
+BOOL INSTAPI ConfigDSNW(HWND hWnd, WORD nRequest, LPCWSTR pszDriver,
+ LPCWSTR pszAttributes)
+{
+ DataSource *ds= ds_new();
+
+ if (ds_from_kvpair(ds, pszAttributes, (SQLWCHAR)';'))
+ {
+ SQLPostInstallerError(ODBC_ERROR_INVALID_KEYWORD_VALUE,
+ /* TODO can't be long string */
+ L"Invalid attribute string");
+ goto exitConfigDSN;
+ }
+
+ switch ( nRequest )
+ {
+#if 0
+ case ODBC_ADD_DSN:
+ /*bReturn = MYODBCSetupConfigDSNAdd( hWnd, pDataSource );*/
+ break;
+ case ODBC_CONFIG_DSN:
+ bReturn = MYODBCSetupConfigDSNEdit( hWnd, pDataSource );
+ break;
+ case ODBC_REMOVE_DSN:
+ bReturn = MYODBCSetupConfigDSNRemove( pDataSource );
+ break;
+ default:
+ SQLPostInstallerError( ODBC_ERROR_INVALID_REQUEST_TYPE, "Invalid request." );
+#endif
+ }
+
+exitConfigDSN:
+ ds_delete(ds);
+ return TRUE;
+}
+
Added: branches/guffert/wingui/myodbc5S.def
===================================================================
--- branches/guffert/wingui/myodbc5S.def 2007-10-17 04:36:24 UTC (rev 822)
+++ branches/guffert/wingui/myodbc5S.def 2007-10-17 04:49:28 UTC (rev 823)
@@ -0,0 +1,4 @@
+LIBRARY MYODBC5S.DLL
+EXPORTS
+ConfigDSNW
+;
Modified: branches/guffert/wingui/odbcdialogparams/main.cpp
===================================================================
--- branches/guffert/wingui/odbcdialogparams/main.cpp 2007-10-17 04:36:24 UTC (rev 822)
+++ branches/guffert/wingui/odbcdialogparams/main.cpp 2007-10-17 04:49:28 UTC (rev 823)
@@ -1,3 +1,5 @@
+#include <winsock2.h>
+#include "mysql.h"
#include "stdafx.h"
#include "resource.h"
@@ -15,6 +17,7 @@
{
if ( ul_reason_for_call == DLL_PROCESS_ATTACH )
{
+ my_init();
InitCommonControls();
ghInstance = hModule;
WNDCLASSEX wcx;
@@ -31,8 +34,9 @@
if (!RegisterClassEx(&wcx) )
return 0;
}
- else if ( ul_reason_for_call = DLL_PROCESS_DETACH )
+ else if ( ul_reason_for_call == DLL_PROCESS_DETACH )
{
+ my_end(0);
UnregisterClass(className,ghInstance);
}
@@ -41,4 +45,4 @@
#ifdef _MANAGED
#pragma managed(pop)
-#endif
\ No newline at end of file
+#endif
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r823 - in branches/guffert/wingui: . odbcdialogparams | jbalint | 17 Oct |