This section explains how to compile and build the software and how to get a development environment running.
msbuildreorder is only available for the Windows platform and has been tested with the following version of Windows:
- Windows XP
- Windows Vista
- Windows 7
The following software must be installed on the system for compiling source code:
- Visual Studio 2010 (or newer)
- Google C++ Testing Framework v1.6.0 (untested with other versions)
- CMake for compilation of Google C++ Testing Framework. (Tested with CMake 3.9.6)
- msbuildreorder source code
The following software must be installed on the system for building the deploy packages:
- 7-Zip for building the win32 portable package. Tested with version 9.20.
- NSIS (Nullsoft Scriptable Install System) for building Windows Self-Extracting Setup Installer (setup.exe). Tested with version 3.0a1.
-
Download googletest source code to your computer using one of the following:
- Download googletest as a zip file and extract to a temporary directory (for example c:\projects\third_party\googletest).
- Clone the git repository using the following commands:
- git clone https://github.com/google/googletest.git c:\projects\third_party\googletest
- cd /d c:\projects\third_party\googletest
- git checkout release-1.6.0
-
Generate googletest Visual Studio 2010 solution using cmake. Enter the following commands:
- cd c:\projects\third_party\googletest
- mkdir msvc2010
- cd msvc2010
- cmake -G "Visual Studio 10 2010" -Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS_DEBUG=/MDd -DCMAKE_CXX_FLAGS_RELEASE=/MD "c:\projects\third_party\googletest"
-
Open the generated Visual Studio 2010 solution file located in c:\projects\third_party\googletest\msvc2010\gtest.sln
-
Build the solution.
Note: this step need to be executed once.
msbuildreorder needs to know where the libraries of googletest are located (debug & release). Define the following environement variables:
| Name | Value |
|---|---|
| GTEST_DEBUG_LIBRARIES | gtest.lib |
| GTEST_RELEASE_LIBRARIES | gtest.lib |
| GTEST_INCLUDE | c:\projects\third_party\googletest\include |
| GTEST_LIBRARY_DIR | c:\projects\third_party\googletest\msvc2010 |
-
Download the msbuildreorder source code and extract the content to a temporary directory (for example c:\projects\msbuildreorder).
-
Open the Visual Studio 2010 solution file located in c:\projects\msbuildreorder\msvc\msbuildreorder.sln
-
Build the solution.
The application support two types of deploy package:
- Portable (*.zip)
- Self-Extracting Setup Installer (setup.exe).
The installer packages are automatically build from the Visual Studio 2010 solution. See the 'install' project.
To manually build the installer packages execute the following steps:
-
Open the Visual Studio 2010 solution file located in c:\projects\msbuildreorder\msvc\msbuildreorder.sln
-
Build the solution in 'Release' configuration.
-
Nagivate to the 'nsis' folder.
-
Run 'build_portable.bat' to build the portable installer or run 'build_setup.bat' to build the setup installer.
-
The packages will be generated in the 'nsis/bin' folder.