Skip to content
Permalink
Browse files

Packaging of GnuTls lib if C/C is built using it

Packaging on windows only (into msi file)
  • Loading branch information...
lawrinn committed Aug 2, 2019
1 parent 099581a commit af6d55c7141ef29c4b0540aa0d911a8b7b39cec3
Showing with 22 additions and 1 deletion.
  1. +10 −1 wininstall/CMakeLists.txt
  2. +12 −0 wininstall/mariadb_odbc.xml.in
@@ -17,6 +17,8 @@ SET(PRODUCT_NAME "MariaDB ODBC Driver")
SET(PRODUCT_MANUFACTURER "MariaDB")
SET(PRODUCT_VERSION "${MARIADB_ODBC_VERSION_MAJOR}.${MARIADB_ODBC_VERSION_MINOR}.${MARIADB_ODBC_VERSION_PATCH}")

SET(TLS_LIB_BEGIN "!-- ")
SET(TLS_LIB_END " --")
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(PRODUCT_NAME "${PRODUCT_NAME} 64-bit")
SET(PLATFORM "win64")
@@ -31,6 +33,13 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(GUID_PLUGINS "9D1B41AA-CE86-4c6d-93C8-FDCD40D5D2E9")
SET(GUID_PLUGINS_DEBUG "63541EC9-9C2B-4763-8C18-03313DAE6F8E")
SET(GUID_INSTALLER_TOOLS "9FF07852-2A99-4699-A6E8-889B9745C5B9")
IF ("${WITH_SSL}" STREQUAL "GNUTLS" AND NOT "${GNUTLS_LIBRARY}" STREQUAL "")
SET(TLS_LIB_BEGIN "")
SET(TLS_LIB_END "")
SET(GUID_TLS_LIB "C8D5976A-4F30-411f-88E5-D77AFF09E444")
GET_FILENAME_COMPONENT(LIB_GNUTLS_LOCATION "${GNUTLS_LIBRARY}" DIRECTORY)
MESSAGE(STATUS "Configuring to package gnutls library from ${LIB_GNUTLS_LOCATION}")
ENDIF()
ELSE()
SET(PLATFORM "win32")
SET(IS_WIN64 "no")
@@ -57,7 +66,7 @@ ELSE()
SET(MSI_PACKAGE "mariadb-connector-odbc-${PRODUCT_VERSION}-${PLATFORM}.msi")
ENDIF()

SET(ENV{MARIADB_ODBC_MSI_PACKAGE} "${MSI_PACKAGE}" PARENT_SCOPE)
SET(ENV{MARIADB_ODBC_MSI_PACKAGE} "${MSI_PACKAGE}")

IF(WITH_SIGNCODE)
IF(EXISTS "/tools/sign.bat")
@@ -23,6 +23,7 @@
<ComponentRef Id="Driver" />
<ComponentRef Id="CcPlugins" />
<ComponentRef Id="InstallerTools" />
<@TLS_LIB_BEGIN@ComponentRef Id="TlsLib" /@TLS_LIB_END@>
</Feature>
<Feature Id="DebugFeature" Title="Debug Information" Level="2">
<ComponentRef Id="Debug" />
@@ -87,6 +88,17 @@
<Component Id="InstallerTools" Guid="@GUID_INSTALLER_TOOLS@" Directory="INSTALLFOLDER" DiskId="1" Win64="@IS_WIN64@">
<File Id="change_dsns_driver" Name="change_dsns_driver.exe" DiskId="1" Source="$(var.installer_tools_dir)/change_dsns_driver.exe" />
</Component>
<@TLS_LIB_BEGIN@Component Id="TlsLib" Guid="@GUID_TLS_LIB@" Directory="INSTALLFOLDER" DiskId="1" Win64="@IS_WIN64@">
<File Id="TlsLibFile1" Name="libgnutls-30.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libgnutls-30.dll" />
<File Id="TlsLibFile2" Name="libgcc_s_seh-1.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libgcc_s_seh-1.dll" />
<File Id="TlsLibFile3" Name="libgmp-10.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libgmp-10.dll" />
<File Id="TlsLibFile4" Name="libhogweed-4.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libhogweed-4.dll" />
<File Id="TlsLibFile5" Name="libidn2-0.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libidn2-0.dll" />
<File Id="TlsLibFile6" Name="libnettle-6.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libnettle-6.dll" />
<File Id="TlsLibFile7" Name="libp11-kit-0.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libp11-kit-0.dll" />
<File Id="TlsLibFile8" Name="libwinpthread-1.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libwinpthread-1.dll" />
<File Id="TlsLibFile9" Name="libffi-6.dll" DiskId="1" Source="@LIB_GNUTLS_LOCATION@/libffi-6.dll" />
</Component@TLS_LIB_END@>
<!-- </ComponentGroup> -->
</Fragment>
</Wix>

0 comments on commit af6d55c

Please sign in to comment.
You can’t perform that action at this time.