Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed local plantuml.jar file #1467

Open
wants to merge 5 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 40 additions & 25 deletions .mystools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,23 @@ configuring your development environment.
Note: The apt versions are too old on Trusty so follow the [Linux - Build and Install from Source](#buildFromSource) instructions

##### Windows - WSL
Tested with Ubuntu 18-04 LTS and 19.04
Tested with Ubuntu 18.04 LTS and 19.04
```
apt-get install astyle
git clone https://github.com/danmar/cppcheck.git
cd cppcheck/
git checkout 2.1 # or later version if available
mkdir build && cd build && cmake .. && cmake --build .
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
$ apt-get install astyle
$ git clone https://github.com/danmar/cppcheck.git
$ cd cppcheck/
$ git checkout 2.1 # or later version if available
$ mkdir build && cd build && cmake .. && cmake --build .
$ sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
```

##### Windows - GitHub Git Shell

###### *IMPORTANT: Be sure to launch PowerShell As Administrator*

```
### Install AStyle

```
# Download
iwr 'https://netix.dl.sourceforge.net/project/astyle/astyle/astyle%203.1/AStyle_3.1_windows.zip' -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox -OutFile astyle.3.1.zip

Expand All @@ -136,44 +136,59 @@ mv .\astyle.3.1.zip\AStyle 'C:\Program Files\AStyle'
# Add AStyle to your path
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\AStyle\bin")
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\AStyle\bin", [EnvironmentVariableTarget]::Machine)
```

### Install Cppcheck x64

```
# 64-bit
iwr 'https://github.com/danmar/cppcheck/releases/download/2.1/cppcheck-2.1-x64-Setup.msi' -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox -OutFile cppcheck-2.1-x64-Setup.msi

# Launch installer to install Cppcheck
& .\cppcheck-2.1-x64-Setup.msi

### Add Cppcheck to your path
# Add Cppcheck to your path
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Cppcheck", [EnvironmentVariableTarget]::Machine)
```

### At this point you need to reboot for the path changes to take effect
```

##### Windows - Cygwin
```
Run Either Cygwin Setup-x86-64.exe or Setup-x86.exe depending upon your OS. Select and install astyle and cppcheck
```

Run either `Cygwin Setup-x86-64.exe` or `Setup-x86.exe` depending upon your OS. Select and install `astyle` and `cppcheck`.

##### <a name="buildFromSource"></a>Linux - Build and Install from Source

```
### Install AStyle

# Download
curl -L 'https://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz/download' | tar xvz
```
$ # Download
$ curl -L 'https://sourceforge.net/projects/astyle/files/astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz/download' | tar xvz

# Compile and install
cd astyle/build/gcc && sudo make shared release shared static install
$ # Compile and install
$ cd astyle/build/gcc && sudo make shared release shared static install
```

### Install Cppcheck
```
git clone https://github.com/danmar/cppcheck.git
cd cppcheck/
git checkout 2.1 # or later version if available)
mkdir build && cd build && cmake .. && cmake --build .
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
$ git clone https://github.com/danmar/cppcheck.git
$ cd cppcheck/
$ git checkout 2.1 # or later version if available)
$ mkdir build && cd build && cmake .. && cmake --build .
$ sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
```

### Documentation

To generate the user documentation an optional set of tools is necessary.

* doxygen
* plantuml
* java (for plantuml)

Call the doxygen helper from the project-root folder to create the documentation.
```
$ ./Documentation/doxygen.sh
```

### Implementation Details
Expand Down Expand Up @@ -210,12 +225,12 @@ intra-repo tool settings/configuration conflicts.
During the bootstrap process, certain keys and aliases are defined
that the runtime leverages.

#####git config keys
##### git config keys

* mysensors.toolsdir = .mystools (defined as a repo-relative path - location agnostic)
* mysensors.bootstrap-cksum = \<git sha of bootstrap-dev.sh used to detect an outdated environment>

#####git aliases
##### git aliases

* mystoolspath = *returns the absolute path to the tools dir*
* \<bundle name> = *(e.g. cppcheck) runs the tool bundle*
Expand Down
18 changes: 17 additions & 1 deletion Documentation/doxygen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
## Invoke from project root, e.g Documentation/doxygen.sh
result=0

. .mystools/.bundle_runtime.sh

is_installed "doxygen" || err "doxygen not found!"
is_installed "java" || err "java not found!"

# Find plantuml.jar. Using "which plantuml" is possible but we need the .jar file anyway.
JAR_LIST=(/usr/share/java/plantuml.jar /usr/share/plantuml/plantuml.jar /usr/share/java/plantuml/plantuml.jar /usr/local/Cellar/plantuml/1.2021.1/libexec/plantuml.jar)
for jar in "${JAR_LIST[@]}" ; do
if [ -f $jar ] ; then
export PLANTUML_JAR_PATH=$jar
break
fi
done

[ "$PLANTUML_JAR_PATH" != "" ] || err "plantuml not found!"


# Generate doxygen file for Raspberry Pi configure command
echo -e "/**\n * @defgroup RaspberryPiGateway Raspberry Pi Gateway\n * @ingroup MyConfigGrp\n * @brief Configuration options for the Raspberry Pi Gateway\n@{\n@verbatim" > configure.h
./configure --help >> configure.h
Expand All @@ -11,7 +28,6 @@ echo -e "@endverbatim\n@}*/\n" >> configure.h
export PROJECTNUMBER=$(git fetch --tags; git describe --tags;)

# Generate any UML diagrams in the code tree that has the proper tags
export PLANTUML_JAR_PATH=Documentation/plantuml.jar
java -Djava.awt.headless=true -jar $PLANTUML_JAR_PATH -failfast2 -nbthread auto -o "$PWD/Documentation/img" "./**.(c|cpp|dox|h|hpp|ino)"

# Launch Doxygen (assumed to be in the PATH)
Expand Down
Binary file removed Documentation/plantuml.jar
Binary file not shown.