diff options
author | Roger Meier <roger@apache.org> | 2014-08-15 22:16:02 +0200 |
---|---|---|
committer | Roger Meier <roger@apache.org> | 2014-08-15 23:07:12 +0200 |
commit | 8720260e39c730be6803a17192b533e3fe6bcbf8 (patch) | |
tree | 09d908dc2c1dee82c4d4d3b5c1e353eb5d632b36 | |
parent | dace6937a7c1f53c45c005f0d5d6e2851b656da6 (diff) | |
download | thrift-8720260e39c730be6803a17192b533e3fe6bcbf8.tar.gz |
THRIFT-2667 create Windows Installer via CPack
Signed-off-by: Roger Meier <roger@apache.org>
-rw-r--r-- | compiler/cpp/CMakeLists.txt | 28 | ||||
-rw-r--r-- | compiler/cpp/README.md | 5 | ||||
-rw-r--r-- | contrib/Vagrantfile | 2 | ||||
-rwxr-xr-x | contrib/installDependencies.sh | 2 | ||||
-rw-r--r-- | doc/install/debian.md | 2 |
5 files changed, 34 insertions, 5 deletions
diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt index 152e5db45..43c37cc41 100644 --- a/compiler/cpp/CMakeLists.txt +++ b/compiler/cpp/CMakeLists.txt @@ -147,6 +147,30 @@ add_executable(thrift ${thrift_SOURCES}) target_link_libraries(thrift libparse) -if(NOT WIN32) - install(TARGETS thrift DESTINATION bin) +install(TARGETS thrift DESTINATION bin) + +# create a Distribution Package for the Apache Thrift Compiler +set(CPACK_PACKAGE_NAME "Apache Thrift") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Thrift Compiler") +set(CPACK_PACKAGE_VENDOR "Apache Software Foundation" ) +set(CPACK_PACKAGE_CONTACT "dev@thrift.apache.org") +set(CPACK_PACKAGE_VERSION ${thrift_VERSION}) +set(CPACK_PACKAGE_VERSION_MAJOR ${thrift_VERSION_MAJOR} ) +set(CPACK_PACKAGE_VERSION_MINOR ${thrift_VERSION_MINOR} ) +set(CPACK_PACKAGE_VERSION_PATCH ${thrift_VERSION_PATCH} ) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../../LICENSE") + +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(CPACK_GENERATOR "NSIS") + set(CPACK_NSIS_HELP_LINK "http://thrift.apache.org") + set(CPACK_NSIS_MENU_LINKS + "http://thrift.apache.org" "Apache Thrift - Web Site" + "https://issues.apache.org/jira/browse/THRIFT" "Apache Thrift - Issues") + set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT}) + set(CPACK_NSIS_MODIFY_PATH "ON") + set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) +else() + set(CPACK_GENERATOR "DEB" ) + set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT}) endif() +include(CPack) diff --git a/compiler/cpp/README.md b/compiler/cpp/README.md index 7e74b89f9..3c40809ca 100644 --- a/compiler/cpp/README.md +++ b/compiler/cpp/README.md @@ -23,7 +23,12 @@ Now open the folder build_ec using eclipse. cmake -DCMAKE_TOOLCHAIN_FILE=../../../contrib/mingw32-toolchain.cmake .. make +### Generate a Windows Installer Package of the Apache Thrift Compiler + cmake -DCMAKE_TOOLCHAIN_FILE=../../../contrib/mingw32-toolchain.cmake -DTHRIFT_COMPILER_HS=OFF .. + cpack + +Haskell uses C++ features not supported by mingw32 such as auto or nullptr, that's why we disable it. ## Build on windows diff --git a/contrib/Vagrantfile b/contrib/Vagrantfile index 5eec59f94..c99719c15 100644 --- a/contrib/Vagrantfile +++ b/contrib/Vagrantfile @@ -78,7 +78,7 @@ sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 # CSharp sudo apt-get install -qq mono-gmcs mono-devel libmono-system-web2.0-cil -sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime +sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime nsis # Customize the system # --- diff --git a/contrib/installDependencies.sh b/contrib/installDependencies.sh index 343ea7e81..d52c0fa42 100755 --- a/contrib/installDependencies.sh +++ b/contrib/installDependencies.sh @@ -66,4 +66,4 @@ sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 # CSharp sudo apt-get install -qq mono-gmcs mono-devel libmono-system-web2.0-cil -sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime +sudo apt-get install -qq mingw32 mingw32-binutils mingw32-runtime nsis diff --git a/doc/install/debian.md b/doc/install/debian.md index 6b8b3d3c3..a05afcc58 100644 --- a/doc/install/debian.md +++ b/doc/install/debian.md @@ -30,7 +30,7 @@ Some other packages depend on what languages you want Thrift to support. * Haskell * ghc6 cabal-install libghc6-binary-dev libghc6-network-dev libghc6-http-dev * Thrift Compiler for Windows - * mingw32 mingw32-binutils mingw32-runtime + * mingw32 mingw32-binutils mingw32-runtime nsis ## Additional reading |