Commit 58c6165e authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Use our libmysql.dll with Heidi, if we compile 32 bit

parent 02dabe35
...@@ -114,6 +114,7 @@ IF(WITH_THIRD_PARTY) ...@@ -114,6 +114,7 @@ IF(WITH_THIRD_PARTY)
ENDIF() ENDIF()
ENDIF() ENDIF()
GET_TARGET_PROPERTY(LIBMYSQL_LOCATION libmysql LOCATION)
FOREACH(third_party ${WITH_THIRD_PARTY}) FOREACH(third_party ${WITH_THIRD_PARTY})
SET(third_party_install_plugin ${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake) SET(third_party_install_plugin ${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake)
IF(NOT EXISTS ${third_party_install_plugin}) IF(NOT EXISTS ${third_party_install_plugin})
......
...@@ -26,8 +26,14 @@ SET(EXTRA_WIX_PREPROCESSOR_FLAGS "@EXTRA_WIX_PREPROCESSOR_FLAGS@") ...@@ -26,8 +26,14 @@ SET(EXTRA_WIX_PREPROCESSOR_FLAGS "@EXTRA_WIX_PREPROCESSOR_FLAGS@")
SET(WITH_THIRD_PARTY "@WITH_THIRD_PARTY@") SET(WITH_THIRD_PARTY "@WITH_THIRD_PARTY@")
SET(THIRD_PARTY_DOWNLOAD_LOCATION "@THIRD_PARTY_DOWNLOAD_LOCATION@") SET(THIRD_PARTY_DOWNLOAD_LOCATION "@THIRD_PARTY_DOWNLOAD_LOCATION@")
SET(THIRD_PARTY_FEATURE_CONDITION "@THIRD_PARTY_FEATURE_CONDITION@") SET(THIRD_PARTY_FEATURE_CONDITION "@THIRD_PARTY_FEATURE_CONDITION@")
SET(LIBMYSQL_LOCATION "@LIBMYSQL_LOCATION@")
IF(LIBMYSQL_LOCATION AND CMAKE_CFG_INTDIR)
# resolve libmysql full path
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "${CMAKE_INSTALL_CONFIG_NAME}" LIBMYSQL_LOCATION "${LIBMYSQL_LOCATION}")
ENDIF()
FOREACH(third_party ${WITH_THIRD_PARTY}) FOREACH(third_party ${WITH_THIRD_PARTY})
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake)
......
SET(HEIDISQL_BASE_NAME "HeidiSQL_6.0_Portable") SET(HEIDISQL_BASE_NAME "HeidiSQL_6.0_Portable")
SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip") SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
SET(HEIDISQL_URL "http://heidisql.googlecode.com/files/${HEIDISQL_ZIP}") SET(HEIDISQL_URL "http://heidisql.googlecode.com/files/${HEIDISQL_ZIP}")
IF(NOT EXISTS ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP}) SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})
MAKE_DIRECTORY(${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL)
MESSAGE(STATUS "Downloading ${HEIDISQL_URL} to ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP}") IF(NOT EXISTS ${HEIDISQL_DOWNLOAD_DIR}/${HEIDISQL_ZIP})
FILE(DOWNLOAD ${HEIDISQL_URL} ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP} TIMEOUT 60) MAKE_DIRECTORY(${HEIDISQL_DOWNLOAD_DIR})
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E chdir ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL MESSAGE(STATUS "Downloading ${HEIDISQL_URL} to ${HEIDISQL_DOWNLOAD_DIR}/${HEIDISQL_ZIP}")
${CMAKE_COMMAND} -E tar xfz ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP} FILE(DOWNLOAD ${HEIDISQL_URL} ${HEIDISQL_DOWNLOAD_DIR}/${HEIDISQL_ZIP} TIMEOUT 60)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E chdir ${HEIDISQL_DOWNLOAD_DIR}
${CMAKE_COMMAND} -E tar xfz ${HEIDISQL_DOWNLOAD_DIR}/${HEIDISQL_ZIP}
) )
ENDIF() ENDIF()
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
# Use our libmysql if it is 32 bit.
IF(LIBMYSQL_LOCATION)
CONFIGURE_FILE(${LIBMYSQL_LOCATION} ${HEIDISQL_DOWNLOAD_DIR}/libmysql.dll COPYONLY)
ENDIF()
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/heidisql.wxi.in ${CMAKE_CURRENT_BINARY_DIR}/heidisql.wxi) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/heidisql.wxi.in ${CMAKE_CURRENT_BINARY_DIR}/heidisql.wxi)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/heidisql_feature.wxi.in ${CMAKE_CURRENT_BINARY_DIR}/heidisql_feature.wxi) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/heidisql_feature.wxi.in ${CMAKE_CURRENT_BINARY_DIR}/heidisql_feature.wxi)
...@@ -8,28 +8,31 @@ ...@@ -8,28 +8,31 @@
Win64="no" Win64="no"
/> />
</Property> </Property>
<Icon Id='heidisql.exe' SourceFile='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\heidisql.exe' /> <DirectoryRef Id="MariaDBShared">
<DirectoryRef Id='MariaDBShared'> <Directory Id="D.HeidiSQL" Name="HeidiSQL">
<Directory Id='D.HeidiSQL' Name='HeidiSQL'> <Component Id="component.HeidiSQL" Guid="96ea3879-5320-4098-8f26-2f655d2f716c" Win64="no">
<Component Id='component.HeidiSQL' Guid='96ea3879-5320-4098-8f26-2f655d2f716c' Win64='no'> <RemoveFile Id="PurgeAppFolder" Name="*.*" On="uninstall" />
<File Id='heidisql.gpl.txt' Name='gpl.txt' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\gpl.txt' /> <File Id="heidisql.gpl.txt" Name="gpl.txt" Source="${HEIDISQL_DOWNLOAD_DIR}\gpl.txt" />
<File Id='heidisql.heidisql.exe' Name='heidisql.exe' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\heidisql.exe' KeyPath='yes'> <File Id="heidisql.heidisql.exe" Name="heidisql.exe" Source="${HEIDISQL_DOWNLOAD_DIR}\heidisql.exe" KeyPath="yes">
<Shortcut Id="desktopHeidiSQL" Directory="DesktopFolder" Name="HeidiSQL" Icon='heidisql.exe' Advertise='yes'/> <Shortcut Id="desktopHeidiSQL" Directory="DesktopFolder" Name="HeidiSQL" Advertise="yes"/>
</File> </File>
<File Id='heidisql.libmysql.dll' Name='libmysql.dll' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\libmysql.dll' /> <File Id="heidisql.license.txt" Name="license.txt" Source="${HEIDISQL_DOWNLOAD_DIR}\license.txt" />
<File Id='heidisql.license.txt' Name='license.txt' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\license.txt' /> <File Id="heidisql.readme.txt" Name="readme.txt" Source="${HEIDISQL_DOWNLOAD_DIR}\readme.txt" />
<File Id='heidisql.portable_settings.txt' Name='portable_settings.txt' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\portable_settings.txt' />
<File Id='heidisql.readme.txt' Name='readme.txt' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\readme.txt' />
</Component> </Component>
<Component Id='component.HeidiSQL_MenuShortcut' Guid='*' Win64='no'> <Component Id="component.HeidiSQL_MenuShortcut" Guid="*" Win64="no">
<RegistryValue Root="HKCU" Key="Software\@CPACK_WIX_PACKAGE_NAME@\Uninstall" Name="shortcuts.heidisql" Value="1" Type="string" KeyPath="yes" /> <RegistryValue Root="HKCU" Key="Software\@CPACK_WIX_PACKAGE_NAME@\Uninstall" Name="shortcuts.heidisql" Value="1" Type="string" KeyPath="yes" />
<Shortcut Id="startmenuHeidiSQL" Directory="ShortcutFolder" Name="HeidiSQL" Target='[D.HeidiSQL]\heidisql.exe'/> <Shortcut Id="startmenuHeidiSQL" Directory="ShortcutFolder" Name="HeidiSQL" Target="[D.HeidiSQL]\heidisql.exe"/>
<RemoveRegistryKey Id="HeidiSQL_RegistryCleanup" Root="HKCU" Key="SOFTWARE\HeidiSQL" Action="removeOnUninstall" />
</Component>
<Component Id="component.HeidiSQL_libmysql.dll" Guid="*" Win64="no">
<File Id="heidisql.libmysql.dll" Name="libmysql.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libmysql.dll" />
</Component> </Component>
</Directory> </Directory>
</DirectoryRef> </DirectoryRef>
<ComponentGroup Id='HeidiSQL'> <ComponentGroup Id="HeidiSQL">
<ComponentRef Id='component.HeidiSQL'/> <ComponentRef Id="component.HeidiSQL"/>
<ComponentRef Id='component.HeidiSQL_MenuShortcut'/> <ComponentRef Id="component.HeidiSQL_MenuShortcut"/>
<ComponentRef Id="component.HeidiSQL_libmysql.dll"/>
</ComponentGroup> </ComponentGroup>
</Include> </Include>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment