Quantcast

docs: ✏️ Add build instructions

eiymba [11-05-22 - 04:33]
docs: ✏️ Add build instructions
Filename
Docs/BUILDING.md
README.md
diff --git a/Docs/BUILDING.md b/Docs/BUILDING.md
new file mode 100644
index 0000000..6a226a9
--- /dev/null
+++ b/Docs/BUILDING.md
@@ -0,0 +1,194 @@
+# Building Arcadia
+
+## Prerequisites
+
+- A text editor like [Visual Studio Code](https://code.visualstudio.com/).
+- [Git](https://git-scm.com/).
+
+## Building
+
+### Clone the repository
+
+#### HTTPS (Simple)
+
+```bash
+git clone --recursive-submodules https://github.com/eiymba/arcadia.git; cd arcadia
+```
+
+#### SSH (Advanced)
+
+```bash
+git clone --recursive-submodules git@github.com:eiymba/arcadia.git; cd arcadia
+```
+
+
+### Build the project
+
+Arcadia comes with a build script that will build the project and package it into a `.zip` file. The script can also extract the `.zip` file into your WoW Addons directory, by passing the `-x` flag.
+
+Arcadia has several build flags that can be passed to the build script. These flags can be found in the [build script](./build.ps1) itself too.
+
+> ℹ️ **Note:** Shorthand flags work on both Windows and Unix systems! 🥳
+
+| Flag | Windows | Unix | Description |
+| --- | ---: | ---: | --- |
+| `-h` | `-Help` | `--help` | Specify the project directory. |
+| `-c` | `-Clean` | `--clean` | Clean the build directory. |
+| `-r` | `-Release` | `--release` | Clean the build directory. |
+| `-x` | `-CopyToWow` | `--copy-to-wow` | Extract the `.zip` file into your WoW Addons directory. |
+| `-v` | `-Version` | `--version` | Specify the build directory. |
+| `-d` | `-BuildDir` | `--build-dir` | Specify the build directory. |
+| `-o` | `-OutputDir` | `--output-dir` | Specify the build directory. |
+| `-w` | `-WowDir` | `--wow-dir` | Specify the build to the specified location. |
+| `-f` | `-File` | `--file` | The `toc` file to use |
+| `-i` | `-InterfaceVersion` | `--interface-version` | The interface version to use. Change this when updating or building for classic. |
+
+#### Example
+
+>ℹ️ **Note:** By default, the script will build a retail compatible `.zip` archive of the addon inside the `./build` directory _without_ performing a `clean`, and _without_ extracting the `.zip` file into your WoW Addons directory.
+
+Here's an example of building for wrath classic:
+
+Windows:
+
+```powershell
+./build.ps1 -c -r -x -v 1.0.0 -d ./build -o ./dist -w "C:\Program Files (x86)\World of Warcraft\_classic_era_" -f ./arcadia.toc -i 30400
+```
+
+Unix:
+
+```bash
+./build.sh --clean --release --copy-to-wow --version 1.0.0 --build-dir ./build --output-dir ./dist --wow-dir "/Applications/World of Warcraft/_classic_era_" --file ./arcadia.toc --interface-version 30400
+```
+
+Typically, you will want to build the project for retail with defaults, and then extract the `.zip` file into your WoW Addons directory. This can be done by passing the `-x` flag to the build script.
+
+Windows:
+
+```powershell
+./build.ps1 -x -c
+```
+
+Unix:
+```bash
+./build.sh -x -c
+```
+
+## Developing In Visual Studio Code
+
+Be sure to have the `LUA` and `WoW API` extensions installed. You can install it by searching for `@ext:sumneko.lua` and `@ext:ketho.wow-api` in the extensions tab. They provide convient linting and autocompletion for the project.
+
+### Build Tasks
+
+Instead of running the build script manually, you can use the build tasks to configure the build script to run automatically when you press `Ctrl+Shift+B` or `Cmd+Shift+B`.
+
+```json
+{
+    "version": "2.0.0",
+    "tasks": [
+        {
+            "label": "Build (Windows, Retail)",
+            "type": "shell",
+            "command": "./build.ps1",
+            "args": [
+                "-x",
+                "-c"
+            ],
+            "problemMatcher": {
+                "owner": "Powershell",
+                "fileLocation": [
+                    "relative",
+                    "${workspaceFolder}"
+                ],
+                "pattern": [
+                    {
+                        "regexp": "^\\s*(.+):(\\d+):\\s*(.+)$",
+                        "file": 1,
+                        "line": 2,
+                        "message": 3
+                    }
+                ]
+            }
+        },{
+            "label": "Build (Unix, Retail)",
+            "type": "shell",
+            "command": "./build.sh",
+            "args": [
+                "-x",
+                "-c"
+            ],
+            "problemMatcher": {
+                "owner": "Bash",
+                "fileLocation": [
+                    "relative",
+                    "${workspaceFolder}"
+                ],
+                "pattern": [
+                    {
+                        "regexp": "^\\s*(.+):(\\d+):\\s*(.+)$",
+                        "file": 1,
+                        "line": 2,
+                        "message": 3
+                    }
+                ]
+            }
+
+        },{
+            "label": "Build (Windows, Classic Era)",
+            "type": "shell",
+            "command": "./build.ps1",
+            "args": [
+                "-x",
+                "-c",
+                "-i",
+                "30400"
+            ],
+            "problemMatcher": {
+                "owner": "Powershell",
+                "fileLocation": [
+                    "relative",
+                    "${workspaceFolder}"
+                ],
+                "pattern": [
+                    {
+                        "regexp": "^\\s*(.+):(\\d+):\\s*(.+)$",
+                        "file": 1,
+                        "line": 2,
+                        "message": 3
+                    }
+                ]
+            }
+        },{
+            "label": "Build (Unix, Classic Era)",
+            "type": "shell",
+            "command": "./build.sh",
+            "args": [
+                "-x",
+                "-c",
+                "-i",
+                "30400"
+            ],
+            "problemMatcher": {
+                "owner": "Bash",
+                "fileLocation": [
+                    "relative",
+                    "${workspaceFolder}"
+                ],
+                "pattern": [
+                    {
+                        "regexp": "^\\s*(.+):(\\d+):\\s*(.+)$",
+                        "file": 1,
+                        "line": 2,
+                        "message": 3
+                    }
+                ]
+            }
+        }
+
+    ]
+}
+```
+
+### Contributing
+
+See [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.
\ No newline at end of file
diff --git a/README.md b/README.md
index 0f3fe64..78b30be 100644
--- a/README.md
+++ b/README.md
@@ -20,63 +20,17 @@
 | WoWAce          | [Download](https://www.wowace.com/projects/archud3-classic) |
 | GitHub Releases | [Download](https://github.com/eiymba/arc-hud/releases/latest) |

-## What is Arc-HUD?
+## What is Arcadia?

-`Arc-HUD` displays smooth arcs around your character in the middle of the screen to inform you about the `health` and `power` (`mana`, `rage`, ...) of you, your pet, and your target. In addition, it shows casts, combo points, holy power, soul shards, and a couple of other things. It discretely fades when you are out of combat and at full health/power.
+`Arcadia` displays smooth arcs around your character in the middle of the screen to inform you about the `health` and `power` (`mana`, `rage`, ...) of you, your pet, and your target. In addition, it shows casts, combo points, holy power, soul shards, and a couple of other things. It discretely fades when you are out of combat and at full health/power.

-## Contributing
-### Prerequisites
-
-- [ ] You have a [GitHub account](https://github.com).
-- [ ] You have a [GPG key set up to sign your commits]().
-
-Please also read the [Contributing](./docs/CONTRIBUTING.md) document and the [Code of Conduct](./docs/CODE_OF_CONDUCT.md).
-
-### Getting Started
-
->⚠️ **Note:** If you currently have **Arc-HUD** installed, it is generally recommended that you disabled it before installing the development version. Otherwise, you'll have both versions displayed in your UI at the same time.
-
-1. Fork the repository
-2. Clone your fork to your local machine, for example:
-    - With SSH (recommended):
-        ```sh
-            git clone --recursive-submodules git@github.com:YOUR_USERNAME/arc-hud.git
-        ```
-    - With HTTPS:
-        ```sh
-            git clone --recursive-submodules https://github.com/YOUR_USERNAME/arc-hud.git
-        ```
-3. Change directory to the cloned repository, for example:
-
-    ```sh
-        cd ./arc-hud
-    ```
-4. Open the directory with your favorite editor, for example (assuming VS Code is being used):
-
-    ```sh
-        code .
-    ```
-
-5. Build the project by running the following command:
-
-    - Windows:
-        ```sh
-            .\build.ps1
-        ```
-
-    - Linux:
-        ```sh
-            ./build.sh
-        ```
-
-This will package the addon in the `./build` directory as a `.zip` file, and extract it in every version of WoW installed on your machine.  For more information, see the [build](./docs/BUILDING.md) document.
-
-If compiled successfully, you should see `Arc-HUD-<version>` in your AddOns list in game. _You may need to select `Load out of date AddOns` in the `Interface Options` menu._
 ## Further Links

 * [Changelog](./CHANGELOG.md)
 * [Issues](https://github.com/eiymba/arc-hud/issues)
 * [Contributing](./docs/Contributing.md)
+* [Building](./docs/Building.md)
+

 ## License