diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-08-16 19:26:42 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2017-08-16 23:04:57 +0000 |
commit | 4136bff2d0f2a805ea2b7f8b75f78ff48ec79da0 (patch) | |
tree | 33229651f97e6c19b3729d894a03a6b7f9ab1c36 | |
parent | 62d60108543bab32c4299e0aa90299975e435b64 (diff) |
CMake: Switch back to shipping README.txt on Windows.
Instead of trying to ship README.md, convert its line endings and make
sure the result is named README.txt.
Change-Id: I4e081587c73342b01633b3a31ea03068e3fc1733
Reviewed-on: https://code.wireshark.org/review/23098
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | packaging/wix/ComponentGroups.wxi | 8 |
2 files changed, 21 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9efbe0ee95..c8f3d1df13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1678,10 +1678,11 @@ if (BUILD_xxx2deb) endif() if(WIN32) - set(INSTALL_FILES README.md ${INSTALL_FILES}) set(TEXTIFY_FILES COPYING NEWS README.windows) - foreach(_text_file ${TEXTIFY_FILES}) - set(INSTALL_FILES ${CMAKE_BINARY_DIR}/${_text_file}.txt ${INSTALL_FILES}) + set(TEXTIFY_MD_FILES README.md) + foreach(_text_file ${TEXTIFY_FILES} ${TEXTIFY_MD_FILES}) + string(REGEX REPLACE ".md$" "" _out_file ${_text_file}) + set(INSTALL_FILES ${CMAKE_BINARY_DIR}/${_out_file}.txt ${INSTALL_FILES}) endforeach() else() set(INSTALL_FILES COPYING ${INSTALL_FILES}) @@ -1951,6 +1952,19 @@ if(WIN32) ${CMAKE_SOURCE_DIR}/${_text_file} ) endforeach() + foreach(_md_file ${TEXTIFY_MD_FILES}) + string(REGEX REPLACE ".md$" ".txt" _text_file ${_md_file}) + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${_text_file} + COMMAND ${POWERSHELL_COMMAND} "${CMAKE_SOURCE_DIR}/tools/textify.ps1" + -Destination ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/${_md_file} + COMMAND ${CMAKE_COMMAND} -E rename + ${CMAKE_BINARY_DIR}/${_md_file}.txt + ${CMAKE_BINARY_DIR}/${_text_file} + DEPENDS + ${CMAKE_SOURCE_DIR}/${_text_file} + ) + endforeach() endif() foreach(_install_file ${INSTALL_FILES}) diff --git a/packaging/wix/ComponentGroups.wxi b/packaging/wix/ComponentGroups.wxi index b74b97bfdc..3220eb3fee 100644 --- a/packaging/wix/ComponentGroups.wxi +++ b/packaging/wix/ComponentGroups.wxi @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Include> <!-- Wireshark --> @@ -38,8 +38,8 @@ <Component Id="cmpNEWS_txt" Guid="*"> <File Id="filNEWS_txt" KeyPath="yes" Source="$(var.Staging.Dir)\NEWS.txt" /> </Component> - <Component Id="cmpREADME_md" Guid="*"> - <File Id="filREADME_md" KeyPath="yes" Source="$(var.Staging.Dir)\README.md" /> + <Component Id="cmpREADME_txt" Guid="*"> + <File Id="filREADME_txt" KeyPath="yes" Source="$(var.Staging.Dir)\README.txt" /> </Component> <Component Id="cmpREADME_windows_txt" Guid="*"> <File Id="filREADME_windows_txt" KeyPath="yes" Source="$(var.Staging.Dir)\README.windows.txt" /> @@ -92,7 +92,7 @@ <ComponentRef Id="cmpLibwsutil_dll" /> <ComponentRef Id="cmpCOPYING_txt" /> <ComponentRef Id="cmpNEWS_txt" /> - <ComponentRef Id="cmpREADME_md" /> + <ComponentRef Id="cmpREADME_txt" /> <ComponentRef Id="cmpREADME_windows_txt" /> <ComponentRef Id="cmpAUTHORS_SHORT" /> <ComponentRef Id="cmpManuf" /> |