diff options
author | Jose <jose@zeroc.com> | 2016-02-26 20:46:27 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-02-26 20:46:27 +0100 |
commit | 62cba8cd46a535585a4422daab489f114feab6f3 (patch) | |
tree | c77e9cec24a570b06024a3c6a1552b8e6eb20ec6 /cpp/BuildInstructionsWindows.md | |
parent | updating changelog for ICE-6844 (diff) | |
download | ice-62cba8cd46a535585a4422daab489f114feab6f3.tar.bz2 ice-62cba8cd46a535585a4422daab489f114feab6f3.tar.xz ice-62cba8cd46a535585a4422daab489f114feab6f3.zip |
Windows msbuild build updates
Diffstat (limited to 'cpp/BuildInstructionsWindows.md')
-rw-r--r-- | cpp/BuildInstructionsWindows.md | 114 |
1 files changed, 81 insertions, 33 deletions
diff --git a/cpp/BuildInstructionsWindows.md b/cpp/BuildInstructionsWindows.md index 3305fa36d72..fd6031869b1 100644 --- a/cpp/BuildInstructionsWindows.md +++ b/cpp/BuildInstructionsWindows.md @@ -14,6 +14,9 @@ unnecessary. Ice was extensively tested using the operating systems and compiler versions listed for our [supported platforms][2]. +The build requires the [Ice Builder for Visual Studio][8], you must install +version 4.2.0 or greater to build Ice. + ### Third-Party Libraries Ice has dependencies on a number of third-party libraries: @@ -28,57 +31,70 @@ You do not need to build these packages yourself, as ZeroC supplies The Ice build system for Windows downloads and installs Nuget and these Nuget packages when you build Ice for C++. The third-party packages -are installed in the ``ice/cpp/third-party-packages`` folder. +are installed in the ``ice/cpp/msbuild/packages`` folder. ## Building Ice -Open a command prompt that is configured for your target architecture. For -example, when using Visual Studio 2013, you have several alternatives: +Open a command prompt for example, when using Visual Studio 2015, you have +several alternatives: -- Developer Command Prompt -- VS2013 x86 Native Tools Command Prompt -- VS2013 x64 Native Tools Command Prompt -- VS2013 x64 Cross Tools Command Prompt +- VS2015 x86 Native Tools Command Prompt +- VS2015 x64 Native Tools Command Prompt -Using the first two configurations produces 32-bit binaries, while the third and -fourth configurations produce 64-bit binaries. +Using the first configurations produces 32-bit binaries, while the second +configurations produce 64-bit binaries. In the command window, change to the `cpp` subdirectory: cd cpp -Edit `config\Make.rules.mak` to establish your build configuration. The comments -in the file provide more information. - Now you're ready to build Ice: - nmake /f Makefile.mak + Msbuild msbuild\ice.proj + +This will build the Ice for C++ developer kit and the Ice for C++ test suite. + +When using Visual Studio 2015 it will also build Ice for UWP (Universal Windows +Platform) and Ice for UWP test suite. + +The build will create debug libraries and binaries for the default platform. If you +want to build release libraries and binaries you can do so by setting the Msbuild +`Configuration` property to `Release`: + + MSbuild msbuild\ice.proj /p:Configuration=Release -This will build the Ice core libraries, services, and tests. + The supported values for the Configuration property are `Debug` and `Release` -### x64 Platform +If you wan to build libraries and binaries for a different platform you need to +set the MSbuild `Platform` property, Ice for C++ supports `Win32` and `x64` platforms, +with Ice for UWP there is Additionally support for `ARM` platform. -Building Ice for x64 with Visual Studio is like building Ice for x86. You just need to -perform the build in an "x64 Command Prompt", and not in a regular "Developer Command Prompt". +For example to build release binaries and libraries for Windows `x64` platform use: -### C++11 mapping + MSbuild msbuild\ice.proj /p:Configuration=Release /p:Platform=x64 -The C++ source tree supports two different language mappings (C++98 and C++11), -the default build uses the C++98 map. The C++11 mapping is a new mapping that -uses the new language features. +To build Ice for UWP debug libraries for `ARM` platform use: -To build the new C++11 mapping, set the environment variable `CPP11_MAPPING` to -yes, as shown below: + MSbuild msbuild\ice.proj /p:Configuration=Debug /p:Platform=ARM - set CPP11_MAPPING=yes +If you want to skip building the test suite you can use the `BuildDist` MSbuild +target: -## Installing a C++ Source Build + MSbuild msbuild\ice.proj /t:BuildDist /p:Configuration=Release /p:Platform=x64 -Simply run `nmake /f Makefile.mak install`. This will install Ice in the -directory specified by the `prefix` variable in `config\Make.rules.mak`. +It is also possible to build all supported platforms and configurations at once, +with the following command: -If you built a 64-bit version of Ice, the binaries are installed in the -`bin\x64` directory and the libraries are installed in the `lib\x64` directory. + MSbuild msbuild\ice.proj /p:BuildAllConfigurations=yes + +## Nuget packages + +To create a Nuget package for the distribution use the following command: + + MSbuild msbuild\ice.proj /t:NugetPack /p:BuildAllConfigurations=yes + +This will create a ice.v120.nuckpkg or ice.v140.nuckpkg depending of the +compiler version you are using to build the package. ## Running the Test Suite @@ -89,15 +105,46 @@ require the Python module `passlib`, which you can install with the command: After a successful source build, you can run the tests as follows: - python allTests.py - -For C++11 mapping you need to use the`--c++11` argument: + python allTests.py --mode=debug --x86 + +For C++11 mapping you need to use the `--c++11` argument: - $ python allTests.py --c++11 + $ python allTests.py --mode=debug --x86 --c++11 If everything worked out, you should see lots of `ok` messages. In case of a failure, the tests abort with `failed`. +## Running the Universal Windows Platform Test Suite + +In Visual Studio 2015, open the solution file: + + cpp\msbuild\ice.testuwp.sln + +Now select the configuration that matches the settings that you used to build +Ice for UWP. + +To run the UWP Test suite application you can deploy the application using "Deploy +Solution" in the "Build" menu. Once deployed, you can start the application from +the Start Menu by clicking the "Ice Test Suite" icon. + +In the test suite application, selecting "uwp" for the Server field allows you +to run tests with TCP and WS protocols supported by the UWP server side. + +You can also use C++, C# or Java servers to run the tests, which allows you to +use additional SSL and WSS protocols. + +To use servers from C++, C# or Java language mappings, you need to build the +tests for the desired language mapping. + +The test controller server is implemented in Java. Refer to the build +instructions in java subdirectory for information on building the test +controller. Use the following command to start the test controller: + + > python scripts/TestController.py + +In the "Ice Test Suite" Windows Store application, select the Server language +mapping and Protocol you want to use. + [1]: https://zeroc.com/download.html [2]: https://doc.zeroc.com/display/Ice37/Supported+Platforms+for+Ice+3.7.0 [3]: http://bzip.org @@ -105,3 +152,4 @@ failure, the tests abort with `failed`. [5]: http://symas.com/mdb/ [6]: https://github.com/zeroc-ice/mcpp [7]: https://www.nuget.org +[8]: https://github.com/zeroc-ice/ice-builder-visualstudio |