|
| 1 | +# Plogon |
| 2 | + |
| 3 | +A build tool for Dalamud plugins. It handles build and continuous integration tasks and is used for the [Dalamud plugin manifest](https://github.com/goatcorp/DalamudPluginsD17/) repository. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +Plogon can be run on both Windows and Linux systems, and needs .NET 6.0 and Docker installed to function. |
| 8 | + |
| 9 | +**Note:** If the Docker connection fails, make sure you're not using Podman as the C# Docker API doesn't seem to work with it yet. |
| 10 | + |
| 11 | +**Note:** If building fails with `/bin/bash: /static/entrypoint.sh: Permission denied` try disabling SELinux temporarily with `setenforce 0`. |
| 12 | + |
| 13 | +Plogon also requires a specific folder structure to work. Here's a preview of the folder structure we will create: |
| 14 | + |
| 15 | +``` |
| 16 | +Plogon / |
| 17 | + ... |
| 18 | +manifests / |
| 19 | + PluginA / |
| 20 | + manifest.toml |
| 21 | + PluginB / |
| 22 | + manifest.toml |
| 23 | +output / |
| 24 | +work / |
| 25 | +artifacts / |
| 26 | +``` |
| 27 | + |
| 28 | +First, of course you need to clone Plogon itself: |
| 29 | + |
| 30 | +``` |
| 31 | +git clone https://github.com/goatcorp/Plogon.git |
| 32 | +``` |
| 33 | + |
| 34 | +Then we need a `manifests` folder which will house the plugin manifests. For each plugin, create a `manifest.toml` that describes the git repository to use among other information. |
| 35 | + |
| 36 | +``` |
| 37 | +[plugin] |
| 38 | +repository = "<git repository>" |
| 39 | +commit = "<git hash>" |
| 40 | +owners = [ "<your name>" ] |
| 41 | +changelog = ''' |
| 42 | +Your changelog in here. |
| 43 | +''' |
| 44 | +``` |
| 45 | + |
| 46 | +You also need to place the plugin's icon into a subfolder named `icon.png`. |
| 47 | + |
| 48 | +You can see plenty of examples in the [Dalamud plugin manifest](https://github.com/goatcorp/DalamudPluginsD17/) repository. Next you need to create some empty folders: |
| 49 | + |
| 50 | +``` |
| 51 | +mkdir output |
| 52 | +mkdir work |
| 53 | +mkdir artifacts |
| 54 | +``` |
| 55 | + |
| 56 | +The `output` directory will be the Dalamud repository that's outputted (you can subsitute this for a pre-existing repository once you run Plogon once.) The `work` and `artifacts` are for temporary files and the compiled plugins respectively. |
| 57 | + |
| 58 | +Now it's time to run Plogon and start compiling our plugins: |
| 59 | + |
| 60 | +``` |
| 61 | +cd Plogon/Plogon |
| 62 | +dotnet run -- \ |
| 63 | + --manifest-folder="../../manifests" \ |
| 64 | + --output-folder="../../output" \ |
| 65 | + --work-folder="../../work" \ |
| 66 | + --static-folder="static" \ |
| 67 | + --artifact-folder="../../artifacts" \ |
| 68 | + --build-overrides-file="../../manifests/overrides.toml" \ |
| 69 | + --mode=Development --build-all |
| 70 | +``` |
| 71 | +(The build overrides file doesn't have to exist for now.) |
| 72 | + |
| 73 | +It may seem like a lot of options but most of the arguments are used to specify the paths to the many locations Plogon needs. Once it's complete, plugin are available under `artifacts` and the repsoitory should be under `output`. |
0 commit comments