From e178b0acd7573c0ac5afaad36ebc97cbe6ddf678 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Mon, 11 Oct 2010 14:46:38 +0000 Subject: QPID-2863 Propagate WinSDK Build Version numbers to the Messaging .NET Binding Rooted at qpid/, this patch propagates the Windows version numbers to the .NET Binding DLLs. The changes can be summarized: 1. The files that hold the version numbers are renamed to templates and are edited to hold the version number CMake variable names. 2. CMake calls configure_file twice to put the version numbers into the generated files. 3. The projects that use these files are steered to use the generated source. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1021361 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org.apache.qpid.messaging.template.rc | 101 +++++++++++++++++++++ .../dotnet/src/org.apache.qpid.messaging.vcproj | 2 +- .../sessionreceiver-AssemblyInfo-template.cs | 55 +++++++++++ ...rg.apache.qpid.messaging.sessionreceiver.csproj | 4 +- qpid/cpp/src/CMakeLists.txt | 11 ++- 5 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc create mode 100644 qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/sessionreceiver-AssemblyInfo-template.cs diff --git a/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc b/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc new file mode 100644 index 0000000000..e0607fabd8 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc @@ -0,0 +1,101 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource1.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource1.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION ${winver_FILE_VERSION_N1},${winver_FILE_VERSION_N2},${winver_FILE_VERSION_N3},${winver_FILE_VERSION_N4} + PRODUCTVERSION ${winver_PRODUCT_VERSION_N1},${winver_PRODUCT_VERSION_N2},${winver_PRODUCT_VERSION_N3},${winver_PRODUCT_VERSION_N4} + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "org.apache.qpid.messaging" + VALUE "FileVersion", "${winver_FILE_VERSION_N1}, ${winver_FILE_VERSION_N2}, ${winver_FILE_VERSION_N3}, ${winver_FILE_VERSION_N4}" + VALUE "InternalName", "org.apache.qpid.messaging" + VALUE "LegalCopyright", "" + VALUE "OriginalFilename", "org.apache.qpid.messaging" + VALUE "ProductName", "org.apache.qpid.messaging" + VALUE "ProductVersion", "${winver_PRODUCT_VERSION_N1}, ${winver_PRODUCT_VERSION_N2}, ${winver_PRODUCT_VERSION_N3}, ${winver_PRODUCT_VERSION_N4}" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj b/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj index 22c66794f2..cedff6b906 100644 --- a/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj +++ b/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.vcproj @@ -614,7 +614,7 @@ > + Debug @@ -102,7 +102,7 @@ - + diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index 2be11a7478..e52ccb6777 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -589,9 +589,18 @@ if (CMAKE_SYSTEM_NAME STREQUAL Windows) add_definitions(/D "_WIN32_WINNT=0x0501") endif (MSVC80) - # set the RelWithDebInfo compile/link switchs to equal Release + # set the RelWithDebInfo compile/link switches to equal Release set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /O2 /Ob2 /D NDEBUG") set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/debug /INCREMENTAL:NO") + + # Set the windows version for the .NET Binding cpp project + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc + ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/org.apache.qpid.messaging.rc) + + # Set the windows version for the .NET Binding sessionreceiver project + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/sessionreceiver/properties/sessionreceiver-AssemblyInfo-template.cs + ${CMAKE_CURRENT_BINARY_DIR}/windows/generated_src/sessionreceiver-AssemblyInfo.cs) + endif (MSVC) set (qpidtypes_platform_SOURCES -- cgit v1.2.1