Skip to content

Latest commit

 

History

History
97 lines (66 loc) · 4.66 KB

01c-msvc-build.md

File metadata and controls

97 lines (66 loc) · 4.66 KB

Building the AREG SDK with Microsoft Visual Studio and MSBuild

Introduction

This guide offers a detailed process for building the AREG SDK using Microsoft Visual Studio and MSBuild. It provides quick build steps and customization options, ensuring the SDK is optimized for multithreading, Inter-Process Communication (IPC), and Object Remote Procedure Call (Object RPC).

Table of Contents

  1. Prerequisites
  2. Quick Build with MSBuild
  3. Customizing Your Build with MSBuild

1. Prerequisites

To build the AREG SDK with MSBuild in Microsoft Visual Studio, ensure the following tools are installed on your system:

  1. Microsoft Visual Studio (with CMake and Clang).
  2. Java (required for code generation tools).
  3. Git for repository management.

Note

Make sure MSBuild is installed and included in your system's PATH.


2. Quick Build with MSBuild

Step 1: Installing Dependencies

This setup prepares your environment to build AREG SDK projects on Windows.

Step 2: Cloning the AREG SDK Repository

Clone the AREG SDK repository to obtain the latest source code:

git clone https://github.com/aregtech/areg-sdk.git
cd areg-sdk

Step 3: Building the Project

Open areg-sdk.sln in Microsoft Visual Studio to build with default settings, or use Terminal or PowerShell in the <areg-sdk> directory:

MSBuild ./areg-sdk.sln

This command initiates the default configuration for AREG SDK projects.


3. Customizing Your Build with MSBuild

MSBuild allows you to configure and optimize the build for different development needs. Below are key configurable properties:

Option Possible Values Default Description
Configuration Debug, Release Debug Sets the build configuration (Debug or Release).
Platform Win32, x64 Win32 Sets the target architecture: Win32 (32-bit) or x64 (64-bit).
AregExtended 0, 1 1 Enables extended features in the aregextend library.
AregLogs 0, 1 1 Enables logging in the SDK for debugging.

Important

Settings can also be modified in the msvc_setup.props file in the AREG SDK, containing essential compilation and output configurations. Refer to msvc_setup.props for further details.

Note

The AREG SDK uses the Google Test Adapter NuGet package to compile AREG Framework unit tests. Package directories are specified in the nuget.config file.

Examples of MSBuild Commands

Here are examples of MSBuild commands for different configurations:

Example 1: 64-bit Debug build with extended features and no logging:

MSBuild /m /property:Configuration=Debug /property:Platform=x64 /property:AregExtended=1 /property:AregLogs=0 ./areg-sdk.sln

Example 2: 32-bit Release build with standard features and logging enabled:

MSBuild /m /property:Configuration=Release /property:Platform=Win32 /property:AregExtended=0 /property:AregLogs=1 ./areg-sdk.sln

For additional examples, see the MSBuild Workflow in the AREG SDK repository.

Additional Resources