Skip to content

Commit b9798e4

Browse files
authored
Update mystools/README.md for WSL (#1361)
Thanks to @ltigges and @mkaiser for noticing that the documentation needed an update and providing input. This fixes #1359
1 parent 06ea6da commit b9798e4

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

.mystools/README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ conventions are employed to facilitate consistent re-use/invocation
77
across modalities (e.g. local development, continuous integration,
88
editor linters, etc.)
99

10-
1. All common tools are hosted and managed in
10+
1. All common tools are hosted and managed in
1111
the tools directory (used for both local development
1212
and continuous integration)
1313
2. Each tool comprises a directory, akin to a bundle,
1414
that encapsulates declarative command-line options,
1515
configuration files and a run script
1616
3. A single bootstrap script configures a
1717
development environment
18-
4. A lightweight runtime provides a common set of
18+
4. A lightweight runtime provides a common set of
1919
convenience functions and variables to all scripts
2020
5. Support for all MySensors development environments
2121

@@ -92,7 +92,7 @@ One or more required tools not found. Install required tools and re-run .mystoo
9292

9393
To finish the bootstrap process, you will need to install the required
9494
tools for your specific operating system as follows. Currently we use
95-
Astyle 2.0.5 or later and Cppcheck 1.76 or later. Once you have
95+
Astyle 3.1 or later and Cppcheck 1.88 or later. Once you have
9696
installed AStyle and Cppcheck, re-run bootstrap-dev.sh to finish
9797
configuring your development environment.
9898

@@ -106,7 +106,18 @@ configuring your development environment.
106106

107107
#### Linux Trusty or earlier
108108

109-
##### Note: The apt versions are too old on Trusty so follow the [Linux - Build and Install from Source](#buildFromSource) instructions
109+
Note: The apt versions are too old on Trusty so follow the [Linux - Build and Install from Source](#buildFromSource) instructions
110+
111+
##### Windows - WSL
112+
Tested with Ubuntu 18-04 LTS and 19.04
113+
```
114+
apt-get install astyle
115+
git clone https://github.com/danmar/cppcheck.git
116+
cd cppcheck/
117+
git checkout 1.89 # or later version if available
118+
mkdir build && cd build && cmake .. && cmake --build .
119+
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
120+
```
110121

111122
##### Windows - GitHub Git Shell
112123

@@ -142,13 +153,9 @@ iwr 'http://github.com/danmar/cppcheck/releases/download/1.76.1/cppcheck-1.76.1-
142153
### At this point you need to reboot for the path changes to take effect
143154
```
144155

145-
##### Windows - bash
146-
147-
###### NOTE: At the time of this writing, the apt vresions of cppcheck and astyle are too old. Follow the [Linux - Build and Install from Source](#buildFromSource) instructions
148-
149156
##### Windows - Cygwin
150157
```
151-
Run Either Cygwin Setup-x86-64.exe or Setup-x86.exe depending upon your OS. Select and install astyle and cppcheck
158+
Run Either Cygwin Setup-x86-64.exe or Setup-x86.exe depending upon your OS. Select and install astyle and cppcheck
152159
```
153160

154161
##### <a name="buildFromSource"></a>Linux - Build and Install from Source
@@ -163,15 +170,12 @@ curl -L 'https://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/as
163170
cd astyle/build/gcc && sudo make shared release shared static install
164171
165172
### Install Cppcheck
166-
167-
# Download
168-
curl -L 'https://sourceforge.net/projects/cppcheck/files/cppcheck/1.76.1/cppcheck-1.76.1.tar.gz/download' | tar xvz
169-
170-
# Compile and install
171-
cd cppcheck-1.76.1
172-
sudo apt-get install libpcre++-dev
173-
sudo make SRCDIR=build CFGDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
174-
173+
```
174+
git clone https://github.com/danmar/cppcheck.git
175+
cd cppcheck/
176+
git checkout 1.89 # or later version if available)
177+
mkdir build && cd build && cmake .. && cmake --build .
178+
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
175179
```
176180
177181
### Implementation Details

0 commit comments

Comments
 (0)