Skip to content

Commit 6ceb1c6

Browse files
WhitWaldomikeeeJoshVanLdapr-bot
authored
Protoc install instructions update for WSL2 on Windows (dapr#8623)
* Updated instructions for installing prereq protoc tools on WSL2 on Windows Signed-off-by: Whit Waldo <[email protected]> * Applied Mike's suggestion to put bin in /usr/local/bin and includes in /usr/local/includes meaning the path doesn't need an update Signed-off-by: Whit Waldo <[email protected]> * Fixed step numbers Signed-off-by: Whit Waldo <[email protected]> * Swapped over to symlinks so go upgrades are resolved without necessitating new copies. Signed-off-by: Whit Waldo <[email protected]> --------- Signed-off-by: Whit Waldo <[email protected]> Co-authored-by: Mike Nguyen <[email protected]> Co-authored-by: Josh van Leeuwen <[email protected]> Co-authored-by: Dapr Bot <[email protected]>
1 parent a0e4d1c commit 6ceb1c6

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

dapr/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,42 @@ make init-proto
2626
make gen-proto
2727
```
2828

29+
### Instructions on Windows (WSL2 with Ubuntu 24.04)
30+
Use the following variation of the steps above
31+
32+
1. Install protoc version: [v25.4](https://github.com/protocolbuffers/protobuf/releases/tag/v25.4) with the following
33+
from your Ubuntu terminal to download the protoc package locally, unzip and copy into /usr/bin/protoc, update your
34+
$PATH and delete the local temp directory.
35+
```bash
36+
sudo apt install unzip
37+
cd ~
38+
mkdir protoc
39+
cd protoc
40+
# Assumes 32- or 64-bit - replace as necessary
41+
wget https://github.com/protocolbuffers/protobuf/releases/download/v25.4/protoc-25.4-linux-x86_64.zip
42+
unzip protoc-25.4-linux-x64_64.zip
43+
rm protoc-25.4-linux-x64_64.zip
44+
sudo mv bin/* /usr/local/bin
45+
sudo mv include/* /usr/local/include
46+
cd ..
47+
sudo rm -r protoc
48+
```
49+
2. Navigate to your Dapr repository. For example, if you've got it in Windows at `P:/Code/Dapr` in your Ubuntu terminal
50+
use `cd /mnt/p/Code/Dapr`.
51+
3. Install proto-gen-go and protoc-gen-go-grpc, then move from their install directory to your previously created directory
52+
in `/usr/bin/protoc`
53+
```bash
54+
make init-proto
55+
cp ~/go/bin
56+
ln -s ~/go/bin/protoc-gen-go /usr/local/bin
57+
ln -s ~/go/bin/proto-gen-go-grpc /usr/local/bin
58+
```
59+
4. Generate the proto clients
60+
```bash
61+
make gen-proto
62+
```
63+
64+
2965
## Update e2e test apps
3066

3167
Whenever there are breaking changes in the proto files, we need to update the e2e test apps to use the correct version of dapr dependencies. This can be done by navigating to the tests folder and running the commands:-

0 commit comments

Comments
 (0)