Skip to content

Commit

Permalink
Simplify setup (microsoft#993)
Browse files Browse the repository at this point in the history
* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Simplify setup

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
  • Loading branch information
Alan-Jowett and Alan Jowett authored Apr 22, 2022
1 parent a40b87d commit deb8a75
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
13 changes: 11 additions & 2 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## Prerequisites

The following must be installed in order to build this project:

1. Git (e.g., [Git for Windows 64-bit](https://git-scm.com/download/win))
2. [Visual Studio 2019 version 16.11.7 or later](https://www.techspot.com/downloads/downloadnow/7241/?evp=70f51271955e6392571f575e301cd9a3&file=9642), including
the "Desktop development with C++" workload, and
Expand All @@ -13,9 +12,19 @@ The following must be installed in order to build this project:
4. [WDK for Windows 10, version 2004](https://go.microsoft.com/fwlink/?linkid=2128854)
5. [Clang for Windows 64-bit version 10.0.0](https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe) or [The latest release of Clang for Windows 64-bit](https://github.com/llvm/llvm-project/releases/latest)
6. [nuget.exe](https://www.nuget.org/downloads)

You should add the paths to `git.exe`, `cmake.exe` and `nuget.exe` to the Windows PATH environment variable after the software packages above have been installed.

Alternative install steps:
1. Launch an elevated PowerShell session.
2. Run:
```
Set-ExecutionPolicy Bypass -Scope Process -Force
Invoke-WebRequest 'https://raw.githubusercontent.com/microsoft/ebpf-for-windows/main/scripts/Setup-DevEnv.ps1' -OutFile $env:TEMP\Setup-DeveEnv.ps1
if ((get-filehash $env:TEMP\Setup-DeveEnv.ps1).Hash -eq 'C0632C7015BE9BF78AD36A8F9039B16CBF78068BAC8D23EA3C02422DBA90D0B9') { &"$env:TEMP\Setup-DeveEnv.ps1" }
```
3. Launch Visual Studio Installer and select "MSVC v142 - VS 2019 C++ x64/x86 Spectre-mitigated libs (latest)"

## How to clone and build the project
This section outlines the steps to build, prepare and build the eBPF-For-Windows project.

Expand Down
2 changes: 1 addition & 1 deletion external/bpftool
Submodule bpftool updated 2 files
+0 −3 src/map.c
+1 −9 src/prog.c
16 changes: 16 additions & 0 deletions scripts/Setup-DevEnv.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) Microsoft Corporation
# SPDX-License-Identifier: MIT

Invoke-WebRequest 'https://community.chocolatey.org/install.ps1' -OutFile $env:TEMP\install_choco.ps1
if ((get-filehash $env:TEMP\install_choco.ps1).Hash -ne '6B2C4EF29B871090B758E403AEE3EFAF9018B21F90FFA03CD4E0C27506331F01') { throw "Wrong file hash for Chocolatey installer"}
&"$env:TEMP\install_choco.ps1"
choco install git --version 2.36.0 -y
choco install visualstudio2019community --version 16.11.12.0 -y
choco install visualstudio2019-workload-nativedesktop --version 1.0.1 -y
choco install visualstudio2019buildtools --version 16.11.12.0 -y
choco install windowsdriverkit10 --version 10.0.19041.685 -y
choco install windowsdriverkit11 --version 10.0.22000.1 -y
choco install llvm --version 10.0.0 -y
choco install nuget.commandline --version 6.1.0 -y
choco install cmake.portable --version 3.23.1 -y
Start-Process "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Community\Common7\IDE\VSIXInstaller.exe" -ArgumentList @("/q", "/a", "${Env:ProgramFiles(x86)}\Windows Kits\10\vsix\vs2019\WDK.vsix") -Wait

0 comments on commit deb8a75

Please sign in to comment.