-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from PisterLab/feature/readme-guide
Add setup and build guide to the readme
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,70 @@ | ||
# Plugins for micromissiles-unity | ||
|
||
This repository contains plugins for the micromissiles simulator found here: https://github.com/PisterLab/micromissiles-unity. | ||
|
||
## Prerequisites | ||
|
||
- A C++ compiler (GCC, Clang, or MSVC) | ||
- Git | ||
- Python (for Bazel) | ||
- Bazel 8.0.0 (or Bazelisk) | ||
|
||
## Installing Bazel | ||
|
||
This project requires Bazel version 8.0.0. | ||
|
||
For detailed installation instructions for your platform (Windows, macOS, Linux), please refer to the official Bazel documentation: https://bazel.build/install. | ||
|
||
A few important notes: | ||
|
||
- Bazelisk is recommended as it automatically manages Bazel versions based on the `.bazelversion` file. | ||
- On Windows, you will need additional components like MSYS2 and Visual Studio Build Tools. | ||
- You can verify your installation with `bazel version`. | ||
|
||
## Building the Project | ||
|
||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/PisterLab/micromissiles-unity-plugins.git | ||
cd micromissiles-unity-plugins | ||
``` | ||
|
||
2. Build all plugins: | ||
```bash | ||
bazel build //... | ||
``` | ||
|
||
3. Build specific plugins: | ||
```bash | ||
# Build the assignment plugin. | ||
bazel build //:assignment | ||
|
||
# Build the example plugin. | ||
bazel build //:example | ||
|
||
# Build and package all plugins into a tarball. | ||
bazel build //:plugins | ||
``` | ||
|
||
4. Run tests: | ||
``` | ||
bazel test //... | ||
``` | ||
|
||
## Project Structure | ||
|
||
- `/assignment`: Contains the assignment plugin implementation. | ||
- `/example`: Contains an example plugin implementation. | ||
- `/base`: Common base utilities. | ||
|
||
## Output Files | ||
|
||
After building, the compiled shared libraries can be found in the `bazel-bin` directory. The packaged plugins tarball will be at `bazel-bin/plugins.tar.gz`. | ||
|
||
## Integrating with Unity | ||
|
||
To use these plugins with the micromissiles Unity project: | ||
|
||
1. Build the plugins using the instructions above. | ||
2. Extract the contents of `bazel-bin/plugins.tar.gz`. | ||
3. Copy the shared libraries (`.dll`, `.dylib`, or `.so` files) to the appropriate plugins directory in the Unity project. |