Skip to content

Commit 24bc60e

Browse files
committed
- Removed "-GA" from CONNECTOR_LEVEL, we don't want it in the MSI package name
- Added PROJECT(MSI), to make sure CMAKE_SIZEOF_VOID_P is initiated - Removed the bundling of the Microsoft redistributable library
1 parent e6d026b commit 24bc60e

File tree

3 files changed

+2
-49
lines changed

3 files changed

+2
-49
lines changed

VersionInfo.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
SET(CONNECTOR_MAJOR "1")
2626
SET(CONNECTOR_MINOR "1")
2727
SET(CONNECTOR_PATCH "4")
28-
SET(CONNECTOR_LEVEL "-GA")
28+
SET(CONNECTOR_LEVEL "") # "-alpha", "-beta", empty if GA
2929
SET(CONNECTOR_QUALITY "GA")
3030

3131
# Bump this every time we change the API/ABI

win/CMakeLists.txt

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2323
#
2424

25+
PROJECT(MSI)
2526

2627
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
2728

@@ -36,52 +37,8 @@ IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
3637
SET(CONNECTOR_DEFAULT_DEST "ProgramFiles64Folder")
3738
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8)
3839

39-
4040
INCLUDE("config.cmake")
4141

42-
43-
#####################################
44-
# Looking for ms redistributable libs
45-
46-
SET(THE_MACHINE "x86")
47-
SET(CRT_VERSION "90")
48-
49-
SET(MSVCRTX_REDIST_DIR "$ENV{VCINSTALLDIR}\\redist")
50-
51-
EXECUTE_PROCESS(COMMAND "dumpbin" "/DEPENDENTS" "${CMAKE_SOURCE_DIR}/../driver/RelWithDebInfo/mysqlcppconn.dll"
52-
OUTPUT_VARIABLE CPPLIB_DEPENDENCIES
53-
)
54-
55-
IF(${CPPLIB_DEPENDENCIES} MATCHES ".*MSVC.([0-9]+)[.]dll.*")
56-
STRING(REGEX REPLACE ".*MSVC.([0-9]+)[.]dll.*" "\\1" CRT_VERSION "${CPPLIB_DEPENDENCIES}")
57-
ENDIF(${CPPLIB_DEPENDENCIES} MATCHES ".*MSVC.([0-9]+)[.]dll.*")
58-
59-
STRING(REGEX MATCHALL "(MSVC.[0-9][0-9][.]dll)" DEPENDENTS "${CPPLIB_DEPENDENCIES}")
60-
61-
62-
# MESSAGE("${CRT_VERSION} ${MSVCRTX_REDIST_DIR} ${DEPENDENTS} ${MACHINE}")
63-
64-
FOREACH(_dir $ENV{LIB})
65-
# MESSAGE("${_dir}")
66-
# $ENV{VCINSTALLDIR}
67-
IF(${_dir} MATCHES ".+[\\]VC[\\]LIB[\\]([^\\]+)$")
68-
STRING(REGEX REPLACE ".+[\\]LIB[\\]([^\\]+)$" "\\1" THE_MACHINE "${_dir}")
69-
#MESSAGE("======= Have match for machine")
70-
ENDIF(${_dir} MATCHES ".+[\\]VC[\\]LIB[\\]([^\\]+)$")
71-
ENDFOREACH(_dir $ENV{LIB})
72-
73-
# MESSAGE("-=${THE_MACHINE}=-")
74-
75-
SET(REQUIRED_REDISTRIBUTABLE_LIBS "")
76-
SET(counter "1")
77-
FOREACH(arg ${DEPENDENTS})
78-
MESSAGE(STATUS "Adding found dependency lib: ${THE_MACHINE}\\${arg}")
79-
SET(REQUIRED_REDISTRIBUTABLE_LIBS "${REQUIRED_REDISTRIBUTABLE_LIBS}
80-
<File Id=\"file016${counter}\" Name=\"${arg}\" LongName=\"${arg}\" Source=\"${MSVCRTX_REDIST_DIR}\\${THE_MACHINE}\\Microsoft.VC${CRT_VERSION}.CRT\\${arg}\" />")
81-
82-
MATH( EXPR counter "${counter} + 1" )
83-
ENDFOREACH(arg ${DEPENDENTS})
84-
8542
SET(CONNECTOR_PRODUCT_DEST "MySQL Connector C++ ${CONNECTOR_PRODUCT_VERSION}")
8643

8744
# Generate GUID

win/mysql-conncpp-msi-template.xml.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ already installed." />
9191
<File Id="file0151" Name="mycppcon.lib" LongName="mysqlcppconn.lib" Source="..\driver\relwithdebinfo\mysqlcppconn.lib" />
9292
<File Id="file0152" Name="mycpstat.lib" LongName="mysqlcppconn-static.lib" Source="..\driver\relwithdebinfo\mysqlcppconn-static.lib" />
9393
</Component>
94-
<Component Id="MSRedistributables" Guid="e50ed3bb-e5bd-42b5-9029-9ca2356fd0f3" DiskId="1">
95-
@REQUIRED_REDISTRIBUTABLE_LIBS@
96-
</Component>
9794
</Directory>
9895
</Directory>
9996

@@ -109,7 +106,6 @@ already installed." />
109106
<ComponentRef Id="IncludeFiles" />
110107
<ComponentRef Id="CppconnIncludes" />
111108
<ComponentRef Id="ClientLibraryRelease" />
112-
<ComponentRef Id="MSRedistributables" />
113109

114110
<Feature Id="DebugLibraries" Title="Debug Libary" Description="Debug library and symbols." Level="1000">
115111
<ComponentRef Id="ClientLibraryDebug" />

0 commit comments

Comments
 (0)