diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-06-01 21:14:10 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-06-01 21:14:10 +0200 |
commit | 58c6165e2809d4009aaae5b050d0a6568a7b0b29 (patch) | |
tree | d29eb7b6664be63739db2b5437ac42c9856eb9e6 /win | |
parent | 02dabe3597be3bd418c1cd28a3172a6b0cce24e3 (diff) | |
download | mariadb-git-58c6165e2809d4009aaae5b050d0a6568a7b0b29.tar.gz |
Use our libmysql.dll with Heidi, if we compile 32 bit
Diffstat (limited to 'win')
-rw-r--r-- | win/packaging/CMakeLists.txt | 1 | ||||
-rw-r--r-- | win/packaging/create_msi.cmake.in | 6 | ||||
-rw-r--r-- | win/packaging/heidisql.cmake | 20 | ||||
-rw-r--r-- | win/packaging/heidisql.wxi.in | 35 |
4 files changed, 40 insertions, 22 deletions
diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt index 8c8cca60c35..8cf4b3872da 100644 --- a/win/packaging/CMakeLists.txt +++ b/win/packaging/CMakeLists.txt @@ -114,6 +114,7 @@ IF(WITH_THIRD_PARTY) ENDIF() ENDIF() +GET_TARGET_PROPERTY(LIBMYSQL_LOCATION libmysql LOCATION) FOREACH(third_party ${WITH_THIRD_PARTY}) SET(third_party_install_plugin ${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake) IF(NOT EXISTS ${third_party_install_plugin}) diff --git a/win/packaging/create_msi.cmake.in b/win/packaging/create_msi.cmake.in index 80560a8c1f2..7c218bbf407 100644 --- a/win/packaging/create_msi.cmake.in +++ b/win/packaging/create_msi.cmake.in @@ -26,8 +26,14 @@ SET(EXTRA_WIX_PREPROCESSOR_FLAGS "@EXTRA_WIX_PREPROCESSOR_FLAGS@") SET(WITH_THIRD_PARTY "@WITH_THIRD_PARTY@") SET(THIRD_PARTY_DOWNLOAD_LOCATION "@THIRD_PARTY_DOWNLOAD_LOCATION@") 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}) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${third_party}.cmake) diff --git a/win/packaging/heidisql.cmake b/win/packaging/heidisql.cmake index c1dfb7c4cad..e96cbf54282 100644 --- a/win/packaging/heidisql.cmake +++ b/win/packaging/heidisql.cmake @@ -1,13 +1,21 @@ SET(HEIDISQL_BASE_NAME "HeidiSQL_6.0_Portable")
SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
SET(HEIDISQL_URL "http://heidisql.googlecode.com/files/${HEIDISQL_ZIP}")
-IF(NOT EXISTS ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP})
- MAKE_DIRECTORY(${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL)
- MESSAGE(STATUS "Downloading ${HEIDISQL_URL} to ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP}")
- FILE(DOWNLOAD ${HEIDISQL_URL} ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP} TIMEOUT 60)
- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E chdir ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL
- ${CMAKE_COMMAND} -E tar xfz ${THIRD_PARTY_DOWNLOAD_LOCATION}/HeidiSQL/${HEIDISQL_ZIP}
+SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})
+
+IF(NOT EXISTS ${HEIDISQL_DOWNLOAD_DIR}/${HEIDISQL_ZIP})
+ MAKE_DIRECTORY(${HEIDISQL_DOWNLOAD_DIR})
+ MESSAGE(STATUS "Downloading ${HEIDISQL_URL} to ${HEIDISQL_DOWNLOAD_DIR}/${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()
+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_feature.wxi.in ${CMAKE_CURRENT_BINARY_DIR}/heidisql_feature.wxi)
diff --git a/win/packaging/heidisql.wxi.in b/win/packaging/heidisql.wxi.in index d47d4ae67c0..3e54d34aa01 100644 --- a/win/packaging/heidisql.wxi.in +++ b/win/packaging/heidisql.wxi.in @@ -8,28 +8,31 @@ Win64="no"
/>
</Property>
-<Icon Id='heidisql.exe' SourceFile='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\heidisql.exe' />
-<DirectoryRef Id='MariaDBShared'>
- <Directory Id='D.HeidiSQL' Name='HeidiSQL'>
- <Component Id='component.HeidiSQL' Guid='96ea3879-5320-4098-8f26-2f655d2f716c' Win64='no'>
- <File Id='heidisql.gpl.txt' Name='gpl.txt' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\gpl.txt' />
- <File Id='heidisql.heidisql.exe' Name='heidisql.exe' Source='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\heidisql.exe' KeyPath='yes'>
- <Shortcut Id="desktopHeidiSQL" Directory="DesktopFolder" Name="HeidiSQL" Icon='heidisql.exe' Advertise='yes'/>
+<DirectoryRef Id="MariaDBShared">
+ <Directory Id="D.HeidiSQL" Name="HeidiSQL">
+ <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="${HEIDISQL_DOWNLOAD_DIR}\gpl.txt" />
+ <File Id="heidisql.heidisql.exe" Name="heidisql.exe" Source="${HEIDISQL_DOWNLOAD_DIR}\heidisql.exe" KeyPath="yes">
+ <Shortcut Id="desktopHeidiSQL" Directory="DesktopFolder" Name="HeidiSQL" Advertise="yes"/>
</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='${THIRD_PARTY_DOWNLOAD_LOCATION}\HeidiSQL\license.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' />
+ <File Id="heidisql.license.txt" Name="license.txt" Source="${HEIDISQL_DOWNLOAD_DIR}\license.txt" />
+ <File Id="heidisql.readme.txt" Name="readme.txt" Source="${HEIDISQL_DOWNLOAD_DIR}\readme.txt" />
</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" />
- <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>
</Directory>
</DirectoryRef>
-<ComponentGroup Id='HeidiSQL'>
- <ComponentRef Id='component.HeidiSQL'/>
- <ComponentRef Id='component.HeidiSQL_MenuShortcut'/>
+<ComponentGroup Id="HeidiSQL">
+ <ComponentRef Id="component.HeidiSQL"/>
+ <ComponentRef Id="component.HeidiSQL_MenuShortcut"/>
+ <ComponentRef Id="component.HeidiSQL_libmysql.dll"/>
</ComponentGroup>
</Include>
|