-
Notifications
You must be signed in to change notification settings - Fork 9
Building The CLI
This document provides instructions on creating the MSI.
See setting up your build environment for more prerequisites.
-
autorest -- Install the beta version with npm i -g @autorest/autorest
-
Turn on '.NET Framework 3.5' Windows feature
-
Install 'WIX Toolset build tools' if not already installed. (e.g. WiX v3.10.3) http://wixtoolset.org/releases/. This is optional as the build scripts download the toolset.
-
Install 'Microsoft Build Tools 2015'. https://www.microsoft.com/download/details.aspx?id=48159
-
chocolatey install curl
&chocolatey install unzip
-
Clone the repository.
Note: The above can be done on a Windows 10 VM.
-
Create your virtual environment with
virtualenv venv
and cd to./venv/scripts
and run./activate.bat
. -
cd into
src/msgraph-cli-core
,src/msgraph-cli
andsrc/msgraph-core
and runpython setup.py sdist bdist_wheel
-
Generate and build the CLI extensions for Microsoft Graph. First run
python generate_extensions.py
from the repo root. This will generate the CLI extension using autorest-beta. Now we need to build the extensions. Runpython build_extensions.py
. This will results in a distributable wheel file. -
Set the
CLI_VERSION
environment variable. For example,$env:CLI_VERSION = '0.1.0'
if using PowerShell andset CLI_VERSION=0.1.0
if using CMD. -
Run
build_scripts\windows\scripts\build.cmd
. -
The unsigned MSI will be in the
.\out
folder.