You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2014/08/15 23:08:46 UTC

git commit: THRIFT-2667 create Windows Installer via CPack

Repository: thrift
Updated Branches:
  refs/heads/master dace6937a -> 8720260e3


THRIFT-2667 create Windows Installer via CPack

Signed-off-by: Roger Meier <ro...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/8720260e
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/8720260e
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/8720260e

Branch: refs/heads/master
Commit: 8720260e39c730be6803a17192b533e3fe6bcbf8
Parents: dace693
Author: Roger Meier <ro...@apache.org>
Authored: Fri Aug 15 22:16:02 2014 +0200
Committer: Roger Meier <ro...@apache.org>
Committed: Fri Aug 15 23:07:12 2014 +0200

----------------------------------------------------------------------
 compiler/cpp/CMakeLists.txt    | 28 ++++++++++++++++++++++++++--
 compiler/cpp/README.md         |  5 +++++
 contrib/Vagrantfile            |  2 +-
 contrib/installDependencies.sh |  2 +-
 doc/install/debian.md          |  2 +-
 5 files changed, 34 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/8720260e/compiler/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt
index 152e5db..43c37cc 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)

http://git-wip-us.apache.org/repos/asf/thrift/blob/8720260e/compiler/cpp/README.md
----------------------------------------------------------------------
diff --git a/compiler/cpp/README.md b/compiler/cpp/README.md
index 7e74b89..3c40809 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
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/8720260e/contrib/Vagrantfile
----------------------------------------------------------------------
diff --git a/contrib/Vagrantfile b/contrib/Vagrantfile
index 5eec59f..c99719c 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
 # ---

http://git-wip-us.apache.org/repos/asf/thrift/blob/8720260e/contrib/installDependencies.sh
----------------------------------------------------------------------
diff --git a/contrib/installDependencies.sh b/contrib/installDependencies.sh
index 343ea7e..d52c0fa 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

http://git-wip-us.apache.org/repos/asf/thrift/blob/8720260e/doc/install/debian.md
----------------------------------------------------------------------
diff --git a/doc/install/debian.md b/doc/install/debian.md
index 6b8b3d3..a05afcc 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