<commit_before># DroneLink

## Description

Messaging library for PX4 using mavlink.

## License

BSD 3-clause, see [LICENSE.md](LICENSE.md).

## Authors

See [AUTHORS.md](AUTHORS.md).

## Usage

### gtest

Ubuntu:
[Ubuntu instructions](https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/)

Mac:

```
cd wherever
git clone <EMAIL>:google/googletest.git
git checkout release-1.8.0
cd googletest/
mkdir build
cd build
cmake ..
make -j4
cd ..
sudo cp -r googletest/include/gtest /usr/local/include
sudo cp build/googlemock/gtest/libgtest.a /usr/local/lib
sudo cp build/googlemock/gtest/libgtest_main.a /usr/local/lib
```

### Building

Make sure the submodules are updated first.
```
git submodule update --init --recursive
```

#### Desktop

Build for the desktop to test and debug:

```
make default
```

#### Android

To build for Android devices or simulators, you first need to install the Android ndk and point the environment variable `ANDROID_TOOLCHAIN_CMAKE` to `build/cmake/android.toolchain.cmake`, e.g. adding the line below to the .bashrc:

```
export ANDROID_TOOLCHAIN_CMAKE=$HOME/Android/android-ndk-r13/build/cmake/android.toolchain.cmake
```


#### iOS

To build for real iOS devices on macOS:

```
make ios install
```

Build for the iOS simulator on macOS:

```
make ios_simulator install
```


### Build with external directory for plugins/integration_tests

The external directory needs to contain the folders `integration_tests` and `plugins`,
and should be organized like the `external_example`.

```
external_example
├── integration_tests
│   ├── CMakeLists.txt
│   └── hello_world.cpp
└── plugins
    └── example
        ├── CMakeLists.txt
        ├── example.cpp
        ├── example.h
        ├── example_impl.cpp
        ├── example_impl.h
        └── example_impl_test.cpp
```

To include the external folder in the build, add the folder name to the make command:

```
make EXTERNAL_DIR=external_example<commit_msg>README.md: add instructions to build on Windows<commit_after># DroneLink

## Description

Messaging library for PX4 using mavlink.

## License

BSD 3-clause, see [LICENSE.md](LICENSE.md).

## Authors

See [AUTHORS.md](AUTHORS.md).

## Usage

### gtest

Ubuntu:
[Ubuntu instructions](https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/)

Mac:

```
cd wherever
git clone <EMAIL>:google/googletest.git
git checkout release-1.8.0
cd googletest/
mkdir build
cd build
cmake ..
make -j4
cd ..
sudo cp -r googletest/include/gtest /usr/local/include
sudo cp build/googlemock/gtest/libgtest.a /usr/local/lib
sudo cp build/googlemock/gtest/libgtest_main.a /usr/local/lib
```

### Building

Make sure the submodules are updated first.
```
git submodule update --init --recursive
```

#### Desktop

Build for the desktop to test and debug:

```
make default
```

#### Android

To build for Android devices or simulators, you first need to install the Android ndk and point the environment variable `ANDROID_TOOLCHAIN_CMAKE` to `build/cmake/android.toolchain.cmake`, e.g. adding the line below to the .bashrc:

```
export ANDROID_TOOLCHAIN_CMAKE=$HOME/Android/android-ndk-r13/build/cmake/android.toolchain.cmake
```


#### iOS

To build for real iOS devices on macOS:

```
make ios install
```

Build for the iOS simulator on macOS:

```
make ios_simulator install
```

#### Windows

To build in Windows, open the VS2015 x64 Native Tools Command Prompt, go to the directory and do:
```
mkdir build && cd build
cmake ..
cmake --build .
```

### Build with external directory for plugins/integration_tests

The external directory needs to contain the folders `integration_tests` and `plugins`,
and should be organized like the `external_example`.

```
external_example
├── integration_tests
│   ├── CMakeLists.txt
│   └── hello_world.cpp
└── plugins
    └── example
        ├── CMakeLists.txt
        ├── example.cpp
        ├── example.h
        ├── example_impl.cpp
        ├── example_impl.h
        └── example_impl_test.cpp
```

To include the external folder in the build, add the folder name to the make command:

```
make EXTERNAL_DIR=external_example
{'fraction_non_alphanumeric': 0.11987381703470032, 'fraction_numerical': 0.005338510070371269, 'mean_word_length': 3.918854415274463, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '583963', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1338, 'n_words': 433}