Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RealNickk committed Oct 17, 2022
1 parent 4db6f58 commit 3e3d550
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 7 deletions.
36 changes: 30 additions & 6 deletions docs/Building.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
# Building Starlight
# Building

Say you downloaded the source, or modified Starlight. How do you build it? This guide will show you how to build Starlight.

## Prerequisites
## Building With Visual Studio

### Prerequisites

You will need a couple of things to build Starlight:
- [Visual Studio](https://visualstudio.microsoft.com/downloads/)
- [Git](https://git-scm.com/downloads) (optional)
- .NET Framework 4.8 build tools (check the box for it in Visual Studio Installer)

## Building
### Building

To build Starlight, you will need to clone the repository. You can do this by either downloading the source code as a ZIP file, or by cloning the repository with Git. If you're using Git, you can clone the repository with the following command:

```batch
git clone https://github.com/Substrant/Starlight.git
```bash
git clone https://github.com/Substrant/Starlight.git --recursive
```

You have to recursively clone the repository, because Starlight uses submodules. If you don't, you will get an error when you try to build the solution. If you're using the ZIP file, you will have to download the submodules manually.

Once you have the source code, you can open the solution in Visual Studio. You can do this by double clicking `Starlight.sln`, or selecting the file in Visual Studio. Once you have the solution open, set your build targets to your preference, and build the solution by right clicking the solution in the Solution Explorer, and clicking Build. It's recommended that you build in `Release` mode. The binaries will be compiled into the `bin` folder.

## Building With The Command Line (Windows)

### Prerequisites

You will need a couple of things to build Starlight:
- [Git](https://git-scm.com/downloads)
- [MSBuild](https://visualstudio.microsoft.com/downloads/) (may come with Visual Studio but needs to be in your PATH)
- [NuGet](https://www.nuget.org/downloads) (or `dotnet` CLI)
- [.NET Framework 4.8 developer pack](https://dotnet.microsoft.com/download/dotnet-framework/net48)

### Building

Follow the instructions states in the previous section to clone the repository. Once you have the source code, you can build the solution by running the following command:

```bash
msbuild Starlight.sln /p:Configuration=Release
```

Once you have the source code, you can open the solution in Visual Studio. You can do this by double clicking `src/Starlight.sln`, or opening it in Visual Studio. Once you have the solution open, set your build targets to your preference, and build the solution by right clicking the solution in the Solution Explorer, and clicking Build. The binaries will be compiled into `src/Starlight/bin/`.
This will build the solution in `Release` mode. The binaries will be compiled into the `bin` folder.
2 changes: 1 addition & 1 deletion docs/GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Getting Started With Starlight
# Getting Started

You're interested in using Starlight, but you don't know where to start? This guide will help you get started with Starlight.

Expand Down
1 change: 1 addition & 0 deletions docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Welcome to the Starlight documentation! This documentation is a work in progress
* [Introduction](Introduction.md)
* [Getting Started](GettingStarted.md)
* [Building](Building.md)
* [Testing](Testing.md)
* [Commands](Commands.md)
* [API](API.md)
* [License](../LICENSE)
25 changes: 25 additions & 0 deletions docs/Testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Testing

## Environment Variables

The following environment variables are used by the test program:
- `IS_CI` - This is set to `1` when running on a CI server. This is used to disable some tests that are not compatible when running CI.
- `AUTH_TOKEN` - If this is set, the launcher will be tested with the specified authentication token. This is used to test the launcher. If not provided, the test will skip.

## Testing With Visual Studio

To test Starlight, you will need to build the solution, and then run the tests. You can do this by right clicking the solution in the Solution Explorer, and clicking Run Tests. The tests will be compiled into `src/Starlight.Tests/bin/`.

## Testing With The Command Line (Windows)

Starlight uses NUnit for testing. You can run the tests by running the following command:

```bash
nunit3-console src/Starlight.Tests/bin/Release/Starlight.Tests.dll
```

This will run the tests in `Release` mode. You can also run the tests in `Debug` mode by replacing `Release` with `Debug`. Make sure that you have built the solution before running the tests.

## Disclaimer

If you are planning to contribute to Starlight, you will need to ensure that all of the tests pass before merging your pull request, especially when refactoring code. If you are adding a new feature, you will need to add tests for it. If you are fixing a bug, you will need to add a test with a scenario that fails without your fix, and passes with your fix. Since CI doesn't support all of the tests, you will need to run the tests locally before submitting a pull request.

0 comments on commit 3e3d550

Please sign in to comment.